From 40202659d69d0ddcd2272d45122a64adef1aa0a3 Mon Sep 17 00:00:00 2001 From: Vitor Sousa Date: Mon, 4 May 2015 18:33:17 -0300 Subject: elm_win: Move enums to elm_win.eo Move enums from elm_win_common.h to elm_win.eo in order to make them more accessible for bindings. Moved the include for elm_win.eo.legacy.h to the top of elm_win_legacy.h to allow the use of the generated types in the function declarations. --- src/lib/elm_win.eo | 166 +++++++++++++++++++++++++++++++++++++++++++++-- src/lib/elm_win_common.h | 138 --------------------------------------- src/lib/elm_win_legacy.h | 4 +- 3 files changed, 163 insertions(+), 145 deletions(-) diff --git a/src/lib/elm_win.eo b/src/lib/elm_win.eo index d0863aee9..d6e070646 100644 --- a/src/lib/elm_win.eo +++ b/src/lib/elm_win.eo @@ -1,3 +1,159 @@ +enum Elm.Win.Type +{ + /*@ + Defines the types of window that can be created + + These are hints set on the window so that a running Window Manager knows + how the window should be handled and/or what kind of decorations it + should have. + + Currently, only the X11 backed engines use them. + + @ingroup Win */ + + legacy: elm_win; + + unknown = -1, + basic, /*@ A normal window. Indicates a normal, top-level + window. Almost every window will be created with this + type. */ + dialog_basic, /*@ Used for simple dialog windows. */ + desktop, /*@ For special desktop windows, like a background + window holding desktop icons. */ + dock, /*@ The window is used as a dock or panel. Usually would + be kept on top of any other window by the Window + Manager. */ + toolbar, /*@ The window is used to hold a floating toolbar, or + similar. */ + menu, /*@ Similar to #ELM_WIN_TOOLBAR. */ + utility, /*@ A persistent utility window, like a toolbox or + palette. */ + splash, /*@ Splash window for a starting up application. */ + dropdown_menu, /*@ The window is a dropdown menu, as when an + entry in a menubar is clicked. Typically used + with elm_win_override_set(). This hint exists + for completion only, as the EFL way of + implementing a menu would not normally use a + separate window for its contents. */ + popup_menu, /*@ Like #ELM_WIN_DROPDOWN_MENU, but for the menu + triggered by right-clicking an object. */ + tooltip, /*@ The window is a tooltip. A short piece of + explanatory text that typically appear after the + mouse cursor hovers over an object for a while. + Typically used with elm_win_override_set() and also + not very commonly used in the EFL. */ + notification, /*@ A notification window, like a warning about + battery life or a new E-Mail received. */ + combo, /*@ A window holding the contents of a combo box. Not + usually used in the EFL. */ + dnd, /*@ Used to indicate the window is a representation of an + object being dragged across different windows, or even + applications. Typically used with + elm_win_override_set(). */ + inlined_image, /*@ The window is rendered onto an image + buffer. No actual window is created for this + type, instead the window and all of its + contents will be rendered to an image buffer. + This allows to have children window inside a + parent one just like any other object would + be, and do other things like applying @c + Evas_Map effects to it. This is the only type + of window that requires the @c parent + parameter of elm_win_add() to be a valid @c + Evas_Object. */ + socket_image, /*@ The window is rendered onto an image buffer + and can be shown other process's plug image object. + No actual window is created for this type, + instead the window and all of its contents will be + rendered to an image buffer and can be shown + other process's plug image object. */ + fake /*@ This window was created using a pre-existing canvas. + The window widget can be deleted, but the canvas + must be managed externally. + @since 1.13 */ +} + +enum Elm.Win.Keyboard_Mode +{ + /*@ + The different layouts that can be requested for the virtual keyboard. + + When the application window is being managed by Illume, it may request + any of the following layouts for the virtual keyboard. + + @ingroup Win */ + + legacy: elm_win_keyboard; + + unknown, /*@ Unknown keyboard state */ + off, /*@ Request to deactivate the keyboard */ + on, /*@ Enable keyboard with default layout */ + alpha, /*@ Alpha (a-z) keyboard layout */ + numeric, /*@ Numeric keyboard layout */ + pin, /*@ PIN keyboard layout */ + phone_number, /*@ Phone keyboard layout */ + hex, /*@ Hexadecimal numeric keyboard layout */ + terminal, /*@ Full (QWERTY) keyboard layout */ + password, /*@ Password keyboard layout */ + ip, /*@ IP keyboard layout */ + host, /*@ Host keyboard layout */ + file, /*@ File keyboard layout */ + url, /*@ URL keyboard layout */ + keypad, /*@ Keypad layout */ + j2me /*@ J2ME keyboard layout */ +} + +enum Elm.Win.Indicator_Mode +{ + /*@ + In some environments, like phones, you may have an indicator that + shows battery status, reception, time etc. This is the indicator. + + Sometimes you don't want it because you provide the same functionality + inside your app, so this will request that the indicator is hidden in + this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default + is to have the indicator shown. + + @ingroup Win */ + + legacy: elm_win_indicator; + + unknown, /*@ Unknown indicator state */ + hide, /*@ Hides the indicator */ + show /*@ Shows the indicator */ +} + +enum Elm.Win.Indicator_Opacity_Mode +{ + /*@ + Defines the opacity modes of indicator that can be shown + + @ingroup Win */ + + legacy: elm_win_indicator; + + opacity_unknown, /*@ Unknown indicator opacity mode */ + opaque, /*@ Opacifies the indicator */ + translucent, /*@ Be translucent the indicator */ + transparent /*@ Transparentizes the indicator */ +} + +enum Elm.Illume_Command +{ + /*@ + Available commands that can be sent to the Illume manager. + + When running under an Illume session, a window may send commands to the + Illume manager to perform different actions. + + @ingroup Win */ + + focus_back, /*@ Reverts focus to the previous window */ + focus_forward, /*@ Sends focus to the next window in the list */ + focus_home, /*@ Hides all windows to show the Home screen */ + close /*@ Closes the currently active window */ +} + class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, Elm_Interface_Atspi_Widget_Action) { @@ -600,7 +756,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, @ingroup Win */ } values { - Elm_Win_Keyboard_Mode mode; /*@ The mode to set, one of #Elm_Win_Keyboard_Mode */ + Elm.Win.Keyboard_Mode mode; /*@ The mode to set, one of #Elm_Win_Keyboard_Mode */ } } @property focus_highlight_animate { @@ -680,7 +836,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, @ingroup Win */ } values { - Elm_Win_Indicator_Opacity_Mode mode; /*@ The mode to set, one of #Elm_Win_Indicator_Opacity_Mode */ + Elm.Win.Indicator_Opacity_Mode mode; /*@ The mode to set, one of #Elm_Win_Indicator_Opacity_Mode */ } } @property demand_attention { @@ -886,7 +1042,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, @ingroup Win */ } values { - Elm_Win_Indicator_Mode mode; /*@ The mode to set, one of #Elm_Win_Indicator_Mode */ + Elm.Win.Indicator_Mode mode; /*@ The mode to set, one of #Elm_Win_Indicator_Mode */ } } @property conformant { @@ -1194,7 +1350,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, @ingroup Win */ } values { - Elm_Win_Type type(-1); + Elm.Win.Type type(enum Elm.Win.Type.unknown); } } @property noblank { @@ -1291,7 +1447,7 @@ class Elm.Win (Elm.Widget, Elm_Interface_Atspi_Window, @ingroup Win */ params { - @in Elm_Illume_Command command; /*@ The command to send */ + @in Elm.Illume_Command command; /*@ The command to send */ @in void *params @optional; /*@ Optional parameters for the command */ } } diff --git a/src/lib/elm_win_common.h b/src/lib/elm_win_common.h index b1e16fbb0..02d8bd4e2 100644 --- a/src/lib/elm_win_common.h +++ b/src/lib/elm_win_common.h @@ -4,144 +4,6 @@ * @{ */ -/** - * Defines the types of window that can be created - * - * These are hints set on the window so that a running Window Manager knows - * how the window should be handled and/or what kind of decorations it - * should have. - * - * Currently, only the X11 backed engines use them. - */ -typedef enum -{ - ELM_WIN_UNKNOWN = -1, - ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level - window. Almost every window will be created with this - type. */ - ELM_WIN_DIALOG_BASIC, /**< Used for simple dialog windows/ */ - ELM_WIN_DESKTOP, /**< For special desktop windows, like a background - window holding desktop icons. */ - ELM_WIN_DOCK, /**< The window is used as a dock or panel. Usually would - be kept on top of any other window by the Window - Manager. */ - ELM_WIN_TOOLBAR, /**< The window is used to hold a floating toolbar, or - similar. */ - ELM_WIN_MENU, /**< Similar to #ELM_WIN_TOOLBAR. */ - ELM_WIN_UTILITY, /**< A persistent utility window, like a toolbox or - palette. */ - ELM_WIN_SPLASH, /**< Splash window for a starting up application. */ - ELM_WIN_DROPDOWN_MENU, /**< The window is a dropdown menu, as when an - entry in a menubar is clicked. Typically used - with elm_win_override_set(). This hint exists - for completion only, as the EFL way of - implementing a menu would not normally use a - separate window for its contents. */ - ELM_WIN_POPUP_MENU, /**< Like #ELM_WIN_DROPDOWN_MENU, but for the menu - triggered by right-clicking an object. */ - ELM_WIN_TOOLTIP, /**< The window is a tooltip. A short piece of - explanatory text that typically appear after the - mouse cursor hovers over an object for a while. - Typically used with elm_win_override_set() and also - not very commonly used in the EFL. */ - ELM_WIN_NOTIFICATION, /**< A notification window, like a warning about - battery life or a new E-Mail received. */ - ELM_WIN_COMBO, /**< A window holding the contents of a combo box. Not - usually used in the EFL. */ - ELM_WIN_DND, /**< Used to indicate the window is a representation of an - object being dragged across different windows, or even - applications. Typically used with - elm_win_override_set(). */ - ELM_WIN_INLINED_IMAGE, /**< The window is rendered onto an image - buffer. No actual window is created for this - type, instead the window and all of its - contents will be rendered to an image buffer. - This allows to have children window inside a - parent one just like any other object would - be, and do other things like applying @c - Evas_Map effects to it. This is the only type - of window that requires the @c parent - parameter of elm_win_add() to be a valid @c - Evas_Object. */ - ELM_WIN_SOCKET_IMAGE,/**< The window is rendered onto an image buffer - and can be shown other process's plug image object. - No actual window is created for this type, - instead the window and all of its contents will be - rendered to an image buffer and can be shown - other process's plug image object*/ - ELM_WIN_FAKE /**< This window was created using a pre-existing canvas. - The window widget can be deleted, but the canvas - must be managed externally. - @since 1.13 */ -} Elm_Win_Type; - -/** - * The different layouts that can be requested for the virtual keyboard. - * - * When the application window is being managed by Illume, it may request - * any of the following layouts for the virtual keyboard. - */ -typedef enum -{ - ELM_WIN_KEYBOARD_UNKNOWN, /**< Unknown keyboard state */ - ELM_WIN_KEYBOARD_OFF, /**< Request to deactivate the keyboard */ - ELM_WIN_KEYBOARD_ON, /**< Enable keyboard with default layout */ - ELM_WIN_KEYBOARD_ALPHA, /**< Alpha (a-z) keyboard layout */ - ELM_WIN_KEYBOARD_NUMERIC, /**< Numeric keyboard layout */ - ELM_WIN_KEYBOARD_PIN, /**< PIN keyboard layout */ - ELM_WIN_KEYBOARD_PHONE_NUMBER, /**< Phone keyboard layout */ - ELM_WIN_KEYBOARD_HEX, /**< Hexadecimal numeric keyboard layout */ - ELM_WIN_KEYBOARD_TERMINAL, /**< Full (QWERTY) keyboard layout */ - ELM_WIN_KEYBOARD_PASSWORD, /**< Password keyboard layout */ - ELM_WIN_KEYBOARD_IP, /**< IP keyboard layout */ - ELM_WIN_KEYBOARD_HOST, /**< Host keyboard layout */ - ELM_WIN_KEYBOARD_FILE, /**< File keyboard layout */ - ELM_WIN_KEYBOARD_URL, /**< URL keyboard layout */ - ELM_WIN_KEYBOARD_KEYPAD, /**< Keypad layout */ - ELM_WIN_KEYBOARD_J2ME /**< J2ME keyboard layout */ -} Elm_Win_Keyboard_Mode; - -/** - * In some environments, like phones, you may have an indicator that - * shows battery status, reception, time etc. This is the indicator. - * - * Sometimes you don't want it because you provide the same functionality - * inside your app, so this will request that the indicator is hidden in - * this circumstance if you use ELM_ILLUME_INDICATOR_HIDE. The default - * is to have the indicator shown. - */ -typedef enum -{ - ELM_WIN_INDICATOR_UNKNOWN, /**< Unknown indicator state */ - ELM_WIN_INDICATOR_HIDE, /**< Hides the indicator */ - ELM_WIN_INDICATOR_SHOW /**< Shows the indicator */ -} Elm_Win_Indicator_Mode; - -/** - * Defines the opacity modes of indicator that can be shown - */ -typedef enum -{ - ELM_WIN_INDICATOR_OPACITY_UNKNOWN, /**< Unknown indicator opacity mode */ - ELM_WIN_INDICATOR_OPAQUE, /**< Opacifies the indicator */ - ELM_WIN_INDICATOR_TRANSLUCENT, /**< Be translucent the indicator */ - ELM_WIN_INDICATOR_TRANSPARENT /**< Transparentizes the indicator */ -} Elm_Win_Indicator_Opacity_Mode; - -/** - * Available commands that can be sent to the Illume manager. - * - * When running under an Illume session, a window may send commands to the - * Illume manager to perform different actions. - */ -typedef enum -{ - ELM_ILLUME_COMMAND_FOCUS_BACK, /**< Reverts focus to the previous window */ - ELM_ILLUME_COMMAND_FOCUS_FORWARD, /**< Sends focus to the next window in the list */ - ELM_ILLUME_COMMAND_FOCUS_HOME, /**< Hides all windows to show the Home screen */ - ELM_ILLUME_COMMAND_CLOSE, /**< Closes the currently active window */ -} Elm_Illume_Command; - /** * @typedef Elm_Win_Trap * diff --git a/src/lib/elm_win_legacy.h b/src/lib/elm_win_legacy.h index 42a875f45..f38bc45d5 100644 --- a/src/lib/elm_win_legacy.h +++ b/src/lib/elm_win_legacy.h @@ -1,3 +1,5 @@ +#include "elm_win.eo.legacy.h" + /** * Adds a window object. If this is the first window created, pass NULL as * @p parent. @@ -225,5 +227,3 @@ EAPI void elm_win_wm_rotation_preferred_rotation_set(const Evas * this is definitely not the function you are looking for. */ EAPI Ecore_Window elm_win_window_id_get(const Evas_Object *obj); - -#include "elm_win.eo.legacy.h" -- cgit v1.2.1