#include "../../../libdecor/src/libdecor.h"
+#include "../../../libdecor/src/libdecor-plugin.h"
\endcode
as necessary.
@@ -201,11 +203,11 @@ stored as member \c wl_compositor of the \c Fl_Wayland_Screen_Driver object.
and stores this information in static member variable \c Fl_Wayland_Screen_Driver::compositor.
Finally, function \c wl_display_get_fd() is called to obtain the file descriptor of the Wayland socket
-and a call to Fl::add_fd() makes FLTK listen to this descriptor and associates function
-\c wayland_socket_callback()
-from file \c Fl_Wayland_Screen_Driver.cxx with it. This function calls \c wl_display_dispatch() which
-asks the Wayland client library to process requests arrived in the socket. The \c wl_display_dispatch()
-call is repeated as long as data are available for reading.
+and a call to Fl::add_fd() makes FLTK listen to this descriptor in \c FL_READ mode and associates
+function \c wayland_socket_callback() from file \c Fl_Wayland_Screen_Driver.cxx with it.
+This function calls \c wl_display_dispatch() which reads and interprets data available from the
+file descriptor, and calls corresponding listeners.
+The \c wl_display_dispatch() call is repeated as long as data are available for reading.
The event loop is run by function \c Fl_Unix_System_Driver::wait() which is used by both
the Wayland and X11 FLTK backends. Among various tasks, this function waits for data arriving
@@ -314,7 +316,7 @@ window has just been created or resized. In that case, FLTK calls member functio
- a Wayland buffer;
- a Cairo image surface.
-Each of these two objects bundles a byte array of the same size and the same memory layout
+Each of these two objects encapsulates a byte array of the same size and the same memory layout
destined to contain the Fl_Window's graphics. The Cairo surface object is where FLTK draws.
The Wayland buffer is what Wayland maps on the display. FLTK copies the Cairo surface's byte array
to the Wayland buffer's byte array before beginning the mapping operation.
@@ -385,7 +387,7 @@ That's done by member function \c Fl_Wayland_Graphics_Driver::create_shm_buffer(
which follows this 3-step procedure to create a "buffer factory" for FLTK and construct
Wayland buffers from it:
- Libdecor function os_create_anonymous_file(off_t size) creates an adequate file and mmap's
-it. FLTK initially sets this file size to \c pool_size = 10 MB. This file will be enlarged when and
+it. FLTK initially sets this file size to \c pool_size = 10 MB. This size will be increased when and
if necessary.
FLTK stores in variable \c pool_memory the address of the beginning of the mmap'ed memory structure.
- Wayland function \c wl_shm_create_pool() has this mmap'ed memory shared with the
@@ -547,8 +549,10 @@ struct cursor_image {
int offset;
};
\endcode
-This definition has been copied to the FLTK source code from file \c wayland-cursor.c of the
-Wayland project source code because it's not accessible via Wayland header files.
+This definition has been copied to the FLTK source code from file
+
+wayland-cursor.c of the Wayland project source code
+because it's not accessible via Wayland header files.
It shows that a pointer to a \c cursor_image object can also be viewed as a pointer to the
embedded struct wl_cursor_image object, this one being part of the public Wayland API.
It also shows that a struct cursor_image object has an associated
@@ -583,11 +587,11 @@ gets associated to a standard cursor or to a new custom cursor.
\section wayland-text Text input
-The "Mouse handling" topic above mentionned function \c seat_capabilities() that Wayland calls when
+The "Mouse handling" section above mentionned function \c seat_capabilities() that Wayland calls when
the app discovers its "seat". Presence of flag \c WL_SEAT_CAPABILITY_KEYBOARD in argument
-\c capabilities of this function indicates that a keyboard is available. This availability is
-stored in member \c wl_keyboard of the \ref seat object. Then, a call to
-\c wl_keyboard_add_listener() installs a 6-member listener of type
+\c capabilities of this function indicates that a keyboard is available. In that case, a call to
+\c wl_seat_get_keyboard() returns a pointer stored in member \c wl_keyboard of the \ref seat object,
+and a call to \c wl_keyboard_add_listener() installs a 6-member listener of type
struct wl_keyboard_listener. These 6 FLTK-defined, callback functions are used as follows.
Function \c wl_keyboard_keymap() runs once and allows initialization of access to this keyboard.
@@ -619,9 +623,9 @@ the wl_keyboard object which is at version 3 in all tested Wayland comp
When the connected Wayland compositor supports text input methods, function
\c registry_handle_global() gets called with its \c interface argument equal to
-\c zwp_text_input_manager_v3_interface.name. The following call to \c wl_registry_bind() returns an
-object of type struct zwp_text_input_manager_v3 * that is stored as member \c text_input_base
-of the \c Fl_Wayland_Screen_Driver object.
+\c zwp_text_input_manager_v3_interface.name. The following call to \c wl_registry_bind() returns a
+pointer to type struct zwp_text_input_manager_v3 that is stored as member
+\c text_input_base of the \c Fl_Wayland_Screen_Driver object.
Later, when function \c seat_capabilities() runs, \c text_input_base is found not NULL, which triggers
a call to function \c zwp_text_input_manager_v3_get_text_input() returning a value of type
@@ -782,7 +786,8 @@ description of function wl_display_prepare_read_queue().
\section wayland-type FLTK-defined, Wayland-specific types
\anchor wld_window
-- struct wld_window is defined in \c Fl_Wayland_Window_Driver.H. One such record is created
+struct wld_window
+Defined in \c Fl_Wayland_Window_Driver.H. One such record is created
for each shown()'n Fl_Window by \c Fl_Wayland_Window_Driver::makeWindow().
Function \c fl_wl_xid(Fl_Window*) returns a pointer to the struct wld_window of its argument.
@@ -810,7 +815,8 @@ struct wld_window {
\anchor fl_wld_buffer
-- struct fl_wld_buffer is defined in \c Fl_Wayland_Graphics_Driver.H. One such record is
+struct fl_wld_buffer
+Defined in \c Fl_Wayland_Graphics_Driver.H. One such record is
created for each shown()'n or resized Fl_Window by \c Fl_Wayland_Graphics_Driver::create_shm_buffer().
struct fl_wld_buffer {
@@ -827,7 +833,8 @@ struct fl_wld_buffer {
\anchor output
-- struct output is defined inside class \c Fl_Wayland_Screen_Driver. One such record is
+struct output
+Defined inside class \c Fl_Wayland_Screen_Driver. One such record is
created for each display of the system by function \c registry_handle_global() when it receives a
\c "wl_output" interface. These records are kept in a linked list of them all, and
an identifier of this linked list is stored in member \c outputs of the unique
@@ -850,12 +857,12 @@ struct output { // one record for each display
};
-
\anchor seat
-- struct seat is defined in file \c Fl_Wayland_Screen_Driver.H. One such record is
-created for each seat (e.g., a collection of displays, a keyboard and a mouse) of the system by
+struct seat
+Defined in file \c Fl_Wayland_Screen_Driver.H. One such record is created by
function \c registry_handle_global() when it receives a \c "wl_seat" or
-\c wl_data_device_manager_interface.name interface.
+\c wl_data_device_manager_interface.name interface. A pointer to this record is stored in member
+\c seat of the client's unique \c Fl_Wayland_Screen_Driver object.
struct seat {
struct wl_seat *wl_seat;
@@ -891,10 +898,10 @@ struct seat {
|
- The Wayland Protocol
+ The Wayland book
|
- Extensive introduction to Wayland programming written by the Wayland author,
- unfortunately unachieved.
+ | Extensive introduction to Wayland programming written by the author of the sway
+ compositor, unfortunately unachieved.
|
|
@@ -902,7 +909,7 @@ struct seat {
Wayland Explorer
|
- Documentation of all Wayland protocols, both stable and unstable. A language-independent syntax is used which makes function names usable in the C language not always obvious. Also some useful functions seem undocumented here for an unclear reason.
+ | Documentation of all Wayland protocols, both stable and unstable. A language-independent syntax is used which makes function names usable from C or C++ not always obvious. Some useful functions seem undocumented here for an unclear reason.
|
--
cgit v1.2.3
|