elm: Split elm_general.eot in two: legacy and EO
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 18 Oct 2017 08:12:03 +0000 (17:12 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 18 Oct 2017 10:24:28 +0000 (19:24 +0900)
This creates efl_ui.eot
It's not called efl_ui_types.eot because a file with that name already
exists in efl/interfaces (for Efl.Ui.Drag functions).

Also add some FIXME comments, and move some types to elm_widget_item.eo.

Ref T5329

src/Makefile_Elementary.am
src/lib/elementary/efl_access_action.eo
src/lib/elementary/efl_ui.eot [new file with mode: 0644]
src/lib/elementary/efl_ui_focus_manager.eo
src/lib/elementary/elm_code_widget.eo
src/lib/elementary/elm_general.eot
src/lib/elementary/elm_general.h
src/lib/elementary/elm_widget_item.eo

index 6d59b91..e639a4a 100644 (file)
@@ -191,7 +191,8 @@ elm_legacy_eolian_files = \
        $(NULL)
 
 elm_eolian_type_files = \
-       lib/elementary/elm_general.eot
+       lib/elementary/elm_general.eot \
+       lib/elementary/efl_ui.eot
 
 elm_public_eolian_c = $(elm_public_eolian_files:%.eo=%.eo.c)
 elm_public_eolian_h = $(elm_public_eolian_files:%.eo=%.eo.h) \
index cbdbc71..d31fb61 100644 (file)
@@ -1,3 +1,4 @@
+/* FIXME: This shouldn't be using undefined Elm_Atspi_Action */
 import elm_general;
 
 mixin Efl.Access.Action ()
diff --git a/src/lib/elementary/efl_ui.eot b/src/lib/elementary/efl_ui.eot
new file mode 100644 (file)
index 0000000..4483acc
--- /dev/null
@@ -0,0 +1,103 @@
+/* Efl.Ui enum and struct types */
+
+enum Efl.Ui.Theme.Apply
+{
+   [[Return error code when setting the style on a widget.]]
+   failed = 0,  [[Failed to apply theme. The widget may become unusable.]]
+   default = 1, [[Successfully applied the default style. The widget may
+                  look different from the rest of the UI if a custom theme
+                  is in use, but it should be usable.]]
+   success = 3  [[Successfully applied the requested style from the current
+                  theme.]]
+}
+
+enum Efl.Ui.Focus.Direction
+{
+   [[ Focus directions. ]]
+   previous = 0, [[ previous direction ]]
+   next = 1,     [[ next direction ]]
+   up = 2,       [[ up direction ]]
+   down = 3,     [[ down direction ]]
+   right = 4,    [[ right direction ]]
+   left = 5,     [[ left direction ]]
+   last = 6
+}
+
+enum Efl.Ui.Interest_Region_Mode
+{
+   [[Focus region show mode.]]
+   widget, [[As a widget.]]
+   item, [[As an item.]]
+}
+
+enum Efl.Ui.Focus.Move_Policy
+{
+   [[Focus Movement Policy.
+     @since 1.10]]
+   click, [[Move focus by mouse click or touch. Elementary focus is set on mouse
+            click and this is checked at mouse up time. (default)]]
+   in, [[Move focus by mouse in. Elementary focus is set on mouse move when the
+         mouse pointer is moved into an object.]]
+   key_only, [[Move focus by key. Elementary focus is set on key input like
+               Left, Right, Up, Down, Tab, or Shift+Tab.]]
+}
+
+enum Efl.Ui.Slider.Indicator_Visible_Mode
+{
+   [[Slider's indicator visiblity mode.
+
+     @since 1.13
+   ]]
+   default,   [[show indicator on mouse down or change in slider value]]
+   always,    [[Always show the indicator.]]
+   on_focus,  [[Show the indicator on focus]]
+   none       [[Never show the indicator ]]
+}
+
+enum Efl.Ui.Focus.Autoscroll_Mode
+{
+   [[Focus Autoscroll Mode
+
+     @since 1.10
+   ]]
+   show,    [[Directly show the focused region or item automatically.]]
+   none,    [[Do not show the focused region or item automatically.]]
+   bring_in [[Bring in the focused region or item automatically which might invole the scrolling.]]
+}
+
+enum Efl.Ui.Softcursor_Mode
+{
+   [[Software cursor mode.
+
+     @since 1.7
+   ]]
+   auto, [[Auto-detect if a software cursor should be used (default).]]
+   on,   [[Always use a softcursor.]]
+   off   [[Never use a softcursor.]]
+}
+
+enum Efl.Ui.Scroll_Block
+{
+   [[Direction in which a scroller should be blocked.
+
+     Note: These options may be effective only in case of thumbscroll (i.e.
+     when scrolling by dragging).
+
+     @since 1.21
+   ]]
+   none = 0,      [[Don't block any movement.]]
+   vertical = 1,  [[Block vertical movement.]]
+   horizontal = 2 [[Block horizontal movement.]]
+}
+
+/* 'on_access_activate' is beta API in the Widget class */
+enum Efl.Ui.Activate
+{
+   [[Accessibility ]]
+   default = 0, [[Activate default]]
+   up, [[Activate up]]
+   down, [[Activate down]]
+   right, [[Activate right]]
+   left, [[Activate left]]
+   back, [[Activate back]]
+}
index b0071ee..1cad0c4 100644 (file)
@@ -1,4 +1,4 @@
-import elm_general;
+import efl_ui;
 
 struct Efl.Ui.Focus.Relations {
     [[Structure holding the graph of relations between focussable objects.
index 050b273..b8ed094 100644 (file)
@@ -2,6 +2,7 @@ import edje_types;
 import elm_interface_scrollable;
 import elm_general;
 
+/* FIXME: Those types make elm_code unusable from pure EO */
 struct @extern Elm_Code; [[Elementary code main data structure]] /* The main interface currently defined in code */
 struct @extern Elm_Code_Line; [[Elementary code line data structure]] /* Parts of the interface currently defined in code */
 
index c12e10a..f44a955 100644 (file)
@@ -1,17 +1,13 @@
-enum Efl.Ui.Theme.Apply
-{
-   [[Return error code when setting the style on a widget.]]
-   failed = 0,  [[Failed to apply theme. The widget may become unusable.]]
-   default = 1, [[Successfully applied the default style. The widget may
-                  look different from the rest of the UI if a custom theme
-                  is in use, but it should be usable.]]
-   success = 3  [[Successfully applied the requested style from the current
-                  theme.]]
-}
-
+/* Elementary legacy-only types.
+ * NOTE: Some of those types still need to be moved to Efl.Ui
+ */
 
-/* The below Elm names need to be cleaned up... */
+/* Legacy-only function pointer types, for the legacy EO classes (genlist, etc...) */
+type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
+type Eina_Compare_Cb: __undefined_type; [[Eina compare callback type]]
+type @extern Elm.Glob.Match_Flags: __undefined_type; [[Elementary glob matching flags]]
 
+/* FIXME: elm_policy API is not bound to EO */
 struct Elm.Event.Policy_Changed
 {
    [[Data on the event when an Elementary policy has changed]]
@@ -20,13 +16,6 @@ struct Elm.Event.Policy_Changed
    old_value: int; [[new value the policy got]]
 }
 
-/* FIXME: These shouldn't be here, we don't do functions in eolian!!! */
-type Elm_Tooltip_Item_Content_Cb: __undefined_type; [[Elementary tooltip item content callback type]]
-type Elm_Object_Item_Signal_Cb: __undefined_type; [[Elementary object item signal callback type]]
-type Evas_Smart_Cb: __undefined_type; [[Evas smart callback type]]
-type Eina_Compare_Cb: __undefined_type; [[Eina compare callback type]]
-type @extern Elm.Glob.Match_Flags: __undefined_type; [[Elementary glob matching flags]]
-
 /* FIXME: elm_policy API is not bound to EO */
 enum Elm.Policy
 {
@@ -44,9 +33,10 @@ enum Elm.Policy
    last [[Sentinel value to indicate last enum field during iteration]]
 }
 
+/* FIXME: elm_policy API is not bound to EO */
 enum Elm.Policy.Quit
 {
-   [[Possible values for the #ELM_POLICY_QUIT policy]]
+   [[Possible values for the @Elm.Policy.quit policy]]
    none = 0, [[never quit the application automatically]]
    last_window_closed, [[quit when the application's last window is closed]]
    last_window_hidden [[quit when the application's last window is hidden
@@ -54,9 +44,10 @@ enum Elm.Policy.Quit
                         @since 1.14]]
 }
 
+/* FIXME: elm_policy API is not bound to EO */
 enum Elm.Policy.Exit
 {
-   [[Possible values for the #ELM_POLICY_EXIT policy.
+   [[Possible values for the @Elm.Policy.exit policy.
 
      @since 1.8
    ]]
@@ -64,9 +55,10 @@ enum Elm.Policy.Exit
    windows_del [[delete all the windows after quitting the main loop]]
 }
 
+/* FIXME: elm_policy API is not bound to EO */
 enum Elm.Policy.Throttle
 {
-   [[Possible values for the #ELM_POLICY_THROTTLE policy.
+   [[Possible values for the @Elm.Policy.throttle policy.
 
      @since 1.8
    ]]
@@ -76,6 +68,7 @@ enum Elm.Policy.Throttle
            settings]]
 }
 
+/* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
 enum Elm.Object.Select_Mode
 {
    [[Possible values for the #ELM_OBJECT_SELECT_MODE policy.
@@ -99,6 +92,7 @@ enum Elm.Object.Select_Mode
          is forbidden.]]
 }
 
+/* FIXME: Move to Efl.Ui namespace after Efl.Ui.List gets merged! */
 enum Elm.Object.Multi_Select_Mode
 {
    [[Possible values for the #ELM_OBJECT_MULTI_SELECT_MODE policy.
@@ -112,6 +106,7 @@ enum Elm.Object.Multi_Select_Mode
          ELM_OBJECT_MULTI_SELECT_MODE_MAX is forbidden.]]
 }
 
+/* Legacy only: elm_entry, elm_label, elm_popup */
 enum Elm.Wrap.Type
 {
    [[Line wrapping types.
@@ -129,85 +124,6 @@ enum Elm.Wrap.Type
    last      [[Sentinel value to indicate last enum field during iteration]]
 }
 
-enum Efl.Ui.Focus.Direction
-{
-   [[ Focus directions. ]]
-   previous = 0, [[ previous direction ]]
-   next = 1,     [[ next direction ]]
-   up = 2,       [[ up direction ]]
-   down = 3,     [[ down direction ]]
-   right = 4,    [[ right direction ]]
-   left = 5,     [[ left direction ]]
-   last = 6
-}
-
-enum Efl.Ui.Interest_Region_Mode
-{
-   [[Focus region show mode.]]
-   widget, [[As a widget.]]
-   item, [[As an item.]]
-}
-
-enum Efl.Ui.Focus.Move_Policy
-{
-   [[Focus Movement Policy.
-     @since 1.10]]
-   click, [[Move focus by mouse click or touch. Elementary focus is set on mouse
-            click and this is checked at mouse up time. (default)]]
-   in, [[Move focus by mouse in. Elementary focus is set on mouse move when the
-         mouse pointer is moved into an object.]]
-   key_only, [[Move focus by key. Elementary focus is set on key input like
-               Left, Right, Up, Down, Tab, or Shift+Tab.]]
-}
-
-enum Efl.Ui.Slider.Indicator_Visible_Mode
-{
-   [[Slider's indicator visiblity mode.
-
-     @since 1.13
-   ]]
-   default,   [[show indicator on mouse down or change in slider value]]
-   always,    [[Always show the indicator.]]
-   on_focus,  [[Show the indicator on focus]]
-   none       [[Never show the indicator ]]
-}
-
-enum Efl.Ui.Focus.Autoscroll_Mode
-{
-   [[Focus Autoscroll Mode
-
-     @since 1.10
-   ]]
-   show,    [[Directly show the focused region or item automatically.]]
-   none,    [[Do not show the focused region or item automatically.]]
-   bring_in [[Bring in the focused region or item automatically which might invole the scrolling.]]
-}
-
-enum Efl.Ui.Softcursor_Mode
-{
-   [[Software cursor mode.
-
-     @since 1.7
-   ]]
-   auto, [[Auto-detect if a software cursor should be used (default).]]
-   on,   [[Always use a softcursor.]]
-   off   [[Never use a softcursor.]]
-}
-
-enum Efl.Ui.Scroll_Block
-{
-   [[Direction in which a scroller should be blocked.
-
-     Note: These options may be effective only in case of thumbscroll (i.e.
-     when scrolling by dragging).
-
-     @since 1.21
-   ]]
-   none = 0,      [[Don't block any movement.]]
-   vertical = 1,  [[Block vertical movement.]]
-   horizontal = 2 [[Block horizontal movement.]]
-}
-
 enum Elm.Icon.Type
 {
    [[Elementary icon types]]
@@ -217,18 +133,6 @@ enum Elm.Icon.Type
    standard [[Icon is of type standard]]
 }
 
-/* 'on_access_activate' is beta API in the Widget class */
-enum Efl.Ui.Activate
-{
-   [[Accessibility ]]
-   default = 0, [[Activate default]]
-   up, [[Activate up]]
-   down, [[Activate down]]
-   right, [[Activate right]]
-   left, [[Activate left]]
-   back, [[Activate back]]
-}
-
 /* FIXME: shouldn't exist */
 struct @extern Elm_Gen_Item;
 struct @extern Elm_Atspi_Action;
index 8e733bb..32fee67 100644 (file)
  * @{
  */
 
+// Legacy types
 #include "elm_general.eot.h"
 
+// EO types. Defined for legacy-only builds as legacy uses typedef of EO types.
+#include "efl_ui.eot.h"
+
 #define ELM_FOCUS_PREVIOUS EFL_UI_FOCUS_DIRECTION_PREVIOUS
 #define ELM_FOCUS_NEXT EFL_UI_FOCUS_DIRECTION_NEXT
 #define ELM_FOCUS_UP EFL_UI_FOCUS_DIRECTION_UP
index eb0b4a8..081aba0 100644 (file)
@@ -1,4 +1,8 @@
 import elm_general;
+import efl_ui;
+
+type Elm_Tooltip_Item_Content_Cb: __undefined_type; [[Elementary tooltip item content callback type]]
+type Elm_Object_Item_Signal_Cb: __undefined_type; [[Elementary object item signal callback type]]
 
 class Elm.Widget.Item(Efl.Object, Elm.Interface.Atspi_Accessible,
                       Efl.Access.Component)