2012-03-20 Vincent Torri
- * Change ecore_win32_window_focus_set() to ecore_win32_window_focus()
+ * Rename ecore_win32_window_focus_set() to ecore_win32_window_focus()
to match ecore_x API.
- * Add ecore_wince_window_focus_set()
+ * Add ecore_wince_window_focus(), ecore_wince_window_focus_get()
+ and ecore_win32_window_focus_get().
- ecore_imf_context_input_panel_caps_lock_mode_get()
* ecore_win32:
- ecore_win32_focus()
+ - ecore_win32_focus_get()
* ecore_wince:
- ecore_wince_focus()
+ - ecore_wince_focus_get()
Fixes:
* ecore_thread:
EAPI void ecore_win32_window_focus(Ecore_Win32_Window *window);
+EAPI void *ecore_win32_window_focus_get(void);
+
EAPI void ecore_win32_window_iconified_set(Ecore_Win32_Window *window,
Eina_Bool on);
*
* This function returns the window HANDLE associated to @p window. If
* @p window is @c NULL, this function returns @c NULL.
+ *
+ * @note The returned value is of type HWND.
*/
EAPI void *
ecore_win32_window_hwnd_get(Ecore_Win32_Window *window)
}
/**
+ * @brief Get the current focused window.
+ *
+ * @return The window that has focus.
+ *
+ * This function returns the window that has focus. If the calling
+ * thread's message queue does not have an associated window with the
+ * keyboard focus, the return value is @c NULL.
+ *
+ * @note Even if the returned value is @c NULL, another thread's queue
+ * may be associated with a window that has the keyboard focus.
+ *
+ * @note The returned value is of type HWND.
+ */
+EAPI void *
+ecore_win32_window_focus_get(void)
+{
+ HWND focused;
+
+ INF("getting focused window");
+
+ focused = GetFocus(window->window);
+ if (!focused)
+ {
+ ERR("GetFocus() failed");
+ return NULL;
+ }
+
+ return focused;
+}
+
+/**
* @brief Iconify or restore the given window.
*
* @param window The window.
EAPI void ecore_wince_window_focus(Ecore_WinCE_Window *window);
+EAPI void *ecore_wince_window_focus_get(void);
+
EAPI void ecore_wince_window_backend_set(Ecore_WinCE_Window *window, int backend);
EAPI void ecore_wince_window_suspend_cb_set(Ecore_WinCE_Window *window, int (*suspend_cb)(int));
}
/**
+ * @brief Get the current focused window.
+ *
+ * @return The window that has focus.
+ *
+ * This function returns the window that has focus. If the calling
+ * thread's message queue does not have an associated window with the
+ * keyboard focus, the return value is @c NULL.
+ *
+ * @note Even if the returned value is @c NULL, another thread's queue
+ * may be associated with a window that has the keyboard focus.
+ *
+ * @note The returned value is of type HWND.
+ */
+EAPI void *
+ecore_wince_window_focus_get(void)
+{
+ HWND focused;
+
+ INF("getting focused window");
+
+ focused = GetFocus(window->window);
+ if (!focused)
+ {
+ ERR("GetFocus() failed");
+ return NULL;
+ }
+
+ return focused;
+}
+
+/**
* @brief Set the graphic backend used for the given window.
*
* @param window The window.