'\" t .\" Title: waffle_display .\" Author: Chad Versace .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 03/25/2021 .\" Manual: Waffle Manual .\" Source: waffle .\" Language: English .\" .TH "WAFFLE_DISPLAY" "3" "03/25/2021" "waffle" "Waffle Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" waffle_display, waffle_display_connect, waffle_display_disconnect, waffle_display_supports_context_api, waffle_display_get_native \- class waffle_display .SH "SYNOPSIS" .sp .ft B .nf #include struct waffle_display; .fi .ft .HP \w'struct\ waffle_display*\ waffle_display_connect('u .BI "struct waffle_display* waffle_display_connect(const\ char*\ " "name" ");" .HP \w'bool\ waffle_display_disconnect('u .BI "bool waffle_display_disconnect(struct\ waffle_display\ *" "self" ");" .HP \w'bool\ waffle_display_supports_context_api('u .BI "bool waffle_display_supports_context_api(struct\ waffle_display\ *" "self" ", int32_t\ " "context_api" ");" .HP \w'union\ waffle_native_display*\ waffle_display_get_native('u .BI "union waffle_native_display* waffle_display_get_native(struct\ waffle_display\ *" "self" ");" .SH "DESCRIPTION" .PP \fBstruct waffle_display\fR .RS 4 An opaque type\&. .RE .PP \fBwaffle_display_connect()\fR .RS 4 Connect to a display\&. The interpretation of \fIname\fR differs according to the platform given to \fBwaffle_init\fR(3)\&. .sp On Android, CGL and WGL \fIname\fR is ignored\&. .sp On the X11 platforms, GLX and X11/EGL, the function connects to the X11 display with the given \fIname\fR\&. If \fIname\fR is null, then it uses the value of the environment variable \fBDISPLAY\fR\&. .sp On Wayland, the function connects to the Wayland display with the given name\&. If \fIname\fR is null, then it uses the value of the environment variable \fBWAYLAND_DISPLAY\fR\&. .sp On GBM, the function opens the device at the filepath \fIname\fR\&. If \fIname\fR is NULL, then the function uses the value of environment variable \fBWAFFLE_GBM_DEVICE\fR\&. If \fIname\fR is null and \fBWAFFLE_GBM_DEVICE\fR is unset, then the function iterates using udev through the set of card devices in the drm subsystem, which are usually located in /dev/dri, and attempts to open each in turn with open(O_RDWR | O_CLOEXEC) until successful\&. .RE .PP \fBwaffle_display_disconnect()\fR .RS 4 Disconnect from the \fBwaffle_display\fR and release it\*(Aqs memory\&. All pointers to waffle objects that were created with the display become invalid\&. .RE .PP \fBwaffle_display_supports_context_api()\fR .RS 4 Check if the display is capable of creating a \fBwaffle_context\fR(3) with the given \fIcontext_api\fR\&. See \fBwaffle_config\fR(3) for choices of \fIcontext_api\fR and expectations for each platform\&. .RE .PP \fBwaffle_display_get_native()\fR .RS 4 Get the display\*(Aqs underlying native objects\&. Use \fBfree\fR(3) to deallocate the returned pointer\&. See \fBwaffle_native\fR(3) for the definition of \fBunion waffle_native_display\fR\&. .RE .SH "RETURN VALUE" .PP Functions whose return type is \fBbool\fR return true on success and false on failure\&. Functions whose return type is a pointer return \fBNULL\fR on failure\&. Use \fBwaffle_error_get_info\fR(3) to get information about any errors\&. .SH "ERRORS" .PP See \fBwaffle_error\fR(3) for the complete list of waffle\*(Aqs error codes\&. .PP No errors are specific to any of the \fBwaffle_display\fR functions\&. .SH "ISSUES" .PP Please report bugs or and feature requests to \m[blue]\fB\%https://gitlab.freedesktop.org/mesa/waffle/issues\fR\m[]\&. .SH "SEE ALSO" .PP \fBwaffle\fR(7) .SH "AUTHOR" .PP \fBChad Versace\fR <\&chad\&.versace@linux\&.intel\&.com\&> .RS 4 Maintainer .RE .SH "COPYRIGHT" .br Copyright \(co 2013 Intel .br .PP 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 \m[blue]\fB\%http://creativecommons.org.license/by-sa/3.0/us\fR\m[]\&. .sp