summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Sousa <vitorsousasilva@gmail.com>2016-02-15 23:57:10 -0200
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2016-02-22 10:38:26 -0300
commit9403eff9414569085a40066f1dc11403b13de5d0 (patch)
tree1877c262e1f6f82d7daff0529e7fa9481f8615e8
parent91944e192a9d02c0b8bd7ddf0c815d3ed6778901 (diff)
elm widget: move some types used in elm_widget.eo to Eolian files
Move declarations of types used in elm_widget.eo to elm_general.eot and elm_widget.eo. Give them a Eolian name and use it instead of the old ones. Correct the type name of some other types used as method parameters, by using the Eolian names instead of legacy/generated names. Reorganize the positions of elm_widget.eo.h inclusion and of callback type declarations in elm_widget.h. This make a clearer distinction of the types in elm_widget.h that are still required in elm_widget.eo.h.
-rw-r--r--src/lib/elm_config.h13
-rw-r--r--src/lib/elm_focus.h11
-rw-r--r--src/lib/elm_general.eot20
-rw-r--r--src/lib/elm_widget.eo43
-rw-r--r--src/lib/elm_widget.h57
5 files changed, 70 insertions, 74 deletions
diff --git a/src/lib/elm_config.h b/src/lib/elm_config.h
index 27043f79a..6d9cf05bb 100644
--- a/src/lib/elm_config.h
+++ b/src/lib/elm_config.h
@@ -1657,19 +1657,6 @@ EAPI Eina_Bool elm_config_focus_highlight_clip_disabled_get(void);
1657EAPI void elm_config_focus_highlight_clip_disabled_set(Eina_Bool disable); 1657EAPI void elm_config_focus_highlight_clip_disabled_set(Eina_Bool disable);
1658 1658
1659/** 1659/**
1660 * Focus Movement Policy
1661 *
1662 * @since 1.10
1663 * @ingroup Focus
1664 */
1665typedef enum
1666{
1667 ELM_FOCUS_MOVE_POLICY_CLICK, /**< move focus by mouse click or touch. Elementary focus is set on mouse click and this is checked at mouse up time. (default) */
1668 ELM_FOCUS_MOVE_POLICY_IN, /**< move focus by mouse in. Elementary focus is set on mouse move when the mouse pointer is moved into an object. */
1669 ELM_FOCUS_MOVE_POLICY_KEY_ONLY /**< move focus by key. Elementary focus is set on key input like Left, Right, Up, Down, Tab, or Shift+Tab.*/
1670} Elm_Focus_Move_Policy;
1671
1672/**
1673 * Get the focus movement policy 1660 * Get the focus movement policy
1674 * 1661 *
1675 * @return The focus movement policy 1662 * @return The focus movement policy
diff --git a/src/lib/elm_focus.h b/src/lib/elm_focus.h
index 158a43799..1d4952d15 100644
--- a/src/lib/elm_focus.h
+++ b/src/lib/elm_focus.h
@@ -34,17 +34,6 @@
34 */ 34 */
35 35
36/** 36/**
37 * Focus region show mode.
38 *
39 * @ingroup Focus
40 */
41typedef enum
42{
43 ELM_FOCUS_REGION_SHOW_WIDGET, /**< as a widget */
44 ELM_FOCUS_REGION_SHOW_ITEM, /**< as an item */
45} Elm_Focus_Region_Show_Mode;
46
47/**
48 * Get the whether an Elementary object has the focus or not. 37 * Get the whether an Elementary object has the focus or not.
49 * 38 *
50 * @param obj The Elementary object to get the information from 39 * @param obj The Elementary object to get the information from
diff --git a/src/lib/elm_general.eot b/src/lib/elm_general.eot
index 955ca6ca0..aac2e940e 100644
--- a/src/lib/elm_general.eot
+++ b/src/lib/elm_general.eot
@@ -178,6 +178,26 @@ enum Elm.Focus_Direction
178 left, [[ left direction ]] 178 left, [[ left direction ]]
179} 179}
180 180
181enum Elm.Focus.Region.Show_Mode
182{
183 [[Focus region show mode.]]
184 legacy: elm_focus_region_show;
185 widget, [[As a widget.]]
186 item, [[As an item.]]
187}
188
189enum Elm.Focus.Move_Policy
190{
191 [[Focus Movement Policy.
192 @since 1.10]]
193 click, [[Move focus by mouse click or touch. Elementary focus is set on mouse
194 click and this is checked at mouse up time. (default)]]
195 in, [[Move focus by mouse in. Elementary focus is set on mouse move when the
196 mouse pointer is moved into an object.]]
197 key_only, [[Move focus by key. Elementary focus is set on key input like
198 Left, Right, Up, Down, Tab, or Shift+Tab.]]
199}
200
181enum Elm.App.View_State 201enum Elm.App.View_State
182{ 202{
183 unknown = 0, 203 unknown = 0,
diff --git a/src/lib/elm_widget.eo b/src/lib/elm_widget.eo
index ce12a4aed..e5db7679d 100644
--- a/src/lib/elm_widget.eo
+++ b/src/lib/elm_widget.eo
@@ -1,5 +1,20 @@
1import elm_general; 1import elm_general;
2 2
3enum Elm.Activate
4{
5 [[ Used in 'Virtual' function @Elm.Widget.activate. ]]
6 default = 0,
7 up,
8 down,
9 right,
10 left,
11 back,
12}
13
14struct Elm.Tooltip;
15struct Elm.Cursor;
16struct @extern Elm.Theme;
17
3abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Interface_Atspi_Component) 18abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Interface_Atspi_Component)
4{ 19{
5 eo_prefix: elm_obj_widget; 20 eo_prefix: elm_obj_widget;
@@ -82,7 +97,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
82 get { 97 get {
83 } 98 }
84 values { 99 values {
85 th: Elm_Theme * @nullable; 100 th: Elm.Theme * @nullable;
86 } 101 }
87 } 102 }
88 @property disabled { 103 @property disabled {
@@ -234,7 +249,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
234 get { 249 get {
235 } 250 }
236 values { 251 values {
237 mode: Elm_Focus_Region_Show_Mode; 252 mode: Elm.Focus.Region.Show_Mode;
238 } 253 }
239 } 254 }
240 @property parent_highlight { 255 @property parent_highlight {
@@ -266,7 +281,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
266 set { 281 set {
267 } 282 }
268 values { 283 values {
269 dispmode: Evas_Display_Mode; 284 dispmode: Evas.Display_Mode;
270 } 285 }
271 } 286 }
272 @property on_show_region_hook { 287 @property on_show_region_hook {
@@ -442,7 +457,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
442 } 457 }
443 cursor_add { 458 cursor_add {
444 params { 459 params {
445 @in cur: Elm_Cursor *; 460 @in cur: Elm.Cursor *;
446 } 461 }
447 } 462 }
448 focus_next_object_set { 463 focus_next_object_set {
@@ -514,7 +529,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
514 activate { 529 activate {
515 [['Virtual' function to activate widget.]] 530 [['Virtual' function to activate widget.]]
516 params { 531 params {
517 @in act: Elm_Activate; 532 @in act: Elm.Activate;
518 } 533 }
519 return: bool; 534 return: bool;
520 legacy: null; /* the legacy API has not the same number of parameter to we don't generate it. */ 535 legacy: null; /* the legacy API has not the same number of parameter to we don't generate it. */
@@ -535,7 +550,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
535 [['Virtual' function handling input events on the widget.]] 550 [['Virtual' function handling input events on the widget.]]
536 params { 551 params {
537 @in source: Evas.Object *; 552 @in source: Evas.Object *;
538 @in type: Evas_Callback_Type; 553 @in type: Evas.Callback_Type;
539 @in event_info: void *; 554 @in event_info: void *;
540 } 555 }
541 return: bool; 556 return: bool;
@@ -555,7 +570,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
555 } 570 }
556 cursor_del { 571 cursor_del {
557 params { 572 params {
558 @in cur: Elm_Cursor *; 573 @in cur: Elm.Cursor *;
559 } 574 }
560 } 575 }
561 event_callback_del { 576 event_callback_del {
@@ -603,16 +618,16 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
603 event_propagate { 618 event_propagate {
604 return: bool; 619 return: bool;
605 params { 620 params {
606 @in type: Evas_Callback_Type; 621 @in type: Evas.Callback_Type;
607 @in event_info: void *; 622 @in event_info: void *;
608 @in event_flags: Evas_Event_Flags *; 623 @in event_flags: Evas.Event_Flags *;
609 } 624 }
610 } 625 }
611 signal_callback_add { 626 signal_callback_add {
612 params { 627 params {
613 @in emission: const(char)*; 628 @in emission: const(char)*;
614 @in source: const(char)*; 629 @in source: const(char)*;
615 @in func: Edje_Signal_Cb; 630 @in func: Edje.Signal_Cb;
616 @in data: void *; 631 @in data: void *;
617 } 632 }
618 } 633 }
@@ -668,7 +683,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
668 } 683 }
669 tooltip_del { 684 tooltip_del {
670 params { 685 params {
671 @in tt: Elm_Tooltip *; 686 @in tt: Elm.Tooltip *;
672 } 687 }
673 } 688 }
674 focus_next_get @const { 689 focus_next_get @const {
@@ -754,7 +769,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
754 params { 769 params {
755 @in emission: const(char)*; 770 @in emission: const(char)*;
756 @in source: const(char)*; 771 @in source: const(char)*;
757 @in func: Edje_Signal_Cb; 772 @in func: Edje.Signal_Cb;
758 } 773 }
759 } 774 }
760 signal_emit { 775 signal_emit {
@@ -776,7 +791,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
776 } 791 }
777 tooltip_add { 792 tooltip_add {
778 params { 793 params {
779 @in tt: Elm_Tooltip *; 794 @in tt: Elm.Tooltip *;
780 } 795 }
781 } 796 }
782 focus_region_show @const { 797 focus_region_show @const {
@@ -803,7 +818,7 @@ abstract Elm.Widget (Evas.Object_Smart, Elm.Interface_Atspi_Accessible, Elm.Inte
803 [[Returns the widget's focus move policy.]] 818 [[Returns the widget's focus move policy.]]
804 } 819 }
805 values { 820 values {
806 policy: Elm_Focus_Move_Policy; [[Object's focus move policy.]] 821 policy: Elm.Focus.Move_Policy; [[Object's focus move policy.]]
807 } 822 }
808 } 823 }
809 } 824 }
diff --git a/src/lib/elm_widget.h b/src/lib/elm_widget.h
index 23ed7a10c..0a82540db 100644
--- a/src/lib/elm_widget.h
+++ b/src/lib/elm_widget.h
@@ -297,23 +297,32 @@
297 * @image latex elm-widget-tree.eps 297 * @image latex elm-widget-tree.eps
298 */ 298 */
299 299
300typedef void (*Elm_Widget_Text_Set_Cb)(void *data, const char *part, const char *text);
301typedef void (*Elm_Widget_Content_Set_Cb)(void *data, const char *part, Evas_Object *content);
302typedef const char *(*Elm_Widget_Text_Get_Cb)(const void *data, const char *part);
303typedef Evas_Object *(*Elm_Widget_Content_Get_Cb)(const void *data, const char *part);
304typedef Evas_Object *(*Elm_Widget_Content_Unset_Cb)(const void *data, const char *part);
305typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const char *emission, const char *source);
306typedef void (*Elm_Widget_Disable_Cb)(void *data);
307typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
308typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Object_Item *item, const char *emission, const char *source);
309typedef void (*Elm_Widget_Style_Set_Cb)(void *data, const char *style);
310typedef const char *(*Elm_Widget_Style_Get_Cb)(const void *data);
311typedef void (*Elm_Widget_Focus_Set_Cb)(void *data, Eina_Bool focused);
312typedef Eina_Bool (*Elm_Widget_Focus_Get_Cb)(const void *data);
313
314typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
315
316typedef void (*region_hook_func_type)(void *data, Evas_Object *obj);
317typedef void * (*list_data_get_func_type)(const Eina_List * l);
318
319#include "elm_widget.eo.h"
320
300/** 321/**
301 * @addtogroup Widget 322 * @addtogroup Widget
302 * @{ 323 * @{
303 */ 324 */
304 325
305/* Elm_Activate is used in 'Virtual' function Eina_Bool (*activate)
306 * (Evas_Object *obj, Elm_Activate act); of Elm_Widget_Smart_Class */
307typedef enum
308{
309 ELM_ACTIVATE_DEFAULT = 0,
310 ELM_ACTIVATE_UP,
311 ELM_ACTIVATE_DOWN,
312 ELM_ACTIVATE_RIGHT,
313 ELM_ACTIVATE_LEFT,
314 ELM_ACTIVATE_BACK
315} Elm_Activate;
316
317/* Please, ALWAYS update the ELM_WIDGET_SMART_CLASS_INIT macro 326/* Please, ALWAYS update the ELM_WIDGET_SMART_CLASS_INIT macro
318 * whenever you change the following struct! */ 327 * whenever you change the following struct! */
319 328
@@ -450,9 +459,6 @@ typedef struct _Elm_Widget_Smart_Data
450 * @} 459 * @}
451 */ 460 */
452 461
453typedef struct _Elm_Tooltip Elm_Tooltip;
454typedef struct _Elm_Cursor Elm_Cursor;
455
456/**< base structure for all widget items that are not Elm_Widget themselves */ 462/**< base structure for all widget items that are not Elm_Widget themselves */
457typedef struct _Elm_Widget_Item_Data Elm_Widget_Item_Data; 463typedef struct _Elm_Widget_Item_Data Elm_Widget_Item_Data;
458typedef struct _Elm_Widget_Item_Signal_Data Elm_Widget_Item_Signal_Data; 464typedef struct _Elm_Widget_Item_Signal_Data Elm_Widget_Item_Signal_Data;
@@ -465,25 +471,9 @@ typedef struct _Elm_Access_Item Elm_Access_Item;
465 471
466typedef struct _Elm_Action Elm_Action; 472typedef struct _Elm_Action Elm_Action;
467 473
468typedef void (*Elm_Widget_Text_Set_Cb)(void *data, const char *part, const char *text);
469typedef void (*Elm_Widget_Content_Set_Cb)(void *data, const char *part, Evas_Object *content);
470typedef const char *(*Elm_Widget_Text_Get_Cb)(const void *data, const char *part);
471typedef Evas_Object *(*Elm_Widget_Content_Get_Cb)(const void *data, const char *part);
472typedef Evas_Object *(*Elm_Widget_Content_Unset_Cb)(const void *data, const char *part);
473typedef void (*Elm_Widget_Signal_Emit_Cb)(void *data, const char *emission, const char *source);
474typedef void (*Elm_Widget_Disable_Cb)(void *data);
475typedef Eina_Bool (*Elm_Widget_Del_Pre_Cb)(void *data);
476typedef void (*Elm_Widget_Item_Signal_Cb)(void *data, Elm_Object_Item *item, const char *emission, const char *source);
477typedef void (*Elm_Widget_Style_Set_Cb)(void *data, const char *style);
478typedef const char *(*Elm_Widget_Style_Get_Cb)(const void *data);
479typedef void (*Elm_Widget_Focus_Set_Cb)(void *data, Eina_Bool focused);
480typedef Eina_Bool (*Elm_Widget_Focus_Get_Cb)(const void *data);
481
482#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */ 474#define ELM_ACCESS_DONE -1 /* sentence done - send done event here */
483#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */ 475#define ELM_ACCESS_CANCEL -2 /* stop reading immediately */
484 476
485typedef void (*Elm_Access_On_Highlight_Cb)(void *data);
486
487struct _Elm_Access_Item 477struct _Elm_Access_Item
488{ 478{
489 int type; 479 int type;
@@ -852,11 +842,6 @@ EAPI Eina_Bool _elm_widget_item_onscreen_is(Elm_Object_Item *item);
852 842
853EAPI Eina_Bool elm_selection_selection_has_owner(Evas_Object *obj); 843EAPI Eina_Bool elm_selection_selection_has_owner(Evas_Object *obj);
854 844
855typedef void (*region_hook_func_type)(void *data, Evas_Object *obj);
856typedef void * (*list_data_get_func_type)(const Eina_List * l);
857
858#include "elm_widget.eo.h"
859
860#define ELM_WIDGET_ITEM_PROTECTED 845#define ELM_WIDGET_ITEM_PROTECTED
861#include "elm_widget_item.eo.h" 846#include "elm_widget_item.eo.h"
862 847