Debian Codegraph @

gtk/gtkglarea.c

raw symbols SCIP
1 /* GTK - The GIMP Toolkit
2 *
3 * gtkglarea.c: A GL drawing area
4 *
5 * Copyright © 2014 Emmanuele Bassi
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "config.h"cxx . . $ `<file>/build/config.h`/
22
23 #include "config.h"cxx . . $ `<file>/build/config.h`/
24 #include "gtkglarea.h"cxx . . $ `<file>/gtk/gtkglarea.h`/
25 #include <glib/gi18n-lib.h>
26 #include "gtkmarshalers.h"cxx . . $ `<file>/build/gtk/gtkmarshalers.h`/
27 #include "gdk/gdkmarshalers.h"cxx . . $ `<file>/build/gdk/gdkmarshalers.h`/
28 #include "gtkprivate.h"cxx . . $ `<file>/gtk/gtkprivate.h`/
29 #include "gtksnapshot.h"cxx . . $ `<file>/gtk/gtksnapshot.h`/
30 #include "gtknative.h"cxx . . $ `<file>/gtk/gtknative.h`/
31 #include "gtkwidgetprivate.h"cxx . . $ `<file>/gtk/gtkwidgetprivate.h`/
32 #include "gtksnapshot.h"cxx . . $ `<file>/gtk/gtksnapshot.h`/
33 #include "gtkrenderlayoutprivate.h"cxx . . $ `<file>/gtk/gtkrenderlayoutprivate.h`/
34 #include "gtkcssnodeprivate.h"cxx . . $ `<file>/gtk/gtkcssnodeprivate.h`/
35 #include "gdk/gdkgltextureprivate.h"cxx . . $ `<file>/gdk/gdkgltextureprivate.h`/
36 #include "gdk/gdkglcontextprivate.h"cxx . . $ `<file>/gdk/gdkglcontextprivate.h`/
37 #include "gdk/gdkdmabuftexturebuilderprivate.h"cxx . . $ `<file>/gdk/gdkdmabuftexturebuilderprivate.h`/
38 #include "gdk/gdkdmabuftextureprivate.h"cxx . . $ `<file>/gdk/gdkdmabuftextureprivate.h`/
39
40 #ifdef HAVE_UNISTD_Hcxx . . $ `build/config.h:94:9`!
41 #include <unistd.h>
42 #endif
43
44 #include <epoxy/gl.h>
45
46 /**
47 * GtkGLArea:
48 *
49 * Allows drawing with OpenGL.
50 *
51 * <picture>
52 * <source srcset="glarea-dark.png" media="(prefers-color-scheme: dark)">
53 * <img alt="An example GtkGLArea" src="glarea.png">
54 * </picture>
55 *
56 * `GtkGLArea` sets up its own [[email protected]], and creates a custom
57 * GL framebuffer that the widget will do GL rendering onto. It also ensures
58 * that this framebuffer is the default GL rendering target when rendering.
59 * The completed rendering is integrated into the larger GTK scene graph as
60 * a texture.
61 *
62 * In order to draw, you have to connect to the [[email protected]::render]
63 * signal, or subclass `GtkGLArea` and override the GtkGLAreaClass.render
64 * virtual function.
65 *
66 * The `GtkGLArea` widget ensures that the `GdkGLContext` is associated with
67 * the widget's drawing area, and it is kept updated when the size and
68 * position of the drawing area changes.
69 *
70 * ## Drawing with GtkGLArea
71 *
72 * The simplest way to draw using OpenGL commands in a `GtkGLArea` is to
73 * create a widget instance and connect to the [[email protected]::render] signal:
74 *
75 * The `render()` function will be called when the `GtkGLArea` is ready
76 * for you to draw its content:
77 *
78 * The initial contents of the framebuffer are transparent.
79 *
80 * ```c
81 * static gboolean
82 * render (GtkGLArea *area, GdkGLContext *context)
83 * {
84 * // inside this function it's safe to use GL; the given
85 * // GdkGLContext has been made current to the drawable
86 * // surface used by the `GtkGLArea` and the viewport has
87 * // already been set to be the size of the allocation
88 *
89 * // we can start by clearing the buffer
90 * glClearColor (0, 0, 0, 0);
91 * glClear (GL_COLOR_BUFFER_BIT);
92 *
93 * // record the active framebuffer ID, so we can return to it
94 * // with `glBindFramebuffer (GL_FRAMEBUFFER, screen_fb)` should
95 * // we, for instance, intend on utilizing the results of an
96 * // intermediate render texture pass
97 * GLuint screen_fb = 0;
98 * glGetIntegerv (GL_FRAMEBUFFER_BINDING, &screen_fb);
99 *
100 * // draw your object
101 * // draw_an_object ();
102 *
103 * // we completed our drawing; the draw commands will be
104 * // flushed at the end of the signal emission chain, and
105 * // the buffers will be drawn on the window
106 * return TRUE;
107 * }
108 *
109 * void setup_glarea (void)
110 * {
111 * // create a GtkGLArea instance
112 * GtkWidget *gl_area = gtk_gl_area_new ();
113 *
114 * // connect to the "render" signal
115 * g_signal_connect (gl_area, "render", G_CALLBACK (render), NULL);
116 * }
117 * ```
118 *
119 * If you need to initialize OpenGL state, e.g. buffer objects or
120 * shaders, you should use the [[email protected]::realize] signal;
121 * you can use the [[email protected]::unrealize] signal to clean up.
122 * Since the `GdkGLContext` creation and initialization may fail, you
123 * will need to check for errors, using [[email protected]_error].
124 *
125 * An example of how to safely initialize the GL state is:
126 *
127 * ```c
128 * static void
129 * on_realize (GtkGLArea *area)
130 * {
131 * // We need to make the context current if we want to
132 * // call GL API
133 * gtk_gl_area_make_current (area);
134 *
135 * // If there were errors during the initialization or
136 * // when trying to make the context current, this
137 * // function will return a GError for you to catch
138 * if (gtk_gl_area_get_error (area) != NULL)
139 * return;
140 *
141 * // You can also use gtk_gl_area_set_error() in order
142 * // to show eventual initialization errors on the
143 * // GtkGLArea widget itself
144 * GError *internal_error = NULL;
145 * init_buffer_objects (&error);
146 * if (error != NULL)
147 * {
148 * gtk_gl_area_set_error (area, error);
149 * g_error_free (error);
150 * return;
151 * }
152 *
153 * init_shaders (&error);
154 * if (error != NULL)
155 * {
156 * gtk_gl_area_set_error (area, error);
157 * g_error_free (error);
158 * return;
159 * }
160 * }
161 * ```
162 *
163 * If you need to change the options for creating the `GdkGLContext`
164 * you should use the [[email protected]::create-context] signal.
165 */
166
167 typedef structcxx . . $ $anonymous_type_4bbcf3c3e6616825_0# {
168 GdkGLTextureBuildercxx . . $ GdkGLTextureBuilder# *buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.;
169 GdkTexturecxx . . $ GdkTexture# *gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.;
170 GdkTexturecxx . . $ GdkTexture# *dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture.;
171 } Texturecxx . . $ Texture#;
172
173 typedef structcxx . . $ $anonymous_type_4bbcf3c3e6616825_1# {
174 GdkGLContextcxx . . $ GdkGLContext# *contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.;
175 GErrorcxx . . $ GError# *errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.;
176
177 gbooleancxx . . $ gboolean# have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers.;
178
179 int required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version.;
180
181 guintcxx . . $ guint# frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer.;
182 guintcxx . . $ guint# depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.;
183 Texturecxx . . $ Texture# *texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.;
184 GListcxx . . $ GList# *texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures.;
185
186 gbooleancxx . . $ gboolean# has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer.;
187 gbooleancxx . . $ gboolean# has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.;
188
189 gbooleancxx . . $ gboolean# needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize.;
190 gbooleancxx . . $ gboolean# needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render.;
191 gbooleancxx . . $ gboolean# auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render.;
192 gbooleancxx . . $ gboolean# use_escxx . . $ $anonymous_type_4bbcf3c3e6616825_1#use_es.;
193 GdkGLAPIcxx . . $ GdkGLAPI# allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis.;
194 } GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate#;
195
196 enumcxx . . $ $anonymous_type_4bbcf3c3e6616825_2# {
197 PROP_0cxx . . $ PROP_0.,
198
199 PROP_CONTEXTcxx . . $ PROP_CONTEXT.,
200 PROP_HAS_DEPTH_BUFFERcxx . . $ PROP_HAS_DEPTH_BUFFER.,
201 PROP_HAS_STENCIL_BUFFERcxx . . $ PROP_HAS_STENCIL_BUFFER.,
202 PROP_USE_EScxx . . $ PROP_USE_ES.,
203 PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.,
204 PROP_APIcxx . . $ PROP_API.,
205
206 PROP_AUTO_RENDERcxx . . $ PROP_AUTO_RENDER.,
207
208 LAST_PROPcxx . . $ LAST_PROP.
209 };
210
211 static GParamSpeccxx . . $ GParamSpec# *obj_propscxx . . $ obj_props.[LAST_PROPcxx . . $ LAST_PROP.] = { NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, };
212
213 enumcxx . . $ $anonymous_type_4bbcf3c3e6616825_3# {
214 RENDERcxx . . $ RENDER.,
215 RESIZEcxx . . $ RESIZE.,
216 CREATE_CONTEXTcxx . . $ CREATE_CONTEXT.,
217
218 LAST_SIGNALcxx . . $ LAST_SIGNAL.
219 };
220
221 static void gtk_gl_area_allocate_bufferscxx . . $ gtk_gl_area_allocate_buffers(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area);
222 static void gtk_gl_area_allocate_texturecxx . . $ gtk_gl_area_allocate_texture(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area);
223
224 static guintcxx . . $ guint# area_signalscxx . . $ area_signals.[LAST_SIGNALcxx . . $ LAST_SIGNAL.] = { 0, };
225
226 G_DEFINE_TYPE_WITH_PRIVATEcxx . . $ `<external>/9567554376676449156/gtype.h:1876:9`! (GtkGLArea, gtk_gl_area, GTK_TYPE_WIDGETcxx . . $ `gtk/gtkwidget.h:43:9`!)
227
228 static void
229 gtk_gl_area_set_propertycxx . . $ gtk_gl_area_set_property(d7c4bb29f36c0dc4). (GObjectcxx . . $ GObject# *gobject,
230 guintcxx . . $ guint# prop_id,
231 const GValuecxx . . $ GValue# *value,
232 GParamSpeccxx . . $ GParamSpec# *pspec)
233 {
234 GtkGLAreacxx . . $ GtkGLArea# *self = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (gobject);
235
236 switch (prop_id)
237 {
238 case PROP_AUTO_RENDERcxx . . $ PROP_AUTO_RENDER.:
239 gtk_gl_area_set_auto_rendercxx . . $ gtk_gl_area_set_auto_render(ffdfa690e158b9b0). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
240 break;
241
242 case PROP_HAS_DEPTH_BUFFERcxx . . $ PROP_HAS_DEPTH_BUFFER.:
243 gtk_gl_area_set_has_depth_buffercxx . . $ gtk_gl_area_set_has_depth_buffer(ffdfa690e158b9b0). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
244 break;
245
246 case PROP_HAS_STENCIL_BUFFERcxx . . $ PROP_HAS_STENCIL_BUFFER.:
247 gtk_gl_area_set_has_stencil_buffercxx . . $ gtk_gl_area_set_has_stencil_buffer(ffdfa690e158b9b0). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
248 break;
249
250 case PROP_USE_EScxx . . $ PROP_USE_ES.:
251 G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`!
252 gtk_gl_area_set_use_escxx . . $ gtk_gl_area_set_use_es(ffdfa690e158b9b0). (self, g_value_get_booleancxx . . $ g_value_get_boolean(f890c5c75ead5b21). (value));
253 G_GNUC_END_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:774:9`!
254 break;
255
256 case PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.:
257 gtk_gl_area_set_allowed_apiscxx . . $ gtk_gl_area_set_allowed_apis(1a2fcea01a5e7925). (self, g_value_get_flagscxx . . $ g_value_get_flags(1e175b1568bd83e1). (value));
258 break;
259
260 default:
261 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (gobject, prop_id, pspec);
262 }
263 }
264
265 static void
266 gtk_gl_area_get_propertycxx . . $ gtk_gl_area_get_property(cee2c52f22407c66). (GObjectcxx . . $ GObject# *gobject,
267 guintcxx . . $ guint# prop_id,
268 GValuecxx . . $ GValue# *value,
269 GParamSpeccxx . . $ GParamSpec# *pspec)
270 {
271 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (gobject));
272
273 switch (prop_id)
274 {
275 case PROP_AUTO_RENDERcxx . . $ PROP_AUTO_RENDER.:
276 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render.);
277 break;
278
279 case PROP_HAS_DEPTH_BUFFERcxx . . $ PROP_HAS_DEPTH_BUFFER.:
280 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer.);
281 break;
282
283 case PROP_HAS_STENCIL_BUFFERcxx . . $ PROP_HAS_STENCIL_BUFFER.:
284 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.);
285 break;
286
287 case PROP_CONTEXTcxx . . $ PROP_CONTEXT.:
288 g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f). (value, priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.);
289 break;
290
291 case PROP_USE_EScxx . . $ PROP_USE_ES.:
292 G_GNUC_BEGIN_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:771:9`!
293 g_value_set_booleancxx . . $ g_value_set_boolean(b698c61e8e30c4ea). (value, gtk_gl_area_get_use_escxx . . $ gtk_gl_area_get_use_es(7e27aaf502b1a6a8). (GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (gobject)));
294 G_GNUC_END_IGNORE_DEPRECATIONScxx . . $ `<external>/12741050725406041920/gmacros.h:774:9`!
295 break;
296
297 case PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.:
298 g_value_set_flagscxx . . $ g_value_set_flags(f81c5c84daf56975). (value, priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis.);
299 break;
300
301 case PROP_APIcxx . . $ PROP_API.:
302 g_value_set_flagscxx . . $ g_value_set_flags(f81c5c84daf56975). (value, gtk_gl_area_get_apicxx . . $ gtk_gl_area_get_api(ed237184b03e93a9). (GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (gobject)));
303 break;
304
305 default:
306 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`! (gobject, prop_id, pspec);
307 }
308 }
309
310 static void
311 gtk_gl_area_realizecxx . . $ gtk_gl_area_realize(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget)
312 {
313 GtkGLAreacxx . . $ GtkGLArea# *area = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (widget);
314 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
315
316 GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_gl_area_parent_class)->realizecxx . . $ _GtkWidgetClass#realize. (widget);
317
318 g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.);
319 priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
320 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (area, area_signalscxx . . $ area_signals.[CREATE_CONTEXTcxx . . $ CREATE_CONTEXT.], 0, &priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.);
321
322 /* In case the signal failed, but did not set an error */
323 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
324 g_set_error_literalcxx . . $ g_set_error_literal(af35e45b47ff535e). (&priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error., GDK_GL_ERRORcxx . . $ `gdk/gdkglcontext.h:35:9`!,
325 GDK_GL_ERROR_NOT_AVAILABLEcxx . . $ GDK_GL_ERROR_NOT_AVAILABLE.,
326 _cxx . . $ `<external>/16453136837583379545/gi18n-lib.h:32:10`!("OpenGL context creation failed"));
327
328 priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
329 }
330
331 static void
332 gtk_gl_area_notifycxx . . $ gtk_gl_area_notify(89706f8943b9e738). (GObjectcxx . . $ GObject# *object,
333 GParamSpeccxx . . $ GParamSpec# *pspec)
334 {
335 if (strcmpcxx . . $ strcmp(5ae29d726ae57f88). (pspec->namecxx . . $ _GParamSpec#name., "scale-factor") == 0)
336 {
337 GtkGLAreacxx . . $ GtkGLArea# *area = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (object);
338 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
339
340 priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
341 }
342
343 if (G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_gl_area_parent_class)->notifycxx . . $ _GObjectClass#notify.)
344 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (gtk_gl_area_parent_class)->notifycxx . . $ _GObjectClass#notify. (object, pspec);
345 }
346
347 static GdkGLContextcxx . . $ GdkGLContext# *
348 gtk_gl_area_real_create_contextcxx . . $ gtk_gl_area_real_create_context(a1b7e91af93ba31e). (GtkGLAreacxx . . $ GtkGLArea# *area)
349 {
350 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
351 GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area);
352 GErrorcxx . . $ GError# *error = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
353 GdkGLContextcxx . . $ GdkGLContext# *context;
354
355 context = gdk_surface_create_gl_contextcxx . . $ gdk_surface_create_gl_context(d669cb5811c82650). (gtk_native_get_surfacecxx . . $ gtk_native_get_surface(bdacbdb7fef9c16f). (gtk_widget_get_nativecxx . . $ gtk_widget_get_native(38d4aa93baea8f2d). (widget)), &error);
356 if (error != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
357 {
358 gtk_gl_area_set_errorcxx . . $ gtk_gl_area_set_error(f47000f0d65ba7fe). (area, error);
359 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&context);
360 g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error);
361 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
362 }
363
364 gdk_gl_context_set_allowed_apiscxx . . $ gdk_gl_context_set_allowed_apis(b692fe9c457aff1e). (context, priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis.);
365 gdk_gl_context_set_required_versioncxx . . $ gdk_gl_context_set_required_version(d81fe516ccaa8371). (context,
366 priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. / 10,
367 priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. % 10);
368
369 gdk_gl_context_realizecxx . . $ gdk_gl_context_realize(7401821b2aedb36e). (context, &error);
370 if (error != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
371 {
372 gtk_gl_area_set_errorcxx . . $ gtk_gl_area_set_error(f47000f0d65ba7fe). (area, error);
373 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&context);
374 g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&error);
375 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
376 }
377
378 return context;
379 }
380
381 static void
382 gtk_gl_area_resizecxx . . $ gtk_gl_area_resize(bcf8f71a12a2015d). (GtkGLAreacxx . . $ GtkGLArea# *area, int width, int height)
383 {
384 glViewportcxx . . $ `<external>/17235136775614108268/gl_generated.h:19860:9`! (0, 0, width, height);
385 }
386
387 /*
388 * Creates all the buffer objects needed for rendering the scene
389 */
390 static void
391 gtk_gl_area_ensure_bufferscxx . . $ gtk_gl_area_ensure_buffers(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
392 {
393 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
394 GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area);
395
396 gtk_widget_realizecxx . . $ gtk_widget_realize(d7cf858254b37903). (widget);
397
398 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
399 return;
400
401 if (priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers.)
402 return;
403
404 priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
405
406 glGenFramebufferscxx . . $ `<external>/17235136775614108268/gl_generated.h:17478:9`! (1, &priv->frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer.);
407
408 if ((priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer. || priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.))
409 {
410 if (priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer. == 0)
411 glGenRenderbufferscxx . . $ `<external>/17235136775614108268/gl_generated.h:17494:9`! (1, &priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
412 }
413 else if (priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer. != 0)
414 {
415 /* Delete old depth/stencil buffer */
416 glDeleteRenderbufferscxx . . $ `<external>/17235136775614108268/gl_generated.h:17160:9`! (1, &priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
417 priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer. = 0;
418 }
419
420 gtk_gl_area_allocate_bufferscxx . . $ gtk_gl_area_allocate_buffers(502929239a3f00a9). (area);
421 }
422
423 static void
424 delete_one_texturecxx . . $ delete_one_texture(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data)
425 {
426 Texturecxx . . $ Texture# *texture = data;
427 guintcxx . . $ guint# id;
428
429 if (texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.)
430 {
431 gdk_gl_texture_releasecxx . . $ gdk_gl_texture_release(82a1bd697691a4d1). (GDK_GL_TEXTUREcxx . . $ `gdk/gdkgltexture.h:33:9`! (texture->gl_texture));
432 texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
433 }
434
435 id = gdk_gl_texture_builder_get_idcxx . . $ gdk_gl_texture_builder_get_id(d74db67619735659). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.);
436 if (id != 0)
437 glDeleteTexturescxx . . $ `<external>/17235136775614108268/gl_generated.h:17169:9`! (1, &id);
438
439 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&texture->builder);
440
441 if (texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
442 g_freecxx . . $ g_free(5d22bdacc48458e8). (texture);
443 }
444
445 static void
446 gtk_gl_area_ensure_texturecxx . . $ gtk_gl_area_ensure_texture(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
447 {
448 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
449 GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area);
450
451 gtk_widget_realizecxx . . $ gtk_widget_realize(d7cf858254b37903). (widget);
452
453 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
454 return;
455
456 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
457 {
458 GListcxx . . $ GList# *l, *link;
459
460 l = priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures.;
461 while (l)
462 {
463 Texturecxx . . $ Texture# *texture = l->datacxx . . $ _GList#data.;
464 link = l;
465 l = l->nextcxx . . $ _GList#next.;
466
467 if (texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.)
468 continue;
469
470 priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures. = g_list_delete_linkcxx . . $ g_list_delete_link(8f293ee9e7c86892). (priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures., link);
471
472 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
473 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. = texture;
474 else
475 delete_one_texturecxx . . $ delete_one_texture(5d22bdacc48458e8). (texture);
476 }
477 }
478
479 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
480 {
481 GLuintcxx . . $ GLuint# id;
482
483 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. = g_newcxx . . $ `<external>/1123956534522462559/gmem.h:318:9`! (Texture, 1);
484 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
485 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
486
487 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder. = gdk_gl_texture_builder_newcxx . . $ gdk_gl_texture_builder_new(a245fefc3e026ad5). ();
488 gdk_gl_texture_builder_set_contextcxx . . $ gdk_gl_texture_builder_set_context(2563798a47a15a0a). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.);
489 if (gdk_gl_context_get_apicxx . . $ gdk_gl_context_get_api(d0a05448c3d42611). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.) == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.)
490 gdk_gl_texture_builder_set_formatcxx . . $ gdk_gl_texture_builder_set_format(15198cf634d11fd2). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., GDK_MEMORY_R8G8B8A8_PREMULTIPLIEDcxx . . $ GDK_MEMORY_R8G8B8A8_PREMULTIPLIED.);
491 else
492 gdk_gl_texture_builder_set_formatcxx . . $ gdk_gl_texture_builder_set_format(15198cf634d11fd2). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., GDK_MEMORY_B8G8R8A8_PREMULTIPLIEDcxx . . $ GDK_MEMORY_B8G8R8A8_PREMULTIPLIED.);
493
494 glGenTexturescxx . . $ `<external>/17235136775614108268/gl_generated.h:17500:9`! (1, &id);
495 gdk_gl_texture_builder_set_idcxx . . $ gdk_gl_texture_builder_set_id(4fc5cf5f4985a448). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., id);
496 }
497
498 gtk_gl_area_allocate_texturecxx . . $ gtk_gl_area_allocate_texture(502929239a3f00a9). (area);
499 }
500
501 /*
502 * Allocates space of the right type and size for all the buffers
503 */
504 static void
505 gtk_gl_area_allocate_bufferscxx . . $ gtk_gl_area_allocate_buffers(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
506 {
507 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
508 GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area);
509 int scale, width, height;
510
511 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
512 return;
513
514 scale = gtk_widget_get_scale_factorcxx . . $ gtk_widget_get_scale_factor(9247ef2dc26c5426). (widget);
515 width = gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget) * scale;
516 height = gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget) * scale;
517
518 if (priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer. || priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.)
519 {
520 glBindRenderbuffercxx . . $ `<external>/17235136775614108268/gl_generated.h:16756:9`! (GL_RENDERBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5099:9`!, priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
521 if (priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.)
522 glRenderbufferStoragecxx . . $ `<external>/17235136775614108268/gl_generated.h:18900:9`! (GL_RENDERBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5099:9`!, GL_DEPTH24_STENCIL8cxx . . $ `<external>/17235136775614108268/gl_generated.h:4338:9`!, width, height);
523 else
524 glRenderbufferStoragecxx . . $ `<external>/17235136775614108268/gl_generated.h:18900:9`! (GL_RENDERBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5099:9`!, GL_DEPTH_COMPONENT24cxx . . $ `<external>/17235136775614108268/gl_generated.h:2441:9`!, width, height);
525 }
526
527 priv->needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
528 }
529
530 static void
531 gtk_gl_area_allocate_texturecxx . . $ gtk_gl_area_allocate_texture(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
532 {
533 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
534 GtkWidgetcxx . . $ GtkWidget# *widget = GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area);
535 int scale, width, height;
536
537 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
538 return;
539
540 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
541 return;
542
543 g_assertcxx . . $ `<external>/15287032793271088244/gtestutils.h:275:9`! (priv->texture->gl_texture == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
544
545 scale = gtk_widget_get_scale_factorcxx . . $ gtk_widget_get_scale_factor(9247ef2dc26c5426). (widget);
546 width = gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget) * scale;
547 height = gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget) * scale;
548
549 if (gdk_gl_texture_builder_get_widthcxx . . $ gdk_gl_texture_builder_get_width(e24ae48225f92a01). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.) != width ||
550 gdk_gl_texture_builder_get_heightcxx . . $ gdk_gl_texture_builder_get_height(e24ae48225f92a01). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.) != height)
551 {
552 glBindTexturecxx . . $ `<external>/17235136775614108268/gl_generated.h:16763:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, gdk_gl_texture_builder_get_idcxx . . $ gdk_gl_texture_builder_get_id(d74db67619735659). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.));
553 glTexParametericxx . . $ `<external>/17235136775614108268/gl_generated.h:19238:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, GL_TEXTURE_WRAP_Scxx . . $ `<external>/17235136775614108268/gl_generated.h:1740:9`!, GL_REPEATcxx . . $ `<external>/17235136775614108268/gl_generated.h:1743:9`!);
554 glTexParametericxx . . $ `<external>/17235136775614108268/gl_generated.h:19238:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, GL_TEXTURE_WRAP_Tcxx . . $ `<external>/17235136775614108268/gl_generated.h:1741:9`!, GL_REPEATcxx . . $ `<external>/17235136775614108268/gl_generated.h:1743:9`!);
555 glTexParametericxx . . $ `<external>/17235136775614108268/gl_generated.h:19238:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, GL_TEXTURE_MIN_FILTERcxx . . $ `<external>/17235136775614108268/gl_generated.h:1739:9`!, GL_NEARESTcxx . . $ `<external>/17235136775614108268/gl_generated.h:1732:9`!);
556 glTexParametericxx . . $ `<external>/17235136775614108268/gl_generated.h:19238:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, GL_TEXTURE_MAG_FILTERcxx . . $ `<external>/17235136775614108268/gl_generated.h:1738:9`!, GL_NEARESTcxx . . $ `<external>/17235136775614108268/gl_generated.h:1732:9`!);
557
558 if (gdk_gl_context_get_apicxx . . $ gdk_gl_context_get_api(d0a05448c3d42611). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.) == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.)
559 glTexImage2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:19219:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, 0, GL_RGBA8cxx . . $ `<external>/17235136775614108268/gl_generated.h:1997:9`!, width, height, 0, GL_RGBAcxx . . $ `<external>/17235136775614108268/gl_generated.h:1655:9`!, GL_UNSIGNED_BYTEcxx . . $ `<external>/17235136775614108268/gl_generated.h:1579:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
560 else
561 glTexImage2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:19219:9`! (GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, 0, GL_RGBA8cxx . . $ `<external>/17235136775614108268/gl_generated.h:1997:9`!, width, height, 0, GL_BGRAcxx . . $ `<external>/17235136775614108268/gl_generated.h:2254:9`!, GL_UNSIGNED_BYTEcxx . . $ `<external>/17235136775614108268/gl_generated.h:1579:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
562
563 gdk_gl_texture_builder_set_widthcxx . . $ gdk_gl_texture_builder_set_width(6008f893c78d5317). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., width);
564 gdk_gl_texture_builder_set_heightcxx . . $ gdk_gl_texture_builder_set_height(6008f893c78d5317). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., height);
565 }
566 }
567
568 /**
569 * gtk_gl_area_attach_buffers:
570 * @area: a `GtkGLArea`
571 *
572 * Binds buffers to the framebuffer.
573 *
574 * Ensures that the @area framebuffer object is made the current draw
575 * and read target, and that all the required buffers for the @area
576 * are created and bound to the framebuffer.
577 *
578 * This function is automatically called before emitting the
579 * [[email protected]::render] signal, and doesn't normally need to be
580 * called by application code.
581 */
582 void
583 gtk_gl_area_attach_bufferscxx . . $ gtk_gl_area_attach_buffers(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
584 {
585 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
586
587 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
588
589 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
590 return;
591
592 gtk_gl_area_make_currentcxx . . $ gtk_gl_area_make_current(502929239a3f00a9). (area);
593
594 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
595 gtk_gl_area_ensure_texturecxx . . $ gtk_gl_area_ensure_texture(502929239a3f00a9). (area);
596 else if (priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize.)
597 gtk_gl_area_allocate_texturecxx . . $ gtk_gl_area_allocate_texture(502929239a3f00a9). (area);
598
599 if (!priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers.)
600 gtk_gl_area_ensure_bufferscxx . . $ gtk_gl_area_ensure_buffers(502929239a3f00a9). (area);
601 else if (priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize.)
602 gtk_gl_area_allocate_bufferscxx . . $ gtk_gl_area_allocate_buffers(502929239a3f00a9). (area);
603
604 glBindFramebuffercxx . . $ `<external>/17235136775614108268/gl_generated.h:16742:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!, priv->frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer.);
605
606 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
607 glFramebufferTexture2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:17445:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!, GL_COLOR_ATTACHMENT0cxx . . $ `<external>/17235136775614108268/gl_generated.h:5025:9`!,
608 GL_TEXTURE_2Dcxx . . $ `<external>/17235136775614108268/gl_generated.h:1535:9`!, gdk_gl_texture_builder_get_idcxx . . $ gdk_gl_texture_builder_get_id(d74db67619735659). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.), 0);
609
610 if (priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.)
611 {
612 if (priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer.)
613 glFramebufferRenderbuffercxx . . $ `<external>/17235136775614108268/gl_generated.h:17436:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!, GL_DEPTH_ATTACHMENTcxx . . $ `<external>/17235136775614108268/gl_generated.h:5090:9`!,
614 GL_RENDERBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5099:9`!, priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
615 if (priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.)
616 glFramebufferRenderbuffercxx . . $ `<external>/17235136775614108268/gl_generated.h:17436:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!, GL_STENCIL_ATTACHMENTcxx . . $ `<external>/17235136775614108268/gl_generated.h:5093:9`!,
617 GL_RENDERBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5099:9`!, priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
618 }
619 }
620
621 static void
622 gtk_gl_area_delete_bufferscxx . . $ gtk_gl_area_delete_buffers(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
623 {
624 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
625
626 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
627 return;
628
629 priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
630
631 if (priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer. != 0)
632 {
633 glDeleteRenderbufferscxx . . $ `<external>/17235136775614108268/gl_generated.h:17160:9`! (1, &priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer.);
634 priv->depth_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#depth_stencil_buffer. = 0;
635 }
636
637 if (priv->frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer. != 0)
638 {
639 glBindFramebuffercxx . . $ `<external>/17235136775614108268/gl_generated.h:16742:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!, 0);
640 glDeleteFramebufferscxx . . $ `<external>/17235136775614108268/gl_generated.h:17139:9`! (1, &priv->frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer.);
641 priv->frame_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#frame_buffer. = 0;
642 }
643 }
644
645 static void
646 gtk_gl_area_delete_texturescxx . . $ gtk_gl_area_delete_textures(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
647 {
648 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
649
650 if (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.)
651 {
652 delete_one_texturecxx . . $ delete_one_texture(5d22bdacc48458e8). (priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.);
653 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
654 }
655
656 /* FIXME: we need to explicitly release all outstanding
657 * textures here, otherwise release_texture will get called
658 * later and access freed memory.
659 */
660 g_list_free_fullcxx . . $ g_list_free_full(5ba5b0738c7ed753). (priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures., delete_one_texturecxx . . $ delete_one_texture(5d22bdacc48458e8).);
661 priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
662 }
663
664 static void
665 gtk_gl_area_unrealizecxx . . $ gtk_gl_area_unrealize(d7cf858254b37903). (GtkWidgetcxx . . $ GtkWidget# *widget)
666 {
667 GtkGLAreacxx . . $ GtkGLArea# *area = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (widget);
668 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
669
670 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
671 {
672 gtk_gl_area_make_currentcxx . . $ gtk_gl_area_make_current(502929239a3f00a9). (area);
673 gtk_gl_area_delete_bufferscxx . . $ gtk_gl_area_delete_buffers(502929239a3f00a9). (area);
674 gtk_gl_area_delete_texturescxx . . $ gtk_gl_area_delete_textures(502929239a3f00a9). (area);
675
676 /* Make sure to unset the context if current */
677 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == gdk_gl_context_get_currentcxx . . $ gdk_gl_context_get_current(2947070f1144fb24). ())
678 gdk_gl_context_clear_currentcxx . . $ gdk_gl_context_clear_current(49f6e7a06ebc5aa8). ();
679 }
680
681 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&priv->context);
682 g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.);
683
684 GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_gl_area_parent_class)->unrealizecxx . . $ _GtkWidgetClass#unrealize. (widget);
685 }
686
687 static void
688 gtk_gl_area_size_allocatecxx . . $ gtk_gl_area_size_allocate(598a503332136822). (GtkWidgetcxx . . $ GtkWidget# *widget,
689 int width,
690 int height,
691 int baseline)
692 {
693 GtkGLAreacxx . . $ GtkGLArea# *area = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (widget);
694 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
695
696 GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (gtk_gl_area_parent_class)->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. (widget, width, height, baseline);
697
698 if (gtk_widget_get_realizedcxx . . $ gtk_widget_get_realized(9247ef2dc26c5426). (widget))
699 priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
700 }
701
702 static void
703 gtk_gl_area_draw_error_screencxx . . $ gtk_gl_area_draw_error_screen(1dc42424c182357). (GtkGLAreacxx . . $ GtkGLArea# *area,
704 GtkSnapshotcxx . . $ GtkSnapshot# *snapshot,
705 int width,
706 int height)
707 {
708 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
709 PangoLayoutcxx . . $ PangoLayout# *layout;
710 int layout_height;
711 GtkCssBoxescxx . . $ GtkCssBoxes# boxes;
712
713 layout = gtk_widget_create_pango_layoutcxx . . $ gtk_widget_create_pango_layout(e1804973e9b72966). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area), priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.->messagecxx . . $ _GError#message.);
714 pango_layout_set_widthcxx . . $ pango_layout_set_width(dc4bc9303c44cb0b). (layout, width * PANGO_SCALEcxx . . $ `<external>/16549852590339199443/pango-types.h:96:9`!);
715 pango_layout_set_alignmentcxx . . $ pango_layout_set_alignment(ce52377b35eb0c94). (layout, PANGO_ALIGN_CENTERcxx . . $ PANGO_ALIGN_CENTER.);
716 pango_layout_get_pixel_sizecxx . . $ pango_layout_get_pixel_size(4e8562eb28bfa385). (layout, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, &layout_height);
717
718 gtk_css_boxes_initcxx . . $ gtk_css_boxes_init(b9ce2e386df4236c). (&boxes, GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area));
719 gtk_css_style_snapshot_layoutcxx . . $ gtk_css_style_snapshot_layout(dad263d465d8b3e9). (&boxes, snapshot, 0, (height - layout_height) / 2, layout);
720
721 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (layout);
722 }
723
724 static void
725 release_gl_texturecxx . . $ release_gl_texture(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data)
726 {
727 Texturecxx . . $ Texture# *texture = data;
728 gpointercxx . . $ gpointer# sync;
729
730 sync = gdk_gl_texture_builder_get_synccxx . . $ gdk_gl_texture_builder_get_sync(9f4f087bbfdb1036). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.);
731 if (sync)
732 {
733 glDeleteSynccxx . . $ `<external>/17235136775614108268/gl_generated.h:17167:9`! (sync);
734 gdk_gl_texture_builder_set_synccxx . . $ gdk_gl_texture_builder_set_sync(60fac1d306e5e3f2). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
735 }
736
737 texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
738 }
739
740 static void
741 release_dmabuf_texturecxx . . $ release_dmabuf_texture(5d22bdacc48458e8). (gpointercxx . . $ gpointer# data)
742 {
743 Texturecxx . . $ Texture# *texture = data;
744
745 g_clear_objectcxx . . $ `<external>/1341695927569185362/gobject.h:695:9`! (&texture->gl_texture);
746
747 if (texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
748 return;
749
750 gdk_dmabuf_close_fdscxx . . $ gdk_dmabuf_close_fds(1ef9b102693d5e5a). ((GdkDmabufcxx . . $ GdkDmabuf# *) gdk_dmabuf_texture_get_dmabufcxx . . $ gdk_dmabuf_texture_get_dmabuf(3c587bc73e930c2e). (GDK_DMABUF_TEXTUREcxx . . $ `gdk/gdkdmabuftexture.h:32:9`! (texture->dmabuf_texture)));
751
752 texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
753 }
754
755 static void
756 gtk_gl_area_snapshotcxx . . $ gtk_gl_area_snapshot(80012d1141bb3efa). (GtkWidgetcxx . . $ GtkWidget# *widget,
757 GtkSnapshotcxx . . $ GtkSnapshot# *snapshot)
758 {
759 GtkGLAreacxx . . $ GtkGLArea# *area = GTK_GL_AREAcxx . . $ `gtk/gtkglarea.h:32:9`! (widget);
760 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
761 gbooleancxx . . $ gboolean# unused;
762 int w, h, scale;
763 GLenumcxx . . $ GLenum# status;
764
765 scale = gtk_widget_get_scale_factorcxx . . $ gtk_widget_get_scale_factor(9247ef2dc26c5426). (widget);
766 w = gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget) * scale;
767 h = gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget) * scale;
768
769 if (w == 0 || h == 0)
770 return;
771
772 if (priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
773 {
774 gtk_gl_area_draw_error_screencxx . . $ gtk_gl_area_draw_error_screen(1dc42424c182357). (area,
775 snapshot,
776 gtk_widget_get_widthcxx . . $ gtk_widget_get_width(9247ef2dc26c5426). (widget),
777 gtk_widget_get_heightcxx . . $ gtk_widget_get_height(9247ef2dc26c5426). (widget));
778 return;
779 }
780
781 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
782 return;
783
784 gtk_gl_area_make_currentcxx . . $ gtk_gl_area_make_current(502929239a3f00a9). (area);
785
786 gtk_gl_area_attach_bufferscxx . . $ gtk_gl_area_attach_buffers(502929239a3f00a9). (area);
787
788 if (priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer.)
789 glEnablecxx . . $ `<external>/17235136775614108268/gl_generated.h:17297:9`! (GL_DEPTH_TESTcxx . . $ `<external>/17235136775614108268/gl_generated.h:1356:9`!);
790 else
791 glDisablecxx . . $ `<external>/17235136775614108268/gl_generated.h:17196:9`! (GL_DEPTH_TESTcxx . . $ `<external>/17235136775614108268/gl_generated.h:1356:9`!);
792
793 status = glCheckFramebufferStatuscxx . . $ `<external>/17235136775614108268/gl_generated.h:16849:9`! (GL_FRAMEBUFFERcxx . . $ `<external>/17235136775614108268/gl_generated.h:5096:9`!);
794 if (status == GL_FRAMEBUFFER_COMPLETEcxx . . $ `<external>/17235136775614108268/gl_generated.h:4999:9`!)
795 {
796 Texturecxx . . $ Texture# *texture;
797 gpointercxx . . $ gpointer# sync = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
798 GdkDmabufcxx . . $ GdkDmabuf# dmabuf;
799 GdkTexturecxx . . $ GdkTexture# *holder;
800
801 if (priv->needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render. || priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render.)
802 {
803 if (priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize.)
804 {
805 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (area, area_signalscxx . . $ area_signals.[RESIZEcxx . . $ RESIZE.], 0, w, h, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
806 priv->needs_resizecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_resize. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
807 }
808
809 g_signal_emitcxx . . $ g_signal_emit(cc3f7c2ba1c6a182). (area, area_signalscxx . . $ area_signals.[RENDERcxx . . $ RENDER.], 0, priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context., &unused);
810 }
811
812 priv->needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
813
814 texture = priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture.;
815 priv->texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_1#texture. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
816 priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures. = g_list_prependcxx . . $ g_list_prepend(35007086a6b2ba1c). (priv->texturescxx . . $ $anonymous_type_4bbcf3c3e6616825_1#textures., texture);
817
818 sync = glFenceSynccxx . . $ `<external>/17235136775614108268/gl_generated.h:17367:9`! (GL_SYNC_GPU_COMMANDS_COMPLETEcxx . . $ `<external>/17235136775614108268/gl_generated.h:6067:9`!, 0);
819 gdk_gl_texture_builder_set_synccxx . . $ gdk_gl_texture_builder_set_sync(60fac1d306e5e3f2). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder., sync);
820
821 texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture. = gdk_gl_texture_builder_buildcxx . . $ gdk_gl_texture_builder_build(1f746ca357be5640). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.,
822 release_gl_texturecxx . . $ release_gl_texture(5d22bdacc48458e8).,
823 texture);
824 holder = texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.;
825
826 if (gdk_gl_context_export_dmabufcxx . . $ gdk_gl_context_export_dmabuf(9243d61674f53e97). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.,
827 gdk_gl_texture_builder_get_idcxx . . $ gdk_gl_texture_builder_get_id(d74db67619735659). (texture->buildercxx . . $ $anonymous_type_4bbcf3c3e6616825_0#builder.),
828 &dmabuf))
829 {
830 GdkDmabufTextureBuildercxx . . $ GdkDmabufTextureBuilder# *builder = gdk_dmabuf_texture_builder_newcxx . . $ gdk_dmabuf_texture_builder_new(3ac516e86cd7e87e). ();
831
832 gdk_dmabuf_texture_builder_set_displaycxx . . $ gdk_dmabuf_texture_builder_set_display(a287a5162a42ca05). (builder, gdk_gl_context_get_displaycxx . . $ gdk_gl_context_get_display(8e33d50c6415d588). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.));
833 gdk_dmabuf_texture_builder_set_widthcxx . . $ gdk_dmabuf_texture_builder_set_width(c5a74fad691ad46). (builder, gdk_texture_get_widthcxx . . $ gdk_texture_get_width(84a21f334421d5dd). (texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.));
834 gdk_dmabuf_texture_builder_set_heightcxx . . $ gdk_dmabuf_texture_builder_set_height(c5a74fad691ad46). (builder, gdk_texture_get_heightcxx . . $ gdk_texture_get_height(84a21f334421d5dd). (texture->gl_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#gl_texture.));
835 gdk_dmabuf_texture_builder_set_premultipliedcxx . . $ gdk_dmabuf_texture_builder_set_premultiplied(8849e63316d6d93d). (builder, TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!);
836 gdk_dmabuf_texture_builder_set_dmabufcxx . . $ gdk_dmabuf_texture_builder_set_dmabuf(ccc81ed0e221c585). (builder, &dmabuf);
837
838 texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. = gdk_dmabuf_texture_builder_buildcxx . . $ gdk_dmabuf_texture_builder_build(351b6e640d4c3b36). (builder, release_dmabuf_texturecxx . . $ release_dmabuf_texture(5d22bdacc48458e8)., texture, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
839
840 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (builder);
841
842 if (texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
843 holder = texture->dmabuf_texturecxx . . $ $anonymous_type_4bbcf3c3e6616825_0#dmabuf_texture.;
844 else
845 gdk_dmabuf_close_fdscxx . . $ gdk_dmabuf_close_fds(1ef9b102693d5e5a). (&dmabuf);
846 }
847
848 /* Our texture is rendered by OpenGL, so it is upside down,
849 * compared to what GSK expects, so flip it back.
850 */
851 gtk_snapshot_savecxx . . $ gtk_snapshot_save(afbd0a0317d5665f). (snapshot);
852 gtk_snapshot_translatecxx . . $ gtk_snapshot_translate(c73e8a4383f18867). (snapshot, &GRAPHENE_POINT_INITcxx . . $ `<external>/9324137249738369859/graphene-point.h:50:9`! (0, gtk_widget_get_height (widget)));
853 gtk_snapshot_scalecxx . . $ gtk_snapshot_scale(41b3301c3093a621). (snapshot, 1, -1);
854 gtk_snapshot_append_texturecxx . . $ gtk_snapshot_append_texture(c0713653ee5892c5). (snapshot,
855 holder,
856 &GRAPHENE_RECT_INITcxx . . $ `<external>/7539008420172022992/graphene-rect.h:50:9`! (0, 0,
857 gtk_widget_get_width (widget),
858 gtk_widget_get_height (widget)));
859 gtk_snapshot_restorecxx . . $ gtk_snapshot_restore(afbd0a0317d5665f). (snapshot);
860
861 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8). (holder);
862 }
863 else
864 {
865 g_warningcxx . . $ `<external>/5169755362661750954/gmessages.h:340:9`! ("fb setup not supported (%x)", status);
866 }
867 }
868
869 static gbooleancxx . . $ gboolean#
870 create_context_accumulatorcxx . . $ create_context_accumulator(76292f232a01f816). (GSignalInvocationHintcxx . . $ GSignalInvocationHint# *ihint,
871 GValuecxx . . $ GValue# *return_accu,
872 const GValuecxx . . $ GValue# *handler_return,
873 gpointercxx . . $ gpointer# data)
874 {
875 g_value_copycxx . . $ g_value_copy(76788ea28990d685). (handler_return, return_accu);
876
877 /* stop after the first handler returning a valid object */
878 return g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce). (handler_return) == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;
879 }
880
881 static void
882 gtk_gl_area_class_initcxx . . $ gtk_gl_area_class_init(d9ddc366c43b8842). (GtkGLAreaClasscxx . . $ GtkGLAreaClass# *klass)
883 {
884 GObjectClasscxx . . $ GObjectClass# *gobject_class = G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`! (klass);
885 GtkWidgetClasscxx . . $ GtkWidgetClass# *widget_class = GTK_WIDGET_CLASScxx . . $ `gtk/gtkwidget.h:45:9`! (klass);
886
887 klass->resizecxx . . $ _GtkGLAreaClass#resize. = gtk_gl_area_resizecxx . . $ gtk_gl_area_resize(bcf8f71a12a2015d).;
888 klass->create_contextcxx . . $ _GtkGLAreaClass#create_context. = gtk_gl_area_real_create_contextcxx . . $ gtk_gl_area_real_create_context(a1b7e91af93ba31e).;
889
890 widget_class->realizecxx . . $ _GtkWidgetClass#realize. = gtk_gl_area_realizecxx . . $ gtk_gl_area_realize(d7cf858254b37903).;
891 widget_class->unrealizecxx . . $ _GtkWidgetClass#unrealize. = gtk_gl_area_unrealizecxx . . $ gtk_gl_area_unrealize(d7cf858254b37903).;
892 widget_class->size_allocatecxx . . $ _GtkWidgetClass#size_allocate. = gtk_gl_area_size_allocatecxx . . $ gtk_gl_area_size_allocate(598a503332136822).;
893 widget_class->snapshotcxx . . $ _GtkWidgetClass#snapshot. = gtk_gl_area_snapshotcxx . . $ gtk_gl_area_snapshot(80012d1141bb3efa).;
894
895 /**
896 * GtkGLArea:context:
897 *
898 * The `GdkGLContext` used by the `GtkGLArea` widget.
899 *
900 * The `GtkGLArea` widget is responsible for creating the `GdkGLContext`
901 * instance. If you need to render with other kinds of buffers (stencil,
902 * depth, etc), use render buffers.
903 */
904 obj_propscxx . . $ obj_props.[PROP_CONTEXTcxx . . $ PROP_CONTEXT.] =
905 g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127). ("context", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
906 GDK_TYPE_GL_CONTEXTcxx . . $ `gdk/gdkglcontext.h:31:9`!,
907 G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. |
908 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`!);
909
910 /**
911 * GtkGLArea:auto-render:
912 *
913 * If set to %TRUE the ::render signal will be emitted every time
914 * the widget draws.
915 *
916 * This is the default and is useful if drawing the widget is faster.
917 *
918 * If set to %FALSE the data from previous rendering is kept around and will
919 * be used for drawing the widget the next time, unless the window is resized.
920 * In order to force a rendering [[email protected]_render] must be called.
921 * This mode is useful when the scene changes seldom, but takes a long time
922 * to redraw.
923 */
924 obj_propscxx . . $ obj_props.[PROP_AUTO_RENDERcxx . . $ PROP_AUTO_RENDER.] =
925 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("auto-render", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
926 TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!,
927 GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! |
928 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
929 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
930
931 /**
932 * GtkGLArea:has-depth-buffer:
933 *
934 * If set to %TRUE the widget will allocate and enable a depth buffer for the
935 * target framebuffer.
936 *
937 * Setting this property will enable GL's depth testing as a side effect. If
938 * you don't need depth testing, you should call `glDisable(GL_DEPTH_TEST)`
939 * in your `GtkGLArea::render` handler.
940 */
941 obj_propscxx . . $ obj_props.[PROP_HAS_DEPTH_BUFFERcxx . . $ PROP_HAS_DEPTH_BUFFER.] =
942 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("has-depth-buffer", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
943 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
944 GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! |
945 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
946 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
947
948 /**
949 * GtkGLArea:has-stencil-buffer:
950 *
951 * If set to %TRUE the widget will allocate and enable a stencil buffer for the
952 * target framebuffer.
953 */
954 obj_propscxx . . $ obj_props.[PROP_HAS_STENCIL_BUFFERcxx . . $ PROP_HAS_STENCIL_BUFFER.] =
955 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("has-stencil-buffer", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
956 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
957 GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! |
958 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
959 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
960
961 /**
962 * GtkGLArea:use-es:
963 *
964 * If set to %TRUE the widget will try to create a `GdkGLContext` using
965 * OpenGL ES instead of OpenGL.
966 *
967 * Deprecated: 4.12: Use [[email protected]:allowed-apis]
968 */
969 obj_propscxx . . $ obj_props.[PROP_USE_EScxx . . $ PROP_USE_ES.] =
970 g_param_spec_booleancxx . . $ g_param_spec_boolean(315d86b79c0116e0). ("use-es", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
971 FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
972 GTK_PARAM_READWRITEcxx . . $ `gtk/gtkprivate.h:44:9`! |
973 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
974 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
975
976 /**
977 * GtkGLArea:allowed-apis:
978 *
979 * The allowed APIs.
980 *
981 * Since: 4.12
982 */
983 obj_propscxx . . $ obj_props.[PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.] =
984 g_param_spec_flagscxx . . $ g_param_spec_flags(8782cb85a73af5de). ("allowed-apis", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
985 GDK_TYPE_GL_APIcxx . . $ `build/gdk/gdkenumtypes.h:49:9`!,
986 GDK_GL_API_GLcxx . . $ GDK_GL_API_GL. | GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.,
987 G_PARAM_READWRITEcxx . . $ G_PARAM_READWRITE. |
988 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
989 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
990
991 /**
992 * GtkGLArea:api:
993 *
994 * The API currently in use.
995 *
996 * Since: 4.12
997 */
998 obj_propscxx . . $ obj_props.[PROP_APIcxx . . $ PROP_API.] =
999 g_param_spec_flagscxx . . $ g_param_spec_flags(8782cb85a73af5de). ("api", NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
1000 GDK_TYPE_GL_APIcxx . . $ `build/gdk/gdkenumtypes.h:49:9`!,
1001 0,
1002 G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. |
1003 G_PARAM_STATIC_STRINGScxx . . $ `<external>/7453068347527694854/gparam.h:187:9`! |
1004 G_PARAM_EXPLICIT_NOTIFYcxx . . $ G_PARAM_EXPLICIT_NOTIFY.);
1005
1006 gobject_class->set_propertycxx . . $ _GObjectClass#set_property. = gtk_gl_area_set_propertycxx . . $ gtk_gl_area_set_property(d7c4bb29f36c0dc4).;
1007 gobject_class->get_propertycxx . . $ _GObjectClass#get_property. = gtk_gl_area_get_propertycxx . . $ gtk_gl_area_get_property(cee2c52f22407c66).;
1008 gobject_class->notifycxx . . $ _GObjectClass#notify. = gtk_gl_area_notifycxx . . $ gtk_gl_area_notify(89706f8943b9e738).;
1009
1010 g_object_class_install_propertiescxx . . $ g_object_class_install_properties(569d03e6a4088541). (gobject_class, LAST_PROPcxx . . $ LAST_PROP., obj_propscxx . . $ obj_props.);
1011
1012 /**
1013 * GtkGLArea::render:
1014 * @area: the `GtkGLArea` that emitted the signal
1015 * @context: the `GdkGLContext` used by @area
1016 *
1017 * Emitted every time the contents of the `GtkGLArea` should be redrawn.
1018 *
1019 * The @context is bound to the @area prior to emitting this function,
1020 * and the buffers are painted to the window once the emission terminates.
1021 *
1022 * Returns: %TRUE to stop other handlers from being invoked for the event.
1023 * %FALSE to propagate the event further.
1024 */
1025 area_signalscxx . . $ area_signals.[RENDERcxx . . $ RENDER.] =
1026 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("render"),
1027 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (gobject_class),
1028 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
1029 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGLAreaClass, render),
1030 _gtk_boolean_handled_accumulatorcxx . . $ _gtk_boolean_handled_accumulator(76292f232a01f816)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
1031 _gdk_marshal_BOOLEAN__OBJECTcxx . . $ _gdk_marshal_BOOLEAN__OBJECT(cba270afb0f82555).,
1032 G_TYPE_BOOLEANcxx . . $ `<external>/9567554376676449156/gtype.h:99:9`!, 1,
1033 GDK_TYPE_GL_CONTEXTcxx . . $ `gdk/gdkglcontext.h:31:9`!);
1034 g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (area_signalscxx . . $ area_signals.[RENDERcxx . . $ RENDER.],
1035 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass),
1036 _gdk_marshal_BOOLEAN__OBJECTvcxx . . $ _gdk_marshal_BOOLEAN__OBJECTv(d309f4be92d1737c).);
1037
1038 /**
1039 * GtkGLArea::resize:
1040 * @area: the `GtkGLArea` that emitted the signal
1041 * @width: the width of the viewport
1042 * @height: the height of the viewport
1043 *
1044 * Emitted once when the widget is realized, and then each time the widget
1045 * is changed while realized.
1046 *
1047 * This is useful in order to keep GL state up to date with the widget size,
1048 * like for instance camera properties which may depend on the width/height
1049 * ratio.
1050 *
1051 * The GL context for the area is guaranteed to be current when this signal
1052 * is emitted.
1053 *
1054 * The default handler sets up the GL viewport.
1055 */
1056 area_signalscxx . . $ area_signals.[RESIZEcxx . . $ RESIZE.] =
1057 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("resize"),
1058 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass),
1059 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
1060 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGLAreaClass, resize),
1061 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
1062 _gdk_marshal_VOID__INT_INTcxx . . $ _gdk_marshal_VOID__INT_INT(cba270afb0f82555).,
1063 G_TYPE_NONEcxx . . $ `<external>/9567554376676449156/gtype.h:72:9`!, 2, G_TYPE_INTcxx . . $ `<external>/9567554376676449156/gtype.h:105:9`!, G_TYPE_INTcxx . . $ `<external>/9567554376676449156/gtype.h:105:9`!);
1064 g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (area_signalscxx . . $ area_signals.[RESIZEcxx . . $ RESIZE.],
1065 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass),
1066 _gdk_marshal_VOID__INT_INTvcxx . . $ _gdk_marshal_VOID__INT_INTv(d309f4be92d1737c).);
1067
1068 /**
1069 * GtkGLArea::create-context:
1070 * @area: the `GtkGLArea` that emitted the signal
1071 * @error: (nullable): location to store error information on failure
1072 *
1073 * Emitted when the widget is being realized.
1074 *
1075 * This allows you to override how the GL context is created.
1076 * This is useful when you want to reuse an existing GL context,
1077 * or if you want to try creating different kinds of GL options.
1078 *
1079 * If context creation fails then the signal handler can use
1080 * [[email protected]_error] to register a more detailed error
1081 * of how the construction failed.
1082 *
1083 * Returns: (transfer full): a newly created `GdkGLContext`;
1084 * the `GtkGLArea` widget will take ownership of the returned value.
1085 */
1086 area_signalscxx . . $ area_signals.[CREATE_CONTEXTcxx . . $ CREATE_CONTEXT.] =
1087 g_signal_newcxx . . $ g_signal_new(b0aa5e8090fb95c0). (I_cxx . . $ `gdk/gdkprivate.h:35:9`!("create-context"),
1088 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass),
1089 G_SIGNAL_RUN_LASTcxx . . $ G_SIGNAL_RUN_LAST.,
1090 G_STRUCT_OFFSETcxx . . $ `<external>/12741050725406041920/gmacros.h:1005:9`! (GtkGLAreaClass, create_context),
1091 create_context_accumulatorcxx . . $ create_context_accumulator(76292f232a01f816)., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!,
1092 _gtk_marshal_OBJECT__VOIDcxx . . $ _gtk_marshal_OBJECT__VOID(cba270afb0f82555).,
1093 GDK_TYPE_GL_CONTEXTcxx . . $ `gdk/gdkglcontext.h:31:9`!, 0);
1094 g_signal_set_va_marshallercxx . . $ g_signal_set_va_marshaller(4fd870c04a9d6fe7). (area_signalscxx . . $ area_signals.[CREATE_CONTEXTcxx . . $ CREATE_CONTEXT.],
1095 G_TYPE_FROM_CLASScxx . . $ `<external>/9567554376676449156/gtype.h:657:9`! (klass),
1096 _gtk_marshal_OBJECT__VOIDvcxx . . $ _gtk_marshal_OBJECT__VOIDv(d309f4be92d1737c).);
1097 }
1098
1099 static void
1100 gtk_gl_area_initcxx . . $ gtk_gl_area_init(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
1101 {
1102 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1103
1104 priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
1105 priv->needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
1106 priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. = 0;
1107 priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. = GDK_GL_API_GLcxx . . $ GDK_GL_API_GL. | GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.;
1108 }
1109
1110 /**
1111 * gtk_gl_area_new:
1112 *
1113 * Creates a new `GtkGLArea` widget.
1114 *
1115 * Returns: a new `GtkGLArea`
1116 */
1117 GtkWidgetcxx . . $ GtkWidget# *
1118 gtk_gl_area_newcxx . . $ gtk_gl_area_new(2369ce5e9f2c7dfd). (void)
1119 {
1120 return g_object_newcxx . . $ g_object_new(8485fe61b4be4c78). (GTK_TYPE_GL_AREAcxx . . $ `gtk/gtkglarea.h:31:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1121 }
1122
1123 /**
1124 * gtk_gl_area_set_error:
1125 * @area: a `GtkGLArea`
1126 * @error: (nullable): a new `GError`, or %NULL to unset the error
1127 *
1128 * Sets an error on the area which will be shown instead of the
1129 * GL rendering.
1130 *
1131 * This is useful in the [[email protected]::create-context]
1132 * signal if GL context creation fails.
1133 */
1134 void
1135 gtk_gl_area_set_errorcxx . . $ gtk_gl_area_set_error(f47000f0d65ba7fe). (GtkGLAreacxx . . $ GtkGLArea# *area,
1136 const GErrorcxx . . $ GError# *error)
1137 {
1138 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1139
1140 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1141
1142 g_clear_errorcxx . . $ g_clear_error(19f343512d040fc2). (&priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.);
1143 if (error)
1144 priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error. = g_error_copycxx . . $ g_error_copy(34f4875c1a1b6692). (error);
1145 }
1146
1147 /**
1148 * gtk_gl_area_get_error:
1149 * @area: a `GtkGLArea`
1150 *
1151 * Gets the current error set on the @area.
1152 *
1153 * Returns: (nullable) (transfer none): the `GError`
1154 */
1155 GErrorcxx . . $ GError# *
1156 gtk_gl_area_get_errorcxx . . $ gtk_gl_area_get_error(9f456f6d75f0255b). (GtkGLAreacxx . . $ GtkGLArea# *area)
1157 {
1158 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1159
1160 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1161
1162 return priv->errorcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#error.;
1163 }
1164
1165 /**
1166 * gtk_gl_area_set_use_es:
1167 * @area: a `GtkGLArea`
1168 * @use_es: whether to use OpenGL or OpenGL ES
1169 *
1170 * Sets whether the @area should create an OpenGL or an OpenGL ES context.
1171 *
1172 * You should check the capabilities of the `GdkGLContext` before drawing
1173 * with either API.
1174 *
1175 * Deprecated: 4.12: Use [[email protected]_allowed_apis]
1176 */
1177 void
1178 gtk_gl_area_set_use_escxx . . $ gtk_gl_area_set_use_es(ffdfa690e158b9b0). (GtkGLAreacxx . . $ GtkGLArea# *area,
1179 gbooleancxx . . $ gboolean# use_es)
1180 {
1181 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1182
1183 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1184 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (!gtk_widget_get_realized (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area)));
1185
1186 if ((priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.) == use_es)
1187 return;
1188
1189 priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. = use_es ? GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES. : GDK_GL_API_GLcxx . . $ GDK_GL_API_GL.;
1190
1191 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), obj_propscxx . . $ obj_props.[PROP_USE_EScxx . . $ PROP_USE_ES.]);
1192 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), obj_propscxx . . $ obj_props.[PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.]);
1193 }
1194
1195 /**
1196 * gtk_gl_area_get_use_es:
1197 * @area: a `GtkGLArea`
1198 *
1199 * Returns whether the `GtkGLArea` should use OpenGL ES.
1200 *
1201 * See [[email protected]_use_es].
1202 *
1203 * Returns: %TRUE if the `GtkGLArea` should create an OpenGL ES context
1204 * and %FALSE otherwise
1205 *
1206 * Deprecated: 4.12: Use [[email protected]_api]
1207 */
1208 gbooleancxx . . $ gboolean#
1209 gtk_gl_area_get_use_escxx . . $ gtk_gl_area_get_use_es(7e27aaf502b1a6a8). (GtkGLAreacxx . . $ GtkGLArea# *area)
1210 {
1211 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1212
1213 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1214
1215 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.)
1216 return gdk_gl_context_get_apicxx . . $ gdk_gl_context_get_api(d0a05448c3d42611). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.) == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.;
1217 else
1218 return priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.;
1219 }
1220
1221 /**
1222 * gtk_gl_area_set_allowed_apis:
1223 * @area: a `GtkGLArea`
1224 * @apis: the allowed APIs
1225 *
1226 * Sets the allowed APIs to create a context with.
1227 *
1228 * You should check [[email protected]:api] before drawing
1229 * with either API.
1230 *
1231 * By default, all APIs are allowed.
1232 *
1233 * Since: 4.12
1234 */
1235 void
1236 gtk_gl_area_set_allowed_apiscxx . . $ gtk_gl_area_set_allowed_apis(1a2fcea01a5e7925). (GtkGLAreacxx . . $ GtkGLArea# *area,
1237 GdkGLAPIcxx . . $ GdkGLAPI# apis)
1238 {
1239 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1240 GdkGLAPIcxx . . $ GdkGLAPI# old_allowed_apis;
1241
1242 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1243 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (!gtk_widget_get_realized (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area)));
1244
1245 if (priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. == apis)
1246 return;
1247
1248 old_allowed_apis = priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis.;
1249
1250 priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis. = apis;
1251
1252 if ((old_allowed_apis == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.) != (apis == GDK_GL_API_GLEScxx . . $ GDK_GL_API_GLES.))
1253 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), obj_propscxx . . $ obj_props.[PROP_USE_EScxx . . $ PROP_USE_ES.]);
1254 g_object_notify_by_pspeccxx . . $ g_object_notify_by_pspec(89706f8943b9e738). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), obj_propscxx . . $ obj_props.[PROP_ALLOWED_APIScxx . . $ PROP_ALLOWED_APIS.]);
1255 }
1256
1257 /**
1258 * gtk_gl_area_get_allowed_apis:
1259 * @area: a `GtkGLArea`
1260 *
1261 * Gets the allowed APIs.
1262 *
1263 * See [[email protected]_allowed_apis].
1264 *
1265 * Returns: the allowed APIs
1266 *
1267 * Since: 4.12
1268 */
1269 GdkGLAPIcxx . . $ GdkGLAPI#
1270 gtk_gl_area_get_allowed_apiscxx . . $ gtk_gl_area_get_allowed_apis(ed237184b03e93a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
1271 {
1272 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1273
1274 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), 0);
1275
1276 return priv->allowed_apiscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#allowed_apis.;
1277 }
1278
1279 /**
1280 * gtk_gl_area_get_api:
1281 * @area: a `GtkGLArea`
1282 *
1283 * Gets the API that is currently in use.
1284 *
1285 * If the GL area has not been realized yet, 0 is returned.
1286 *
1287 * Returns: the currently used API
1288 *
1289 * Since: 4.12
1290 */
1291 GdkGLAPIcxx . . $ GdkGLAPI#
1292 gtk_gl_area_get_apicxx . . $ gtk_gl_area_get_api(ed237184b03e93a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
1293 {
1294 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1295
1296 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), 0);
1297
1298 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.)
1299 return gdk_gl_context_get_apicxx . . $ gdk_gl_context_get_api(d0a05448c3d42611). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.);
1300 else
1301 return 0;
1302 }
1303
1304 /**
1305 * gtk_gl_area_set_required_version:
1306 * @area: a `GtkGLArea`
1307 * @major: the major version
1308 * @minor: the minor version
1309 *
1310 * Sets the required version of OpenGL to be used when creating
1311 * the context for the widget.
1312 *
1313 * This function must be called before the area has been realized.
1314 */
1315 void
1316 gtk_gl_area_set_required_versioncxx . . $ gtk_gl_area_set_required_version(bcf8f71a12a2015d). (GtkGLAreacxx . . $ GtkGLArea# *area,
1317 int major,
1318 int minor)
1319 {
1320 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1321
1322 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1323 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (!gtk_widget_get_realized (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area)));
1324
1325 priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. = major * 10 + minor;
1326 }
1327
1328 /**
1329 * gtk_gl_area_get_required_version:
1330 * @area: a `GtkGLArea`
1331 * @major: (out): return location for the required major version
1332 * @minor: (out): return location for the required minor version
1333 *
1334 * Retrieves the required version of OpenGL.
1335 *
1336 * See [[email protected]_required_version].
1337 */
1338 void
1339 gtk_gl_area_get_required_versioncxx . . $ gtk_gl_area_get_required_version(2a1cecafabbaa2e9). (GtkGLAreacxx . . $ GtkGLArea# *area,
1340 int *major,
1341 int *minor)
1342 {
1343 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1344
1345 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1346
1347 if (major != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1348 *major = priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. / 10;
1349 if (minor != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1350 *minor = priv->required_gl_versioncxx . . $ $anonymous_type_4bbcf3c3e6616825_1#required_gl_version. % 10;
1351 }
1352
1353 /**
1354 * gtk_gl_area_get_has_depth_buffer:
1355 * @area: a `GtkGLArea`
1356 *
1357 * Returns whether the area has a depth buffer.
1358 *
1359 * Returns: %TRUE if the @area has a depth buffer, %FALSE otherwise
1360 */
1361 gbooleancxx . . $ gboolean#
1362 gtk_gl_area_get_has_depth_buffercxx . . $ gtk_gl_area_get_has_depth_buffer(7e27aaf502b1a6a8). (GtkGLAreacxx . . $ GtkGLArea# *area)
1363 {
1364 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1365
1366 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1367
1368 return priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer.;
1369 }
1370
1371 /**
1372 * gtk_gl_area_set_has_depth_buffer:
1373 * @area: a `GtkGLArea`
1374 * @has_depth_buffer: %TRUE to add a depth buffer
1375 *
1376 * Sets whether the `GtkGLArea` should use a depth buffer.
1377 *
1378 * If @has_depth_buffer is %TRUE the widget will allocate and
1379 * enable a depth buffer for the target framebuffer. Otherwise
1380 * there will be none.
1381 */
1382 void
1383 gtk_gl_area_set_has_depth_buffercxx . . $ gtk_gl_area_set_has_depth_buffer(ffdfa690e158b9b0). (GtkGLAreacxx . . $ GtkGLArea# *area,
1384 gbooleancxx . . $ gboolean# has_depth_buffer)
1385 {
1386 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1387
1388 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1389
1390 has_depth_buffer = !!has_depth_buffer;
1391
1392 if (priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer. != has_depth_buffer)
1393 {
1394 priv->has_depth_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_depth_buffer. = has_depth_buffer;
1395
1396 g_object_notifycxx . . $ g_object_notify(174c9e6df5777c4e). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), "has-depth-buffer");
1397
1398 priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
1399 }
1400 }
1401
1402 /**
1403 * gtk_gl_area_get_has_stencil_buffer:
1404 * @area: a `GtkGLArea`
1405 *
1406 * Returns whether the area has a stencil buffer.
1407 *
1408 * Returns: %TRUE if the @area has a stencil buffer, %FALSE otherwise
1409 */
1410 gbooleancxx . . $ gboolean#
1411 gtk_gl_area_get_has_stencil_buffercxx . . $ gtk_gl_area_get_has_stencil_buffer(7e27aaf502b1a6a8). (GtkGLAreacxx . . $ GtkGLArea# *area)
1412 {
1413 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1414
1415 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1416
1417 return priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer.;
1418 }
1419
1420 /**
1421 * gtk_gl_area_set_has_stencil_buffer:
1422 * @area: a `GtkGLArea`
1423 * @has_stencil_buffer: %TRUE to add a stencil buffer
1424 *
1425 * Sets whether the `GtkGLArea` should use a stencil buffer.
1426 *
1427 * If @has_stencil_buffer is %TRUE the widget will allocate and
1428 * enable a stencil buffer for the target framebuffer. Otherwise
1429 * there will be none.
1430 */
1431 void
1432 gtk_gl_area_set_has_stencil_buffercxx . . $ gtk_gl_area_set_has_stencil_buffer(ffdfa690e158b9b0). (GtkGLAreacxx . . $ GtkGLArea# *area,
1433 gbooleancxx . . $ gboolean# has_stencil_buffer)
1434 {
1435 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1436
1437 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1438
1439 has_stencil_buffer = !!has_stencil_buffer;
1440
1441 if (priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer. != has_stencil_buffer)
1442 {
1443 priv->has_stencil_buffercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#has_stencil_buffer. = has_stencil_buffer;
1444
1445 g_object_notifycxx . . $ g_object_notify(174c9e6df5777c4e). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), "has-stencil-buffer");
1446
1447 priv->have_bufferscxx . . $ $anonymous_type_4bbcf3c3e6616825_1#have_buffers. = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
1448 }
1449 }
1450
1451 /**
1452 * gtk_gl_area_queue_render:
1453 * @area: a `GtkGLArea`
1454 *
1455 * Marks the currently rendered data (if any) as invalid, and queues
1456 * a redraw of the widget.
1457 *
1458 * This ensures that the [[email protected]::render] signal
1459 * is emitted during the draw.
1460 *
1461 * This is only needed when [[email protected]_auto_render] has
1462 * been called with a %FALSE value. The default behaviour is to
1463 * emit [[email protected]::render] on each draw.
1464 */
1465 void
1466 gtk_gl_area_queue_rendercxx . . $ gtk_gl_area_queue_render(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
1467 {
1468 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1469
1470 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1471
1472 priv->needs_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#needs_render. = TRUEcxx . . $ `<external>/12741050725406041920/gmacros.h:971:9`!;
1473
1474 gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area));
1475 }
1476
1477
1478 /**
1479 * gtk_gl_area_get_auto_render:
1480 * @area: a `GtkGLArea`
1481 *
1482 * Returns whether the area is in auto render mode or not.
1483 *
1484 * Returns: %TRUE if the @area is auto rendering, %FALSE otherwise
1485 */
1486 gbooleancxx . . $ gboolean#
1487 gtk_gl_area_get_auto_rendercxx . . $ gtk_gl_area_get_auto_render(7e27aaf502b1a6a8). (GtkGLAreacxx . . $ GtkGLArea# *area)
1488 {
1489 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1490
1491 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!);
1492
1493 return priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render.;
1494 }
1495
1496 /**
1497 * gtk_gl_area_set_auto_render:
1498 * @area: a `GtkGLArea`
1499 * @auto_render: a boolean
1500 *
1501 * Sets whether the `GtkGLArea` is in auto render mode.
1502 *
1503 * If @auto_render is %TRUE the [[email protected]::render] signal will
1504 * be emitted every time the widget draws. This is the default and is
1505 * useful if drawing the widget is faster.
1506 *
1507 * If @auto_render is %FALSE the data from previous rendering is kept
1508 * around and will be used for drawing the widget the next time,
1509 * unless the window is resized. In order to force a rendering
1510 * [[email protected]_render] must be called. This mode is
1511 * useful when the scene changes seldom, but takes a long time to redraw.
1512 */
1513 void
1514 gtk_gl_area_set_auto_rendercxx . . $ gtk_gl_area_set_auto_render(ffdfa690e158b9b0). (GtkGLAreacxx . . $ GtkGLArea# *area,
1515 gbooleancxx . . $ gboolean# auto_render)
1516 {
1517 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1518
1519 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1520
1521 auto_render = !!auto_render;
1522
1523 if (priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render. != auto_render)
1524 {
1525 priv->auto_rendercxx . . $ $anonymous_type_4bbcf3c3e6616825_1#auto_render. = auto_render;
1526
1527 g_object_notifycxx . . $ g_object_notify(174c9e6df5777c4e). (G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`! (area), "auto-render");
1528
1529 if (auto_render)
1530 gtk_widget_queue_drawcxx . . $ gtk_widget_queue_draw(d7cf858254b37903). (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area));
1531 }
1532 }
1533
1534 /**
1535 * gtk_gl_area_get_context:
1536 * @area: a `GtkGLArea`
1537 *
1538 * Retrieves the `GdkGLContext` used by @area.
1539 *
1540 * Returns: (transfer none) (nullable): the `GdkGLContext`
1541 */
1542 GdkGLContextcxx . . $ GdkGLContext# *
1543 gtk_gl_area_get_contextcxx . . $ gtk_gl_area_get_context(a1b7e91af93ba31e). (GtkGLAreacxx . . $ GtkGLArea# *area)
1544 {
1545 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1546
1547 g_return_val_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:665:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!);
1548
1549 return priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.;
1550 }
1551
1552 /**
1553 * gtk_gl_area_make_current:
1554 * @area: a `GtkGLArea`
1555 *
1556 * Ensures that the `GdkGLContext` used by @area is associated with
1557 * the `GtkGLArea`.
1558 *
1559 * This function is automatically called before emitting the
1560 * [[email protected]::render] signal, and doesn't normally need
1561 * to be called by application code.
1562 */
1563 void
1564 gtk_gl_area_make_currentcxx . . $ gtk_gl_area_make_current(502929239a3f00a9). (GtkGLAreacxx . . $ GtkGLArea# *area)
1565 {
1566 GtkGLAreaPrivatecxx . . $ GtkGLAreaPrivate# *priv = gtk_gl_area_get_instance_privatecxx . . $ gtk_gl_area_get_instance_private(1750484b14711024). (area);
1567
1568 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (GTK_IS_GL_AREAcxx . . $ `gtk/gtkglarea.h:33:9`! (area));
1569 g_return_if_failcxx . . $ `<external>/5169755362661750954/gmessages.h:652:9`! (gtk_widget_get_realized (GTK_WIDGETcxx . . $ `gtk/gtkwidget.h:44:9`! (area)));
1570
1571 if (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!)
1572 gdk_gl_context_make_currentcxx . . $ gdk_gl_context_make_current(6e1c86d47c4ef917). (priv->contextcxx . . $ $anonymous_type_4bbcf3c3e6616825_1#context.);
1573 }