Debian Codegraph @

gtk-priv/h/gdk_window_impl_priv.h

raw
1 /* AUTOGENERATED, DO NOT EDIT DIRECTLY
2 * See gtk-priv/README.md for more information
3 *
4 * This file is part of gtk-layer-shell
5 *
6 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
7 * Copyright © 2024 gtk-priv/scripts/code.py
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 3 of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 */
23
24 #ifndef GDK_WINDOW_IMPL_PRIV_H
25 #define GDK_WINDOW_IMPL_PRIV_H
26
27 #include "common.h"
28
29 typedef struct _GdkWindowImpl GdkWindowImpl;
30
31 // Version ID 0
32 // Valid for GTK v3.22.0 - v3.24.40 (unreleased)
33 struct _GdkWindowImpl_v3_22_0
34 {
35 GObject parent;
36 };
37
38 // For internal use only
39 int gdk_window_impl_priv_get_version_id() {
40 static int version_id = -1;
41
42 if (version_id == -1) {
43 gtk_priv_assert_gtk_version_valid();
44 int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version();
45
46 switch (combo) {
47 case 22000:
48 case 22001:
49 case 22002:
50 case 22003:
51 case 22004:
52 case 22005:
53 case 22006:
54 case 22007:
55 case 22008:
56 case 22009:
57 case 22010:
58 case 22011:
59 case 22012:
60 case 22013:
61 case 22014:
62 case 22015:
63 case 22016:
64 case 22017:
65 case 22018:
66 case 22019:
67 case 22020:
68 case 22021:
69 case 22022:
70 case 22023:
71 case 22024:
72 case 22025:
73 case 22026:
74 case 22027:
75 case 22028:
76 case 22029:
77 case 22030:
78 case 23000:
79 case 23001:
80 case 23002:
81 case 23003:
82 case 24000:
83 case 24001:
84 case 24002:
85 case 24003:
86 case 24004:
87 case 24005:
88 case 24006:
89 case 24007:
90 case 24008:
91 case 24009:
92 case 24010:
93 case 24011:
94 case 24012:
95 case 24013:
96 case 24014:
97 case 24015:
98 case 24016:
99 case 24017:
100 case 24018:
101 case 24020:
102 case 24021:
103 case 24022:
104 case 24023:
105 case 24024:
106 case 24025:
107 case 24026:
108 case 24027:
109 case 24028:
110 case 24029:
111 case 24030:
112 case 24031:
113 case 24032:
114 case 24033:
115 case 24034:
116 case 24035:
117 case 24036:
118 case 24037:
119 case 24038:
120 case 24039:
121 break;
122
123 default:
124 gtk_priv_warn_gtk_version_may_be_unsupported();
125 }
126
127 {
128 version_id = 0;
129 }
130 }
131
132 return version_id;
133 }
134
135 // GdkWindowImpl::parent
136
137 GObject * gdk_window_impl_priv_get_parent_ptr(GdkWindowImpl * self) {
138 switch (gdk_window_impl_priv_get_version_id()) {
139 case 0: return (GObject *)&((struct _GdkWindowImpl_v3_22_0*)self)->parent;
140 default: g_error("Invalid version ID"); g_abort();
141 }
142 }
143
144 #endif // GDK_WINDOW_IMPL_PRIV_H