blob: 23ad37d14795fe8eb617ed62d5e795c47febc8ac [file] [log] [blame]
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -05001/*
2 * Copyright © 2008 Kristian Høgsberg
3 *
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
13 *
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THIS SOFTWARE.
21 */
22
23#ifndef _WINDOW_H_
24#define _WINDOW_H_
25
Daniel Stone9d4f0302012-02-15 16:33:21 +000026#include <xkbcommon/xkbcommon.h>
Fred Morcosc4b8c452010-11-28 19:31:55 +010027#include <wayland-client.h>
Benjamin Franzkecff904e2011-02-18 23:00:55 +010028#include <cairo.h>
Kristian Høgsbergbcacef12012-03-11 21:05:57 -040029#include "../shared/config-parser.h"
Fred Morcosc4b8c452010-11-28 19:31:55 +010030
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -050031struct window;
Kristian Høgsbergc51f7992012-01-08 15:09:53 -050032struct widget;
Kristian Høgsberge28d05b2011-09-20 21:43:54 -040033struct display;
34struct input;
Kristian Høgsberg53ff2f62011-11-26 17:27:37 -050035struct output;
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -050036
Kristian Høgsberg3a696272011-09-14 17:33:48 -040037struct task {
38 void (*run)(struct task *task, uint32_t events);
39 struct wl_list link;
40};
41
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -050042struct rectangle {
43 int32_t x;
44 int32_t y;
45 int32_t width;
46 int32_t height;
47};
48
Kristian Høgsberg43c28ee2009-01-26 23:42:46 -050049struct display *
Kristian Høgsbergbcacef12012-03-11 21:05:57 -040050display_create(int argc, char *argv[]);
Kristian Høgsberg7824d812010-06-08 14:59:44 -040051
Pekka Paalanen999c5b52011-11-30 10:52:38 +020052void
Pekka Paalanenfe6079a2011-12-15 15:20:04 +020053display_destroy(struct display *display);
54
55void
Pekka Paalanen999c5b52011-11-30 10:52:38 +020056display_set_user_data(struct display *display, void *data);
57
58void *
59display_get_user_data(struct display *display);
60
Kristian Høgsberg9d69f8e2010-09-03 14:46:38 -040061struct wl_display *
62display_get_display(struct display *display);
63
Kristian Høgsberg43c28ee2009-01-26 23:42:46 -050064struct wl_compositor *
65display_get_compositor(struct display *display);
66
Kristian Høgsberg58eec362011-01-19 14:27:42 -050067struct wl_shell *
68display_get_shell(struct display *display);
69
Kristian Høgsberg53ff2f62011-11-26 17:27:37 -050070struct output *
71display_get_output(struct display *display);
72
Kristian Høgsbergeae5de72012-04-11 22:42:15 -040073uint32_t
74display_get_serial(struct display *display);
75
Pekka Paalanen999c5b52011-11-30 10:52:38 +020076typedef void (*display_output_handler_t)(struct output *output, void *data);
77
78/*
79 * The output configure handler is called, when a new output is connected
80 * and we know its current mode, or when the current mode changes.
81 * Test and set the output user data in your handler to know, if the
82 * output is new. Note: 'data' in the configure handler is the display
83 * user data.
84 */
85void
86display_set_output_configure_handler(struct display *display,
87 display_output_handler_t handler);
88
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -040089struct wl_data_source *
90display_create_data_source(struct display *display);
91
Kristian Høgsberg7824d812010-06-08 14:59:44 -040092#ifdef EGL_NO_DISPLAY
93EGLDisplay
94display_get_egl_display(struct display *d);
Kristian Høgsberg2b43bd72010-11-08 15:45:55 -050095
Benjamin Franzkecff904e2011-02-18 23:00:55 +010096EGLConfig
Benjamin Franzke0c991632011-09-27 21:57:31 +020097display_get_argb_egl_config(struct display *d);
Benjamin Franzkecff904e2011-02-18 23:00:55 +010098
Benjamin Franzke1a89f282011-10-07 09:33:06 +020099int
Benjamin Franzkecff904e2011-02-18 23:00:55 +0100100display_acquire_window_surface(struct display *display,
101 struct window *window,
102 EGLContext ctx);
103void
Benjamin Franzke0c991632011-09-27 21:57:31 +0200104display_release_window_surface(struct display *display,
105 struct window *window);
Benjamin Franzkecff904e2011-02-18 23:00:55 +0100106
Kristian Høgsberg8def2642011-01-14 17:41:33 -0500107#ifdef HAVE_CAIRO_EGL
Kristian Høgsberg2b43bd72010-11-08 15:45:55 -0500108EGLImageKHR
Kristian Høgsberg297c6312011-02-04 14:11:33 -0500109display_get_image_for_egl_image_surface(struct display *display,
110 cairo_surface_t *surface);
Kristian Høgsberg7824d812010-06-08 14:59:44 -0400111#endif
nobled98354172011-01-05 17:48:15 +0000112#endif
Kristian Høgsberg7824d812010-06-08 14:59:44 -0400113
Kristian Høgsberg3be87d12011-05-13 13:45:17 -0400114#define SURFACE_OPAQUE 0x01
Ander Conselvan de Oliveira210eb9d2012-05-25 16:03:06 +0300115#define SURFACE_SHM 0x02
Kristian Høgsberg3be87d12011-05-13 13:45:17 -0400116
Kristian Høgsbergdcb71b62010-06-15 17:16:35 -0400117cairo_surface_t *
118display_create_surface(struct display *display,
Benjamin Franzke6693ac22011-02-10 12:04:30 +0100119 struct wl_surface *surface,
Kristian Høgsberg3be87d12011-05-13 13:45:17 -0400120 struct rectangle *rectangle,
121 uint32_t flags);
Kristian Høgsbergdcb71b62010-06-15 17:16:35 -0400122
Kristian Høgsberg9a686242010-08-18 15:28:04 -0400123struct wl_buffer *
124display_get_buffer_for_surface(struct display *display,
125 cairo_surface_t *surface);
126
Ander Conselvan de Oliveira1042dc12012-05-22 15:39:42 +0300127struct wl_cursor_image *
128display_get_pointer_image(struct display *display, int pointer);
Kristian Høgsberg9a686242010-08-18 15:28:04 -0400129
Kristian Høgsberg7824d812010-06-08 14:59:44 -0400130void
Kristian Høgsberg3a696272011-09-14 17:33:48 -0400131display_defer(struct display *display, struct task *task);
132
133void
134display_watch_fd(struct display *display,
135 int fd, uint32_t events, struct task *task);
136
137void
Kristian Høgsberg7824d812010-06-08 14:59:44 -0400138display_run(struct display *d);
139
Pekka Paalanen826d7952011-12-15 10:14:07 +0200140void
141display_exit(struct display *d);
142
Ander Conselvan de Oliveiradc8c8fc2012-05-25 16:01:41 +0300143enum cursor_type {
144 CURSOR_BOTTOM_LEFT,
145 CURSOR_BOTTOM_RIGHT,
146 CURSOR_BOTTOM,
147 CURSOR_DRAGGING,
148 CURSOR_LEFT_PTR,
149 CURSOR_LEFT,
150 CURSOR_RIGHT,
151 CURSOR_TOP_LEFT,
152 CURSOR_TOP_RIGHT,
153 CURSOR_TOP,
154 CURSOR_IBEAM,
155 CURSOR_HAND1,
Kristian Høgsbergf3370522012-06-20 23:04:41 -0400156 CURSOR_WATCH,
157
158 CURSOR_BLANK
Kristian Høgsberg9a686242010-08-18 15:28:04 -0400159};
160
Kristian Høgsberg67cac8a2011-01-19 14:20:33 -0500161typedef void (*window_key_handler_t)(struct window *window, struct input *input,
162 uint32_t time, uint32_t key, uint32_t unicode,
Daniel Stonec9785ea2012-05-30 16:31:52 +0100163 enum wl_keyboard_key_state state, void *data);
Tim Wiederhakedc3f8172011-01-17 17:25:34 +0100164
Kristian Høgsberg3c248cc2009-02-22 23:01:35 -0500165typedef void (*window_keyboard_focus_handler_t)(struct window *window,
Kristian Høgsberg808fd412010-07-20 17:06:19 -0400166 struct input *device, void *data);
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500167
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400168typedef void (*window_data_handler_t)(struct window *window,
Kristian Høgsbergeae5de72012-04-11 22:42:15 -0400169 struct input *input,
Kristian Høgsberg80680c72012-05-10 12:21:37 -0400170 float x, float y,
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400171 const char **types,
172 void *data);
173
174typedef void (*window_drop_handler_t)(struct window *window,
175 struct input *input,
176 int32_t x, int32_t y, void *data);
177
Kristian Høgsberg4f7dcd62012-01-06 21:59:05 -0500178typedef void (*window_close_handler_t)(struct window *window, void *data);
179
Kristian Høgsbergb67e94b2012-01-10 12:23:19 -0500180typedef void (*widget_resize_handler_t)(struct widget *widget,
181 int32_t width, int32_t height,
182 void *data);
183typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data);
184
Kristian Høgsbergbb901fa2012-01-09 11:22:32 -0500185typedef int (*widget_enter_handler_t)(struct widget *widget,
Kristian Høgsbergeae5de72012-04-11 22:42:15 -0400186 struct input *input,
Kristian Høgsberg80680c72012-05-10 12:21:37 -0400187 float x, float y, void *data);
Kristian Høgsbergee143232012-01-09 08:42:24 -0500188typedef void (*widget_leave_handler_t)(struct widget *widget,
189 struct input *input, void *data);
Kristian Høgsberg04e98342012-01-09 09:36:16 -0500190typedef int (*widget_motion_handler_t)(struct widget *widget,
191 struct input *input, uint32_t time,
Kristian Høgsberg80680c72012-05-10 12:21:37 -0400192 float x, float y, void *data);
Kristian Høgsberga8a0db32012-01-09 11:12:05 -0500193typedef void (*widget_button_handler_t)(struct widget *widget,
194 struct input *input, uint32_t time,
Daniel Stone4dbadb12012-05-30 16:31:51 +0100195 uint32_t button,
196 enum wl_pointer_button_state state,
Daniel Stoneda5b93c2012-05-04 11:21:54 +0100197 void *data);
Kristian Høgsbergee143232012-01-09 08:42:24 -0500198
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500199struct window *
Kristian Høgsberg009ac0a2012-01-31 15:24:48 -0500200window_create(struct display *display);
Kristian Høgsberg248c1b62011-01-21 18:03:15 -0500201struct window *
202window_create_transient(struct display *display, struct window *parent,
Tiago Vignattidec76582012-05-21 16:47:46 +0300203 int32_t x, int32_t y, uint32_t flags);
Kristian Høgsberg962342c2012-06-26 16:29:50 -0400204struct window *
205window_create_custom(struct display *display);
Kristian Høgsberg4f7dcd62012-01-06 21:59:05 -0500206
207typedef void (*menu_func_t)(struct window *window, int index, void *data);
208
Pekka Paalanen6d174cf2012-01-19 15:17:59 +0200209void
210window_show_menu(struct display *display,
211 struct input *input, uint32_t time, struct window *parent,
212 int32_t x, int32_t y,
213 menu_func_t func, const char **entries, int count);
Kristian Høgsberg248c1b62011-01-21 18:03:15 -0500214
215void
Kristian Høgsbergd31fcab2012-01-31 09:53:44 -0500216window_show_frame_menu(struct window *window,
217 struct input *input, uint32_t time);
218
219void
Kristian Høgsberg248c1b62011-01-21 18:03:15 -0500220window_destroy(struct window *window);
221
Kristian Høgsbergc51f7992012-01-08 15:09:53 -0500222struct widget *
223window_add_widget(struct window *window, void *data);
Kristian Høgsberge28d05b2011-09-20 21:43:54 -0400224
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400225typedef void (*data_func_t)(void *data, size_t len,
226 int32_t x, int32_t y, void *user_data);
227
Kristian Høgsbergbcee9a42011-10-12 00:36:16 -0400228struct display *
229window_get_display(struct window *window);
Kristian Høgsberg248c1b62011-01-21 18:03:15 -0500230void
Kristian Høgsberg82da52b2010-12-17 09:53:12 -0500231window_move(struct window *window, struct input *input, uint32_t time);
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500232void
Kristian Høgsbergbb977002012-01-10 19:11:42 -0500233window_get_allocation(struct window *window, struct rectangle *allocation);
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500234void
Kristian Høgsberg3be87d12011-05-13 13:45:17 -0400235window_set_transparent(struct window *window, int transparent);
236void
Kristian Høgsberg80d746f2010-06-14 23:52:50 -0400237window_schedule_redraw(struct window *window);
Kristian Høgsbergb67e94b2012-01-10 12:23:19 -0500238void
239window_schedule_resize(struct window *window, int width, int height);
Kristian Høgsberga85fe3c2010-06-08 14:08:30 -0400240
241void
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -0400242window_damage(struct window *window, int32_t x, int32_t y,
243 int32_t width, int32_t height);
244
Kristian Høgsberg0ac16f02009-01-15 11:37:43 -0500245cairo_surface_t *
Kristian Høgsberga85fe3c2010-06-08 14:08:30 -0400246window_get_surface(struct window *window);
247
Benjamin Franzkeec4d3422011-03-14 12:07:26 +0100248struct wl_surface *
249window_get_wl_surface(struct window *window);
250
Pekka Paalanen9d1613e2011-11-25 12:09:16 +0200251struct wl_shell_surface *
252window_get_wl_shell_surface(struct window *window);
253
Kristian Høgsberg0ac16f02009-01-15 11:37:43 -0500254void
Kristian Høgsberg9d69f8e2010-09-03 14:46:38 -0400255window_flush(struct window *window);
256
Kristian Høgsberg012a0072010-10-26 00:02:20 -0400257void
Bryce Harringtonf57303f2010-11-19 12:15:15 -0800258window_set_surface(struct window *window, cairo_surface_t *surface);
259
260void
Kristian Høgsberg012a0072010-10-26 00:02:20 -0400261window_create_surface(struct window *window);
262
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -0400263enum window_buffer_type {
Benjamin Franzke6693ac22011-02-10 12:04:30 +0100264 WINDOW_BUFFER_TYPE_EGL_WINDOW,
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -0400265 WINDOW_BUFFER_TYPE_SHM,
266};
267
268void
Benjamin Franzkebde55ec2011-03-07 15:08:09 +0100269display_surface_damage(struct display *display, cairo_surface_t *cairo_surface,
270 int32_t x, int32_t y, int32_t width, int32_t height);
271
272void
Kristian Høgsbergd0c3b9d2010-10-25 11:40:03 -0400273window_set_buffer_type(struct window *window, enum window_buffer_type type);
274
Kristian Høgsberg9d69f8e2010-09-03 14:46:38 -0400275void
Kristian Høgsberg0395f302008-12-22 12:14:50 -0500276window_set_fullscreen(struct window *window, int fullscreen);
277
278void
Kristian Høgsbergd6bcd7d2012-02-16 15:53:46 -0500279window_set_maximized(struct window *window, int maximized);
280
281void
Kristian Høgsberg0c29eb22011-09-06 18:02:34 -0400282window_set_custom(struct window *window);
283
284void
Kristian Høgsbergc8c37342010-06-25 11:19:22 -0400285window_set_user_data(struct window *window, void *data);
286
Kristian Høgsberge9d37bd2010-09-02 20:22:42 -0400287void *
288window_get_user_data(struct window *window);
289
Kristian Høgsbergc8c37342010-06-25 11:19:22 -0400290void
Kristian Høgsberg6e83d582008-12-08 00:01:36 -0500291window_set_key_handler(struct window *window,
Kristian Høgsbergc8c37342010-06-25 11:19:22 -0400292 window_key_handler_t handler);
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500293
Kristian Høgsberg3c248cc2009-02-22 23:01:35 -0500294void
295window_set_keyboard_focus_handler(struct window *window,
Kristian Høgsbergc8c37342010-06-25 11:19:22 -0400296 window_keyboard_focus_handler_t handler);
Kristian Høgsberga85fe3c2010-06-08 14:08:30 -0400297
298void
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400299window_set_data_handler(struct window *window,
300 window_data_handler_t handler);
301
302void
303window_set_drop_handler(struct window *window,
304 window_drop_handler_t handler);
305
306void
Kristian Høgsberg4f7dcd62012-01-06 21:59:05 -0500307window_set_close_handler(struct window *window,
308 window_close_handler_t handler);
309
310void
Callum Lowcayef57a9b2011-01-14 20:46:23 +1300311window_set_title(struct window *window, const char *title);
312
313const char *
314window_get_title(struct window *window);
315
Scott Moreau7a1b32a2012-05-27 14:25:02 -0600316void
317window_set_text_cursor_position(struct window *window, int32_t x, int32_t y);
318
Tiago Vignatti82db9d82012-05-23 22:06:27 +0300319int
320widget_set_tooltip(struct widget *parent, char *entry, float x, float y);
321
322void
323widget_destroy_tooltip(struct widget *parent);
324
Kristian Høgsberg441338c2012-01-10 13:52:34 -0500325struct widget *
326widget_add_widget(struct widget *parent, void *data);
Tiago Vignatti82db9d82012-05-23 22:06:27 +0300327
Kristian Høgsberg441338c2012-01-10 13:52:34 -0500328void
329widget_destroy(struct widget *widget);
Kristian Høgsberg9a686242010-08-18 15:28:04 -0400330void
Kristian Høgsbergc51f7992012-01-08 15:09:53 -0500331widget_get_allocation(struct widget *widget, struct rectangle *allocation);
Kristian Høgsberge28d05b2011-09-20 21:43:54 -0400332
333void
Kristian Høgsbergc51f7992012-01-08 15:09:53 -0500334widget_set_allocation(struct widget *widget,
335 int32_t x, int32_t y, int32_t width, int32_t height);
Kristian Høgsbergbb977002012-01-10 19:11:42 -0500336void
337widget_set_size(struct widget *widget, int32_t width, int32_t height);
338void
Kristian Høgsberg010f98b2012-02-23 17:30:45 -0500339widget_set_transparent(struct widget *widget, int transparent);
340void
Kristian Høgsbergbb977002012-01-10 19:11:42 -0500341widget_schedule_resize(struct widget *widget, int32_t width, int32_t height);
Kristian Høgsberge28d05b2011-09-20 21:43:54 -0400342
343void *
Kristian Høgsbergc51f7992012-01-08 15:09:53 -0500344widget_get_user_data(struct widget *widget);
Kristian Høgsberge28d05b2011-09-20 21:43:54 -0400345
346void
Kristian Høgsbergb67e94b2012-01-10 12:23:19 -0500347widget_set_redraw_handler(struct widget *widget,
348 widget_redraw_handler_t handler);
349void
350widget_set_resize_handler(struct widget *widget,
351 widget_resize_handler_t handler);
352void
Kristian Høgsbergee143232012-01-09 08:42:24 -0500353widget_set_enter_handler(struct widget *widget,
354 widget_enter_handler_t handler);
355void
356widget_set_leave_handler(struct widget *widget,
357 widget_leave_handler_t handler);
Kristian Høgsberg04e98342012-01-09 09:36:16 -0500358void
359widget_set_motion_handler(struct widget *widget,
360 widget_motion_handler_t handler);
Kristian Høgsberg9a13dab2012-01-08 15:18:19 -0500361void
Kristian Høgsberga8a0db32012-01-09 11:12:05 -0500362widget_set_button_handler(struct widget *widget,
363 widget_button_handler_t handler);
364
365void
Kristian Høgsberg9a13dab2012-01-08 15:18:19 -0500366widget_schedule_redraw(struct widget *widget);
367
Kristian Høgsberg29af3eb2012-01-10 22:41:05 -0500368struct widget *
369frame_create(struct window *window, void *data);
Kristian Høgsberga1627922012-06-20 17:30:03 -0400370void
371frame_set_child_size(struct widget *widget, int child_width, int child_height);
Kristian Høgsberg29af3eb2012-01-10 22:41:05 -0500372
Kristian Høgsberg9a13dab2012-01-08 15:18:19 -0500373void
Kristian Høgsberg5a4e9ff2012-06-04 16:04:07 -0400374input_set_pointer_image(struct input *input, int pointer);
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400375
376void
Kristian Høgsberg9a686242010-08-18 15:28:04 -0400377input_get_position(struct input *input, int32_t *x, int32_t *y);
378
Kristian Høgsberg70163132012-05-08 15:55:39 -0400379#define MOD_SHIFT_MASK 0x01
380#define MOD_ALT_MASK 0x02
381#define MOD_CONTROL_MASK 0x04
382
Kristian Høgsberg67cac8a2011-01-19 14:20:33 -0500383uint32_t
384input_get_modifiers(struct input *input);
385
Kristian Høgsberg831dd522012-01-10 23:46:33 -0500386void
387input_grab(struct input *input, struct widget *widget, uint32_t button);
388
389void
Kristian Høgsbergeae5de72012-04-11 22:42:15 -0400390input_ungrab(struct input *input);
Kristian Høgsberg831dd522012-01-10 23:46:33 -0500391
Kristian Høgsbergb6323512012-01-11 00:04:42 -0500392struct widget *
393input_get_focus_widget(struct input *input);
394
Kristian Høgsbergd56bd902012-06-05 09:58:51 -0400395struct display *
396input_get_display(struct input *input);
397
Daniel Stone37816df2012-05-16 18:45:18 +0100398struct wl_seat *
399input_get_seat(struct input *input);
Kristian Høgsberg1d7ffd32010-08-25 16:34:05 -0400400
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400401struct wl_data_device *
402input_get_data_device(struct input *input);
403
Kristian Høgsberg6bccebe2011-01-21 16:23:09 -0500404void
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400405input_set_selection(struct input *input,
406 struct wl_data_source *source, uint32_t time);
407
408void
Kristian Høgsbergeae5de72012-04-11 22:42:15 -0400409input_accept(struct input *input, const char *type);
Kristian Høgsberg47fe08a2011-10-28 12:26:06 -0400410
411
412void
413input_receive_drag_data(struct input *input, const char *mime_type,
414 data_func_t func, void *user_data);
415
416int
417input_receive_selection_data(struct input *input, const char *mime_type,
418 data_func_t func, void *data);
Kristian Høgsberge7aaec32011-12-27 13:50:04 -0500419int
420input_receive_selection_data_to_fd(struct input *input,
421 const char *mime_type, int fd);
Kristian Høgsberg58eec362011-01-19 14:27:42 -0500422
Kristian Høgsberg53ff2f62011-11-26 17:27:37 -0500423void
Pekka Paalanen999c5b52011-11-30 10:52:38 +0200424output_set_user_data(struct output *output, void *data);
425
426void *
427output_get_user_data(struct output *output);
428
429void
430output_set_destroy_handler(struct output *output,
431 display_output_handler_t handler);
432
433void
Kristian Høgsberg53ff2f62011-11-26 17:27:37 -0500434output_get_allocation(struct output *output, struct rectangle *allocation);
435
Pekka Paalanen999c5b52011-11-30 10:52:38 +0200436struct wl_output *
437output_get_wl_output(struct output *output);
Kristian Høgsberg53ff2f62011-11-26 17:27:37 -0500438
Kristian Høgsberg0c4457f2008-12-07 19:59:11 -0500439#endif