WAFFLE_DISPLAY(3)
π WAFFLE_DISPLAY π
okay bestie, buckle up, we're doing the waffle_display page from the Waffle Manual, section 3 π This is your whole group chat for displays, connecting to them, checking what they can do, and yeeting them when you're done. Let's go β¨
β¨ NAME β¨
waffle_display, waffle_display_connect, waffle_display_disconnect, waffle_display_supports_context_api, waffle_display_get_native β the whole waffle_display class, no cap π
πΈ SYNOPSIS πΈ
#include <waffle.h>
struct waffle_display;
struct waffle_display* waffle_display_connect(const char* name);
bool waffle_display_disconnect(struct waffle_display *self);
bool waffle_display_supports_context_api(struct waffle_display *self,
int32_t context_api);
union waffle_native_display*
waffle_display_get_native(struct waffle_display *self);
(yes the formatting on that last one is a lil unhinged, we don't talk about it π)
π¦ DESCRIPTION π¦
struct waffle_display
An opaque type. You don't get to see inside her. She's mysterious. Main character energy π
waffle_display_connect()
Connects to a display, periodt. The way name gets interpreted depends entirely on which platform you handed to waffle_init(3). Here's the tea, platform by platform:
- Android, CGL, and WGL β
nameis straight up ignored. She said what she said π - X11 platforms (GLX and X11/EGL) β this function connects to the X11 display with the given
name. Ifnameis null, it reaches for the environment variableDISPLAYinstead π - Wayland β connects to the Wayland display with the given
name. Ifnameis null, it uses the environment variableWAYLAND_DISPLAYπ¦ - GBM β opens the device at the filepath
name. IfnameisNULL, it uses the environment variableWAFFLE_GBM_DEVICE. And ifnameis null andWAFFLE_GBM_DEVICEis unset? She goes on a little quest π« β she iterates usinglibdrmthrough the set of card devices in the drm subsystem, which usually live in/dev/dri, and tries to open each one in turn withopen(O_RDWR | O_CLOEXEC)until something works. Iconic tbh.
waffle_display_disconnect()
Disconnects from the waffle_display and releases its memory (the page says "it's memory", we're keeping that, it's canon now π).
β οΈ IMPORTANT, BESTIE: every single pointer to waffle objects that were created with this display becomes INVALID. All of them. Gone. Do not touch. π«Ά
waffle_display_supports_context_api()
Checks whether the display is capable of creating a waffle_context(3) with the given context_api. Wanna know what your context_api choices are and what each platform expects? That's waffle_config(3), go look π
waffle_display_get_native()
Gets the display's underlying native objects β the raw ones, the real ones underneath π Use free(3) to deallocate the returned pointer (she gave you that pointer, you have to free her, it's only polite π
). For the definition of union waffle_native_display, see waffle_native(3).
β RETURN VALUE β
- Functions whose return type is
boolreturntrueon success andfalseon failure. - Functions whose return type is a pointer return
NULLon failure.
Need the deets on what went wrong? Use waffle_error_get_info(3) to get information about any errors π§
π ERRORS π
See waffle_error(3) for the complete list of waffle's error codes.
And the cute part: no errors are specific to any of the waffle_display functions. She's a clean girl, she doesn't have her own personal error drama β¨
π ISSUES π
Please report bugs or and feature requests to https://gitlab.freedesktop.org/mesa/waffle/issues.
(we are reproducing "bugs or and" exactly as written, because that's how she wrote it, and honestly? slay π«Ά)
π₯ SEE ALSO π₯
π AUTHOR π
Chad Versace <chad.versace@linux.intel.com> Former maintainer
π 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.
okay that's the whole page bestie, you ate it, go connect to a display π¦π
this page came from the waffle source, dated 07/06/2026, and it's WAFFLE_DISPLAY(3) β section 3, always and forever, periodt π
β¨πΈ
π¦ 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