2008-12-08 00:59:11 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2008 Kristian Høgsberg
|
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
|
|
* that the name of the copyright holders not be used in advertising or
|
|
|
|
* publicity pertaining to distribution of the software without specific,
|
|
|
|
* written prior permission. The copyright holders make no representations
|
|
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
|
|
* is" without express or implied warranty.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
* OF THIS SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _WINDOW_H_
|
|
|
|
#define _WINDOW_H_
|
|
|
|
|
2012-02-15 16:33:21 +00:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
2010-11-28 18:31:55 +00:00
|
|
|
#include <wayland-client.h>
|
2011-02-18 22:00:55 +00:00
|
|
|
#include <cairo.h>
|
2012-03-12 01:05:57 +00:00
|
|
|
#include "../shared/config-parser.h"
|
protocol: add sub-surfaces
Add protocol for sub-surfaces, wl_subcompositor as the global interface,
and wl_subsurface as the per-surface interface extension.
This patch is meant to be reverted, once sub-surfaces are moved into
Wayland core.
Changes in v2:
- Rewrite wl_subcompositor.get_subsurface description, and move mapping
and commit details into wl_subsurface description. Check the wording
in wl_subsurface.set_position description.
- Add wl_subsurface.set_commit_mode request, and document it, with the
commit_mode enum. Add bad_value error code for wl_subsurface.
- Moved the protocol into Weston repository so we can land it upstream
sooner for public exposure. It is to be moved into Wayland core later.
- Add destroy requests to both wl_subcompositor and wl_subsurface, and
document them. Experience has showed, that interfaces should always
have a destructor unless there is a good and future-proof reason to not
have it.
Changes in v3:
- Specify, that wl_subsurface will become inert, if the corresponding
wl_surface is destroyed, instead of requiring a certain destruction
order.
- Replaced wl_subsurface.set_commit_mode with wl_subsurface.set_sync and
wl_subsurface.set_desync. Parent-cached commit mode is now called
synchronized, and independent mode is desynchronized. Removed
commit_mode enum, and bad_value error.
- Added support for nested sub-surfaces.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2013-04-25 10:57:41 +00:00
|
|
|
#include "subsurface-client-protocol.h"
|
2010-11-28 18:31:55 +00:00
|
|
|
|
2012-10-19 21:12:38 +00:00
|
|
|
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
|
|
|
|
2012-10-20 03:05:37 +00:00
|
|
|
#define container_of(ptr, type, member) ({ \
|
|
|
|
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
|
|
|
|
(type *)( (char *)__mptr - offsetof(type,member) );})
|
|
|
|
|
2008-12-08 00:59:11 +00:00
|
|
|
struct window;
|
2012-01-08 20:09:53 +00:00
|
|
|
struct widget;
|
2011-09-21 01:43:54 +00:00
|
|
|
struct display;
|
|
|
|
struct input;
|
2011-11-26 22:27:37 +00:00
|
|
|
struct output;
|
2008-12-08 00:59:11 +00:00
|
|
|
|
2011-09-14 21:33:48 +00:00
|
|
|
struct task {
|
|
|
|
void (*run)(struct task *task, uint32_t events);
|
|
|
|
struct wl_list link;
|
|
|
|
};
|
|
|
|
|
2008-12-08 00:59:11 +00:00
|
|
|
struct rectangle {
|
|
|
|
int32_t x;
|
|
|
|
int32_t y;
|
|
|
|
int32_t width;
|
|
|
|
int32_t height;
|
|
|
|
};
|
|
|
|
|
2009-01-27 04:42:46 +00:00
|
|
|
struct display *
|
2013-02-20 20:27:49 +00:00
|
|
|
display_create(int *argc, char *argv[]);
|
2010-06-08 18:59:44 +00:00
|
|
|
|
2011-12-15 13:20:04 +00:00
|
|
|
void
|
|
|
|
display_destroy(struct display *display);
|
|
|
|
|
2011-11-30 08:52:38 +00:00
|
|
|
void
|
|
|
|
display_set_user_data(struct display *display, void *data);
|
|
|
|
|
|
|
|
void *
|
|
|
|
display_get_user_data(struct display *display);
|
|
|
|
|
2010-09-03 18:46:38 +00:00
|
|
|
struct wl_display *
|
|
|
|
display_get_display(struct display *display);
|
|
|
|
|
2009-01-27 04:42:46 +00:00
|
|
|
struct wl_compositor *
|
|
|
|
display_get_compositor(struct display *display);
|
|
|
|
|
2011-01-19 19:27:42 +00:00
|
|
|
struct wl_shell *
|
|
|
|
display_get_shell(struct display *display);
|
|
|
|
|
2011-11-26 22:27:37 +00:00
|
|
|
struct output *
|
|
|
|
display_get_output(struct display *display);
|
|
|
|
|
2012-04-12 02:42:15 +00:00
|
|
|
uint32_t
|
|
|
|
display_get_serial(struct display *display);
|
|
|
|
|
2012-10-11 01:34:26 +00:00
|
|
|
typedef void (*display_global_handler_t)(struct display *display,
|
|
|
|
uint32_t name,
|
|
|
|
const char *interface,
|
|
|
|
uint32_t version, void *data);
|
|
|
|
|
|
|
|
void
|
|
|
|
display_set_global_handler(struct display *display,
|
|
|
|
display_global_handler_t handler);
|
|
|
|
void *
|
|
|
|
display_bind(struct display *display, uint32_t name,
|
|
|
|
const struct wl_interface *interface, uint32_t version);
|
|
|
|
|
2011-11-30 08:52:38 +00:00
|
|
|
typedef void (*display_output_handler_t)(struct output *output, void *data);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The output configure handler is called, when a new output is connected
|
|
|
|
* and we know its current mode, or when the current mode changes.
|
|
|
|
* Test and set the output user data in your handler to know, if the
|
|
|
|
* output is new. Note: 'data' in the configure handler is the display
|
|
|
|
* user data.
|
|
|
|
*/
|
|
|
|
void
|
|
|
|
display_set_output_configure_handler(struct display *display,
|
|
|
|
display_output_handler_t handler);
|
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
struct wl_data_source *
|
|
|
|
display_create_data_source(struct display *display);
|
|
|
|
|
2010-06-08 18:59:44 +00:00
|
|
|
#ifdef EGL_NO_DISPLAY
|
|
|
|
EGLDisplay
|
|
|
|
display_get_egl_display(struct display *d);
|
2010-11-08 20:45:55 +00:00
|
|
|
|
2011-09-27 19:57:31 +00:00
|
|
|
EGLConfig
|
|
|
|
display_get_argb_egl_config(struct display *d);
|
2011-02-18 22:00:55 +00:00
|
|
|
|
2011-10-07 07:33:06 +00:00
|
|
|
int
|
2011-02-18 22:00:55 +00:00
|
|
|
display_acquire_window_surface(struct display *display,
|
|
|
|
struct window *window,
|
|
|
|
EGLContext ctx);
|
|
|
|
void
|
2011-09-27 19:57:31 +00:00
|
|
|
display_release_window_surface(struct display *display,
|
|
|
|
struct window *window);
|
2011-01-05 17:48:15 +00:00
|
|
|
#endif
|
2010-06-08 18:59:44 +00:00
|
|
|
|
2011-05-13 17:45:17 +00:00
|
|
|
#define SURFACE_OPAQUE 0x01
|
2012-05-25 13:03:06 +00:00
|
|
|
#define SURFACE_SHM 0x02
|
2011-05-13 17:45:17 +00:00
|
|
|
|
2013-02-13 14:17:15 +00:00
|
|
|
#define SURFACE_HINT_RESIZE 0x10
|
|
|
|
|
2010-06-15 21:16:35 +00:00
|
|
|
cairo_surface_t *
|
|
|
|
display_create_surface(struct display *display,
|
2011-02-10 11:04:30 +00:00
|
|
|
struct wl_surface *surface,
|
2011-05-13 17:45:17 +00:00
|
|
|
struct rectangle *rectangle,
|
|
|
|
uint32_t flags);
|
2010-06-15 21:16:35 +00:00
|
|
|
|
2010-08-18 19:28:04 +00:00
|
|
|
struct wl_buffer *
|
|
|
|
display_get_buffer_for_surface(struct display *display,
|
|
|
|
cairo_surface_t *surface);
|
|
|
|
|
2012-05-22 12:39:42 +00:00
|
|
|
struct wl_cursor_image *
|
|
|
|
display_get_pointer_image(struct display *display, int pointer);
|
2010-08-18 19:28:04 +00:00
|
|
|
|
2011-09-14 21:33:48 +00:00
|
|
|
void
|
|
|
|
display_defer(struct display *display, struct task *task);
|
|
|
|
|
|
|
|
void
|
|
|
|
display_watch_fd(struct display *display,
|
|
|
|
int fd, uint32_t events, struct task *task);
|
|
|
|
|
2012-11-29 08:27:09 +00:00
|
|
|
void
|
|
|
|
display_unwatch_fd(struct display *display, int fd);
|
|
|
|
|
2010-06-08 18:59:44 +00:00
|
|
|
void
|
|
|
|
display_run(struct display *d);
|
|
|
|
|
2011-12-15 08:14:07 +00:00
|
|
|
void
|
|
|
|
display_exit(struct display *d);
|
|
|
|
|
2012-05-25 13:01:41 +00:00
|
|
|
enum cursor_type {
|
|
|
|
CURSOR_BOTTOM_LEFT,
|
|
|
|
CURSOR_BOTTOM_RIGHT,
|
|
|
|
CURSOR_BOTTOM,
|
|
|
|
CURSOR_DRAGGING,
|
|
|
|
CURSOR_LEFT_PTR,
|
|
|
|
CURSOR_LEFT,
|
|
|
|
CURSOR_RIGHT,
|
|
|
|
CURSOR_TOP_LEFT,
|
|
|
|
CURSOR_TOP_RIGHT,
|
|
|
|
CURSOR_TOP,
|
|
|
|
CURSOR_IBEAM,
|
|
|
|
CURSOR_HAND1,
|
2012-06-21 03:04:41 +00:00
|
|
|
CURSOR_WATCH,
|
|
|
|
|
|
|
|
CURSOR_BLANK
|
2010-08-18 19:28:04 +00:00
|
|
|
};
|
|
|
|
|
2011-01-19 19:20:33 +00:00
|
|
|
typedef void (*window_key_handler_t)(struct window *window, struct input *input,
|
|
|
|
uint32_t time, uint32_t key, uint32_t unicode,
|
2012-05-30 15:31:52 +00:00
|
|
|
enum wl_keyboard_key_state state, void *data);
|
2011-01-17 16:25:34 +00:00
|
|
|
|
2009-02-23 04:01:35 +00:00
|
|
|
typedef void (*window_keyboard_focus_handler_t)(struct window *window,
|
2010-07-20 21:06:19 +00:00
|
|
|
struct input *device, void *data);
|
2008-12-08 00:59:11 +00:00
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
typedef void (*window_data_handler_t)(struct window *window,
|
2012-04-12 02:42:15 +00:00
|
|
|
struct input *input,
|
2012-05-10 16:21:37 +00:00
|
|
|
float x, float y,
|
2011-10-28 16:26:06 +00:00
|
|
|
const char **types,
|
|
|
|
void *data);
|
|
|
|
|
|
|
|
typedef void (*window_drop_handler_t)(struct window *window,
|
|
|
|
struct input *input,
|
|
|
|
int32_t x, int32_t y, void *data);
|
|
|
|
|
2012-01-07 02:59:05 +00:00
|
|
|
typedef void (*window_close_handler_t)(struct window *window, void *data);
|
2012-07-24 01:56:31 +00:00
|
|
|
typedef void (*window_fullscreen_handler_t)(struct window *window, void *data);
|
2012-01-07 02:59:05 +00:00
|
|
|
|
2012-11-30 15:34:25 +00:00
|
|
|
typedef void (*window_output_handler_t)(struct window *window, struct output *output,
|
|
|
|
int enter, void *data);
|
|
|
|
|
2012-01-10 17:23:19 +00:00
|
|
|
typedef void (*widget_resize_handler_t)(struct widget *widget,
|
|
|
|
int32_t width, int32_t height,
|
|
|
|
void *data);
|
|
|
|
typedef void (*widget_redraw_handler_t)(struct widget *widget, void *data);
|
|
|
|
|
2012-01-09 16:22:32 +00:00
|
|
|
typedef int (*widget_enter_handler_t)(struct widget *widget,
|
2012-04-12 02:42:15 +00:00
|
|
|
struct input *input,
|
2012-05-10 16:21:37 +00:00
|
|
|
float x, float y, void *data);
|
2012-01-09 13:42:24 +00:00
|
|
|
typedef void (*widget_leave_handler_t)(struct widget *widget,
|
|
|
|
struct input *input, void *data);
|
2012-01-09 14:36:16 +00:00
|
|
|
typedef int (*widget_motion_handler_t)(struct widget *widget,
|
|
|
|
struct input *input, uint32_t time,
|
2012-05-10 16:21:37 +00:00
|
|
|
float x, float y, void *data);
|
2012-01-09 16:12:05 +00:00
|
|
|
typedef void (*widget_button_handler_t)(struct widget *widget,
|
|
|
|
struct input *input, uint32_t time,
|
2012-05-30 15:31:51 +00:00
|
|
|
uint32_t button,
|
|
|
|
enum wl_pointer_button_state state,
|
2012-05-04 10:21:54 +00:00
|
|
|
void *data);
|
2012-08-14 09:02:41 +00:00
|
|
|
typedef void (*widget_axis_handler_t)(struct widget *widget,
|
|
|
|
struct input *input, uint32_t time,
|
|
|
|
uint32_t axis,
|
|
|
|
wl_fixed_t value,
|
|
|
|
void *data);
|
2012-01-09 13:42:24 +00:00
|
|
|
|
2008-12-08 00:59:11 +00:00
|
|
|
struct window *
|
2012-01-31 20:24:48 +00:00
|
|
|
window_create(struct display *display);
|
2011-01-21 23:03:15 +00:00
|
|
|
struct window *
|
|
|
|
window_create_transient(struct display *display, struct window *parent,
|
2012-05-21 13:47:46 +00:00
|
|
|
int32_t x, int32_t y, uint32_t flags);
|
2012-06-26 20:29:50 +00:00
|
|
|
struct window *
|
|
|
|
window_create_custom(struct display *display);
|
2012-01-07 02:59:05 +00:00
|
|
|
|
2012-08-14 02:25:53 +00:00
|
|
|
int
|
|
|
|
window_has_focus(struct window *window);
|
|
|
|
|
2012-01-07 02:59:05 +00:00
|
|
|
typedef void (*menu_func_t)(struct window *window, int index, void *data);
|
|
|
|
|
2012-01-19 13:17:59 +00:00
|
|
|
void
|
|
|
|
window_show_menu(struct display *display,
|
|
|
|
struct input *input, uint32_t time, struct window *parent,
|
|
|
|
int32_t x, int32_t y,
|
|
|
|
menu_func_t func, const char **entries, int count);
|
2011-01-21 23:03:15 +00:00
|
|
|
|
2012-01-31 14:53:44 +00:00
|
|
|
void
|
|
|
|
window_show_frame_menu(struct window *window,
|
|
|
|
struct input *input, uint32_t time);
|
|
|
|
|
2012-11-30 15:34:24 +00:00
|
|
|
int
|
|
|
|
window_get_buffer_transform(struct window *window);
|
|
|
|
|
|
|
|
void
|
|
|
|
window_set_buffer_transform(struct window *window,
|
|
|
|
enum wl_output_transform transform);
|
|
|
|
|
2011-01-21 23:03:15 +00:00
|
|
|
void
|
|
|
|
window_destroy(struct window *window);
|
|
|
|
|
2012-01-08 20:09:53 +00:00
|
|
|
struct widget *
|
|
|
|
window_add_widget(struct window *window, void *data);
|
2011-09-21 01:43:54 +00:00
|
|
|
|
2013-04-25 10:57:48 +00:00
|
|
|
enum subsurface_mode {
|
|
|
|
SUBSURFACE_SYNCHRONIZED,
|
|
|
|
SUBSURFACE_DESYNCHRONIZED
|
|
|
|
};
|
|
|
|
|
|
|
|
struct widget *
|
|
|
|
window_add_subsurface(struct window *window, void *data,
|
|
|
|
enum subsurface_mode default_mode);
|
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
typedef void (*data_func_t)(void *data, size_t len,
|
|
|
|
int32_t x, int32_t y, void *user_data);
|
|
|
|
|
2011-10-12 04:36:16 +00:00
|
|
|
struct display *
|
|
|
|
window_get_display(struct window *window);
|
2010-12-17 14:53:12 +00:00
|
|
|
void
|
|
|
|
window_move(struct window *window, struct input *input, uint32_t time);
|
2008-12-08 00:59:11 +00:00
|
|
|
void
|
2012-01-11 00:11:42 +00:00
|
|
|
window_get_allocation(struct window *window, struct rectangle *allocation);
|
2011-05-13 17:45:17 +00:00
|
|
|
void
|
2010-06-15 03:52:50 +00:00
|
|
|
window_schedule_redraw(struct window *window);
|
2012-01-10 17:23:19 +00:00
|
|
|
void
|
|
|
|
window_schedule_resize(struct window *window, int width, int height);
|
2010-06-08 18:08:30 +00:00
|
|
|
|
2010-10-25 15:40:03 +00:00
|
|
|
void
|
|
|
|
window_damage(struct window *window, int32_t x, int32_t y,
|
|
|
|
int32_t width, int32_t height);
|
|
|
|
|
2010-06-08 18:08:30 +00:00
|
|
|
cairo_surface_t *
|
|
|
|
window_get_surface(struct window *window);
|
|
|
|
|
2011-03-14 11:07:26 +00:00
|
|
|
struct wl_surface *
|
|
|
|
window_get_wl_surface(struct window *window);
|
|
|
|
|
2011-11-25 10:09:16 +00:00
|
|
|
struct wl_shell_surface *
|
|
|
|
window_get_wl_shell_surface(struct window *window);
|
|
|
|
|
2010-10-25 15:40:03 +00:00
|
|
|
enum window_buffer_type {
|
2011-02-10 11:04:30 +00:00
|
|
|
WINDOW_BUFFER_TYPE_EGL_WINDOW,
|
2010-10-25 15:40:03 +00:00
|
|
|
WINDOW_BUFFER_TYPE_SHM,
|
|
|
|
};
|
|
|
|
|
2011-03-07 14:08:09 +00:00
|
|
|
void
|
|
|
|
display_surface_damage(struct display *display, cairo_surface_t *cairo_surface,
|
|
|
|
int32_t x, int32_t y, int32_t width, int32_t height);
|
|
|
|
|
2010-10-25 15:40:03 +00:00
|
|
|
void
|
|
|
|
window_set_buffer_type(struct window *window, enum window_buffer_type type);
|
|
|
|
|
2012-10-10 15:36:24 +00:00
|
|
|
int
|
|
|
|
window_is_fullscreen(struct window *window);
|
|
|
|
|
2008-12-22 17:14:50 +00:00
|
|
|
void
|
|
|
|
window_set_fullscreen(struct window *window, int fullscreen);
|
|
|
|
|
2012-12-14 15:37:23 +00:00
|
|
|
void
|
|
|
|
window_set_fullscreen_method(struct window *window,
|
|
|
|
enum wl_shell_surface_fullscreen_method method);
|
2012-10-10 15:36:24 +00:00
|
|
|
int
|
|
|
|
window_is_maximized(struct window *window);
|
|
|
|
|
2012-02-16 20:53:46 +00:00
|
|
|
void
|
|
|
|
window_set_maximized(struct window *window, int maximized);
|
|
|
|
|
2010-06-25 15:19:22 +00:00
|
|
|
void
|
|
|
|
window_set_user_data(struct window *window, void *data);
|
|
|
|
|
2010-09-03 00:22:42 +00:00
|
|
|
void *
|
|
|
|
window_get_user_data(struct window *window);
|
|
|
|
|
2008-12-08 05:01:36 +00:00
|
|
|
void
|
|
|
|
window_set_key_handler(struct window *window,
|
2010-06-25 15:19:22 +00:00
|
|
|
window_key_handler_t handler);
|
2008-12-08 00:59:11 +00:00
|
|
|
|
2009-02-23 04:01:35 +00:00
|
|
|
void
|
|
|
|
window_set_keyboard_focus_handler(struct window *window,
|
2010-06-25 15:19:22 +00:00
|
|
|
window_keyboard_focus_handler_t handler);
|
2010-06-08 18:08:30 +00:00
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
void
|
|
|
|
window_set_data_handler(struct window *window,
|
|
|
|
window_data_handler_t handler);
|
|
|
|
|
|
|
|
void
|
|
|
|
window_set_drop_handler(struct window *window,
|
|
|
|
window_drop_handler_t handler);
|
|
|
|
|
2012-01-07 02:59:05 +00:00
|
|
|
void
|
|
|
|
window_set_close_handler(struct window *window,
|
|
|
|
window_close_handler_t handler);
|
2012-07-24 01:56:31 +00:00
|
|
|
void
|
|
|
|
window_set_fullscreen_handler(struct window *window,
|
|
|
|
window_fullscreen_handler_t handler);
|
2012-11-30 15:34:25 +00:00
|
|
|
void
|
|
|
|
window_set_output_handler(struct window *window,
|
|
|
|
window_output_handler_t handler);
|
2012-01-07 02:59:05 +00:00
|
|
|
|
2011-01-14 07:46:23 +00:00
|
|
|
void
|
|
|
|
window_set_title(struct window *window, const char *title);
|
|
|
|
|
|
|
|
const char *
|
|
|
|
window_get_title(struct window *window);
|
|
|
|
|
2012-05-27 20:25:02 +00:00
|
|
|
void
|
|
|
|
window_set_text_cursor_position(struct window *window, int32_t x, int32_t y);
|
|
|
|
|
2012-05-23 19:06:27 +00:00
|
|
|
int
|
|
|
|
widget_set_tooltip(struct widget *parent, char *entry, float x, float y);
|
|
|
|
|
|
|
|
void
|
|
|
|
widget_destroy_tooltip(struct widget *parent);
|
|
|
|
|
2012-01-10 18:52:34 +00:00
|
|
|
struct widget *
|
|
|
|
widget_add_widget(struct widget *parent, void *data);
|
2012-05-23 19:06:27 +00:00
|
|
|
|
2012-01-10 18:52:34 +00:00
|
|
|
void
|
|
|
|
widget_destroy(struct widget *widget);
|
2012-11-30 19:54:35 +00:00
|
|
|
void
|
|
|
|
widget_set_default_cursor(struct widget *widget, int cursor);
|
2011-09-21 01:43:54 +00:00
|
|
|
void
|
2012-01-08 20:09:53 +00:00
|
|
|
widget_get_allocation(struct widget *widget, struct rectangle *allocation);
|
2011-09-21 01:43:54 +00:00
|
|
|
|
|
|
|
void
|
2012-01-08 20:09:53 +00:00
|
|
|
widget_set_allocation(struct widget *widget,
|
|
|
|
int32_t x, int32_t y, int32_t width, int32_t height);
|
2012-01-11 00:11:42 +00:00
|
|
|
void
|
|
|
|
widget_set_size(struct widget *widget, int32_t width, int32_t height);
|
|
|
|
void
|
2012-02-23 22:30:45 +00:00
|
|
|
widget_set_transparent(struct widget *widget, int transparent);
|
|
|
|
void
|
2012-01-11 00:11:42 +00:00
|
|
|
widget_schedule_resize(struct widget *widget, int32_t width, int32_t height);
|
2011-09-21 01:43:54 +00:00
|
|
|
|
|
|
|
void *
|
2012-01-08 20:09:53 +00:00
|
|
|
widget_get_user_data(struct widget *widget);
|
2011-09-21 01:43:54 +00:00
|
|
|
|
2013-02-13 14:17:23 +00:00
|
|
|
cairo_t *
|
|
|
|
widget_cairo_create(struct widget *widget);
|
|
|
|
|
2012-01-10 17:23:19 +00:00
|
|
|
void
|
|
|
|
widget_set_redraw_handler(struct widget *widget,
|
|
|
|
widget_redraw_handler_t handler);
|
|
|
|
void
|
|
|
|
widget_set_resize_handler(struct widget *widget,
|
|
|
|
widget_resize_handler_t handler);
|
2012-01-08 20:18:19 +00:00
|
|
|
void
|
2012-01-09 13:42:24 +00:00
|
|
|
widget_set_enter_handler(struct widget *widget,
|
|
|
|
widget_enter_handler_t handler);
|
|
|
|
void
|
|
|
|
widget_set_leave_handler(struct widget *widget,
|
|
|
|
widget_leave_handler_t handler);
|
2012-01-09 14:36:16 +00:00
|
|
|
void
|
|
|
|
widget_set_motion_handler(struct widget *widget,
|
|
|
|
widget_motion_handler_t handler);
|
2012-01-08 20:18:19 +00:00
|
|
|
void
|
2012-01-09 16:12:05 +00:00
|
|
|
widget_set_button_handler(struct widget *widget,
|
|
|
|
widget_button_handler_t handler);
|
2012-08-14 09:02:41 +00:00
|
|
|
void
|
|
|
|
widget_set_axis_handler(struct widget *widget,
|
|
|
|
widget_axis_handler_t handler);
|
2012-01-09 16:12:05 +00:00
|
|
|
|
|
|
|
void
|
2012-01-08 20:18:19 +00:00
|
|
|
widget_schedule_redraw(struct widget *widget);
|
|
|
|
|
2012-01-11 03:41:05 +00:00
|
|
|
struct widget *
|
|
|
|
frame_create(struct window *window, void *data);
|
2013-02-13 14:17:23 +00:00
|
|
|
|
2012-06-20 21:30:03 +00:00
|
|
|
void
|
|
|
|
frame_set_child_size(struct widget *widget, int child_width, int child_height);
|
2012-01-11 03:41:05 +00:00
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
void
|
2012-06-04 20:04:07 +00:00
|
|
|
input_set_pointer_image(struct input *input, int pointer);
|
2011-10-28 16:26:06 +00:00
|
|
|
|
2010-08-18 19:28:04 +00:00
|
|
|
void
|
|
|
|
input_get_position(struct input *input, int32_t *x, int32_t *y);
|
|
|
|
|
2012-05-08 19:55:39 +00:00
|
|
|
#define MOD_SHIFT_MASK 0x01
|
|
|
|
#define MOD_ALT_MASK 0x02
|
|
|
|
#define MOD_CONTROL_MASK 0x04
|
|
|
|
|
2011-01-19 19:20:33 +00:00
|
|
|
uint32_t
|
|
|
|
input_get_modifiers(struct input *input);
|
|
|
|
|
2012-01-11 04:46:33 +00:00
|
|
|
void
|
|
|
|
input_grab(struct input *input, struct widget *widget, uint32_t button);
|
|
|
|
|
|
|
|
void
|
2012-04-12 02:42:15 +00:00
|
|
|
input_ungrab(struct input *input);
|
2012-01-11 04:46:33 +00:00
|
|
|
|
2012-01-11 05:04:42 +00:00
|
|
|
struct widget *
|
|
|
|
input_get_focus_widget(struct input *input);
|
|
|
|
|
2012-06-05 13:58:51 +00:00
|
|
|
struct display *
|
|
|
|
input_get_display(struct input *input);
|
|
|
|
|
2012-05-16 17:45:18 +00:00
|
|
|
struct wl_seat *
|
|
|
|
input_get_seat(struct input *input);
|
2010-08-25 20:34:05 +00:00
|
|
|
|
2011-10-28 16:26:06 +00:00
|
|
|
struct wl_data_device *
|
|
|
|
input_get_data_device(struct input *input);
|
|
|
|
|
2011-01-21 21:23:09 +00:00
|
|
|
void
|
2011-10-28 16:26:06 +00:00
|
|
|
input_set_selection(struct input *input,
|
|
|
|
struct wl_data_source *source, uint32_t time);
|
|
|
|
|
|
|
|
void
|
2012-04-12 02:42:15 +00:00
|
|
|
input_accept(struct input *input, const char *type);
|
2011-10-28 16:26:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
input_receive_drag_data(struct input *input, const char *mime_type,
|
|
|
|
data_func_t func, void *user_data);
|
|
|
|
|
|
|
|
int
|
|
|
|
input_receive_selection_data(struct input *input, const char *mime_type,
|
|
|
|
data_func_t func, void *data);
|
2011-12-27 18:50:04 +00:00
|
|
|
int
|
|
|
|
input_receive_selection_data_to_fd(struct input *input,
|
|
|
|
const char *mime_type, int fd);
|
2011-01-19 19:27:42 +00:00
|
|
|
|
2011-11-30 08:52:38 +00:00
|
|
|
void
|
|
|
|
output_set_user_data(struct output *output, void *data);
|
|
|
|
|
|
|
|
void *
|
|
|
|
output_get_user_data(struct output *output);
|
|
|
|
|
|
|
|
void
|
|
|
|
output_set_destroy_handler(struct output *output,
|
|
|
|
display_output_handler_t handler);
|
|
|
|
|
2011-11-26 22:27:37 +00:00
|
|
|
void
|
|
|
|
output_get_allocation(struct output *output, struct rectangle *allocation);
|
|
|
|
|
2011-11-30 08:52:38 +00:00
|
|
|
struct wl_output *
|
|
|
|
output_get_wl_output(struct output *output);
|
2011-11-26 22:27:37 +00:00
|
|
|
|
2012-11-30 15:34:25 +00:00
|
|
|
enum wl_output_transform
|
|
|
|
output_get_transform(struct output *output);
|
|
|
|
|
2012-11-18 18:06:44 +00:00
|
|
|
void
|
|
|
|
keysym_modifiers_add(struct wl_array *modifiers_map,
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
xkb_mod_mask_t
|
|
|
|
keysym_modifiers_get_mask(struct wl_array *modifiers_map,
|
|
|
|
const char *name);
|
|
|
|
|
2008-12-08 00:59:11 +00:00
|
|
|
#endif
|