summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-12 17:00:39 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-13 13:47:48 +0900
commit1fdbb00e225ce9e98e7ec2e2ec554eb5d1e02e69 (patch)
treee61a7f9d422e3876aa97ff8f602898b1e8b576f2 /src/lib/efl/interfaces
parent3136500fbeba47538ebdf95ead9ef49a4579db3d (diff)
efl: Move VG-specific change event to efl.gfx.path
Diffstat (limited to '')
-rw-r--r--src/lib/efl/interfaces/efl_gfx.eo1
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.c34
-rw-r--r--src/lib/efl/interfaces/efl_gfx_path.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_shape.c5
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot9
5 files changed, 29 insertions, 22 deletions
diff --git a/src/lib/efl/interfaces/efl_gfx.eo b/src/lib/efl/interfaces/efl_gfx.eo
index 6b30097bf3..3d073c2fc7 100644
--- a/src/lib/efl/interfaces/efl_gfx.eo
+++ b/src/lib/efl/interfaces/efl_gfx.eo
@@ -146,6 +146,5 @@ interface Efl.Gfx {
146 hide; [[Object just became invisible.]] 146 hide; [[Object just became invisible.]]
147 move; [[Object was moved, its position during the event is the new one.]] 147 move; [[Object was moved, its position during the event is the new one.]]
148 resize; [[Object was resized, its size during the event is the new one.]] 148 resize; [[Object was resized, its size during the event is the new one.]]
149 changed; [[Object was changed]]
150 } 149 }
151} 150}
diff --git a/src/lib/efl/interfaces/efl_gfx_path.c b/src/lib/efl/interfaces/efl_gfx_path.c
index b744ef1e37..2901373ddc 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.c
+++ b/src/lib/efl/interfaces/efl_gfx_path.c
@@ -149,6 +149,7 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
149 const Efl_Gfx_Path_Command *commands, 149 const Efl_Gfx_Path_Command *commands,
150 const double *points) 150 const double *points)
151{ 151{
152 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
152 Efl_Gfx_Path_Command *cmds; 153 Efl_Gfx_Path_Command *cmds;
153 double *pts; 154 double *pts;
154 unsigned int cmds_length = 0, pts_length = 0; 155 unsigned int cmds_length = 0, pts_length = 0;
@@ -184,9 +185,9 @@ _efl_gfx_path_path_set(Eo *obj, Efl_Gfx_Path_Data *pd,
184 _efl_gfx_path_current_search(pd->commands, pd->points, 185 _efl_gfx_path_current_search(pd->commands, pd->points,
185 &pd->current.x, &pd->current.y, 186 &pd->current.x, &pd->current.y,
186 &pd->current_ctrl.x, &pd->current_ctrl.y); 187 &pd->current_ctrl.x, &pd->current_ctrl.y);
188
187 end: 189 end:
188 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 190 efl_event_callback_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
189 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
190} 191}
191 192
192EOLIAN static void 193EOLIAN static void
@@ -276,6 +277,7 @@ EOLIAN static Eina_Bool
276_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd, 277_efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
277 const Eo *from, const Eo *to, double pos_map) 278 const Eo *from, const Eo *to, double pos_map)
278{ 279{
280 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
279 Efl_Gfx_Path_Data *from_pd, *to_pd; 281 Efl_Gfx_Path_Data *from_pd, *to_pd;
280 Efl_Gfx_Path_Command *cmds; 282 Efl_Gfx_Path_Command *cmds;
281 double *pts; 283 double *pts;
@@ -339,8 +341,7 @@ _efl_gfx_path_interpolate(Eo *obj, Efl_Gfx_Path_Data *pd,
339 pd->current_ctrl.y = interpolate(from_pd->current_ctrl.y, 341 pd->current_ctrl.y = interpolate(from_pd->current_ctrl.y,
340 to_pd->current_ctrl.y, pos_map); 342 to_pd->current_ctrl.y, pos_map);
341 343
342 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 344 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
343 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
344 345
345 return EINA_TRUE; 346 return EINA_TRUE;
346} 347}
@@ -361,6 +362,8 @@ _efl_gfx_path_equal_commands(Eo *obj EINA_UNUSED,
361EOLIAN static void 362EOLIAN static void
362_efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd) 363_efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
363{ 364{
365 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
366
364 free(pd->commands); 367 free(pd->commands);
365 pd->commands = NULL; 368 pd->commands = NULL;
366 pd->commands_count = 0; 369 pd->commands_count = 0;
@@ -375,14 +378,14 @@ _efl_gfx_path_reset(Eo *obj, Efl_Gfx_Path_Data *pd)
375 pd->current_ctrl.y = 0; 378 pd->current_ctrl.y = 0;
376 pd->convex = EINA_FALSE; 379 pd->convex = EINA_FALSE;
377 380
378 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 381 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
379 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
380} 382}
381 383
382EOLIAN static void 384EOLIAN static void
383_efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd, 385_efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
384 double x, double y) 386 double x, double y)
385{ 387{
388 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
386 double *offset_point; 389 double *offset_point;
387 390
388 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, pd, &offset_point)) 391 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO, pd, &offset_point))
@@ -394,14 +397,14 @@ _efl_gfx_path_append_move_to(Eo *obj, Efl_Gfx_Path_Data *pd,
394 pd->current.x = x; 397 pd->current.x = x;
395 pd->current.y = y; 398 pd->current.y = y;
396 399
397 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 400 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
398 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
399} 401}
400 402
401EOLIAN static void 403EOLIAN static void
402_efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd, 404_efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
403 double x, double y) 405 double x, double y)
404{ 406{
407 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
405 double *offset_point; 408 double *offset_point;
406 409
407 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, pd, &offset_point)) 410 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_LINE_TO, pd, &offset_point))
@@ -413,8 +416,7 @@ _efl_gfx_path_append_line_to(Eo *obj, Efl_Gfx_Path_Data *pd,
413 pd->current.x = x; 416 pd->current.x = x;
414 pd->current.y = y; 417 pd->current.y = y;
415 418
416 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 419 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
417 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
418} 420}
419 421
420EOLIAN static void 422EOLIAN static void
@@ -423,6 +425,7 @@ _efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
423 double ctrl_x1, double ctrl_y1, 425 double ctrl_x1, double ctrl_y1,
424 double x, double y) 426 double x, double y)
425{ 427{
428 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
426 double *offset_point; 429 double *offset_point;
427 430
428 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO, 431 if (!efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO,
@@ -441,8 +444,7 @@ _efl_gfx_path_append_cubic_to(Eo *obj, Efl_Gfx_Path_Data *pd,
441 pd->current_ctrl.x = ctrl_x1; 444 pd->current_ctrl.x = ctrl_x1;
442 pd->current_ctrl.y = ctrl_y1; 445 pd->current_ctrl.y = ctrl_y1;
443 446
444 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 447 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
445 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
446} 448}
447 449
448EOLIAN static void 450EOLIAN static void
@@ -1028,12 +1030,12 @@ _efl_gfx_path_append_arc(Eo *obj, Efl_Gfx_Path_Data *pd,
1028EOLIAN static void 1030EOLIAN static void
1029_efl_gfx_path_append_close(Eo *obj, Efl_Gfx_Path_Data *pd) 1031_efl_gfx_path_append_close(Eo *obj, Efl_Gfx_Path_Data *pd)
1030{ 1032{
1033 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
1031 double *offset_point; 1034 double *offset_point;
1032 1035
1033 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point); 1036 efl_gfx_path_grow(EFL_GFX_PATH_COMMAND_TYPE_CLOSE, pd, &offset_point);
1034 1037
1035 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 1038 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
1036 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
1037} 1039}
1038 1040
1039static void 1041static void
@@ -1578,6 +1580,7 @@ _efl_gfx_path_append_svg_path(Eo *obj, Efl_Gfx_Path_Data *pd,
1578EOLIAN static void 1580EOLIAN static void
1579_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from) 1581_efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
1580{ 1582{
1583 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
1581 Efl_Gfx_Path_Data *from; 1584 Efl_Gfx_Path_Data *from;
1582 1585
1583 if (obj == dup_from) return; 1586 if (obj == dup_from) return;
@@ -1588,8 +1591,7 @@ _efl_gfx_path_copy_from(Eo *obj, Efl_Gfx_Path_Data *pd, const Eo *dup_from)
1588 1591
1589 _efl_gfx_path_path_set(obj, pd, from->commands, from->points); 1592 _efl_gfx_path_path_set(obj, pd, from->commands, from->points);
1590 1593
1591 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 1594 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
1592 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
1593} 1595}
1594 1596
1595#include "interfaces/efl_gfx_path.eo.c" 1597#include "interfaces/efl_gfx_path.eo.c"
diff --git a/src/lib/efl/interfaces/efl_gfx_path.eo b/src/lib/efl/interfaces/efl_gfx_path.eo
index 4b8961dd74..b36bf090dd 100644
--- a/src/lib/efl/interfaces/efl_gfx_path.eo
+++ b/src/lib/efl/interfaces/efl_gfx_path.eo
@@ -284,6 +284,6 @@ mixin Efl.Gfx.Path
284 } 284 }
285 } 285 }
286 events { 286 events {
287 changed; [[Graphics path was changed.]] 287 changed: Efl.Gfx.Path.Change_Event; [[Graphics path was changed.]]
288 } 288 }
289} 289}
diff --git a/src/lib/efl/interfaces/efl_gfx_shape.c b/src/lib/efl/interfaces/efl_gfx_shape.c
index 00bad6677f..3e88e8603f 100644
--- a/src/lib/efl/interfaces/efl_gfx_shape.c
+++ b/src/lib/efl/interfaces/efl_gfx_shape.c
@@ -161,9 +161,10 @@ _efl_gfx_shape_stroke_color_get(Eo *obj EINA_UNUSED, Efl_Gfx_Shape_Data *pd,
161EOLIAN static void 161EOLIAN static void
162_efl_gfx_shape_stroke_width_set(Eo *obj, Efl_Gfx_Shape_Data *pd, double w) 162_efl_gfx_shape_stroke_width_set(Eo *obj, Efl_Gfx_Shape_Data *pd, double w)
163{ 163{
164 Efl_Gfx_Path_Change_Event ev = { EFL_GFX_CHANGE_FLAG_PATH };
165
164 pd->public.stroke.width = w; 166 pd->public.stroke.width = w;
165 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, NULL); 167 efl_event_callback_legacy_call(obj, EFL_GFX_PATH_EVENT_CHANGED, &ev);
166 efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_CHANGED, NULL);
167} 168}
168 169
169EOLIAN static double 170EOLIAN static double
diff --git a/src/lib/efl/interfaces/efl_gfx_types.eot b/src/lib/efl/interfaces/efl_gfx_types.eot
index 7c6c43ec18..1b3598a3cf 100644
--- a/src/lib/efl/interfaces/efl_gfx_types.eot
+++ b/src/lib/efl/interfaces/efl_gfx_types.eot
@@ -146,13 +146,18 @@ enum Efl.Gfx.Border_Fill_Mode
146 solid = 2 [[Image's center region is to be made solid, even if it has transparency on it]] 146 solid = 2 [[Image's center region is to be made solid, even if it has transparency on it]]
147} 147}
148 148
149enum Efl.Gfx.Change.Flag 149enum Efl.Gfx.Change_Flag
150{ 150{
151 [[What property got changed for this object @since 1.18]] 151 [[What property got changed for this object @since 1.18]]
152 none = 0x0, [[No change]] 152 none = 0x0, [[No change]]
153 matrix = 0x1, [[matrix got changed]] 153 matrix = 0x1, [[matrix got changed]]
154 path = 0x2, [[path got changes]] 154 path = 0x2, [[path got changes]]
155 all = -1 [[all property got changed]] 155 fill = 0x4, [[coloring or fill information changed, not geometry]]
156 all = 0xffff [[all properties got changed]]
157}
158
159struct Efl.Gfx.Path.Change_Event {
160 what: Efl.Gfx.Change_Flag; [[Indicates what changed.]]
156} 161}
157 162
158struct Efl.Gfx.Event.Render_Post 163struct Efl.Gfx.Event.Render_Post