[Bf-blender-cvs] [900e3ea] gooseberry: Merge branch 'master' into gooseberry
Lukas Tönne
noreply at git.blender.org
Mon Dec 8 11:14:38 CET 2014
Commit: 900e3eacd7ff1db2c74b36f5c12f0e72b88c3d7d
Author: Lukas Tönne
Date: Mon Dec 8 11:14:23 2014 +0100
Branches: gooseberry
https://developer.blender.org/rB900e3eacd7ff1db2c74b36f5c12f0e72b88c3d7d
Merge branch 'master' into gooseberry
Conflicts:
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_event_system.c
===================================================================
===================================================================
diff --cc source/blender/windowmanager/WM_api.h
index 3f6d475,d2abfd4..1139acb
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@@ -468,84 -462,10 +468,88 @@@ void WM_event_ndof_to_quat(cons
float WM_event_tablet_data(const struct wmEvent *event, int *pen_flip, float tilt[2]);
bool WM_event_is_tablet(const struct wmEvent *event);
+
+/* widget API */
+struct wmWidgetGroupType *WM_widgetgrouptype_new(void (*create)(struct wmWidgetGroup *wgroup),
+ bool (*poll)(struct wmWidgetGroup *, const struct bContext *),
+ void (*update)(struct wmWidgetGroup *, const struct bContext *),
+ void (*free)(struct wmWidgetGroup *));
+
+struct wmWidget *WM_widget_new(void (*draw)(struct wmWidget *, const struct bContext *),
+ void (*render_3d_intersection)(const struct bContext *, struct wmWidget *, int),
+ int (*intersect)(struct bContext *C, const struct wmEvent *event, struct wmWidget *customdata),
+ int (*handler)(struct bContext *, const struct wmEvent *, struct wmWidget *, struct wmOperator *op),
+ void *customdata, bool free_data);
+
+void WM_widget_property(struct wmWidget *, struct PointerRNA *ptr, const char *propname);
+void WM_widget_operator(struct wmWidget *,
+ int (*initialize_op)(struct bContext *, const struct wmEvent *, struct wmWidget *, struct PointerRNA *),
+ const char *opname,
+ const char *propname);
+void WM_widgets_draw(const struct bContext *C, struct ARegion *ar);
+void WM_event_add_widget_handler(struct ARegion *ar);
+
+bool WM_widget_register(struct wmWidgetGroup *wgroup, struct wmWidget *widget);
+void WM_widget_unregister(struct wmWidgetGroup *wgroup, struct wmWidget *widget);
+
+void *WM_widget_customdata(struct wmWidget *widget);
+void WM_widget_set_origin(struct wmWidget *widget, float origin[3]);
+void WM_widget_set_draw(struct wmWidget *widget, bool draw);
+void WM_widget_set_3d_scale(struct wmWidget *widget, bool scale);
+void WM_widget_set_draw_on_hover_only(struct wmWidget *widget, bool draw);
+void WM_widget_set_scale(struct wmWidget *widget, float scale);
+
+void *WM_widgetgroup_customdata(struct wmWidgetGroup *wgroup);
+void WM_widgetgroup_customdata_set(struct wmWidgetGroup *wgroup, void *data);
+ListBase *WM_widgetgroup_widgets(struct wmWidgetGroup *wgroup);
+
+struct wmWidgetMapType *WM_widgetmaptype_find(const char *idname, int spaceid, int regionid, bool is_3d);
+
+bool WM_widgetgrouptype_register(struct wmWidgetMapType *wmap, struct wmWidgetGroupType *wgroup);
+void WM_widgetgrouptype_unregister(struct wmWidgetMapType *wmap, struct wmWidgetGroupType *wgroup);
+
+/* creates a widgetmap with all registered widgets for that type */
+struct wmWidgetMap *WM_widgetmap_from_type(const char *idname, int spaceid, int regionid, bool is_3d);
+void WM_widgetmap_delete(struct wmWidgetMap *);
+
+void WM_widgetmaptypes_free(void);
+
+/* wm_generic_widgets.c */
+
+enum {
+ UI_ARROW_STYLE_NORMAL = 0,
+ UI_ARROW_STYLE_NO_AXIS = (1 << 1),
+ UI_ARROW_STYLE_CROSS = (1 << 2),
+ /* inverted offset during interaction - if set it also sets constrained below */
+ UI_ARROW_STYLE_INVERTED = (1 << 3),
+ /* clamp arrow interaction to property width */
+ UI_ARROW_STYLE_CONSTRAINED = (1 << 4),
+};
+
+enum {
+ UI_DIAL_STYLE_RING = 0,
+ UI_DIAL_STYLE_RING_CLIPPED = 1,
+};
+
+struct wmWidget *WIDGET_arrow_new(int style, void *customdata);
+void WIDGET_arrow_set_color(struct wmWidget *widget, float color[4]);
+void WIDGET_arrow_set_direction(struct wmWidget *widget, float direction[3]);
+void WIDGET_arrow_set_up_vector(struct wmWidget *widget, float direction[3]);
+void WIDGET_arrow_set_scale(struct wmWidget *widget, float scale);
+
+struct wmWidget *WIDGET_dial_new(int style,
+ void *customdata);
+void WIDGET_dial_set_color(struct wmWidget *widget, float color[4]);
+void WIDGET_dial_set_direction(struct wmWidget *widget, float direction[3]);
+
+struct wmWidget *WIDGET_cage_new(int style, void *customdata);
+void WIDGET_cage_bind_to_rotation(struct wmWidget *widget, float rotation);
+void WIDGET_cage_bounds_set(struct wmWidget *widget, float w, float h);
+
+ #ifdef WITH_INPUT_IME
+ bool WM_event_is_ime_switch(const struct wmEvent *event);
+ #endif
+
#ifdef __cplusplus
}
#endif
diff --cc source/blender/windowmanager/intern/wm_event_system.c
index 2f340ae,3554241..0a5b966
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@@ -3558,3 -3505,14 +3585,12 @@@ bool WM_event_is_tablet(const struct wm
{
return (event->tablet_data) ? true : false;
}
+
+ #ifdef WITH_INPUT_IME
+ /* most os using ctrl/oskey + space to switch ime, avoid added space */
+ bool WM_event_is_ime_switch(const struct wmEvent *event)
+ {
+ return event->val == KM_PRESS && event->type == SPACEKEY &&
+ (event->ctrl || event->oskey || event->shift || event->alt);
+ }
-#endif
-
-/** \} */
++#endif
More information about the Bf-blender-cvs
mailing list