2000-03-28 01:24:44 +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
|
2000-07-26 11:33:08 +00:00
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
2000-03-28 01:24:44 +00:00
|
|
|
* 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
|
2000-07-26 11:33:08 +00:00
|
|
|
* Lesser General Public License for more details.
|
2000-03-28 01:24:44 +00:00
|
|
|
*
|
2000-07-26 11:33:08 +00:00
|
|
|
* 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/>.
|
2000-03-28 01:24:44 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
2000-03-28 01:24:44 +00:00
|
|
|
* 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
|
|
|
|
*/
|
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
#ifndef __GDK_PRIVATE_X11_H__
|
|
|
|
#define __GDK_PRIVATE_X11_H__
|
|
|
|
|
2010-12-11 05:14:53 +00:00
|
|
|
#include "gdkcursor.h"
|
2010-12-16 03:09:35 +00:00
|
|
|
#include "gdkx.h"
|
2018-03-20 10:46:11 +00:00
|
|
|
#include "gdksurface-x11.h"
|
2010-12-16 03:09:35 +00:00
|
|
|
#include "gdkscreen-x11.h"
|
2010-12-21 19:17:02 +00:00
|
|
|
|
2021-09-24 19:20:15 +00:00
|
|
|
#include "gdk/gdkdeviceprivate.h"
|
|
|
|
#include "gdk/gdkkeysprivate.h"
|
|
|
|
|
2010-12-21 19:17:02 +00:00
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
|
|
|
#include <X11/extensions/XInput2.h>
|
|
|
|
|
2010-10-05 20:11:49 +00:00
|
|
|
#include <cairo-xlib.h>
|
1999-11-08 20:14:59 +00:00
|
|
|
|
2018-02-07 05:00:01 +00:00
|
|
|
typedef enum {
|
|
|
|
GDK_FILTER_CONTINUE,
|
|
|
|
GDK_FILTER_TRANSLATE,
|
|
|
|
GDK_FILTER_REMOVE
|
|
|
|
} GdkFilterReturn;
|
|
|
|
|
|
|
|
typedef GdkFilterReturn (*GdkFilterFunc) (const XEvent *xevent,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data);
|
|
|
|
|
|
|
|
|
2010-09-18 22:19:27 +00:00
|
|
|
void _gdk_x11_error_handler_push (void);
|
|
|
|
void _gdk_x11_error_handler_pop (void);
|
2006-01-20 04:35:24 +00:00
|
|
|
|
2016-11-03 21:40:36 +00:00
|
|
|
int gdk_x11_display_get_window_depth (GdkX11Display *display);
|
|
|
|
Visual * gdk_x11_display_get_window_visual (GdkX11Display *display);
|
|
|
|
Colormap gdk_x11_display_get_window_colormap (GdkX11Display *display);
|
2010-12-06 22:19:58 +00:00
|
|
|
|
2010-12-16 04:35:15 +00:00
|
|
|
void _gdk_x11_display_add_window (GdkDisplay *display,
|
|
|
|
XID *xid,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface *window);
|
2010-12-16 04:35:15 +00:00
|
|
|
void _gdk_x11_display_remove_window (GdkDisplay *display,
|
|
|
|
XID xid);
|
2010-12-15 19:49:23 +00:00
|
|
|
|
2020-07-24 13:54:49 +00:00
|
|
|
int _gdk_x11_display_send_xevent (GdkDisplay *display,
|
|
|
|
Window window,
|
|
|
|
gboolean propagate,
|
|
|
|
glong event_mask,
|
|
|
|
XEvent *event_send);
|
2000-12-15 01:46:41 +00:00
|
|
|
|
2010-12-15 19:49:23 +00:00
|
|
|
cairo_region_t* _gdk_x11_xwindow_get_shape (Display *xdisplay,
|
2010-12-15 22:32:29 +00:00
|
|
|
Window window,
|
2020-07-24 13:54:49 +00:00
|
|
|
int scale,
|
|
|
|
int shape_type);
|
2010-02-05 00:15:54 +00:00
|
|
|
|
2010-12-15 22:32:29 +00:00
|
|
|
void _gdk_x11_region_get_xrectangles (const cairo_region_t *region,
|
2020-07-24 13:54:49 +00:00
|
|
|
int x_offset,
|
|
|
|
int y_offset,
|
|
|
|
int scale,
|
2010-12-15 22:32:29 +00:00
|
|
|
XRectangle **rects,
|
2020-07-24 13:54:49 +00:00
|
|
|
int *n_rects);
|
2001-03-02 20:02:17 +00:00
|
|
|
|
2017-12-12 23:39:32 +00:00
|
|
|
gboolean _gdk_x11_moveresize_handle_event (const XEvent *event);
|
2010-12-15 22:55:04 +00:00
|
|
|
gboolean _gdk_x11_moveresize_configure_done (GdkDisplay *display,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface *window);
|
2001-03-29 21:17:45 +00:00
|
|
|
|
2010-12-16 04:49:31 +00:00
|
|
|
void _gdk_x11_keymap_state_changed (GdkDisplay *display,
|
2017-12-12 23:39:32 +00:00
|
|
|
const XEvent *event);
|
2010-12-16 04:49:31 +00:00
|
|
|
void _gdk_x11_keymap_keys_changed (GdkDisplay *display);
|
|
|
|
void _gdk_x11_keymap_add_virt_mods (GdkKeymap *keymap,
|
|
|
|
GdkModifierType *modifiers);
|
2001-06-08 16:07:00 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surfaceing_init (void);
|
2001-10-10 21:54:25 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_grab_check_unmap (GdkSurface *window,
|
2018-03-21 08:06:31 +00:00
|
|
|
gulong serial);
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_grab_check_destroy (GdkSurface *window);
|
2002-03-02 20:37:07 +00:00
|
|
|
|
2020-05-27 19:12:35 +00:00
|
|
|
#ifdef HAVE_XDAMAGE
|
|
|
|
void _gdk_x11_surface_set_frame_still_painting (GdkSurface *surface,
|
|
|
|
gboolean painting);
|
|
|
|
#endif
|
|
|
|
|
2002-04-25 22:29:14 +00:00
|
|
|
gboolean _gdk_x11_display_is_root_window (GdkDisplay *display,
|
2010-12-15 22:45:05 +00:00
|
|
|
Window xroot_window);
|
2002-04-25 22:29:14 +00:00
|
|
|
|
2010-12-10 17:13:25 +00:00
|
|
|
void _gdk_x11_display_update_grab_info (GdkDisplay *display,
|
|
|
|
GdkDevice *device,
|
2020-07-24 13:54:49 +00:00
|
|
|
int status);
|
2010-12-10 17:13:25 +00:00
|
|
|
void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
|
|
|
|
GdkDevice *device,
|
|
|
|
guint32 time,
|
|
|
|
gulong serial);
|
2010-12-11 01:46:42 +00:00
|
|
|
void _gdk_x11_display_queue_events (GdkDisplay *display);
|
2010-12-17 00:22:44 +00:00
|
|
|
|
|
|
|
|
2011-02-01 17:11:35 +00:00
|
|
|
GdkAppLaunchContext *_gdk_x11_display_get_app_launch_context (GdkDisplay *display);
|
|
|
|
|
2020-07-24 13:54:49 +00:00
|
|
|
int _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display,
|
2020-02-23 00:33:56 +00:00
|
|
|
const char *encoding,
|
2020-07-24 13:54:49 +00:00
|
|
|
int format,
|
2010-12-17 04:44:50 +00:00
|
|
|
const guchar *text,
|
2020-07-24 13:54:49 +00:00
|
|
|
int length,
|
2020-07-24 18:40:36 +00:00
|
|
|
char ***list);
|
2020-02-22 17:33:20 +00:00
|
|
|
char * gdk_x11_utf8_to_string_target (const char *utf8_str,
|
|
|
|
gboolean return_latin1);
|
2010-12-17 04:44:50 +00:00
|
|
|
|
2010-12-11 01:46:42 +00:00
|
|
|
void _gdk_x11_device_check_extension_events (GdkDevice *device);
|
2010-12-10 17:13:25 +00:00
|
|
|
|
2019-05-14 22:18:38 +00:00
|
|
|
GdkX11DeviceManagerXI2 *_gdk_x11_device_manager_new (GdkDisplay *display);
|
2010-12-15 19:49:23 +00:00
|
|
|
|
2012-03-01 05:56:51 +00:00
|
|
|
guchar * _gdk_x11_device_xi2_translate_event_mask (GdkX11DeviceManagerXI2 *device_manager_xi2,
|
|
|
|
GdkEventMask event_mask,
|
2020-07-24 13:54:49 +00:00
|
|
|
int *len);
|
2010-12-21 06:32:01 +00:00
|
|
|
guint _gdk_x11_device_xi2_translate_state (XIModifierState *mods_state,
|
2011-02-05 02:01:52 +00:00
|
|
|
XIButtonState *buttons_state,
|
|
|
|
XIGroupState *group_state);
|
2021-09-05 22:32:16 +00:00
|
|
|
guint _gdk_x11_device_xi2_gesture_type_to_phase (int evtype, int flags);
|
2020-07-24 13:54:49 +00:00
|
|
|
int _gdk_x11_device_xi2_get_id (GdkX11DeviceXI2 *device);
|
2013-09-27 17:32:54 +00:00
|
|
|
void _gdk_device_xi2_unset_scroll_valuators (GdkX11DeviceXI2 *device);
|
|
|
|
|
2011-07-14 15:43:59 +00:00
|
|
|
|
2011-07-14 15:49:44 +00:00
|
|
|
GdkDevice * _gdk_x11_device_manager_xi2_lookup (GdkX11DeviceManagerXI2 *device_manager_xi2,
|
2020-07-24 13:54:49 +00:00
|
|
|
int device_id);
|
2012-01-23 23:49:52 +00:00
|
|
|
void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
|
|
|
|
guint n_valuator,
|
2012-03-05 00:12:27 +00:00
|
|
|
GdkScrollDirection direction,
|
2020-07-24 20:32:16 +00:00
|
|
|
double increment);
|
2012-01-23 23:49:52 +00:00
|
|
|
gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
|
|
|
|
guint n_valuator,
|
2020-07-24 20:32:16 +00:00
|
|
|
double valuator_value,
|
2012-01-23 23:49:52 +00:00
|
|
|
GdkScrollDirection *direction_ret,
|
2020-07-24 20:32:16 +00:00
|
|
|
double *delta_ret);
|
2012-01-23 23:49:52 +00:00
|
|
|
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
|
2011-07-14 15:43:59 +00:00
|
|
|
|
2020-07-24 20:32:16 +00:00
|
|
|
double gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
|
2020-07-24 13:54:49 +00:00
|
|
|
int n_axis);
|
2015-03-02 17:19:16 +00:00
|
|
|
|
|
|
|
void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
|
2020-07-24 20:32:16 +00:00
|
|
|
double *axes,
|
2020-07-24 13:54:49 +00:00
|
|
|
int n_axes);
|
2010-12-21 06:32:01 +00:00
|
|
|
|
2010-12-13 17:36:35 +00:00
|
|
|
gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display);
|
|
|
|
gboolean _gdk_x11_display_supports_cursor_color (GdkDisplay *display);
|
|
|
|
void _gdk_x11_display_get_default_cursor_size (GdkDisplay *display,
|
|
|
|
guint *width,
|
|
|
|
guint *height);
|
|
|
|
void _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
|
|
|
|
guint *width,
|
|
|
|
guint *height);
|
2019-04-22 01:14:46 +00:00
|
|
|
|
|
|
|
GdkSurface * _gdk_x11_display_create_surface (GdkDisplay *display,
|
|
|
|
GdkSurfaceType surface_type,
|
|
|
|
GdkSurface *parent,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int width,
|
|
|
|
int height);
|
2018-03-21 08:06:31 +00:00
|
|
|
GList * gdk_x11_display_get_toplevel_windows (GdkDisplay *display);
|
2010-12-13 17:36:35 +00:00
|
|
|
|
2003-07-05 01:54:05 +00:00
|
|
|
void _gdk_x11_precache_atoms (GdkDisplay *display,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char * const *atom_names,
|
2020-07-24 13:54:49 +00:00
|
|
|
int n_atoms);
|
2003-07-05 01:54:05 +00:00
|
|
|
|
2013-02-18 15:59:06 +00:00
|
|
|
Atom _gdk_x11_get_xatom_for_display_printf (GdkDisplay *display,
|
2020-07-24 18:40:36 +00:00
|
|
|
const char *format,
|
2013-02-18 15:59:06 +00:00
|
|
|
...) G_GNUC_PRINTF (2, 3);
|
|
|
|
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag *gdk_x11_drag_find (GdkDisplay *display,
|
|
|
|
Window source_xid,
|
|
|
|
Window dest_xid);
|
|
|
|
void gdk_x11_drag_handle_status (GdkDisplay *display,
|
|
|
|
const XEvent *xevent);
|
|
|
|
void gdk_x11_drag_handle_finished (GdkDisplay *display,
|
|
|
|
const XEvent *xevent);
|
|
|
|
void gdk_x11_drop_read_actions (GdkDrop *drop);
|
|
|
|
gboolean gdk_x11_drop_filter (GdkSurface *surface,
|
|
|
|
const XEvent *xevent);
|
2002-04-25 22:29:14 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
typedef struct _GdkSurfaceCache GdkSurfaceCache;
|
2017-11-09 23:40:16 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurfaceCache *
|
|
|
|
gdk_surface_cache_get (GdkDisplay *display);
|
2017-11-09 23:40:16 +00:00
|
|
|
|
|
|
|
GdkFilterReturn
|
2018-03-20 10:40:08 +00:00
|
|
|
gdk_surface_cache_filter (const XEvent *xevent,
|
2018-03-21 08:06:31 +00:00
|
|
|
gpointer data);
|
2017-11-09 23:40:16 +00:00
|
|
|
GdkFilterReturn
|
2018-03-20 10:40:08 +00:00
|
|
|
gdk_surface_cache_shape_filter (const XEvent *xevent,
|
2018-03-21 08:06:31 +00:00
|
|
|
gpointer data);
|
2017-11-09 23:40:16 +00:00
|
|
|
|
2009-01-20 02:15:59 +00:00
|
|
|
void _gdk_x11_cursor_display_finalize (GdkDisplay *display);
|
2005-06-17 17:26:24 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_register_dnd (GdkSurface *window);
|
2010-12-05 20:58:23 +00:00
|
|
|
|
2019-04-22 15:22:33 +00:00
|
|
|
void gdk_x11_surface_update_popups (GdkSurface *surface);
|
|
|
|
|
2020-04-16 10:58:39 +00:00
|
|
|
void gdk_x11_surface_enter_leave_monitors (GdkSurface *surface);
|
|
|
|
|
2018-06-29 17:34:14 +00:00
|
|
|
GdkDrag * _gdk_x11_surface_drag_begin (GdkSurface *window,
|
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);
|
2012-10-05 14:46:49 +00:00
|
|
|
|
2020-02-23 00:09:18 +00:00
|
|
|
void gdk_x11_surface_get_root_coords (GdkSurface *surface,
|
2020-07-24 13:54:49 +00:00
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
int *root_x,
|
|
|
|
int *root_y);
|
2020-02-23 00:09:18 +00:00
|
|
|
|
2020-03-09 17:20:13 +00:00
|
|
|
void gdk_x11_surface_show (GdkSurface *surface,
|
|
|
|
gboolean already_mapped);
|
2020-02-29 17:54:24 +00:00
|
|
|
void gdk_x11_surface_raise (GdkSurface *surface);
|
2020-03-04 17:38:27 +00:00
|
|
|
void gdk_x11_surface_set_opacity (GdkSurface *surface,
|
|
|
|
double opacity);
|
2020-03-09 18:38:08 +00:00
|
|
|
gboolean gdk_x11_surface_supports_edge_constraints (GdkSurface *surface);
|
2020-02-29 17:54:24 +00:00
|
|
|
|
2017-11-09 23:40:16 +00:00
|
|
|
cairo_surface_t * _gdk_x11_display_create_bitmap_surface (GdkDisplay *display,
|
|
|
|
int width,
|
|
|
|
int height);
|
2018-03-21 08:06:31 +00:00
|
|
|
|
2020-07-24 13:54:49 +00:00
|
|
|
extern const int _gdk_x11_event_mask_table[];
|
|
|
|
extern const int _gdk_x11_event_mask_table_size;
|
2002-04-25 22:29:14 +00:00
|
|
|
|
2010-12-21 01:32:13 +00:00
|
|
|
#define GDK_SCREEN_DISPLAY(screen) (GDK_X11_SCREEN (screen)->display)
|
|
|
|
#define GDK_SCREEN_XROOTWIN(screen) (GDK_X11_SCREEN (screen)->xroot_window)
|
2017-11-09 23:40:16 +00:00
|
|
|
#define GDK_DISPLAY_XROOTWIN(display) (GDK_SCREEN_XROOTWIN (GDK_X11_DISPLAY (display)->screen))
|
2018-03-20 10:40:08 +00:00
|
|
|
#define GDK_SURFACE_SCREEN(win) (GDK_X11_DISPLAY (gdk_surface_get_display (win))->screen)
|
|
|
|
#define GDK_SURFACE_DISPLAY(win) (gdk_surface_get_display (win))
|
|
|
|
#define GDK_SURFACE_XROOTWIN(win) (GDK_X11_SCREEN (GDK_SURFACE_SCREEN (win))->xroot_window)
|
2001-03-29 21:17:45 +00:00
|
|
|
|
2010-12-16 03:09:35 +00:00
|
|
|
/* override some macros from gdkx.h with direct-access variants */
|
|
|
|
#undef GDK_DISPLAY_XDISPLAY
|
2018-03-20 10:40:08 +00:00
|
|
|
#undef GDK_SURFACE_XDISPLAY
|
|
|
|
#undef GDK_SURFACE_XID
|
2010-12-16 03:09:35 +00:00
|
|
|
#undef GDK_SCREEN_XDISPLAY
|
|
|
|
|
2010-12-20 18:20:10 +00:00
|
|
|
#define GDK_DISPLAY_XDISPLAY(display) (GDK_X11_DISPLAY(display)->xdisplay)
|
2018-03-20 10:40:08 +00:00
|
|
|
#define GDK_SURFACE_XDISPLAY(win) (GDK_X11_SCREEN (GDK_SURFACE_SCREEN (win))->xdisplay)
|
2019-04-22 01:14:46 +00:00
|
|
|
#define GDK_SURFACE_XID(win) (GDK_X11_SURFACE (win)->xid)
|
2010-12-21 01:32:13 +00:00
|
|
|
#define GDK_SCREEN_XDISPLAY(screen) (GDK_X11_SCREEN (screen)->xdisplay)
|
2010-12-16 03:09:35 +00:00
|
|
|
|
1999-11-08 20:14:59 +00:00
|
|
|
#endif /* __GDK_PRIVATE_X11_H__ */
|