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
|
2015-02-28 03:28:28 +00:00
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
2010-12-18 20:38:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2015-02-28 03:28:28 +00:00
|
|
|
* Private uninstalled header defining things local to the Wayland backend
|
2010-12-18 20:38:49 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GDK_PRIVATE_WAYLAND_H__
|
|
|
|
#define __GDK_PRIVATE_WAYLAND_H__
|
|
|
|
|
2017-11-25 13:22:12 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
#include <gdk/gdkcursor.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>
|
2019-04-20 00:08:14 +00:00
|
|
|
#include <gdk/wayland/gdkseat-wayland.h>
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2012-07-16 11:33:35 +00:00
|
|
|
#include <xkbcommon/xkbcommon.h>
|
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2015-03-13 13:38:24 +00:00
|
|
|
#define WL_SURFACE_HAS_BUFFER_SCALE 3
|
2015-10-20 03:21:54 +00:00
|
|
|
#define WL_POINTER_HAS_FRAME 5
|
2015-03-13 13:38:24 +00:00
|
|
|
|
2020-02-15 20:04:57 +00:00
|
|
|
/* the magic mime type we use for local DND operations.
|
|
|
|
* We offer it to every dnd operation, but will strip it out on the drop
|
|
|
|
* site unless we can prove it's a local DND - then we will use only
|
|
|
|
* this type
|
|
|
|
*/
|
|
|
|
#define GDK_WAYLAND_LOCAL_DND_MIME_TYPE "application/x-gtk-local-dnd"
|
|
|
|
|
2018-01-12 02:44:49 +00:00
|
|
|
GdkKeymap *_gdk_wayland_keymap_new (GdkDisplay *display);
|
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
|
|
|
|
2014-08-10 16:15:40 +00:00
|
|
|
void _gdk_wayland_display_init_cursors (GdkWaylandDisplay *display);
|
2013-03-21 02:34:03 +00:00
|
|
|
void _gdk_wayland_display_finalize_cursors (GdkWaylandDisplay *display);
|
2015-03-13 07:40:18 +00:00
|
|
|
|
2020-01-24 18:33:13 +00:00
|
|
|
struct wl_cursor_theme * _gdk_wayland_display_get_cursor_theme (GdkWaylandDisplay *display_wayland);
|
2013-03-21 02:34:03 +00:00
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
void _gdk_wayland_display_get_default_cursor_size (GdkDisplay *display,
|
2018-03-21 08:06:31 +00:00
|
|
|
guint *width,
|
|
|
|
guint *height);
|
2010-12-18 20:38:49 +00:00
|
|
|
void _gdk_wayland_display_get_maximal_cursor_size (GdkDisplay *display,
|
2018-03-21 08:06:31 +00:00
|
|
|
guint *width,
|
|
|
|
guint *height);
|
2010-12-18 20:38:49 +00:00
|
|
|
gboolean _gdk_wayland_display_supports_cursor_alpha (GdkDisplay *display);
|
|
|
|
gboolean _gdk_wayland_display_supports_cursor_color (GdkDisplay *display);
|
|
|
|
|
2017-03-13 06:33:06 +00:00
|
|
|
void gdk_wayland_display_system_bell (GdkDisplay *display,
|
2018-03-20 14:14:10 +00:00
|
|
|
GdkSurface *surface);
|
2017-03-13 06:33:06 +00:00
|
|
|
|
2017-11-03 21:41:31 +00:00
|
|
|
struct wl_buffer *_gdk_wayland_cursor_get_buffer (GdkWaylandDisplay *display,
|
|
|
|
GdkCursor *cursor,
|
|
|
|
guint desired_scale,
|
|
|
|
guint image_index,
|
|
|
|
int *hotspot_x,
|
|
|
|
int *hotspot_y,
|
|
|
|
int *w,
|
|
|
|
int *h,
|
2018-03-21 08:06:31 +00:00
|
|
|
int *scale);
|
2017-11-03 21:41:31 +00:00
|
|
|
guint _gdk_wayland_cursor_get_next_image_index (GdkWaylandDisplay *display,
|
|
|
|
GdkCursor *cursor,
|
|
|
|
guint scale,
|
|
|
|
guint current_image_index,
|
|
|
|
guint *next_image_delay);
|
2015-03-13 07:40:18 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void gdk_wayland_surface_sync (GdkSurface *surface);
|
2020-09-17 15:35:35 +00:00
|
|
|
void gdk_wayland_surface_commit (GdkSurface *surface);
|
2020-09-17 16:20:08 +00:00
|
|
|
void gdk_wayland_surface_notify_committed (GdkSurface *surface);
|
2018-04-10 13:10:56 +00:00
|
|
|
void gdk_wayland_surface_request_frame (GdkSurface *surface);
|
2020-11-19 09:54:20 +00:00
|
|
|
gboolean gdk_wayland_surface_has_surface (GdkSurface *surface);
|
2018-04-17 21:05:41 +00:00
|
|
|
void gdk_wayland_surface_attach_image (GdkSurface *surface,
|
|
|
|
cairo_surface_t *cairo_surface,
|
|
|
|
const cairo_region_t *damage);
|
2011-02-08 13:12:59 +00:00
|
|
|
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag *_gdk_wayland_surface_drag_begin (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
GdkContentProvider *content,
|
|
|
|
GdkDragAction actions,
|
2020-05-17 21:49:02 +00:00
|
|
|
double dx,
|
|
|
|
double dy);
|
2018-03-20 14:14:10 +00:00
|
|
|
void _gdk_wayland_surface_offset_next_wl_buffer (GdkSurface *surface,
|
2018-03-21 08:06:31 +00:00
|
|
|
int x,
|
|
|
|
int y);
|
2018-05-30 02:04:51 +00:00
|
|
|
GdkDrop * gdk_wayland_drop_new (GdkDevice *device,
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag *drag,
|
2018-05-30 02:04:51 +00:00
|
|
|
GdkContentFormats *formats,
|
|
|
|
GdkSurface *surface,
|
|
|
|
struct wl_data_offer *offer,
|
|
|
|
uint32_t serial);
|
|
|
|
void gdk_wayland_drop_set_source_actions (GdkDrop *drop,
|
|
|
|
uint32_t source_actions);
|
|
|
|
void gdk_wayland_drop_set_action (GdkDrop *drop,
|
|
|
|
uint32_t action);
|
|
|
|
|
2019-04-22 01:14:46 +00:00
|
|
|
GdkSurface * _gdk_wayland_display_create_surface (GdkDisplay *display,
|
|
|
|
GdkSurfaceType surface_type,
|
|
|
|
GdkSurface *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height);
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2017-11-25 13:12:48 +00:00
|
|
|
void _gdk_wayland_display_create_seat (GdkWaylandDisplay *display,
|
|
|
|
guint32 id,
|
|
|
|
struct wl_seat *seat);
|
|
|
|
void _gdk_wayland_display_remove_seat (GdkWaylandDisplay *display,
|
|
|
|
guint32 id);
|
2012-07-11 13:29:43 +00:00
|
|
|
|
2012-07-16 18:02:41 +00:00
|
|
|
GdkKeymap *_gdk_wayland_device_get_keymap (GdkDevice *device);
|
2020-06-23 09:00:46 +00:00
|
|
|
uint32_t _gdk_wayland_seat_get_implicit_grab_serial(GdkSeat *seat,
|
|
|
|
GdkEvent *event);
|
2019-04-20 00:08:14 +00:00
|
|
|
uint32_t _gdk_wayland_seat_get_last_implicit_grab_serial (GdkWaylandSeat *seat,
|
2020-08-21 12:41:13 +00:00
|
|
|
GdkEventSequence **sequence);
|
2020-12-02 16:22:41 +00:00
|
|
|
GdkSurface * gdk_wayland_device_get_focus (GdkDevice *device);
|
|
|
|
|
2014-08-21 16:49:44 +00:00
|
|
|
struct wl_data_device * gdk_wayland_device_get_data_device (GdkDevice *gdk_device);
|
|
|
|
void gdk_wayland_device_set_selection (GdkDevice *gdk_device,
|
|
|
|
struct wl_data_source *source);
|
2012-07-16 18:02:41 +00:00
|
|
|
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag* gdk_wayland_device_get_drop_context (GdkDevice *gdk_device);
|
2015-06-01 13:55:20 +00:00
|
|
|
|
2014-08-20 18:22:42 +00:00
|
|
|
void gdk_wayland_device_unset_touch_grab (GdkDevice *device,
|
|
|
|
GdkEventSequence *sequence);
|
|
|
|
|
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);
|
|
|
|
|
2020-07-24 18:40:36 +00:00
|
|
|
GdkDisplay *_gdk_wayland_display_open (const char *display_name);
|
2010-12-18 20:38:49 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
GList *gdk_wayland_display_get_toplevel_surfaces (GdkDisplay *display);
|
2017-11-06 23:30:27 +00:00
|
|
|
|
2017-11-01 23:25:45 +00:00
|
|
|
int gdk_wayland_display_get_output_refresh_rate (GdkWaylandDisplay *display_wayland,
|
|
|
|
struct wl_output *output);
|
|
|
|
guint32 gdk_wayland_display_get_output_scale (GdkWaylandDisplay *display_wayland,
|
|
|
|
struct wl_output *output);
|
2017-11-29 03:37:42 +00:00
|
|
|
GdkMonitor *gdk_wayland_display_get_monitor_for_output (GdkDisplay *display,
|
|
|
|
struct wl_output *output);
|
2013-09-03 07:54:53 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void _gdk_wayland_surface_set_grab_seat (GdkSurface *surface,
|
2015-12-09 11:56:26 +00:00
|
|
|
GdkSeat *seat);
|
2012-02-27 14:06:22 +00:00
|
|
|
|
2016-04-26 03:16:56 +00:00
|
|
|
guint32 _gdk_wayland_display_get_serial (GdkWaylandDisplay *display_wayland);
|
|
|
|
void _gdk_wayland_display_update_serial (GdkWaylandDisplay *display_wayland,
|
|
|
|
guint32 serial);
|
2012-07-11 16:06:32 +00:00
|
|
|
|
2014-02-23 18:57:24 +00:00
|
|
|
cairo_surface_t * _gdk_wayland_display_create_shm_surface (GdkWaylandDisplay *display,
|
|
|
|
int width,
|
|
|
|
int height,
|
|
|
|
guint scale);
|
|
|
|
struct wl_buffer *_gdk_wayland_shm_surface_get_wl_buffer (cairo_surface_t *surface);
|
2015-02-24 10:10:07 +00:00
|
|
|
gboolean _gdk_wayland_is_shm_surface (cairo_surface_t *surface);
|
2013-03-21 20:05:32 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
struct gtk_surface1 * gdk_wayland_surface_get_gtk_surface (GdkSurface *surface);
|
2017-03-13 06:33:06 +00:00
|
|
|
|
2016-01-13 19:57:47 +00:00
|
|
|
void gdk_wayland_seat_set_global_cursor (GdkSeat *seat,
|
|
|
|
GdkCursor *cursor);
|
2018-05-31 19:15:59 +00:00
|
|
|
void gdk_wayland_seat_set_drag (GdkSeat *seat,
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag *drag);
|
2016-01-13 19:57:47 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
struct wl_output *gdk_wayland_surface_get_wl_output (GdkSurface *surface);
|
2016-05-19 07:48:46 +00:00
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void gdk_wayland_surface_inhibit_shortcuts (GdkSurface *surface,
|
2017-03-22 09:21:02 +00:00
|
|
|
GdkSeat *gdk_seat);
|
2018-03-20 14:14:10 +00:00
|
|
|
void gdk_wayland_surface_restore_shortcuts (GdkSurface *surface,
|
2017-03-22 09:21:02 +00:00
|
|
|
GdkSeat *gdk_seat);
|
|
|
|
|
2018-03-20 14:14:10 +00:00
|
|
|
void gdk_wayland_surface_update_scale (GdkSurface *surface);
|
2017-11-01 01:48:58 +00:00
|
|
|
|
2020-02-29 17:25:51 +00:00
|
|
|
GdkSurface * create_dnd_surface (GdkDisplay *display);
|
|
|
|
|
2020-04-05 18:40:55 +00:00
|
|
|
GdkModifierType gdk_wayland_keymap_get_gdk_modifiers (GdkKeymap *keymap,
|
|
|
|
guint32 mods);
|
2017-11-01 01:48:58 +00:00
|
|
|
|
2010-12-18 20:38:49 +00:00
|
|
|
#endif /* __GDK_PRIVATE_WAYLAND_H__ */
|