2008-07-01 22:57:50 +00:00
|
|
|
/* GDK - The GIMP Drawing Kit
|
1997-11-24 22:37:52 +00:00
|
|
|
* 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
|
1997-11-24 22:37:52 +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
|
2010-12-24 20:54:12 +00:00
|
|
|
* 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.
|
1997-11-24 22:37:52 +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/>.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
2000-07-26 11:33:08 +00:00
|
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
1999-02-24 07:37:18 +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
|
2008-05-28 14:01:57 +00:00
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
1999-02-24 07:37:18 +00:00
|
|
|
*/
|
|
|
|
|
2012-12-28 14:57:34 +00:00
|
|
|
#ifndef __GDK_TYPES_H__
|
|
|
|
#define __GDK_TYPES_H__
|
|
|
|
|
2019-11-27 13:33:43 +00:00
|
|
|
#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
2008-05-28 14:01:57 +00:00
|
|
|
#error "Only <gdk/gdk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/* GDK uses "glib". (And so does GTK).
|
|
|
|
*/
|
|
|
|
#include <glib.h>
|
Make this compile without framebuffer enabled
2000-06-20 Havoc Pennington <hp@redhat.com>
* modules/linux-fb/Makefile.am: Make this compile
without framebuffer enabled
* gdk/linux-fb/Makefile.am: Add conditional to not build
framebuffer unless specified in configure
* gdk/gdkdraw.c (gdk_draw_drawable): Fix bug where I was getting
the size of the target instead of source if -1 was passed for
width/height
* gdk/x11/gdkgeometry-x11.c (gdk_window_compute_position): Fix
width/height confusion.
2000-06-19 Havoc Pennington <hp@redhat.com>
* gdk/x11/gdkx.h (GDK_WINDOW_XWINDOW): change this to be
GDK_DRAWABLE_XID. In the future, we probably want to make it
faster with G_DISABLE_CHECKS turned on.
2000-06-14 Havoc Pennington <hp@redhat.com>
* gdk/Makefile.am: add gdkpixmap.c
* gdk/gdk.c: s/gdk_window_init/_gdk_windowing_window_init/
s/gdk_image_init/_gdk_windowing_image_init
* gdk/gdkcolor.c: make ref/unref compat wrappers for GObject
ref/unref
* gdk/gdkcolor.h: make GdkColormap a GObject subclass
* gdk/gdkcompat.h: remove GdkWindowType compat, since
GdkWindowType is now non-deprecated;
change gdk_window_get_type() compat to be
gdk_window_get_window_type().
* gdk/gdkdnd.h: make GdkDragContext a GObject.
* gdk/gdkdraw.c, gdk/gdkdraw.h: Convert GdkDrawable to a pure
virtual GObject. Make all functions call into the vtable.
Move gdk_image_put() guts in here. Remove GdkDrawableType
and gdk_drawable_get_type(), these are now GdkWindow-specific.
draw_image, get_depth, get_size, set_colormap, get_colormap,
get_visual added to the vtable.
* gdk/gdkgc.h, gdk/gdkgc.c: Convert GdkGC to a pure virtual
GObject. Virtualize everything.
(gdk_gc_new_with_values): remove check for destroyed window,
because now GdkWindow::create_gc will check this.
(gdk_gc_set_values): New function to set GC values, this
was already implemented but wasn't in the header
* gdk/gdkimage.h, gdk/gdkimage.c: Convert GdkImage to a GObject.
* gdk/gdkinternals.h: Remove _gdk_window_alloc(), remove
_gdk_window_draw_image(), remove _gdk_windowing_window_class,
remove _gdk_window_class; add _gdk_window_impl_get_type() and
_gdk_pixmap_impl_get_type(). Rename gdk_window_init to
_gdk_windowing_window_init, rename gdk_image_init to
_gdk_windowing_image_init.
* gdk/gdkpango.c: Reflect GObject-ification of PangoContext.
(gdk_draw_layout): Remove check for destroyed window,
because all the drawable methods already check it.
* gdk/gdkpixmap.h, gdk/gdkpixmap.c: Convert GdkPixmap to GObject.
Add gdkpixmap.c which contains implementation of GdkDrawable
virtual table (by chaining to a platform-specific implementation
object).
* gdk/gdkprivate.h: Remove GDK_IS_WINDOW, GDK_IS_PIXMAP,
GDK_DRAWABLE_DESTROYED. Add GDK_WINDOW_DESTROYED. Replace
GDK_DRAWABLE_TYPE with GDK_WINDOW_TYPE. Remove GdkDrawablePrivate,
GdkWindowPrivate, GdkImageClass, GdkImagePrivate, GdkGCPrivate,
GdkColormapPrivate.
* gdk/gdktypes.h: #include <glib-object.h>
* gdk/gdkwindow.h, gdk/gdkwindow.c: Convert GdkWindow to GObject.
Move most functionality to platform-specific implementation
object. GdkWindow itself now handles the backing store, then
chains to the platform-specific implementation.
(gdk_window_get_window_type): return GdkWindowType of the window.
(gdk_window_peek_children): New routine, returns the children of
a GdkWindow
(gdk_window_get_children): Was in X11-specific code and did
XQueryTree. Changed to simply return a copy of window->children;
so it can go in cross-platform code.
* gdk/x11/Makefile.am: fix broken MKINSTALLDIRS path
* gdk/x11/gdkcolor-x11.c: implement X-specific parts of
GdkColormap; just changed to use the new private data instead
of casting to GdkColormapPrivate.
* gdk/x11/gdkcursor-x11.c: added a couple typechecks to
gdk_cursor_new().
* gdk/x11/gdkdnd-x11.c: Change the way we access private fields
(private data member in the GObject).
(xdnd_manager_source_filter): Function had broken
error handling, fix it (use gdk_error_trap_push).
* gdk/x11/gdkdrawable-x11.c: This file now implements
a base class for GdkWindowImplX11/GdkPixmapImplX11. This
base class is purely for the convenience of the X port,
and not part of the interface to cross-platform GDK.
* gdk/x11/gdkevents-x11.c: Reflect various renamings.
* gdk/x11/gdkgc-x11.c: Implement a subclass of GdkGC that's
specific to X, and returned by the create_gc virtual method
of GdkDrawableImplX11.
(gdk_x11_gc_set_dashes): Change this to take an array of gint8
rather than gchar, this was also changed in the GdkGC vtable.
(gdk_x11_gc_values_to_xvalues): If GdkGCValues is NULL, or the
mask is 0, return immediately, instead of checking every flag.
This is faster, and keeps us from segfaulting if values is NULL
and the mask contains some nonzero flags.
* gdk/x11/gdkgeometry-x11.c: deal with all the rearranging of
GdkWindow.
* gdk/x11/gdkglobals-x11.c: change type of grab window, since
GdkWindowPrivate is gone.
* gdk/x11/gdkim-x11.c: rename things that got renamed.
* gdk/x11/gdkimage-x11.c: implement in terms of GObject, and
remove the image_put stuff that got transferred to GdkDrawable.
* gdk/x11/gdkinput.c: renamings
* gdk/x11/gdkmain-x11.c: #include <pango/pangox.h>
* gdk/x11/gdkpixmap-x11.c: GObject conversion
* gdk/x11/gdkprivate-x11.h: indentation fixes
* gdk/x11/gdkproperty-x11.c: renamings
* gdk/x11/gdkselection-x11.c: renamings
* gdk/x11/gdkwindow-x11.c: Restructuring and renaming; this now
implements the platform-specific "impl" object.
Moved gdk_window_get_children to gdk/gdkwindow.c
* gdk/x11/gdkx.h: Remove all the private structs and private datas
that no longer exist. Add declaration of GdkGCX11 object here.
Fix all the macros to still work.
* gtk/gtk-boxed.defs: Remove GtkStyle, GdkColormap, GdkWindow,
GdkDragContext from the boxed types since they are now GObjects.
* gtk/gtkstyle.h, gtk/gtkstyle.c: Converted GtkStyle to a GObject,
moved xthickness/ythickness into the instance. GtkStyleClass
functions are now in the standard vtable for GtkStyle, so you have
to create a GObject subclass to write a theme engine.
(gtk_style_copy): fixed a leaked PangoFontDescription
(gtk_style_init): renamed gtk_style_realize, so gtk_style_init
can be the standard GObject function.
* Throughout GTK:
s/style->klass->[xy]thickness/style->[xy]thickness
s/pango_layout_unref/g_object_unref/
* gtk/gtkrc.h, gtk/gtkrc.c: Converted GtkRcStyle to a GObject.
* gtk/gtksocket.c: Use gdk_window_get_user_data() instead of
accessing GDK internals.
* gtk/gtkwidget.c: Use gdk_window_peek_children() instead of
accessing GDK internals.
2000-06-20 21:04:44 +00:00
|
|
|
#include <glib-object.h>
|
2017-12-05 14:44:00 +00:00
|
|
|
#include <gio/gio.h>
|
2010-06-28 12:27:55 +00:00
|
|
|
#include <cairo.h>
|
2017-12-05 14:44:00 +00:00
|
|
|
#include <pango/pango.h>
|
1997-11-24 22:37:52 +00:00
|
|
|
|
1999-03-13 16:40:24 +00:00
|
|
|
/* The system specific file gdkconfig.h contains such configuration
|
|
|
|
* settings that are needed not only when compiling GDK (or GTK)
|
|
|
|
* itself, but also occasionally when compiling programs that use GDK
|
|
|
|
* (or GTK). One such setting is what windowing API backend is in use.
|
|
|
|
*/
|
2010-12-21 23:18:07 +00:00
|
|
|
#include <gdk/gdkconfig.h>
|
1999-03-13 16:40:24 +00:00
|
|
|
|
2020-05-26 23:21:55 +00:00
|
|
|
G_BEGIN_DECLS
|
2010-11-15 18:15:00 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GDK_CURRENT_TIME:
|
|
|
|
*
|
|
|
|
* Represents the current time, and can be used anywhere a time is expected.
|
|
|
|
*/
|
1997-11-24 22:37:52 +00:00
|
|
|
#define GDK_CURRENT_TIME 0L
|
2010-05-13 02:51:37 +00:00
|
|
|
|
2017-12-26 16:34:18 +00:00
|
|
|
/**
|
|
|
|
* GdkPoint:
|
|
|
|
* @x: the x coordinate of the point
|
|
|
|
* @y: the y coordinate of the point
|
|
|
|
*
|
|
|
|
* Defines the x and y coordinates of a point.
|
1997-11-24 22:37:52 +00:00
|
|
|
*/
|
2017-12-26 16:34:18 +00:00
|
|
|
struct _GdkPoint
|
|
|
|
{
|
|
|
|
gint x;
|
|
|
|
gint y;
|
|
|
|
};
|
2010-12-24 20:54:12 +00:00
|
|
|
typedef struct _GdkPoint GdkPoint;
|
2010-10-04 01:19:43 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GdkRectangle:
|
2017-12-26 16:34:18 +00:00
|
|
|
* @x: the x coordinate of the top left corner
|
|
|
|
* @y: the y coordinate of the top left corner
|
|
|
|
* @width: the width of the rectangle
|
|
|
|
* @height: the height of the rectangle
|
2010-10-04 01:19:43 +00:00
|
|
|
*
|
|
|
|
* Defines the position and size of a rectangle. It is identical to
|
|
|
|
* #cairo_rectangle_int_t.
|
|
|
|
*/
|
2015-05-03 10:38:45 +00:00
|
|
|
#ifdef __GI_SCANNER__
|
|
|
|
/* The introspection scanner is currently unable to lookup how
|
|
|
|
* cairo_rectangle_int_t is actually defined. This prevents
|
|
|
|
* introspection data for the GdkRectangle type to include fields
|
|
|
|
* descriptions. To workaround this issue, we define it with the same
|
|
|
|
* content as cairo_rectangle_int_t, but only under the introspection
|
|
|
|
* define.
|
|
|
|
*/
|
|
|
|
struct _GdkRectangle
|
|
|
|
{
|
|
|
|
int x, y;
|
|
|
|
int width, height;
|
|
|
|
};
|
|
|
|
typedef struct _GdkRectangle GdkRectangle;
|
|
|
|
#else
|
2010-12-24 20:54:12 +00:00
|
|
|
typedef cairo_rectangle_int_t GdkRectangle;
|
2015-05-03 10:38:45 +00:00
|
|
|
#endif
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2010-12-24 20:54:12 +00:00
|
|
|
/* Forward declarations of commonly used types */
|
2010-10-21 13:23:48 +00:00
|
|
|
typedef struct _GdkRGBA GdkRGBA;
|
2017-11-18 01:19:53 +00:00
|
|
|
typedef struct _GdkContentFormats GdkContentFormats;
|
2017-11-24 05:17:37 +00:00
|
|
|
typedef struct _GdkContentProvider GdkContentProvider;
|
2010-12-10 14:46:35 +00:00
|
|
|
typedef struct _GdkCursor GdkCursor;
|
2017-11-02 20:39:00 +00:00
|
|
|
typedef struct _GdkTexture GdkTexture;
|
2010-12-24 20:54:12 +00:00
|
|
|
typedef struct _GdkDevice GdkDevice;
|
2018-06-29 17:34:14 +00:00
|
|
|
typedef struct _GdkDrag GdkDrag;
|
2018-04-30 12:10:44 +00:00
|
|
|
typedef struct _GdkDrop GdkDrop;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2014-05-29 03:55:53 +00:00
|
|
|
typedef struct _GdkClipboard GdkClipboard;
|
2010-12-11 00:42:09 +00:00
|
|
|
typedef struct _GdkDisplayManager GdkDisplayManager;
|
2010-12-10 14:46:35 +00:00
|
|
|
typedef struct _GdkDisplay GdkDisplay;
|
2018-03-20 10:40:08 +00:00
|
|
|
typedef struct _GdkSurface GdkSurface;
|
2010-12-11 05:14:53 +00:00
|
|
|
typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
|
2015-11-26 18:47:38 +00:00
|
|
|
typedef struct _GdkSeat GdkSeat;
|
2018-03-18 18:21:33 +00:00
|
|
|
typedef struct _GdkSnapshot GdkSnapshot;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2016-11-23 00:07:25 +00:00
|
|
|
typedef struct _GdkDrawingContext GdkDrawingContext;
|
2016-11-28 16:22:35 +00:00
|
|
|
typedef struct _GdkDrawContext GdkDrawContext;
|
2018-04-11 22:16:43 +00:00
|
|
|
typedef struct _GdkCairoContext GdkCairoContext;
|
2014-10-09 08:45:44 +00:00
|
|
|
typedef struct _GdkGLContext GdkGLContext;
|
2016-11-21 13:18:43 +00:00
|
|
|
typedef struct _GdkVulkanContext GdkVulkanContext;
|
2014-10-09 08:45:44 +00:00
|
|
|
|
2020-02-15 23:32:05 +00:00
|
|
|
/* Currently, these are the same values numerically as in the
|
|
|
|
* X protocol. If you change that, gdksurface-x11.c/gdk_surface_set_geometry_hints()
|
|
|
|
* will need fixing.
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* GdkGravity:
|
|
|
|
* @GDK_GRAVITY_NORTH_WEST: the reference point is at the top left corner.
|
|
|
|
* @GDK_GRAVITY_NORTH: the reference point is in the middle of the top edge.
|
|
|
|
* @GDK_GRAVITY_NORTH_EAST: the reference point is at the top right corner.
|
|
|
|
* @GDK_GRAVITY_WEST: the reference point is at the middle of the left edge.
|
|
|
|
* @GDK_GRAVITY_CENTER: the reference point is at the center of the surface.
|
|
|
|
* @GDK_GRAVITY_EAST: the reference point is at the middle of the right edge.
|
|
|
|
* @GDK_GRAVITY_SOUTH_WEST: the reference point is at the lower left corner.
|
|
|
|
* @GDK_GRAVITY_SOUTH: the reference point is at the middle of the lower edge.
|
|
|
|
* @GDK_GRAVITY_SOUTH_EAST: the reference point is at the lower right corner.
|
|
|
|
* @GDK_GRAVITY_STATIC: the reference point is at the top left corner of the
|
|
|
|
* surface itself, ignoring window manager decorations.
|
|
|
|
*
|
2020-05-27 00:05:11 +00:00
|
|
|
* Defines the reference point of a surface and is used in #GdkPopupLayout.
|
2020-02-15 23:32:05 +00:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GDK_GRAVITY_NORTH_WEST = 1,
|
|
|
|
GDK_GRAVITY_NORTH,
|
|
|
|
GDK_GRAVITY_NORTH_EAST,
|
|
|
|
GDK_GRAVITY_WEST,
|
|
|
|
GDK_GRAVITY_CENTER,
|
|
|
|
GDK_GRAVITY_EAST,
|
|
|
|
GDK_GRAVITY_SOUTH_WEST,
|
|
|
|
GDK_GRAVITY_SOUTH,
|
|
|
|
GDK_GRAVITY_SOUTH_EAST,
|
|
|
|
GDK_GRAVITY_STATIC
|
|
|
|
} GdkGravity;
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
/* Types of modifiers.
|
|
|
|
*/
|
2010-05-13 02:51:37 +00:00
|
|
|
/**
|
|
|
|
* GdkModifierType:
|
|
|
|
* @GDK_SHIFT_MASK: the Shift key.
|
|
|
|
* @GDK_LOCK_MASK: a Lock key (depending on the modifier mapping of the
|
|
|
|
* X server this may either be CapsLock or ShiftLock).
|
|
|
|
* @GDK_CONTROL_MASK: the Control key.
|
2020-04-05 13:39:03 +00:00
|
|
|
* @GDK_ALT_MASK: the fourth modifier key (it depends on the modifier
|
2010-05-13 02:51:37 +00:00
|
|
|
* mapping of the X server which key is interpreted as this modifier, but
|
|
|
|
* normally it is the Alt key).
|
|
|
|
* @GDK_BUTTON1_MASK: the first mouse button.
|
|
|
|
* @GDK_BUTTON2_MASK: the second mouse button.
|
|
|
|
* @GDK_BUTTON3_MASK: the third mouse button.
|
|
|
|
* @GDK_BUTTON4_MASK: the fourth mouse button.
|
|
|
|
* @GDK_BUTTON5_MASK: the fifth mouse button.
|
2018-06-25 23:21:08 +00:00
|
|
|
* @GDK_SUPER_MASK: the Super modifier
|
|
|
|
* @GDK_HYPER_MASK: the Hyper modifier
|
|
|
|
* @GDK_META_MASK: the Meta modifier
|
2010-05-13 02:51:37 +00:00
|
|
|
*
|
|
|
|
* A set of bit-flags to indicate the state of modifier keys and mouse buttons
|
|
|
|
* in various event types. Typical modifier keys are Shift, Control, Meta,
|
|
|
|
* Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
|
|
|
|
*
|
2020-04-05 14:24:07 +00:00
|
|
|
* Note that GDK may add internal values to events which include values outside
|
|
|
|
* of this enumeration. Your code should preserve and ignore them. You can use
|
|
|
|
* %GDK_MODIFIER_MASK to remove all private values.
|
2010-05-13 02:51:37 +00:00
|
|
|
*/
|
1997-11-24 22:37:52 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
1998-06-15 21:27:17 +00:00
|
|
|
GDK_SHIFT_MASK = 1 << 0,
|
2010-12-24 20:54:12 +00:00
|
|
|
GDK_LOCK_MASK = 1 << 1,
|
1998-06-15 21:27:17 +00:00
|
|
|
GDK_CONTROL_MASK = 1 << 2,
|
2020-04-05 13:39:03 +00:00
|
|
|
GDK_ALT_MASK = 1 << 3,
|
2020-04-05 14:24:07 +00:00
|
|
|
|
1998-06-15 21:27:17 +00:00
|
|
|
GDK_BUTTON1_MASK = 1 << 8,
|
|
|
|
GDK_BUTTON2_MASK = 1 << 9,
|
|
|
|
GDK_BUTTON3_MASK = 1 << 10,
|
|
|
|
GDK_BUTTON4_MASK = 1 << 11,
|
|
|
|
GDK_BUTTON5_MASK = 1 << 12,
|
2005-09-06 17:56:01 +00:00
|
|
|
|
|
|
|
GDK_SUPER_MASK = 1 << 26,
|
|
|
|
GDK_HYPER_MASK = 1 << 27,
|
|
|
|
GDK_META_MASK = 1 << 28,
|
1998-06-15 21:27:17 +00:00
|
|
|
} GdkModifierType;
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2020-04-05 14:24:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GDK_MODIFIER_MASK:
|
|
|
|
*
|
|
|
|
* A mask covering all entries in #GdkModifierType.
|
|
|
|
*/
|
|
|
|
#define GDK_MODIFIER_MASK (GDK_SHIFT_MASK|GDK_LOCK_MASK|GDK_CONTROL_MASK| \
|
|
|
|
GDK_ALT_MASK|GDK_SUPER_MASK|GDK_HYPER_MASK|GDK_META_MASK| \
|
|
|
|
GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK| \
|
|
|
|
GDK_BUTTON4_MASK|GDK_BUTTON5_MASK)
|
2011-09-27 07:50:34 +00:00
|
|
|
|
2010-05-25 22:38:44 +00:00
|
|
|
|
2015-01-28 19:04:22 +00:00
|
|
|
/**
|
|
|
|
* GdkGLError:
|
|
|
|
* @GDK_GL_ERROR_NOT_AVAILABLE: OpenGL support is not available
|
|
|
|
* @GDK_GL_ERROR_UNSUPPORTED_FORMAT: The requested visual format is not supported
|
|
|
|
* @GDK_GL_ERROR_UNSUPPORTED_PROFILE: The requested profile is not supported
|
2018-06-25 23:21:08 +00:00
|
|
|
* @GDK_GL_ERROR_COMPILATION_FAILED: The shader compilation failed
|
|
|
|
* @GDK_GL_ERROR_LINK_FAILED: The shader linking failed
|
2015-01-28 19:04:22 +00:00
|
|
|
*
|
|
|
|
* Error enumeration for #GdkGLContext.
|
|
|
|
*/
|
2014-10-09 08:45:44 +00:00
|
|
|
typedef enum {
|
|
|
|
GDK_GL_ERROR_NOT_AVAILABLE,
|
|
|
|
GDK_GL_ERROR_UNSUPPORTED_FORMAT,
|
2016-07-01 15:17:14 +00:00
|
|
|
GDK_GL_ERROR_UNSUPPORTED_PROFILE,
|
|
|
|
GDK_GL_ERROR_COMPILATION_FAILED,
|
|
|
|
GDK_GL_ERROR_LINK_FAILED
|
2014-10-09 08:45:44 +00:00
|
|
|
} GdkGLError;
|
2000-11-22 10:07:34 +00:00
|
|
|
|
2016-11-28 15:34:01 +00:00
|
|
|
/**
|
|
|
|
* GdkVulkanError:
|
|
|
|
* @GDK_VULKAN_ERROR_UNSUPPORTED: Vulkan is not supported on this backend or has not been
|
|
|
|
* compiled in.
|
2018-03-20 14:14:10 +00:00
|
|
|
* @GDK_VULKAN_ERROR_NOT_AVAILABLE: Vulkan support is not available on this Surface
|
2016-11-28 15:34:01 +00:00
|
|
|
*
|
|
|
|
* Error enumeration for #GdkVulkanContext.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GDK_VULKAN_ERROR_UNSUPPORTED,
|
|
|
|
GDK_VULKAN_ERROR_NOT_AVAILABLE,
|
|
|
|
} GdkVulkanError;
|
|
|
|
|
2016-04-09 19:20:07 +00:00
|
|
|
/**
|
|
|
|
* GdkAxisUse:
|
|
|
|
* @GDK_AXIS_IGNORE: the axis is ignored.
|
|
|
|
* @GDK_AXIS_X: the axis is used as the x axis.
|
|
|
|
* @GDK_AXIS_Y: the axis is used as the y axis.
|
|
|
|
* @GDK_AXIS_PRESSURE: the axis is used for pressure information.
|
|
|
|
* @GDK_AXIS_XTILT: the axis is used for x tilt information.
|
|
|
|
* @GDK_AXIS_YTILT: the axis is used for y tilt information.
|
|
|
|
* @GDK_AXIS_WHEEL: the axis is used for wheel information.
|
2018-06-25 23:21:08 +00:00
|
|
|
* @GDK_AXIS_DISTANCE: the axis is used for pen/tablet distance information
|
|
|
|
* @GDK_AXIS_ROTATION: the axis is used for pen rotation information
|
|
|
|
* @GDK_AXIS_SLIDER: the axis is used for pen slider information
|
2016-04-09 19:20:07 +00:00
|
|
|
* @GDK_AXIS_LAST: a constant equal to the numerically highest axis value.
|
|
|
|
*
|
|
|
|
* An enumeration describing the way in which a device
|
|
|
|
* axis (valuator) maps onto the predefined valuator
|
2019-02-24 18:32:24 +00:00
|
|
|
* types that GTK understands.
|
2016-04-09 21:35:58 +00:00
|
|
|
*
|
|
|
|
* Note that the X and Y axes are not really needed; pointer devices
|
|
|
|
* report their location via the x/y members of events regardless. Whether
|
|
|
|
* X and Y are present as axes depends on the GDK backend.
|
2016-04-09 19:20:07 +00:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GDK_AXIS_IGNORE,
|
|
|
|
GDK_AXIS_X,
|
|
|
|
GDK_AXIS_Y,
|
|
|
|
GDK_AXIS_PRESSURE,
|
|
|
|
GDK_AXIS_XTILT,
|
|
|
|
GDK_AXIS_YTILT,
|
|
|
|
GDK_AXIS_WHEEL,
|
|
|
|
GDK_AXIS_DISTANCE,
|
|
|
|
GDK_AXIS_ROTATION,
|
|
|
|
GDK_AXIS_SLIDER,
|
|
|
|
GDK_AXIS_LAST
|
|
|
|
} GdkAxisUse;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GdkAxisFlags:
|
|
|
|
* @GDK_AXIS_FLAG_X: X axis is present
|
|
|
|
* @GDK_AXIS_FLAG_Y: Y axis is present
|
|
|
|
* @GDK_AXIS_FLAG_PRESSURE: Pressure axis is present
|
|
|
|
* @GDK_AXIS_FLAG_XTILT: X tilt axis is present
|
|
|
|
* @GDK_AXIS_FLAG_YTILT: Y tilt axis is present
|
|
|
|
* @GDK_AXIS_FLAG_WHEEL: Wheel axis is present
|
|
|
|
* @GDK_AXIS_FLAG_DISTANCE: Distance axis is present
|
|
|
|
* @GDK_AXIS_FLAG_ROTATION: Z-axis rotation is present
|
|
|
|
* @GDK_AXIS_FLAG_SLIDER: Slider axis is present
|
|
|
|
*
|
|
|
|
* Flags describing the current capabilities of a device/tool.
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GDK_AXIS_FLAG_X = 1 << GDK_AXIS_X,
|
|
|
|
GDK_AXIS_FLAG_Y = 1 << GDK_AXIS_Y,
|
|
|
|
GDK_AXIS_FLAG_PRESSURE = 1 << GDK_AXIS_PRESSURE,
|
|
|
|
GDK_AXIS_FLAG_XTILT = 1 << GDK_AXIS_XTILT,
|
|
|
|
GDK_AXIS_FLAG_YTILT = 1 << GDK_AXIS_YTILT,
|
|
|
|
GDK_AXIS_FLAG_WHEEL = 1 << GDK_AXIS_WHEEL,
|
|
|
|
GDK_AXIS_FLAG_DISTANCE = 1 << GDK_AXIS_DISTANCE,
|
|
|
|
GDK_AXIS_FLAG_ROTATION = 1 << GDK_AXIS_ROTATION,
|
|
|
|
GDK_AXIS_FLAG_SLIDER = 1 << GDK_AXIS_SLIDER,
|
|
|
|
} GdkAxisFlags;
|
|
|
|
|
2018-05-30 19:12:43 +00:00
|
|
|
/**
|
|
|
|
* GdkDragAction:
|
|
|
|
* @GDK_ACTION_COPY: Copy the data.
|
|
|
|
* @GDK_ACTION_MOVE: Move the data, i.e. first copy it, then delete
|
|
|
|
* it from the source using the DELETE target of the X selection protocol.
|
|
|
|
* @GDK_ACTION_LINK: Add a link to the data. Note that this is only
|
2020-01-04 17:06:36 +00:00
|
|
|
* useful if source and destination agree on what it means, and is not
|
|
|
|
* supported on all platforms.
|
2018-05-30 19:12:43 +00:00
|
|
|
* @GDK_ACTION_ASK: Ask the user what to do with the data.
|
|
|
|
*
|
2020-01-04 17:06:36 +00:00
|
|
|
* Used in #GdkDrop and #GdkDrag to indicate the actions that the
|
|
|
|
* destination can and should do with the dropped data.
|
2018-05-30 19:12:43 +00:00
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GDK_ACTION_COPY = 1 << 0,
|
|
|
|
GDK_ACTION_MOVE = 1 << 1,
|
|
|
|
GDK_ACTION_LINK = 1 << 2,
|
|
|
|
GDK_ACTION_ASK = 1 << 3
|
|
|
|
} GdkDragAction;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GDK_ACTION_ALL:
|
|
|
|
*
|
|
|
|
* Defines all possible DND actions. This can be used in gdk_drop_status()
|
|
|
|
* messages when any drop can be accepted or a more specific drop method
|
|
|
|
* is not yet known.
|
|
|
|
*/
|
|
|
|
#define GDK_ACTION_ALL (GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK)
|
|
|
|
|
2020-03-19 15:53:35 +00:00
|
|
|
/*
|
|
|
|
* GDK_DECLARE_INTERNAL_TYPE:
|
|
|
|
* @ModuleObjName: The name of the new type, in camel case (like GtkWidget)
|
|
|
|
* @module_obj_name: The name of the new type in lowercase, with words
|
|
|
|
* separated by '_' (like 'gtk_widget')
|
|
|
|
* @MODULE: The name of the module, in all caps (like 'GTK')
|
|
|
|
* @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET')
|
|
|
|
* @ParentName: the name of the parent type, in camel case (like GtkWidget)
|
|
|
|
*
|
|
|
|
* A convenience macro for emitting the usual declarations in the
|
|
|
|
* header file for a type which is intended to be subclassed only
|
|
|
|
* by internal consumers.
|
|
|
|
*
|
|
|
|
* This macro differs from %G_DECLARE_DERIVABLE_TYPE and %G_DECLARE_FINAL_TYPE
|
|
|
|
* by declaring a type that is only derivable internally. Internal users can
|
|
|
|
* derive this type, assuming they have access to the instance and class
|
|
|
|
* structures; external users will not be able to subclass this type.
|
|
|
|
*/
|
|
|
|
#define GDK_DECLARE_INTERNAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \
|
|
|
|
GType module_obj_name##_get_type (void); \
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
|
|
|
|
typedef struct _##ModuleObjName ModuleObjName; \
|
|
|
|
typedef struct _##ModuleObjName##Class ModuleObjName##Class; \
|
|
|
|
\
|
|
|
|
_GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModuleObjName##Class, g_type_class_unref) \
|
|
|
|
\
|
|
|
|
G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \
|
|
|
|
return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \
|
|
|
|
G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_CLASS (gpointer ptr) { \
|
|
|
|
return G_TYPE_CHECK_CLASS_CAST (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
|
|
|
|
G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \
|
|
|
|
return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \
|
|
|
|
G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME##_CLASS (gpointer ptr) { \
|
|
|
|
return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \
|
|
|
|
G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \
|
|
|
|
return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
|
|
|
|
2020-04-05 15:02:21 +00:00
|
|
|
typedef struct _GdkKeymapKey GdkKeymapKey;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GdkKeymapKey:
|
|
|
|
* @keycode: the hardware keycode. This is an identifying number for a
|
|
|
|
* physical key.
|
|
|
|
* @group: indicates movement in a horizontal direction. Usually groups are used
|
|
|
|
* for two different languages. In group 0, a key might have two English
|
|
|
|
* characters, and in group 1 it might have two Hebrew characters. The Hebrew
|
|
|
|
* characters will be printed on the key next to the English characters.
|
|
|
|
* @level: indicates which symbol on the key will be used, in a vertical direction.
|
|
|
|
* So on a standard US keyboard, the key with the number “1” on it also has the
|
|
|
|
* exclamation point ("!") character on it. The level indicates whether to use
|
|
|
|
* the “1” or the “!” symbol. The letter keys are considered to have a lowercase
|
|
|
|
* letter at level 0, and an uppercase letter at level 1, though only the
|
|
|
|
* uppercase letter is printed.
|
|
|
|
*
|
|
|
|
* A #GdkKeymapKey is a hardware key that can be mapped to a keyval.
|
|
|
|
*/
|
|
|
|
struct _GdkKeymapKey
|
|
|
|
{
|
|
|
|
guint keycode;
|
|
|
|
gint group;
|
|
|
|
gint level;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-06-12 05:32:25 +00:00
|
|
|
G_END_DECLS
|
1997-11-24 22:37:52 +00:00
|
|
|
|
2020-04-07 22:32:22 +00:00
|
|
|
/*< private >
|
|
|
|
* GDK_EXTERN_VAR:
|
|
|
|
*
|
|
|
|
* A macro to annotate extern variables so that they show up properly in
|
|
|
|
* Windows DLLs.
|
|
|
|
*/
|
|
|
|
#ifndef GDK_EXTERN_VAR
|
|
|
|
# ifdef G_PLATFORM_WIN32
|
|
|
|
# ifdef GTK_COMPILATION
|
|
|
|
# ifdef DLL_EXPORT
|
|
|
|
# define GDK_EXTERN_VAR __declspec(dllexport)
|
|
|
|
# else /* !DLL_EXPORT */
|
|
|
|
# define GDK_EXTERN_VAR extern
|
|
|
|
# endif /* !DLL_EXPORT */
|
|
|
|
# else /* !GTK_COMPILATION */
|
|
|
|
# define GDK_EXTERN_VAR extern __declspec(dllimport)
|
|
|
|
# endif /* !GTK_COMPILATION */
|
|
|
|
# else /* !G_PLATFORM_WIN32 */
|
|
|
|
# define GDK_EXTERN_VAR _GDK_EXTERN
|
|
|
|
# endif /* !G_PLATFORM_WIN32 */
|
|
|
|
#endif /* GDK_EXTERN_VAR */
|
|
|
|
|
1997-11-24 22:37:52 +00:00
|
|
|
#endif /* __GDK_TYPES_H__ */
|