Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdktypes.h
Go to the documentation of this file.
1/* GDK - The GIMP Drawing Kit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/*
19 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
20 * file for a list of people on the GTK+ Team. See the ChangeLog
21 * files for a list of changes. These files are distributed with
22 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 */
24
25#pragma once
26
27#if !defined (__GDK_H_INSIDE__) && !defined (GTK_COMPILATION)
28#error "Only <gdk/gdk.h> can be included directly."
29#endif
30
31/* GDK uses "glib". (And so does GTK).
32 */
33#include <glib.h>
34#include <glib-object.h>
35#include <gio/gio.h>
36#include <cairo.h>
37#include <pango/pango.h>
38
39/* The system specific file gdkconfig.h contains such configuration
40 * settings that are needed not only when compiling GDK (or GTK)
41 * itself, but also occasionally when compiling programs that use GDK
42 * (or GTK). One such setting is what windowing API backend is in use.
43 */
44#include <gdk/gdkconfig.h>
45#include <gdk/gdkenums.h>
47
49
50/**
51 * GDK_CURRENT_TIME:
52 *
53 * Represents the current time, and can be used anywhere a time is expected.
54 */
55#define GDK_CURRENT_TIME 0L
56
57#ifdef __GI_SCANNER__
58/* The introspection scanner is currently unable to lookup how
59 * cairo_rectangle_int_t is actually defined. This prevents
60 * introspection data for the GdkRectangle type to include fields
61 * descriptions. To workaround this issue, we define it with the same
62 * content as cairo_rectangle_int_t, but only under the introspection
63 * define.
64 */
65struct _GdkRectangle
66{
67 int x, y;
68 int width, height;
69};
70typedef struct _GdkRectangle GdkRectangle;
71#else
73#endif
74
75/* Forward declarations of commonly used types */
76typedef struct _GdkRGBA GdkRGBA;
77typedef struct _GdkCicpParams GdkCicpParams;
78typedef struct _GdkColorState GdkColorState;
79typedef struct _GdkContentFormats GdkContentFormats;
81typedef struct _GdkCursor GdkCursor;
82typedef struct _GdkTexture GdkTexture;
83typedef struct _GdkTextureDownloader GdkTextureDownloader;
84typedef struct _GdkDevice GdkDevice;
85typedef struct _GdkDrag GdkDrag;
86typedef struct _GdkDrop GdkDrop;
87
88typedef struct _GdkClipboard GdkClipboard;
89typedef struct _GdkDisplayManager GdkDisplayManager;
90typedef struct _GdkDisplay GdkDisplay;
91typedef struct _GdkSurface GdkSurface;
92typedef struct _GdkAppLaunchContext GdkAppLaunchContext;
93typedef struct _GdkSeat GdkSeat;
94typedef struct _GdkSnapshot GdkSnapshot;
95
96typedef struct _GdkDrawContext GdkDrawContext;
97typedef struct _GdkCairoContext GdkCairoContext;
98typedef struct _GdkGLContext GdkGLContext;
99typedef struct _GdkVulkanContext GdkVulkanContext;
100
101typedef struct _GdkDmabufFormats GdkDmabufFormats;
102typedef struct _GdkDmabufTexture GdkDmabufTexture;
103
104/*<private>
105 * GDK_DECLARE_INTERNAL_TYPE:
106 * @ModuleObjName: The name of the new type, in camel case (like GtkWidget)
107 * @module_obj_name: The name of the new type in lowercase, with words
108 * separated by '_' (like 'gtk_widget')
109 * @MODULE: The name of the module, in all caps (like 'GTK')
110 * @OBJ_NAME: The bare name of the type, in all caps (like 'WIDGET')
111 * @ParentName: the name of the parent type, in camel case (like GtkWidget)
112 *
113 * A convenience macro for emitting the usual declarations in the
114 * header file for a type which is intended to be subclassed only
115 * by internal consumers.
116 *
117 * This macro differs from %G_DECLARE_DERIVABLE_TYPE and %G_DECLARE_FINAL_TYPE
118 * by declaring a type that is only derivable internally. Internal users can
119 * derive this type, assuming they have access to the instance and class
120 * structures; external users will not be able to subclass this type.
121 */
122#define GDK_DECLARE_INTERNAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName) \
123 GType module_obj_name##_get_type (void); \
124 G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
125 typedef struct _##ModuleObjName ModuleObjName; \
126 typedef struct _##ModuleObjName##Class ModuleObjName##Class; \
127 \
128 _GLIB_DEFINE_AUTOPTR_CHAINUP (ModuleObjName, ParentName) \
129 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ModuleObjName##Class, g_type_class_unref) \
130 \
131 G_GNUC_UNUSED static inline ModuleObjName * MODULE##_##OBJ_NAME (gpointer ptr) { \
132 return G_TYPE_CHECK_INSTANCE_CAST (ptr, module_obj_name##_get_type (), ModuleObjName); } \
133 G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_CLASS (gpointer ptr) { \
134 return G_TYPE_CHECK_CLASS_CAST (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
135 G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME (gpointer ptr) { \
136 return G_TYPE_CHECK_INSTANCE_TYPE (ptr, module_obj_name##_get_type ()); } \
137 G_GNUC_UNUSED static inline gboolean MODULE##_IS_##OBJ_NAME##_CLASS (gpointer ptr) { \
138 return G_TYPE_CHECK_CLASS_TYPE (ptr, module_obj_name##_get_type ()); } \
139 G_GNUC_UNUSED static inline ModuleObjName##Class * MODULE##_##OBJ_NAME##_GET_CLASS (gpointer ptr) { \
140 return G_TYPE_INSTANCE_GET_CLASS (ptr, module_obj_name##_get_type (), ModuleObjName##Class); } \
141 G_GNUC_END_IGNORE_DEPRECATIONS
142
144
145/**
146 * GdkKeymapKey:
147 * @keycode: the hardware keycode. This is an identifying number for a
148 * physical key.
149 * @group: indicates movement in a horizontal direction. Usually groups are used
150 * for two different languages. In group 0, a key might have two English
151 * characters, and in group 1 it might have two Hebrew characters. The Hebrew
152 * characters will be printed on the key next to the English characters.
153 * @level: indicates which symbol on the key will be used, in a vertical direction.
154 * So on a standard US keyboard, the key with the number “1” on it also has the
155 * exclamation point ("!") character on it. The level indicates whether to use
156 * the “1” or the “!” symbol. The letter keys are considered to have a lowercase
157 * letter at level 0, and an uppercase letter at level 1, though only the
158 * uppercase letter is printed.
159 *
160 * A `GdkKeymapKey` is a hardware key that can be mapped to a keyval.
161 */
163{
165 int group;
166 int level;
167};
168
170
cairo_rectangle_int_t GdkRectangle
Definition gdktypes.h:72
struct _GdkGLContext GdkGLContext
Definition gdktypes.h:98
struct _GdkDevice GdkDevice
Definition gdktypes.h:84
struct _GdkDisplay GdkDisplay
Definition gdktypes.h:90
struct _GdkContentFormats GdkContentFormats
Definition gdktypes.h:79
struct _GdkDrop GdkDrop
Definition gdktypes.h:86
struct _GdkCairoContext GdkCairoContext
Definition gdktypes.h:97
struct _GdkDmabufTexture GdkDmabufTexture
Definition gdktypes.h:102
struct _GdkClipboard GdkClipboard
Definition gdktypes.h:88
struct _GdkAppLaunchContext GdkAppLaunchContext
Definition gdktypes.h:92
struct _GdkSurface GdkSurface
Definition gdktypes.h:91
struct _GdkDmabufFormats GdkDmabufFormats
Definition gdktypes.h:101
struct _GdkDisplayManager GdkDisplayManager
Definition gdktypes.h:89
struct _GdkCursor GdkCursor
Definition gdktypes.h:81
struct _GdkVulkanContext GdkVulkanContext
Definition gdktypes.h:99
struct _GdkDrawContext GdkDrawContext
Definition gdktypes.h:96
struct _GdkTexture GdkTexture
Definition gdktypes.h:82
struct _GdkColorState GdkColorState
Definition gdktypes.h:78
struct _GdkTextureDownloader GdkTextureDownloader
Definition gdktypes.h:83
struct _GdkCicpParams GdkCicpParams
Definition gdktypes.h:77
struct _GdkSnapshot GdkSnapshot
Definition gdktypes.h:94
struct _GdkDrag GdkDrag
Definition gdktypes.h:85
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
unsigned int guint
Definition gtypes.h:61
guint keycode
Definition gdktypes.h:164