WAFFLE_WINDOW(3)
π NAME π
hey bestie π welcome to WAFFLE_WINDOW(3), straight out of the Waffle Manual β this is the page all about the class waffle_window, and it covers these icons right here:
waffle_windowwaffle_window_createwaffle_window_destroywaffle_window_showwaffle_window_swap_bufferswaffle_window_get_native
(and yes, waffle_window_create2 shows up too, keep scrolling π«Ά)
β¨ SYNOPSIS β¨
#include <waffle.h>
struct waffle_window;
struct waffle_window* waffle_window_create(struct waffle_window *config,
int32_t width,
int32_t height);
struct waffle_window*
waffle_window_create2(struct waffle_window *config,
const intptr_t attrib_list[]);
bool waffle_window_destroy(struct waffle_window *self);
bool waffle_window_show(struct waffle_window *self);
bool waffle_window_swap_buffers(struct waffle_window *self);
union waffle_native_window*
waffle_window_get_native(struct waffle_window *self);
π DESCRIPTION π
okay so, one by one, no skipping, we're going through all of them π
struct waffle_window
it's an opaque type. that's it, that's the whole vibe. you don't get to peek inside, and honestly? respect. π₯
waffle_window_create()
makes you a window with all the properties that config says. πͺ
and here's the fun part β if the platform allows it, the window is not slapped onto the screen right after creation. nope. she's shy. to actually make her appear you gotta call waffle_window_show(). main character entrance, delayed. periodt β¨
waffle_window_create2()
feature test macro situation: WAFFLE_API_VERSION >= 0x0106. (go read waffle_feature_test_macros(7) for the tea π΅)
this one creates a window using the properties from config and attrib_list. and attrib_list has to specify the window size in one of exactly two ways β no improvising:
- with the attributes
WAFFLE_WINDOW_WIDTHandWAFFLE_WINDOW_HEIGHT, both set to positive values that are<= INT32_MAX, or - with the attribute
WAFFLE_WINDOW_FULLSCREENequal totrue(1). πΈ
waffle_window_destroy()
destroys the window and releases her memory. rest in peace queen π she ate and now she's gone.
waffle_window_show()
puts the window up on the display, front and center, icon behavior π
but lowkey β if the window is already shown, or if the native platform straight up doesn't support showing windows (hi GBM π), then it just does nothing and returns true. no drama, no error, we chill.
waffle_window_swap_buffers()
so if the window is double-buffered, this implicitly calls glFlush() and posts the contents of the back buffer to the front buffer. putting in the work, showing the results β¨
if the window is front-buffered, it does nothing. okay, she's resting.
and for the platform-specific details of swap semantics? go read the spec for whichever native platform you're on, bestie:
- the GLX 1.4 Specification [1]
- the EGL 1.4 Specification [2]
- or the CGL Reference [3]
(receipts are down at the bottom in NOTES, I got you π«Ά)
waffle_window_get_native()
grabs the window's underlying native objects. when you're done with the pointer it gives you, free it with free(3), okay? don't just leave it there to rot π
and if you wanna know what union waffle_native_window even is, that's a waffle_native(3) situation.
π RETURN VALUE π
- functions returning
bool:trueon success,falseon failure. - functions returning a pointer:
NULLon failure. - wanna know why something flopped? call
waffle_error_get_info(3)to get the full info about any errors. π
π ERRORS π
go look at waffle_error(3) for the complete list of waffle's error codes β the whole menu, not just the snacks.
and ngl: no errors are specific to the waffle_window functions. there's nothing extra hiding here. clean page, clean vibes β¨
π ISSUES π
found a bug? want a feature? please report that to:
https://gitlab.freedesktop.org/mesa/waffle/issues
we love a link drop π«Ά
π SEE ALSO π
π AUTHOR π
Chad Versace <chad.versace@linux.intel.com>
- Former maintainer
thank you for your service, legend πΈ
π COPYRIGHT π
Copyright Β© 2013 Intel
this manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). to view a copy of this license, visit:
http://creativecommons.org.license/by-sa/3.0/us
π NOTES π
- GLX 1.4 Specification
http://www.opengl.org/registry/doc/glx1.4.pdf - EGL 1.4 Specification
http://www.khronos.org/registry/egl/specs/eglspec.1.4.20110406.pdf - CGL Reference
https://developer.apple.com/library/mac/#documentation/graphicsimaging/reference/CGL_OpenGL/Reference/reference.html
and that's the whole page bestie, you made it to the end π this was the waffle manual, dated 07/06/2026, page WAFFLE_WINDOW(3). go make some windows, slay, and hydrate πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libwaffle-doc 1.8.3-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms