summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-10-31 19:09:30 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-10-31 21:35:13 -0200
commite56428f4ad7b015c73b1959cf1d6aac154ca4ac0 (patch)
tree0ff0f8a4a979d64c3a95e26d14789a9190574b7e /src/lib
parent35d2f195de262d846c5e3f6dc5634921afe46606 (diff)
ecore/wayland: Make Ecore_Wl_Input private.
It's mostly only used inside ecore_wayland library anyway. The only bit needed outside of the library is the "seat" pointer, but a new function was added to retrieve such pointer from Ecore_Wl_Input.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_wayland/Ecore_Wayland.h53
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c13
-rw-r--r--src/lib/ecore_wayland/ecore_wl_private.h52
3 files changed, 66 insertions, 52 deletions
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index d7b6c6936b..d190e0f82a 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -109,58 +109,6 @@ struct _Ecore_Wl_Output
109 void *data; 109 void *data;
110}; 110};
111 111
112struct _Ecore_Wl_Input
113{
114 Ecore_Wl_Display *display;
115 struct wl_seat *seat;
116 struct wl_pointer *pointer;
117 struct wl_keyboard *keyboard;
118 struct wl_touch *touch;
119
120 const char *cursor_name;
121 struct wl_cursor *cursor;
122 struct wl_surface *cursor_surface;
123 struct wl_callback *cursor_frame_cb;
124 Ecore_Timer *cursor_timer;
125 unsigned int cursor_current_index;
126
127 struct wl_data_device *data_device;
128 struct wl_data_source *data_source;
129 struct wl_array data_types;
130
131 Ecore_Wl_Window *pointer_focus;
132 Ecore_Wl_Window *keyboard_focus;
133
134 unsigned int button;
135 unsigned int timestamp;
136 unsigned int modifiers;
137 unsigned int pointer_enter_serial;
138 int sx, sy;
139
140 struct wl_list link;
141
142 Ecore_Wl_Window *grab;
143 unsigned int grab_button;
144
145 Ecore_Wl_Dnd_Source *drag_source;
146 Ecore_Wl_Dnd_Source *selection_source;
147
148 struct
149 {
150 struct xkb_keymap *keymap;
151 struct xkb_state *state;
152 xkb_mod_mask_t control_mask;
153 xkb_mod_mask_t alt_mask;
154 xkb_mod_mask_t shift_mask;
155 } xkb;
156
157 struct
158 {
159 Ecore_Timer *tmr;
160 unsigned int sym, key, time;
161 } repeat;
162};
163
164struct _Ecore_Wl_Window 112struct _Ecore_Wl_Window
165{ 113{
166 Ecore_Wl_Display *display; 114 Ecore_Wl_Display *display;
@@ -524,6 +472,7 @@ EAPI void ecore_wl_input_ungrab(Ecore_Wl_Input *input);
524EAPI void ecore_wl_input_pointer_set(Ecore_Wl_Input *input, struct wl_surface *surface, int hot_x, int hot_y); 472EAPI void ecore_wl_input_pointer_set(Ecore_Wl_Input *input, struct wl_surface *surface, int hot_x, int hot_y);
525EAPI void ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input *input, const char *cursor_name); 473EAPI void ecore_wl_input_cursor_from_name_set(Ecore_Wl_Input *input, const char *cursor_name);
526EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input); 474EAPI void ecore_wl_input_cursor_default_restore(Ecore_Wl_Input *input);
475EAPI struct wl_seat *ecore_wl_input_seat_get(Ecore_Wl_Input *input);
527 476
528EAPI struct wl_list *ecore_wl_outputs_get(void); 477EAPI struct wl_list *ecore_wl_outputs_get(void);
529 478
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 2cdc1ec773..bd1e01042d 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -287,6 +287,19 @@ ecore_wl_input_get(void)
287 return _ecore_wl_disp->input; 287 return _ecore_wl_disp->input;
288} 288}
289 289
290/**
291 * @since 1.8
292 */
293EAPI struct wl_seat *
294ecore_wl_input_seat_get(Ecore_Wl_Input *input)
295{
296 LOGFN(__FILE__, __LINE__, __FUNCTION__);
297
298 if (!input) return NULL;
299
300 return input->seat;
301}
302
290/* local functions */ 303/* local functions */
291void 304void
292_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id) 305_ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id)
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h
index fdbd3c9bef..06be1a5b58 100644
--- a/src/lib/ecore_wayland/ecore_wl_private.h
+++ b/src/lib/ecore_wayland/ecore_wl_private.h
@@ -92,6 +92,58 @@ struct _Ecore_Wl_Display
92 void *data; 92 void *data;
93}; 93};
94 94
95struct _Ecore_Wl_Input
96{
97 Ecore_Wl_Display *display;
98 struct wl_seat *seat;
99 struct wl_pointer *pointer;
100 struct wl_keyboard *keyboard;
101 struct wl_touch *touch;
102
103 const char *cursor_name;
104 struct wl_cursor *cursor;
105 struct wl_surface *cursor_surface;
106 struct wl_callback *cursor_frame_cb;
107 Ecore_Timer *cursor_timer;
108 unsigned int cursor_current_index;
109
110 struct wl_data_device *data_device;
111 struct wl_data_source *data_source;
112 struct wl_array data_types;
113
114 Ecore_Wl_Window *pointer_focus;
115 Ecore_Wl_Window *keyboard_focus;
116
117 unsigned int button;
118 unsigned int timestamp;
119 unsigned int modifiers;
120 unsigned int pointer_enter_serial;
121 int sx, sy;
122
123 struct wl_list link;
124
125 Ecore_Wl_Window *grab;
126 unsigned int grab_button;
127
128 Ecore_Wl_Dnd_Source *drag_source;
129 Ecore_Wl_Dnd_Source *selection_source;
130
131 struct
132 {
133 struct xkb_keymap *keymap;
134 struct xkb_state *state;
135 xkb_mod_mask_t control_mask;
136 xkb_mod_mask_t alt_mask;
137 xkb_mod_mask_t shift_mask;
138 } xkb;
139
140 struct
141 {
142 Ecore_Timer *tmr;
143 unsigned int sym, key, time;
144 } repeat;
145};
146
95struct _Ecore_Wl_Dnd 147struct _Ecore_Wl_Dnd
96{ 148{
97 Ecore_Wl_Display *ewd; 149 Ecore_Wl_Display *ewd;