summaryrefslogtreecommitdiff
path: root/src/lib/evas/include/evas_private.h
diff options
context:
space:
mode:
authorGuilherme Iscaro <iscaro@profusion.mobi>2016-10-21 10:25:41 -0200
committerBruno Dilly <bdilly@profusion.mobi>2016-12-02 09:57:50 -0200
commit484dae76e675318a579e90ac05d4371acc1f8891 (patch)
treeec41e13d5fc110083a7c37bd75258b1227aab61f /src/lib/evas/include/evas_private.h
parent5442e9c908f3a846aab9758cfb905234e8686e53 (diff)
Evas: Add support for per mouse pointer mode/properties.
This patch introduces the possibility to set the pointer mode and query other properties like current position per pointer device. The old API will still works, however it will only act on the default seat.
Diffstat (limited to 'src/lib/evas/include/evas_private.h')
-rw-r--r--src/lib/evas/include/evas_private.h68
1 files changed, 52 insertions, 16 deletions
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 06b8c1e522..2af422f911 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -84,6 +84,7 @@ typedef struct _Evas_Object_Map_Data Evas_Object_Map_Data;
84typedef struct _Evas_Proxy_Render_Data Evas_Proxy_Render_Data; 84typedef struct _Evas_Proxy_Render_Data Evas_Proxy_Render_Data;
85typedef struct _Evas_Object_3D_Data Evas_Object_3D_Data; 85typedef struct _Evas_Object_3D_Data Evas_Object_3D_Data;
86typedef struct _Evas_Object_Mask_Data Evas_Object_Mask_Data; 86typedef struct _Evas_Object_Mask_Data Evas_Object_Mask_Data;
87typedef struct _Evas_Object_Pointer_Data Evas_Object_Pointer_Data;
87 88
88typedef struct _Evas_Smart_Data Evas_Smart_Data; 89typedef struct _Evas_Smart_Data Evas_Smart_Data;
89 90
@@ -93,6 +94,7 @@ typedef struct _Evas_Object_Protected_Data Evas_Object_Protected_Data;
93typedef struct _Evas_Filter_Program Evas_Filter_Program; 94typedef struct _Evas_Filter_Program Evas_Filter_Program;
94typedef struct _Evas_Object_Filter_Data Evas_Object_Filter_Data; 95typedef struct _Evas_Object_Filter_Data Evas_Object_Filter_Data;
95typedef struct _Evas_Filter_Data_Binding Evas_Filter_Data_Binding; 96typedef struct _Evas_Filter_Data_Binding Evas_Filter_Data_Binding;
97typedef struct _Evas_Pointer_Data Evas_Pointer_Data;
96 98
97// 3D stuff 99// 3D stuff
98 100
@@ -798,6 +800,21 @@ typedef struct
798 Evas_Object_Protected_Data *obj; 800 Evas_Object_Protected_Data *obj;
799} Evas_Active_Entry; 801} Evas_Active_Entry;
800 802
803struct _Evas_Pointer_Data
804{
805 Evas_Device *pointer;
806 struct {
807 Eina_List *in;
808 } object;
809 DATA32 button;
810 Evas_Coord x, y;
811 Evas_Point prev;
812 int mouse_grabbed;
813 int downs;
814 int nogrep;
815 unsigned char inside : 1;
816};
817
801struct _Evas_Public_Data 818struct _Evas_Public_Data
802{ 819{
803 EINA_INLIST; 820 EINA_INLIST;
@@ -805,18 +822,7 @@ struct _Evas_Public_Data
805 DATA32 magic; 822 DATA32 magic;
806 Evas *evas; 823 Evas *evas;
807 824
808 struct { 825 Eina_List *pointers;
809 unsigned char inside : 1;
810 int mouse_grabbed;
811 int downs;
812 DATA32 button;
813 Evas_Coord x, y;
814 Evas_Point prev;
815 int nogrep;
816 struct {
817 Eina_List *in;
818 } object;
819 } pointer;
820 826
821 struct { 827 struct {
822 Evas_Coord x, y, w, h; 828 Evas_Coord x, y, w, h;
@@ -1083,6 +1089,14 @@ struct _Evas_Object_Protected_State
1083 Eina_Bool snapshot : 1; 1089 Eina_Bool snapshot : 1;
1084}; 1090};
1085 1091
1092struct _Evas_Object_Pointer_Data {
1093 Evas_Object_Protected_Data *obj;
1094 Evas_Pointer_Data *evas_pdata;
1095 Evas_Object_Pointer_Mode pointer_mode;
1096 int mouse_grabbed;
1097 Eina_Bool mouse_in;
1098};
1099
1086struct _Evas_Object_Protected_Data 1100struct _Evas_Object_Protected_Data
1087{ 1101{
1088 EINA_INLIST; 1102 EINA_INLIST;
@@ -1123,6 +1137,7 @@ struct _Evas_Object_Protected_Data
1123 const Evas_Object_3D_Data *data_3d; 1137 const Evas_Object_3D_Data *data_3d;
1124 const Evas_Object_Mask_Data *mask; 1138 const Evas_Object_Mask_Data *mask;
1125 Eina_List *focused_by_seats; 1139 Eina_List *focused_by_seats;
1140 Eina_Hash *pointer_grabs;
1126 1141
1127 // Pointer to the Evas_Object itself 1142 // Pointer to the Evas_Object itself
1128 Evas_Object *object; 1143 Evas_Object *object;
@@ -1131,7 +1146,6 @@ struct _Evas_Object_Protected_Data
1131 1146
1132 int last_mouse_down_counter; 1147 int last_mouse_down_counter;
1133 int last_mouse_up_counter; 1148 int last_mouse_up_counter;
1134 int mouse_grabbed;
1135 1149
1136 // Daniel: Added because the destructor can't take parameters, at least for the moment 1150 // Daniel: Added because the destructor can't take parameters, at least for the moment
1137 int clean_layer; 1151 int clean_layer;
@@ -1152,6 +1166,7 @@ struct _Evas_Object_Protected_Data
1152 1166
1153 Eina_Bool render_pre : 1; 1167 Eina_Bool render_pre : 1;
1154 Eina_Bool rect_del : 1; 1168 Eina_Bool rect_del : 1;
1169
1155 Eina_Bool is_active : 1; 1170 Eina_Bool is_active : 1;
1156 Eina_Bool changed : 1; 1171 Eina_Bool changed : 1;
1157 Eina_Bool restack : 1; 1172 Eina_Bool restack : 1;
@@ -1173,8 +1188,6 @@ struct _Evas_Object_Protected_Data
1173 Eina_Bool pre_render_done : 1; 1188 Eina_Bool pre_render_done : 1;
1174 Eina_Bool precise_is_inside : 1; 1189 Eina_Bool precise_is_inside : 1;
1175 Eina_Bool is_static_clip : 1; 1190 Eina_Bool is_static_clip : 1;
1176 Eina_Bool mouse_in : 1;
1177 Evas_Object_Pointer_Mode pointer_mode : 2;
1178 1191
1179 Eina_Bool in_layer : 1; 1192 Eina_Bool in_layer : 1;
1180 Eina_Bool is_frame : 1; 1193 Eina_Bool is_frame : 1;
@@ -1576,6 +1589,7 @@ void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
1576void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj, Evas_Object_Protected_Data *pd); 1589void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj, Evas_Object_Protected_Data *pd);
1577void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v); 1590void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
1578void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh); 1591void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
1592Evas_Object_Pointer_Data *_evas_object_pointer_data_get(Evas_Pointer_Data *evas_pdata, Evas_Object_Protected_Data *obj, Efl_Input_Device *pointer);
1579 1593
1580void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd); 1594void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd);
1581void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd); 1595void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd);
@@ -1904,7 +1918,22 @@ struct _Evas_Proxy_Render_Data
1904 1918
1905void _evas_canvas_event_init(Evas *eo_e, Evas_Public_Data *e); 1919void _evas_canvas_event_init(Evas *eo_e, Evas_Public_Data *e);
1906void _evas_canvas_event_shutdown(Evas *eo_e, Evas_Public_Data *e); 1920void _evas_canvas_event_shutdown(Evas *eo_e, Evas_Public_Data *e);
1907 1921void _evas_canvas_event_pointer_in_rect_mouse_move_feed(Evas_Public_Data *edata,
1922 Evas_Object *obj,
1923 Evas_Object_Protected_Data *obj_data,
1924 int w, int h,
1925 Eina_Bool in_objects_list,
1926 void *data);
1927void _evas_canvas_event_pointer_in_list_mouse_move_feed(Evas_Public_Data *edata,
1928 Eina_List *was,
1929 Evas_Object *obj,
1930 Evas_Object_Protected_Data *obj_data,
1931 int w, int h,
1932 Eina_Bool xor_rule,
1933 void *data);
1934void _evas_canvas_event_pointer_move_event_dispatch(Evas_Public_Data *edata,
1935 Evas_Pointer_Data *pdata,
1936 void *data);
1908int evas_async_events_init(void); 1937int evas_async_events_init(void);
1909int evas_async_events_shutdown(void); 1938int evas_async_events_shutdown(void);
1910int evas_async_target_del(const void *target); 1939int evas_async_target_del(const void *target);
@@ -1969,6 +1998,13 @@ Eina_Bool _evas_image_proxy_source_clip_get(const Eo *eo_obj);
1969 1998
1970void _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj, 1999void _evas_focus_dispatch_event(Evas_Object_Protected_Data *obj,
1971 Efl_Input_Device *seat, Eina_Bool in); 2000 Efl_Input_Device *seat, Eina_Bool in);
2001Evas_Pointer_Data *_evas_pointer_data_by_device_get(Evas_Public_Data *edata, Efl_Input_Device *pointer);
2002Eina_Bool _evas_pointer_data_add(Evas_Public_Data *edata, Efl_Input_Device *pointer);
2003void _evas_pointer_data_remove(Evas_Public_Data *edata, Efl_Input_Device *pointer);
2004Eina_List *_evas_pointer_list_in_rect_get(Evas_Public_Data *edata,
2005 Evas_Object *obj,
2006 Evas_Object_Protected_Data *obj_data,
2007 int w, int h);
1972 2008
1973extern Eina_Cow *evas_object_proxy_cow; 2009extern Eina_Cow *evas_object_proxy_cow;
1974extern Eina_Cow *evas_object_map_cow; 2010extern Eina_Cow *evas_object_map_cow;