1WAFFLE_DISPLAY(3) Waffle Manual WAFFLE_DISPLAY(3)
2
3
4
6 waffle_display, waffle_display_connect, waffle_display_disconnect,
7 waffle_display_supports_context_api, waffle_display_get_native - class
8 waffle_display
9
11 #include <waffle.h>
12
13 struct waffle_display;
14
15
16 struct waffle_display* waffle_display_connect(const char* name);
17
18 bool waffle_display_disconnect(struct waffle_display *self);
19
20 bool waffle_display_supports_context_api(struct waffle_display *self,
21 int32_t context_api);
22
23 union waffle_native_display*
24 waffle_display_get_native(struct waffle_display *self);
25
27 struct waffle_display
28 An opaque type.
29
30 waffle_display_connect()
31 Connect to a display. The interpretation of name differs according
32 to the platform given to waffle_init(3).
33
34 On Android, CGL and WGL name is ignored.
35
36 On the X11 platforms, GLX and X11/EGL, the function connects to the
37 X11 display with the given name. If name is null, then it uses the
38 value of the environment variable DISPLAY.
39
40 On Wayland, the function connects to the Wayland display with the
41 given name. If name is null, then it uses the value of the
42 environment variable WAYLAND_DISPLAY.
43
44 On GBM, the function opens the device at the filepath name. If name
45 is NULL, then the function uses the value of environment variable
46 WAFFLE_GBM_DEVICE. If name is null and WAFFLE_GBM_DEVICE is unset,
47 then the function iterates using udev through the set of card
48 devices in the drm subsystem, which are usually located in
49 /dev/dri, and attempts to open each in turn with open(O_RDWR |
50 O_CLOEXEC) until successful.
51
52 waffle_display_disconnect()
53 Disconnect from the waffle_display and release it's memory. All
54 pointers to waffle objects that were created with the display
55 become invalid.
56
57 waffle_display_supports_context_api()
58 Check if the display is capable of creating a waffle_context(3)
59 with the given context_api. See waffle_config(3) for choices of
60 context_api and expectations for each platform.
61
62 waffle_display_get_native()
63 Get the display's underlying native objects. Use free(3) to
64 deallocate the returned pointer. See waffle_native(3) for the
65 definition of union waffle_native_display.
66
68 Functions whose return type is bool return true on success and false on
69 failure. Functions whose return type is a pointer return NULL on
70 failure. Use waffle_error_get_info(3) to get information about any
71 errors.
72
74 See waffle_error(3) for the complete list of waffle's error codes.
75
76 No errors are specific to any of the waffle_display functions.
77
79 Please report bugs or and feature requests to
80 https://github.com/waffle-gl/waffle/issues.
81
83 waffle(7)
84
86 Chad Versace <chad.versace@linux.intel.com>
87 Maintainer
88
90 Copyright © 2013 Intel
91
92 This manual page is licensed under the Creative Commons
93 Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). To
94 view a copy of this license, visit
95 http://creativecommons.org.license/by-sa/3.0/us.
96
97
98
99
100waffle 02/03/2019 WAFFLE_DISPLAY(3)