| 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 © 2010 Intel Corporation |
| 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_WAYLAND_CLASS_PRIV_H |
| 25 |
#define GDK_WINDOW_IMPL_WAYLAND_CLASS_PRIV_H |
| 26 |
|
| 27 |
#include "common.h" |
| 28 |
|
| 29 |
typedef struct _GdkWindowImplWaylandClass GdkWindowImplWaylandClass; |
| 30 |
|
| 31 |
// Version ID 0 |
| 32 |
// Valid for GTK v3.22.0 - v3.24.34 |
| 33 |
struct _GdkWindowImplWaylandClass_v3_22_0 |
| 34 |
{ |
| 35 |
struct _GdkWindowImplClass_v3_22_0 parent_class; |
| 36 |
}; |
| 37 |
|
| 38 |
// Version ID 1 |
| 39 |
// Diff from previous version: |
| 40 |
// - struct _GdkWindowImplClass_v3_22_0 parent_class; |
| 41 |
// + struct _GdkWindowImplClass_v3_24_35 parent_class; |
| 42 |
// Valid for GTK v3.24.35 - v3.24.40 (unreleased) |
| 43 |
struct _GdkWindowImplWaylandClass_v3_24_35 |
| 44 |
{ |
| 45 |
struct _GdkWindowImplClass_v3_24_35 parent_class; |
| 46 |
}; |
| 47 |
|
| 48 |
// For internal use only |
| 49 |
int gdk_window_impl_wayland_class_priv_get_version_id() { |
| 50 |
static int version_id = -1; |
| 51 |
|
| 52 |
if (version_id == -1) { |
| 53 |
gtk_priv_assert_gtk_version_valid(); |
| 54 |
int combo = gtk_get_minor_version() * 1000 + gtk_get_micro_version(); |
| 55 |
|
| 56 |
switch (combo) { |
| 57 |
case 22000: |
| 58 |
case 22001: |
| 59 |
case 22002: |
| 60 |
case 22003: |
| 61 |
case 22004: |
| 62 |
case 22005: |
| 63 |
case 22006: |
| 64 |
case 22007: |
| 65 |
case 22008: |
| 66 |
case 22009: |
| 67 |
case 22010: |
| 68 |
case 22011: |
| 69 |
case 22012: |
| 70 |
case 22013: |
| 71 |
case 22014: |
| 72 |
case 22015: |
| 73 |
case 22016: |
| 74 |
case 22017: |
| 75 |
case 22018: |
| 76 |
case 22019: |
| 77 |
case 22020: |
| 78 |
case 22021: |
| 79 |
case 22022: |
| 80 |
case 22023: |
| 81 |
case 22024: |
| 82 |
case 22025: |
| 83 |
case 22026: |
| 84 |
case 22027: |
| 85 |
case 22028: |
| 86 |
case 22029: |
| 87 |
case 22030: |
| 88 |
case 23000: |
| 89 |
case 23001: |
| 90 |
case 23002: |
| 91 |
case 23003: |
| 92 |
case 24000: |
| 93 |
case 24001: |
| 94 |
case 24002: |
| 95 |
case 24003: |
| 96 |
case 24004: |
| 97 |
case 24005: |
| 98 |
case 24006: |
| 99 |
case 24007: |
| 100 |
case 24008: |
| 101 |
case 24009: |
| 102 |
case 24010: |
| 103 |
case 24011: |
| 104 |
case 24012: |
| 105 |
case 24013: |
| 106 |
case 24014: |
| 107 |
case 24015: |
| 108 |
case 24016: |
| 109 |
case 24017: |
| 110 |
case 24018: |
| 111 |
case 24020: |
| 112 |
case 24021: |
| 113 |
case 24022: |
| 114 |
case 24023: |
| 115 |
case 24024: |
| 116 |
case 24025: |
| 117 |
case 24026: |
| 118 |
case 24027: |
| 119 |
case 24028: |
| 120 |
case 24029: |
| 121 |
case 24030: |
| 122 |
case 24031: |
| 123 |
case 24032: |
| 124 |
case 24033: |
| 125 |
case 24034: |
| 126 |
case 24035: |
| 127 |
case 24036: |
| 128 |
case 24037: |
| 129 |
case 24038: |
| 130 |
case 24039: |
| 131 |
break; |
| 132 |
|
| 133 |
default: |
| 134 |
gtk_priv_warn_gtk_version_may_be_unsupported(); |
| 135 |
} |
| 136 |
|
| 137 |
if (combo >= 24035) { |
| 138 |
version_id = 1; |
| 139 |
} else { |
| 140 |
version_id = 0; |
| 141 |
} |
| 142 |
} |
| 143 |
|
| 144 |
return version_id; |
| 145 |
} |
| 146 |
|
| 147 |
// GdkWindowImplWaylandClass::parent_class |
| 148 |
|
| 149 |
GdkWindowImplClass * gdk_window_impl_wayland_class_priv_get_parent_class_ptr(GdkWindowImplWaylandClass * self) { |
| 150 |
switch (gdk_window_impl_wayland_class_priv_get_version_id()) { |
| 151 |
case 0: return (GdkWindowImplClass *)&((struct _GdkWindowImplWaylandClass_v3_22_0*)self)->parent_class; |
| 152 |
case 1: return (GdkWindowImplClass *)&((struct _GdkWindowImplWaylandClass_v3_24_35*)self)->parent_class; |
| 153 |
default: g_error("Invalid version ID"); g_abort(); |
| 154 |
} |
| 155 |
} |
| 156 |
|
| 157 |
#endif // GDK_WINDOW_IMPL_WAYLAND_CLASS_PRIV_H |