aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c')
-rw-r--r--libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c52
1 files changed, 52 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
index 4e8b7b1..72353ce 100644
--- a/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
+++ b/libraries/ecore/src/lib/ecore_wince/ecore_wince_window.c
@@ -447,6 +447,58 @@ ecore_wince_window_title_set(Ecore_WinCE_Window *window,
447} 447}
448 448
449/** 449/**
450 * @brief Set the focus to the given window.
451 *
452 * @param window The window to give focus to.
453 *
454 * This function gives the focus to @p window. If @p window is
455 * @c NULL, this function does nothing.
456 */
457EAPI void
458ecore_wince_window_focus(Ecore_WinCE_Window *window)
459{
460 if (!window) return;
461
462 INF("focusing window");
463
464 if (!SetFocus(window->window))
465 {
466 ERR("SetFocus() failed");
467 }
468}
469
470/**
471 * @brief Get the current focused window.
472 *
473 * @return The window that has focus.
474 *
475 * This function returns the window that has focus. If the calling
476 * thread's message queue does not have an associated window with the
477 * keyboard focus, the return value is @c NULL.
478 *
479 * @note Even if the returned value is @c NULL, another thread's queue
480 * may be associated with a window that has the keyboard focus.
481 *
482 * @note The returned value is of type HWND.
483 */
484EAPI void *
485ecore_wince_window_focus_get(void)
486{
487 HWND focused;
488
489 INF("getting focused window");
490
491 focused = GetFocus();
492 if (!focused)
493 {
494 ERR("GetFocus() failed");
495 return NULL;
496 }
497
498 return focused;
499}
500
501/**
450 * @brief Set the graphic backend used for the given window. 502 * @brief Set the graphic backend used for the given window.
451 * 503 *
452 * @param window The window. 504 * @param window The window.