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"
|
|
|
|
#include "gdkinternals.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
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
#include <X11/Xutil.h>
|
2011-02-12 04:30:01 +00:00
|
|
|
#ifdef XINPUT_2
|
2010-12-21 19:17:02 +00:00
|
|
|
#include <X11/extensions/XInput2.h>
|
2011-02-11 22:19:25 +00:00
|
|
|
#endif
|
2010-12-21 19:17:02 +00:00
|
|
|
|
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 22:40:54 +00:00
|
|
|
void gdk_display_setup_window_visual (GdkDisplay *display,
|
|
|
|
gint depth,
|
|
|
|
Visual *visual,
|
|
|
|
Colormap colormap,
|
|
|
|
gboolean rgba);
|
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
|
|
|
|
2010-12-15 22:38:48 +00:00
|
|
|
gint _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
|
|
|
|
2000-03-28 01:24:44 +00:00
|
|
|
/* Routines from gdkgeometry-x11.c */
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_process_expose (GdkSurface *window,
|
2010-12-16 03:21:39 +00:00
|
|
|
gulong serial,
|
|
|
|
GdkRectangle *area);
|
2000-03-28 01:24:44 +00:00
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_queue_antiexpose (GdkSurface *window,
|
2010-12-16 03:09:35 +00:00
|
|
|
cairo_region_t *area);
|
2018-03-20 10:40:08 +00:00
|
|
|
void _gdk_x11_surface_translate (GdkSurface *window,
|
2010-12-16 03:09:35 +00:00
|
|
|
cairo_region_t *area,
|
|
|
|
gint dx,
|
|
|
|
gint dy);
|
2008-06-27 14:27:44 +00:00
|
|
|
|
2011-04-09 01:34:25 +00:00
|
|
|
void _gdk_x11_display_free_translate_queue (GdkDisplay *display);
|
|
|
|
|
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,
|
2013-06-20 09:40:07 +00:00
|
|
|
gint scale,
|
2010-12-15 22:32:29 +00:00
|
|
|
gint 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,
|
|
|
|
gint x_offset,
|
|
|
|
gint y_offset,
|
2013-06-20 09:40:07 +00:00
|
|
|
gint scale,
|
2010-12-15 22:32:29 +00:00
|
|
|
XRectangle **rects,
|
|
|
|
gint *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,
|
2010-12-15 22:45:05 +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
|
|
|
|
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,
|
|
|
|
gint status);
|
|
|
|
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);
|
|
|
|
|
2010-12-17 04:44:50 +00:00
|
|
|
gint _gdk_x11_display_text_property_to_utf8_list (GdkDisplay *display,
|
|
|
|
GdkAtom encoding,
|
|
|
|
gint format,
|
|
|
|
const guchar *text,
|
|
|
|
gint length,
|
|
|
|
gchar ***list);
|
|
|
|
gchar * _gdk_x11_display_utf8_to_string_target (GdkDisplay *displayt,
|
|
|
|
const gchar *str);
|
|
|
|
|
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
|
|
|
|
2017-11-25 13:23:25 +00:00
|
|
|
GdkX11DeviceManagerCore *_gdk_x11_device_manager_new (GdkDisplay *display);
|
2010-12-15 19:49:23 +00:00
|
|
|
|
2011-02-12 04:30:01 +00:00
|
|
|
#ifdef XINPUT_2
|
2012-03-01 05:56:51 +00:00
|
|
|
guchar * _gdk_x11_device_xi2_translate_event_mask (GdkX11DeviceManagerXI2 *device_manager_xi2,
|
|
|
|
GdkEventMask event_mask,
|
|
|
|
gint *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);
|
2011-07-14 15:43:59 +00:00
|
|
|
gint _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,
|
|
|
|
gint 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,
|
|
|
|
gdouble increment);
|
2012-01-23 23:49:52 +00:00
|
|
|
gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
|
|
|
|
guint n_valuator,
|
|
|
|
gdouble valuator_value,
|
|
|
|
GdkScrollDirection *direction_ret,
|
|
|
|
gdouble *delta_ret);
|
|
|
|
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
|
2011-07-14 15:43:59 +00:00
|
|
|
|
2015-03-02 17:19:16 +00:00
|
|
|
gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
|
|
|
|
gint n_axis);
|
|
|
|
|
|
|
|
void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
|
|
|
|
gdouble *axes,
|
|
|
|
gint n_axes);
|
2011-02-11 22:19:25 +00:00
|
|
|
#endif
|
2010-12-21 06:32:01 +00:00
|
|
|
|
2011-02-05 01:58:41 +00:00
|
|
|
void _gdk_x11_event_translate_keyboard_string (GdkEventKey *event);
|
|
|
|
|
2010-12-16 05:37:39 +00:00
|
|
|
GdkAtom _gdk_x11_display_manager_atom_intern (GdkDisplayManager *manager,
|
|
|
|
const gchar *atom_name,
|
|
|
|
gboolean copy_name);
|
|
|
|
gchar * _gdk_x11_display_manager_get_atom_name (GdkDisplayManager *manager,
|
|
|
|
GdkAtom atom);
|
2010-12-11 00:42:09 +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);
|
2018-03-20 11:05:26 +00:00
|
|
|
void _gdk_x11_display_create_surface_impl (GdkDisplay *display,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurface *window,
|
|
|
|
GdkSurface *real_parent,
|
2010-12-16 00:07:36 +00:00
|
|
|
GdkEventMask event_mask,
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkSurfaceAttr *attributes);
|
2017-11-05 23:33:56 +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,
|
2010-12-16 03:09:35 +00:00
|
|
|
const gchar * const *atom_names,
|
|
|
|
gint 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,
|
|
|
|
const gchar *format,
|
|
|
|
...) G_GNUC_PRINTF (2, 3);
|
|
|
|
|
2011-02-01 05:12:51 +00:00
|
|
|
GdkFilterReturn
|
2018-02-07 05:00:01 +00:00
|
|
|
_gdk_x11_dnd_filter (const XEvent *xevent,
|
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data);
|
2002-04-25 22:29:14 +00:00
|
|
|
|
2018-02-07 03:10:43 +00:00
|
|
|
GdkFilterReturn
|
2018-03-20 11:05:26 +00:00
|
|
|
xdnd_source_surface_filter (const XEvent *xevent,
|
2018-02-07 05:00:01 +00:00
|
|
|
GdkEvent *event,
|
|
|
|
gpointer data);
|
2018-02-07 03:10:43 +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,
|
2017-12-12 23:39:32 +00:00
|
|
|
GdkEvent *event,
|
|
|
|
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,
|
2017-12-12 23:39:32 +00:00
|
|
|
GdkEvent *event,
|
|
|
|
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
|
|
|
|
2018-03-20 10:40:08 +00:00
|
|
|
GdkDragContext * _gdk_x11_surface_drag_begin (GdkSurface *window,
|
2017-12-13 14:03:53 +00:00
|
|
|
GdkDevice *device,
|
|
|
|
GdkContentProvider *content,
|
|
|
|
GdkDragAction actions,
|
|
|
|
gint dx,
|
|
|
|
gint dy);
|
2012-10-05 14:46:49 +00:00
|
|
|
|
2010-05-25 22:38:44 +00:00
|
|
|
GdkGrabStatus _gdk_x11_convert_grab_status (gint status);
|
|
|
|
|
2017-11-09 23:40:16 +00:00
|
|
|
cairo_surface_t * _gdk_x11_display_create_bitmap_surface (GdkDisplay *display,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
|
2010-12-15 22:32:29 +00:00
|
|
|
extern const gint _gdk_x11_event_mask_table[];
|
|
|
|
extern const gint _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)
|
|
|
|
#define GDK_SURFACE_IS_X11(win) (GDK_IS_SURFACE_IMPL_X11 ((win)->impl))
|
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)
|
|
|
|
#define GDK_SURFACE_XID(win) (GDK_SURFACE_IMPL_X11(GDK_SURFACE (win)->impl)->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__ */
|