diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-01 15:51:38 -0200 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-01 15:51:38 -0200 |
commit | b77ac9b57ef6367adaa2812be874575559b54d72 (patch) | |
tree | bb384b70d834fa1bf2e7f0d6aa171510351274cd /src/lib | |
parent | 8b852ad21eb106545100b122fa82d9923526b8af (diff) |
ecore/wayland: Add ecore_wl_window_keyboard_get().
Instead of use direct access to the Ecore_Wl_Window structure, just use
the getter, so we can hide the internals.
Diffstat (limited to '')
-rw-r--r-- | src/lib/ecore_wayland/Ecore_Wayland.h | 2 | ||||
-rw-r--r-- | src/lib/ecore_wayland/ecore_wl_window.c | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h index d42bae7d47..fe376308ea 100644 --- a/src/lib/ecore_wayland/Ecore_Wayland.h +++ b/src/lib/ecore_wayland/Ecore_Wayland.h | |||
@@ -633,6 +633,8 @@ EAPI int ecore_wl_window_id_get(Ecore_Wl_Window *win); | |||
633 | EAPI void ecore_wl_window_title_set(Ecore_Wl_Window *win, const char *title); | 633 | EAPI void ecore_wl_window_title_set(Ecore_Wl_Window *win, const char *title); |
634 | EAPI void ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name); | 634 | EAPI void ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name); |
635 | 635 | ||
636 | EAPI Ecore_Wl_Input *ecore_wl_window_keyboard_get(Ecore_Wl_Window *win); | ||
637 | |||
636 | /** | 638 | /** |
637 | * Returns a wl_surface with no association to any wl_shell_surface. | 639 | * Returns a wl_surface with no association to any wl_shell_surface. |
638 | * | 640 | * |
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c index 99463da11a..9b732d17a0 100644 --- a/src/lib/ecore_wayland/ecore_wl_window.c +++ b/src/lib/ecore_wayland/ecore_wl_window.c | |||
@@ -714,6 +714,17 @@ ecore_wl_window_class_name_set(Ecore_Wl_Window *win, const char *class_name) | |||
714 | wl_shell_surface_set_class(win->shell_surface, win->class_name); | 714 | wl_shell_surface_set_class(win->shell_surface, win->class_name); |
715 | } | 715 | } |
716 | 716 | ||
717 | /* @since 1.8 */ | ||
718 | /* Maybe we need an ecore_wl_window_pointer_get() too */ | ||
719 | EAPI Ecore_Wl_Input * | ||
720 | ecore_wl_window_keyboard_get(Ecore_Wl_Window *win) | ||
721 | { | ||
722 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
723 | |||
724 | if (!win) return 0; | ||
725 | return win->keyboard_device; | ||
726 | } | ||
727 | |||
717 | 728 | ||
718 | /* local functions */ | 729 | /* local functions */ |
719 | static void | 730 | static void |