Elm_Win_Type type;
Elm_Win_Keyboard_Mode kbdmode;
+ Elm_Win_Indicator_Mode indmode;
struct {
const char *info;
Ecore_Timer *timer;
}
ecore_x_e_virtual_keyboard_state_set
(win->xwin, (Ecore_X_Virtual_Keyboard_State)win->kbdmode);
+ if (win->indmode == ELM_WIN_INDICATOR_SHOW)
+ ecore_x_e_illume_indicator_state_set
+ (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
+ else if (win->indmode == ELM_WIN_INDICATOR_HIDE)
+ ecore_x_e_illume_indicator_state_set
+ (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
}
#endif
} while (0)
#define ENGINE_COMPARE(name) (_elm_config->engine && !strcmp(_elm_config->engine, name))
+ win->kbdmode = ELM_WIN_KEYBOARD_UNKNOWN;
+ win->indmode = ELM_WIN_INDICATOR_UNKNOWN;
+
switch (type)
{
case ELM_WIN_INLINED_IMAGE:
}
EAPI void
+elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode)
+{
+ Elm_Win *win;
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ win = elm_widget_data_get(obj);
+ if (!win) return;
+ if (mode == win->indmode) return;
+#ifdef HAVE_ELEMENTARY_X
+ _elm_win_xwindow_get(win);
+#endif
+ win->indmode = mode;
+#ifdef HAVE_ELEMENTARY_X
+ if (win->xwin)
+ {
+ if (win->indmode == ELM_WIN_INDICATOR_SHOW)
+ ecore_x_e_illume_indicator_state_set
+ (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
+ else if (win->indmode == ELM_WIN_INDICATOR_HIDE)
+ ecore_x_e_illume_indicator_state_set
+ (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
+ }
+#endif
+}
+
+EAPI Elm_Win_Indicator_Mode
+elm_win_indicator_mode_get(const Evas_Object *obj)
+{
+ Elm_Win *win;
+ ELM_CHECK_WIDTYPE(obj, widtype) ELM_WIN_INDICATOR_UNKNOWN;
+ win = elm_widget_data_get(obj);
+ if (!win) return ELM_WIN_INDICATOR_UNKNOWN;
+ return win->indmode;
+}
+
+EAPI void
elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y)
{
Elm_Win *win;
case ELM_ILLUME_COMMAND_CLOSE:
ecore_x_e_illume_close_send(win->xwin);
break;
- case ELM_ILLUME_COMMAND_INDICATOR_SHOW:
- ecore_x_e_illume_indicator_state_set
- (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
- break;
- case ELM_ILLUME_COMMAND_INDICATOR_HIDE:
- ecore_x_e_illume_indicator_state_set
- (win->xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
- break;
default:
break;
}
} 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;
+
+/**
* Available commands that can be sent to the Illume manager.
*
* When running under an Illume session, a window may send commands to the
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_INDICATOR_SHOW, /**< Shows the indicator */
- ELM_ILLUME_COMMAND_INDICATOR_HIDE /**< Hides the indicator */
} Elm_Illume_Command;
/**
EAPI Eina_Bool elm_win_keyboard_win_get(const Evas_Object *obj);
/**
+ * Sets the indicator mode of the window.
+ *
+ * @param obj The window object
+ * @param mode The mode to set, one of #Elm_Win_Indicator_Mode
+ */
+EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode);
+
+/**
+ * Gets the indicator mode of the window.
+ *
+ * @param obj The window object
+ * @return The mode, one of #Elm_Win_Indicator_Mode
+ */
+EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj);
+
+/**
* Get the screen position of a window.
*
* @param obj The window object