[Bf-blender-cvs] [cd05b83] temp_widgets_files_refactor: Move widget declarations/defines into right header

Julian Eisel noreply at git.blender.org
Mon Feb 8 18:09:37 CET 2016


Commit: cd05b8336a4f8048b35f59649bd827d9c0890dc3
Author: Julian Eisel
Date:   Mon Feb 8 18:08:17 2016 +0100
Branches: temp_widgets_files_refactor
https://developer.blender.org/rBcd05b8336a4f8048b35f59649bd827d9c0890dc3

Move widget declarations/defines into right header

===================================================================

M	source/blender/windowmanager/WM_api.h
M	source/blender/windowmanager/widgets/WM_widgets_api.h
M	source/blender/windowmanager/widgets/wm_widgets_intern.h

===================================================================

diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 5f4f31f..7d443ea 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -520,37 +520,12 @@ float       WM_event_tablet_data(const struct wmEvent *event, int *pen_flip, flo
 bool        WM_event_is_tablet(const struct wmEvent *event);
 
 
-/* *************** Widget API ********************
- *
- * TODO getting a bit crowded here - maybe move into own .h file?
- */
+/* *************** Widget API ******************** */
 
 void  WM_event_add_area_widgetmap_handlers(struct ARegion *ar);
 void  WM_modal_handler_attach_widgetgroup(struct bContext *C, struct wmEventHandler *handler,
                                           struct wmWidgetGroupType *wgrouptype, struct wmOperator *op);
 
-/**
- * \brief Widget tweak flag.
- * Bitflag passed to widget while tweaking.
- */
-enum {
-	/* drag with extra precision (shift)
-	 * NOTE: Widgets are responsible for handling this (widget->handler callback)! */
-	WM_WIDGET_TWEAK_PRECISE = (1 << 0),
-};
-
-void WM_widget_set_property(struct wmWidget *, int slot, struct PointerRNA *ptr, const char *propname);
-struct PointerRNA *WM_widget_set_operator(struct wmWidget *, const char *opname);
-void WM_widget_set_func_select(
-        struct wmWidget *widget,
-        void (*select)(struct bContext *, struct wmWidget *, const int action));
-void WM_widget_set_origin(struct wmWidget *widget, const float origin[3]);
-void WM_widget_set_offset(struct wmWidget *widget, const float offset[3]);
-void WM_widget_set_flag(struct wmWidget *widget, const int flag, const bool enable);
-void WM_widget_set_scale(struct wmWidget *widget, float scale);
-void WM_widget_set_line_width(struct wmWidget *widget, const float line_width);
-void WM_widget_set_colors(struct wmWidget *widget, const float col[4], const float col_hi[4]);
-
 
 #ifdef WITH_INPUT_IME
 bool        WM_event_is_ime_switch(const struct wmEvent *event);
diff --git a/source/blender/windowmanager/widgets/WM_widgets_api.h b/source/blender/windowmanager/widgets/WM_widgets_api.h
index 2063296..7d9fc0c 100644
--- a/source/blender/windowmanager/widgets/WM_widgets_api.h
+++ b/source/blender/windowmanager/widgets/WM_widgets_api.h
@@ -47,10 +47,23 @@ struct wmWidgetMapType_Params;
 /* -------------------------------------------------------------------- */
 /* wmWidget */
 
-struct wmWidget *WM_widget_new(void (*draw)(const struct bContext *, struct wmWidget *),
-                               void (*render_3d_intersection)(const struct bContext *, struct wmWidget *, int),
-                               int  (*intersect)(struct bContext *, const struct wmEvent *, struct wmWidget *),
-                               int  (*handler)(struct bContext *, const struct wmEvent *, struct wmWidget *, const int));
+struct wmWidget *WM_widget_new(
+        void (*draw)(const struct bContext *, struct wmWidget *),
+        void (*render_3d_intersection)(const struct bContext *, struct wmWidget *, int),
+        int  (*intersect)(struct bContext *, const struct wmEvent *, struct wmWidget *),
+        int  (*handler)(struct bContext *, const struct wmEvent *, struct wmWidget *, const int));
+
+void WM_widget_set_property(struct wmWidget *, int slot, struct PointerRNA *ptr, const char *propname);
+struct PointerRNA *WM_widget_set_operator(struct wmWidget *, const char *opname);
+void WM_widget_set_func_select(
+        struct wmWidget *widget,
+        void (*select)(struct bContext *, struct wmWidget *, const int action));
+void WM_widget_set_origin(struct wmWidget *widget, const float origin[3]);
+void WM_widget_set_offset(struct wmWidget *widget, const float offset[3]);
+void WM_widget_set_flag(struct wmWidget *widget, const int flag, const bool enable);
+void WM_widget_set_scale(struct wmWidget *widget, float scale);
+void WM_widget_set_line_width(struct wmWidget *widget, const float line_width);
+void WM_widget_set_colors(struct wmWidget *widget, const float col[4], const float col_hi[4]);
 
 
 /* -------------------------------------------------------------------- */
diff --git a/source/blender/windowmanager/widgets/wm_widgets_intern.h b/source/blender/windowmanager/widgets/wm_widgets_intern.h
index bd5cb3d..89a68db 100644
--- a/source/blender/windowmanager/widgets/wm_widgets_intern.h
+++ b/source/blender/windowmanager/widgets/wm_widgets_intern.h
@@ -31,6 +31,16 @@
 /* -------------------------------------------------------------------- */
 /* wmWidget */
 
+/**
+ * \brief Widget tweak flag.
+ * Bitflag passed to widget while tweaking.
+ */
+enum {
+	/* drag with extra precision (shift)
+	 * NOTE: Widgets are responsible for handling this (widget->handler callback)! */
+	WM_WIDGET_TWEAK_PRECISE = (1 << 0),
+};
+
 bool wm_widget_register(wmWidgetGroup *wgroup, wmWidget *widget, const char *name);
 void wm_widget_data_free(struct wmWidget *widget);
 void wm_widget_delete(ListBase *widgetlist, struct wmWidget *widget);




More information about the Bf-blender-cvs mailing list