2010-12-18 20:38:49 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2010-12-18 20:38:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Private uninstalled header defining things local to X windowing code
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_PRIVATE_WAYLAND_H__
|
|
|
|
#define __GDK_PRIVATE_WAYLAND_H__
|
|
|
|
|
|
|
|
#include <gdk/gdkcursor.h>
|
|
|
|
#include <gdk/gdkprivate.h>
|
2013-01-19 22:43:27 +00:00
|
|
|
#include <gdk/wayland/gdkwayland.h>
|
2010-12-18 20:38:49 +00:00
|
|
|
#include <gdk/wayland/gdkdisplay-wayland.h>
|
|
|
|
|
2012-07-16 11:33:35 +00:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
#include "gdkinternals.h"
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#define GDK_WINDOW_IS_WAYLAND(win) (GDK_IS_WINDOW_IMPL_WAYLAND (((GdkWindow *)win)->impl))
|
|
|
|
|
2012-01-16 15:20:36 +00:00
|
|
|
void _gdk_wayland_window_add_focus (GdkWindow *window);
|
|
|
|
void _gdk_wayland_window_remove_focus (GdkWindow *window);
|
2011-01-07 17:10:41 +00:00
|
|
|
|
2012-07-16 18:02:41 +00:00
|
|
|
GdkKeymap *_gdk_wayland_keymap_new (void);
|
2013-03-23 22:02:28 +00:00
|
|
|
void _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
|
|
|
|
uint32_t format,
|
|
|
|
uint32_t fd,
|
|
|
|
uint32_t size);
|
2012-07-16 18:16:48 +00:00
|
|
|
struct xkb_state *_gdk_wayland_keymap_get_xkb_state (GdkKeymap *keymap);
|
2013-03-23 21:09:38 +00:00
|
|
|
struct xkb_keymap *_gdk_wayland_keymap_get_xkb_keymap (GdkKeymap *keymap);
|
2013-04-06 14:40:56 +00:00
|
|
|
gboolean _gdk_wayland_keymap_key_is_modifier (GdkKeymap *keymap,
|
|
|
|
guint keycode);
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2013-03-21 02:34:03 +00:00
|
|
|
void _gdk_wayland_display_finalize_cursors (GdkWaylandDisplay *display);
|
2013-03-23 00:30:51 +00:00
|
|
|
void _gdk_wayland_display_update_cursors (GdkWaylandDisplay *display,
|
|
|
|
struct wl_cursor_theme *theme);
|
2013-03-21 02:34:03 +00:00
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
GdkCursor *_gdk_wayland_display_get_cursor_for_type (GdkDisplay *display,
|
|
|
|
GdkCursorType cursor_type);
|
|
|
|
GdkCursor *_gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
|
|
|
const gchar *name);
|
2013-08-07 10:18:38 +00:00
|
|
|
GdkCursor *_gdk_wayland_display_get_cursor_for_surface (GdkDisplay *display,
|
|
|
|
cairo_surface_t *surface,
|
|
|
|
gdouble x,
|
|
|
|
gdouble y);
|
2010-12-18 20:38:49 +00:00
|
|
|
void _gdk_wayland_display_get_default_cursor_size (GdkDisplay *display,
|
|
|
|
guint *width,
|
|
|
|
guint *height);
|
|
|
|
void _gdk_wayland_display_get_maximal_cursor_size (GdkDisplay *display,
|
|
|
|
guint *width,
|
|
|
|
guint *height);
|
|
|
|
gboolean _gdk_wayland_display_supports_cursor_alpha (GdkDisplay *display);
|
|
|
|
gboolean _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
|
|
|
|
|
2011-02-09 19:48:29 +00:00
|
|
|
struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
2013-03-28 12:08:43 +00:00
|
|
|
guint image_index,
|
2013-03-28 14:47:03 +00:00
|
|
|
int *hotspot_x,
|
|
|
|
int *hotspot_y,
|
2012-07-11 13:43:16 +00:00
|
|
|
int *w,
|
2013-08-07 10:18:38 +00:00
|
|
|
int *h,
|
|
|
|
int *scale);
|
2013-03-28 12:08:43 +00:00
|
|
|
guint _gdk_wayland_cursor_get_next_image_index (GdkCursor *cursor,
|
|
|
|
guint current_image_index,
|
|
|
|
guint *next_image_delay);
|
2011-02-09 19:48:29 +00:00
|
|
|
|
2011-02-08 13:12:59 +00:00
|
|
|
GdkDragProtocol _gdk_wayland_window_get_drag_protocol (GdkWindow *window,
|
|
|
|
GdkWindow **target);
|
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
void _gdk_wayland_window_register_dnd (GdkWindow *window);
|
|
|
|
GdkDragContext *_gdk_wayland_window_drag_begin (GdkWindow *window,
|
|
|
|
GdkDevice *device,
|
|
|
|
GList *targets);
|
|
|
|
|
|
|
|
void _gdk_wayland_display_create_window_impl (GdkDisplay *display,
|
|
|
|
GdkWindow *window,
|
|
|
|
GdkWindow *real_parent,
|
|
|
|
GdkScreen *screen,
|
|
|
|
GdkEventMask event_mask,
|
|
|
|
GdkWindowAttr *attributes,
|
|
|
|
gint attributes_mask);
|
|
|
|
|
|
|
|
GdkWindow *_gdk_wayland_display_get_selection_owner (GdkDisplay *display,
|
|
|
|
GdkAtom selection);
|
|
|
|
gboolean _gdk_wayland_display_set_selection_owner (GdkDisplay *display,
|
|
|
|
GdkWindow *owner,
|
|
|
|
GdkAtom selection,
|
|
|
|
guint32 time,
|
|
|
|
gboolean send_event);
|
2011-02-08 13:12:59 +00:00
|
|
|
void _gdk_wayland_display_send_selection_notify (GdkDisplay *dispay,
|
|
|
|
GdkWindow *requestor,
|
2010-12-18 20:38:49 +00:00
|
|
|
GdkAtom selection,
|
|
|
|
GdkAtom target,
|
|
|
|
GdkAtom property,
|
|
|
|
guint32 time);
|
|
|
|
gint _gdk_wayland_display_get_selection_property (GdkDisplay *display,
|
|
|
|
GdkWindow *requestor,
|
|
|
|
guchar **data,
|
|
|
|
GdkAtom *ret_type,
|
|
|
|
gint *ret_format);
|
|
|
|
void _gdk_wayland_display_convert_selection (GdkDisplay *display,
|
|
|
|
GdkWindow *requestor,
|
|
|
|
GdkAtom selection,
|
|
|
|
GdkAtom target,
|
|
|
|
guint32 time);
|
|
|
|
gint _gdk_wayland_display_text_property_to_utf8_list (GdkDisplay *display,
|
|
|
|
GdkAtom encoding,
|
|
|
|
gint format,
|
|
|
|
const guchar *text,
|
|
|
|
gint length,
|
|
|
|
gchar ***list);
|
|
|
|
gchar * _gdk_wayland_display_utf8_to_string_target (GdkDisplay *display,
|
|
|
|
const gchar *str);
|
|
|
|
|
2011-02-09 20:27:08 +00:00
|
|
|
GdkDeviceManager *_gdk_wayland_device_manager_new (GdkDisplay *display);
|
2013-03-27 02:57:46 +00:00
|
|
|
void _gdk_wayland_device_manager_add_seat (GdkDeviceManager *device_manager,
|
|
|
|
guint32 id,
|
|
|
|
struct wl_seat *seat);
|
|
|
|
void _gdk_wayland_device_manager_remove_seat (GdkDeviceManager *device_manager,
|
|
|
|
guint32 id);
|
2012-07-11 13:29:43 +00:00
|
|
|
|
2013-03-27 17:21:54 +00:00
|
|
|
typedef struct _GdkWaylandDeviceData GdkWaylandDeviceData;
|
|
|
|
|
2012-07-16 18:02:41 +00:00
|
|
|
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
|
2013-03-27 17:21:54 +00:00
|
|
|
uint32_t _gdk_wayland_device_get_button_press_serial(GdkWaylandDeviceData *device);
|
2012-07-16 18:02:41 +00:00
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
void _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event);
|
|
|
|
GSource *_gdk_wayland_display_event_source_new (GdkDisplay *display);
|
|
|
|
void _gdk_wayland_display_queue_events (GdkDisplay *display);
|
|
|
|
|
|
|
|
GdkAppLaunchContext *_gdk_wayland_display_get_app_launch_context (GdkDisplay *display);
|
|
|
|
|
2013-04-19 20:22:32 +00:00
|
|
|
GdkDisplay *_gdk_wayland_display_open (const gchar *display_name);
|
2010-12-18 20:38:49 +00:00
|
|
|
|
|
|
|
GdkWindow *_gdk_wayland_screen_create_root_window (GdkScreen *screen,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
|
|
|
|
GdkScreen *_gdk_wayland_screen_new (GdkDisplay *display);
|
2013-03-27 02:16:15 +00:00
|
|
|
void _gdk_wayland_screen_add_output (GdkScreen *screen,
|
|
|
|
guint32 id,
|
2013-06-04 09:18:49 +00:00
|
|
|
struct wl_output *output,
|
|
|
|
guint32 version);
|
2013-03-27 02:57:46 +00:00
|
|
|
void _gdk_wayland_screen_remove_output (GdkScreen *screen,
|
|
|
|
guint32 id);
|
2013-04-25 15:19:31 +00:00
|
|
|
int _gdk_wayland_screen_get_output_refresh_rate (GdkScreen *screen,
|
|
|
|
struct wl_output *output);
|
2013-06-04 09:18:49 +00:00
|
|
|
guint32 _gdk_wayland_screen_get_output_scale (GdkScreen *screen,
|
|
|
|
struct wl_output *output);
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2013-09-03 07:54:53 +00:00
|
|
|
void _gdk_wayland_screen_set_has_gtk_shell (GdkScreen *screen);
|
|
|
|
|
2012-07-11 13:29:43 +00:00
|
|
|
void _gdk_wayland_window_set_device_grabbed (GdkWindow *window,
|
2013-02-15 11:16:51 +00:00
|
|
|
GdkDevice *device,
|
2012-07-11 13:29:43 +00:00
|
|
|
struct wl_seat *seat,
|
|
|
|
guint32 time_);
|
2012-02-27 14:06:22 +00:00
|
|
|
|
2012-07-11 16:06:32 +00:00
|
|
|
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *wayland_display);
|
|
|
|
void _gdk_wayland_display_update_serial (GdkWaylandDisplay *wayland_display, guint32 serial);
|
|
|
|
|
2013-03-21 20:05:32 +00:00
|
|
|
struct wl_shm_pool * _create_shm_pool (struct wl_shm *shm,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
size_t *buf_length,
|
|
|
|
void **data_out);
|
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
|