From 38391e1d289adc42c688cb2e804538b25aefcb7a Mon Sep 17 00:00:00 2001 From: Dany LE Date: Thu, 2 Apr 2026 17:38:05 +0200 Subject: [PATCH] initial commit --- .gitignore | 1 + Cargo.toml | 20 ++ README.md | 6 + protocols/virtual-keyboard-unstable-v1.xml | 113 ++++++++ ...oreign-toplevel-management-unstable-v1.xml | 270 ++++++++++++++++++ ...lr-output-power-management-unstable-v1.xml | 128 +++++++++ protocols/wlr-screencopy-unstable-v1.xml | 232 +++++++++++++++ src/lib.rs | 1 + src/main.rs | 74 +++++ src/protocols.rs | 79 +++++ 10 files changed, 924 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 README.md create mode 100644 protocols/virtual-keyboard-unstable-v1.xml create mode 100644 protocols/wlr-foreign-toplevel-management-unstable-v1.xml create mode 100644 protocols/wlr-output-power-management-unstable-v1.xml create mode 100644 protocols/wlr-screencopy-unstable-v1.xml create mode 100644 src/lib.rs create mode 100644 src/main.rs create mode 100644 src/protocols.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c953bab --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "diyagl-rs" +version = "0.1.0" +edition = "2021" +authors = ["Dany LE"] +description = "DIYAGL Is Yet Another GTK4 Layer‑shell" +license = "MIT" +readme = "README.md" +keywords = ["Gtk4", "Diya", "Layer‑shell"] +categories = ["daemon", "service"] + +[dependencies] +bitflags = "2.11.0" +gio = "0.21.5" +gtk4 = "0.10.3" +gtk4-layer-shell = "0.7.1" +wayland-backend = "0.3.15" +wayland-client = "0.31.14" +wayland-protocols = { version = "0.32.12", features = ["staging"] } +wayland-scanner = "0.31.10" diff --git a/README.md b/README.md new file mode 100644 index 0000000..0f3aa64 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# DIYAGL Is Yet Another GTK4 Layer‑shell + +Pronounceable ("dee‑yai‑gl" or "die‑ya‑gl") + + +cargo build --target x86_64-poky-linux-gnu \ No newline at end of file diff --git a/protocols/virtual-keyboard-unstable-v1.xml b/protocols/virtual-keyboard-unstable-v1.xml new file mode 100644 index 0000000..5095c91 --- /dev/null +++ b/protocols/virtual-keyboard-unstable-v1.xml @@ -0,0 +1,113 @@ + + + + Copyright © 2008-2011 Kristian Høgsberg + Copyright © 2010-2013 Intel Corporation + Copyright © 2012-2013 Collabora, Ltd. + Copyright © 2018 Purism SPC + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + + The virtual keyboard provides an application with requests which emulate + the behaviour of a physical keyboard. + + This interface can be used by clients on its own to provide raw input + events, or it can accompany the input method protocol. + + + + + Provide a file descriptor to the compositor which can be + memory-mapped to provide a keyboard mapping description. + + Format carries a value from the keymap_format enumeration. + + + + + + + + + + + + + A key was pressed or released. + The time argument is a timestamp with millisecond granularity, with an + undefined base. All requests regarding a single object must share the + same clock. + + Keymap must be set before issuing this request. + + State carries a value from the key_state enumeration. + + + + + + + + + Notifies the compositor that the modifier and/or group state has + changed, and it should update state. + + The client should use wl_keyboard.modifiers event to synchronize its + internal state with seat state. + + Keymap must be set before issuing this request. + + + + + + + + + + + + + + + A virtual keyboard manager allows an application to provide keyboard + input events as if they came from a physical keyboard. + + + + + + + + + Creates a new virtual keyboard associated to a seat. + + If the compositor enables a keyboard to perform arbitrary actions, it + should present an error when an untrusted client requests a new + keyboard. + + + + + + diff --git a/protocols/wlr-foreign-toplevel-management-unstable-v1.xml b/protocols/wlr-foreign-toplevel-management-unstable-v1.xml new file mode 100644 index 0000000..1081337 --- /dev/null +++ b/protocols/wlr-foreign-toplevel-management-unstable-v1.xml @@ -0,0 +1,270 @@ + + + + Copyright © 2018 Ilia Bozhinov + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + + + + + The purpose of this protocol is to enable the creation of taskbars + and docks by providing them with a list of opened applications and + letting them request certain actions on them, like maximizing, etc. + + After a client binds the zwlr_foreign_toplevel_manager_v1, each opened + toplevel window will be sent via the toplevel event + + + + + This event is emitted whenever a new toplevel window is created. It + is emitted for all toplevels, regardless of the app that has created + them. + + All initial details of the toplevel(title, app_id, states, etc.) will + be sent immediately after this event via the corresponding events in + zwlr_foreign_toplevel_handle_v1. + + + + + + + Indicates the client no longer wishes to receive events for new toplevels. + However the compositor may emit further toplevel_created events, until + the finished event is emitted. + + The client must not send any more requests after this one. + + + + + + This event indicates that the compositor is done sending events to the + zwlr_foreign_toplevel_manager_v1. The server will destroy the object + immediately after sending this request, so it will become invalid and + the client should free any resources associated with it. + + + + + + + A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel + window. Each app may have multiple opened toplevels. + + Each toplevel has a list of outputs it is visible on, conveyed to the + client with the output_enter and output_leave events. + + + + + This event is emitted whenever the title of the toplevel changes. + + + + + + + This event is emitted whenever the app-id of the toplevel changes. + + + + + + + This event is emitted whenever the toplevel becomes visible on + the given output. A toplevel may be visible on multiple outputs. + + + + + + + This event is emitted whenever the toplevel stops being visible on + the given output. It is guaranteed that an entered-output event + with the same output has been emitted before this event. + + + + + + + Requests that the toplevel be maximized. If the maximized state actually + changes, this will be indicated by the state event. + + + + + + Requests that the toplevel be unmaximized. If the maximized state actually + changes, this will be indicated by the state event. + + + + + + Requests that the toplevel be minimized. If the minimized state actually + changes, this will be indicated by the state event. + + + + + + Requests that the toplevel be unminimized. If the minimized state actually + changes, this will be indicated by the state event. + + + + + + Request that this toplevel be activated on the given seat. + There is no guarantee the toplevel will be actually activated. + + + + + + + The different states that a toplevel can have. These have the same meaning + as the states with the same names defined in xdg-toplevel + + + + + + + + + + + This event is emitted immediately after the zlw_foreign_toplevel_handle_v1 + is created and each time the toplevel state changes, either because of a + compositor action or because of a request in this protocol. + + + + + + + + This event is sent after all changes in the toplevel state have been + sent. + + This allows changes to the zwlr_foreign_toplevel_handle_v1 properties + to be seen as atomic, even if they happen via multiple events. + + + + + + Send a request to the toplevel to close itself. The compositor would + typically use a shell-specific method to carry out this request, for + example by sending the xdg_toplevel.close event. However, this gives + no guarantees the toplevel will actually be destroyed. If and when + this happens, the zwlr_foreign_toplevel_handle_v1.closed event will + be emitted. + + + + + + The rectangle of the surface specified in this request corresponds to + the place where the app using this protocol represents the given toplevel. + It can be used by the compositor as a hint for some operations, e.g + minimizing. The client is however not required to set this, in which + case the compositor is free to decide some default value. + + If the client specifies more than one rectangle, only the last one is + considered. + + The dimensions are given in surface-local coordinates. + Setting width=height=0 removes the already-set rectangle. + + + + + + + + + + + + + + + + This event means the toplevel has been destroyed. It is guaranteed there + won't be any more events for this zwlr_foreign_toplevel_handle_v1. The + toplevel itself becomes inert so any requests will be ignored except the + destroy request. + + + + + + Destroys the zwlr_foreign_toplevel_handle_v1 object. + + This request should be called either when the client does not want to + use the toplevel anymore or after the closed event to finalize the + destruction of the object. + + + + + + + + Requests that the toplevel be fullscreened on the given output. If the + fullscreen state and/or the outputs the toplevel is visible on actually + change, this will be indicated by the state and output_enter/leave + events. + + The output parameter is only a hint to the compositor. Also, if output + is NULL, the compositor should decide which output the toplevel will be + fullscreened on, if at all. + + + + + + + Requests that the toplevel be unfullscreened. If the fullscreen state + actually changes, this will be indicated by the state event. + + + + + + + + This event is emitted whenever the parent of the toplevel changes. + + No event is emitted when the parent handle is destroyed by the client. + + + + + diff --git a/protocols/wlr-output-power-management-unstable-v1.xml b/protocols/wlr-output-power-management-unstable-v1.xml new file mode 100644 index 0000000..20dbb77 --- /dev/null +++ b/protocols/wlr-output-power-management-unstable-v1.xml @@ -0,0 +1,128 @@ + + + + Copyright © 2019 Purism SPC + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol allows clients to control power management modes + of outputs that are currently part of the compositor space. The + intent is to allow special clients like desktop shells to power + down outputs when the system is idle. + + To modify outputs not currently part of the compositor space see + wlr-output-management. + + Warning! The protocol described in this file is experimental and + backward incompatible changes may be made. Backward compatible changes + may be added together with the corresponding interface version bump. + Backward incompatible changes are done by bumping the version number in + the protocol and interface names and resetting the interface version. + Once the protocol is to be declared stable, the 'z' prefix and the + version number in the protocol and interface names are removed and the + interface version number is reset. + + + + + This interface is a manager that allows creating per-output power + management mode controls. + + + + + Create an output power management mode control that can be used to + adjust the power management mode for a given output. + + + + + + + + All objects created by the manager will still remain valid, until their + appropriate destroy request has been called. + + + + + + + This object offers requests to set the power management mode of + an output. + + + + + + + + + + + + + + Set an output's power save mode to the given mode. The mode change + is effective immediately. If the output does not support the given + mode a failed event is sent. + + + + + + + Report the power management mode change of an output. + + The mode event is sent after an output changed its power + management mode. The reason can be a client using set_mode or the + compositor deciding to change an output's mode. + This event is also sent immediately when the object is created + so the client is informed about the current power management mode. + + + + + + + This event indicates that the output power management mode control + is no longer valid. This can happen for a number of reasons, + including: + - The output doesn't support power management + - Another client already has exclusive power management mode control + for this output + - The output disappeared + + Upon receiving this event, the client should destroy this object. + + + + + + Destroys the output power management mode control object. + + + + diff --git a/protocols/wlr-screencopy-unstable-v1.xml b/protocols/wlr-screencopy-unstable-v1.xml new file mode 100644 index 0000000..50b1b7d --- /dev/null +++ b/protocols/wlr-screencopy-unstable-v1.xml @@ -0,0 +1,232 @@ + + + + Copyright © 2018 Simon Ser + Copyright © 2019 Andri Yngvason + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. + + + + This protocol allows clients to ask the compositor to copy part of the + screen content to a client buffer. + + Warning! The protocol described in this file is experimental and + backward incompatible changes may be made. Backward compatible changes + may be added together with the corresponding interface version bump. + Backward incompatible changes are done by bumping the version number in + the protocol and interface names and resetting the interface version. + Once the protocol is to be declared stable, the 'z' prefix and the + version number in the protocol and interface names are removed and the + interface version number is reset. + + + + + This object is a manager which offers requests to start capturing from a + source. + + + + + Capture the next frame of an entire output. + + + + + + + + + Capture the next frame of an output's region. + + The region is given in output logical coordinates, see + xdg_output.logical_size. The region will be clipped to the output's + extents. + + + + + + + + + + + + + All objects created by the manager will still remain valid, until their + appropriate destroy request has been called. + + + + + + + This object represents a single frame. + + When created, a series of buffer events will be sent, each representing a + supported buffer type. The "buffer_done" event is sent afterwards to + indicate that all supported buffer types have been enumerated. The client + will then be able to send a "copy" request. If the capture is successful, + the compositor will send a "flags" followed by a "ready" event. + + For objects version 2 or lower, wl_shm buffers are always supported, ie. + the "buffer" event is guaranteed to be sent. + + If the capture failed, the "failed" event is sent. This can happen anytime + before the "ready" event. + + Once either a "ready" or a "failed" event is received, the client should + destroy the frame. + + + + + Provides information about wl_shm buffer parameters that need to be + used for this frame. This event is sent once after the frame is created + if wl_shm buffers are supported. + + + + + + + + + + Copy the frame to the supplied buffer. The buffer must have a the + correct size, see zwlr_screencopy_frame_v1.buffer and + zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a + supported format. + + If the frame is successfully copied, a "flags" and a "ready" events are + sent. Otherwise, a "failed" event is sent. + + + + + + + + + + + + + + + + Provides flags about the frame. This event is sent once before the + "ready" event. + + + + + + + Called as soon as the frame is copied, indicating it is available + for reading. This event includes the time at which presentation happened + at. + + The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, + each component being an unsigned 32-bit value. Whole seconds are in + tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, + and the additional fractional part in tv_nsec as nanoseconds. Hence, + for valid timestamps tv_nsec must be in [0, 999999999]. The seconds part + may have an arbitrary offset at start. + + After receiving this event, the client should destroy the object. + + + + + + + + + This event indicates that the attempted frame copy has failed. + + After receiving this event, the client should destroy the object. + + + + + + Destroys the frame. This request can be sent at any time by the client. + + + + + + + Same as copy, except it waits until there is damage to copy. + + + + + + + This event is sent right before the ready event when copy_with_damage is + requested. It may be generated multiple times for each copy_with_damage + request. + + The arguments describe a box around an area that has changed since the + last copy request that was derived from the current screencopy manager + instance. + + The union of all regions received between the call to copy_with_damage + and a ready event is the total damage since the prior ready event. + + + + + + + + + + + Provides information about linux-dmabuf buffer parameters that need to + be used for this frame. This event is sent once after the frame is + created if linux-dmabuf buffers are supported. + + + + + + + + + This event is sent once after all buffer events have been sent. + + The client should proceed to create a buffer of one of the supported + types, and send a "copy" request. + + + + diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..534c207 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1 @@ +pub mod protocols; \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..6b94beb --- /dev/null +++ b/src/main.rs @@ -0,0 +1,74 @@ +// use diyagl_rs::protocols; +use wayland_client::{protocol::wl_registry, Connection, Dispatch, QueueHandle}; +// This struct represents the state of our app. This simple app does not +// need any state, but this type still supports the `Dispatch` implementations. +struct AppData; + +// Implement `Dispatch for our state. This provides the logic +// to be able to process events for the wl_registry interface. +// +// The second type parameter is the user-data of our implementation. It is a +// mechanism that allows you to associate a value to each particular Wayland +// object, and allow different dispatching logic depending on the type of the +// associated value. +// +// In this example, we just use () as we don't have any value to associate. See +// the `Dispatch` documentation for more details about this. +impl Dispatch for AppData { + fn event( + _state: &mut Self, + _: &wl_registry::WlRegistry, + event: wl_registry::Event, + _: &(), + _: &Connection, + _: &QueueHandle, + ) { + // When receiving events from the wl_registry, we are only interested in the + // `global` event, which signals a new available global. + // When receiving this event, we just print its characteristics in this example. + if let wl_registry::Event::Global { name, interface, version } = event { + println!("[{}] {} (v{})", name, interface, version); + } + } +} + +// The main function of our program +fn main() { + // Create a Wayland connection by connecting to the server through the + // environment-provided configuration. + let conn = Connection::connect_to_env().unwrap(); + + // Retrieve the WlDisplay Wayland object from the connection. This object is + // the starting point of any Wayland program, from which all other objects will + // be created. + let display = conn.display(); + + // Create an event queue for our event processing + let mut event_queue = conn.new_event_queue(); + // And get its handle to associate new objects to it + let qh = event_queue.handle(); + + // Create a wl_registry object by sending the wl_display.get_registry request. + // This method takes two arguments: a handle to the queue that the newly created + // wl_registry will be assigned to, and the user-data that should be associated + // with this registry (here it is () as we don't need user-data). + let _registry = display.get_registry(&qh, ()); + + // At this point everything is ready, and we just need to wait to receive the events + // from the wl_registry. Our callback will print the advertised globals. + println!("Advertised globals:"); + + // To actually receive the events, we invoke the `roundtrip` method. This method + // is special and you will generally only invoke it during the setup of your program: + // it will block until the server has received and processed all the messages you've + // sent up to now. + // + // In our case, that means it'll block until the server has received our + // wl_display.get_registry request, and as a reaction has sent us a batch of + // wl_registry.global events. + // + // `roundtrip` will then empty the internal buffer of the queue it has been invoked + // on, and thus invoke our `Dispatch` implementation that prints the list of advertised + // globals. + event_queue.roundtrip(&mut AppData).unwrap(); +} \ No newline at end of file diff --git a/src/protocols.rs b/src/protocols.rs new file mode 100644 index 0000000..936c3ea --- /dev/null +++ b/src/protocols.rs @@ -0,0 +1,79 @@ +pub mod wl_virtual_keyboard { + use wayland_client; + // import objects from the core protocol if needed + use wayland_client::protocol::*; + + // This module hosts a low-level representation of the protocol objects + // you will not need to interact with it yourself, but the code generated + // by the generate_client_code! macro will use it + pub mod __interfaces { + // import the interfaces from the core protocol if needed + use wayland_client::protocol::__interfaces::*; + wayland_scanner::generate_interfaces!("./protocols/virtual-keyboard-unstable-v1.xml"); + } + use self::__interfaces::*; + + // This macro generates the actual types that represent the wayland objects of + // your custom protocol + wayland_scanner::generate_client_code!("./protocols/virtual-keyboard-unstable-v1.xml"); +} + +pub mod wl_foreign_toplevel_management { + use wayland_client; + // import objects from the core protocol if needed + use wayland_client::protocol::*; + + // This module hosts a low-level representation of the protocol objects + // you will not need to interact with it yourself, but the code generated + // by the generate_client_code! macro will use it + pub mod __interfaces { + // import the interfaces from the core protocol if needed + use wayland_client::protocol::__interfaces::*; + wayland_scanner::generate_interfaces!("./protocols/wlr-foreign-toplevel-management-unstable-v1.xml"); + } + use self::__interfaces::*; + + // This macro generates the actual types that represent the wayland objects of + // your custom protocol + wayland_scanner::generate_client_code!("./protocols/wlr-foreign-toplevel-management-unstable-v1.xml"); +} + +pub mod wl_output_power_management { + use wayland_client; + // import objects from the core protocol if needed + use wayland_client::protocol::*; + + // This module hosts a low-level representation of the protocol objects + // you will not need to interact with it yourself, but the code generated + // by the generate_client_code! macro will use it + pub mod __interfaces { + // import the interfaces from the core protocol if needed + use wayland_client::protocol::__interfaces::*; + wayland_scanner::generate_interfaces!("./protocols/wlr-output-power-management-unstable-v1.xml"); + } + use self::__interfaces::*; + + // This macro generates the actual types that represent the wayland objects of + // your custom protocol + wayland_scanner::generate_client_code!("./protocols/wlr-output-power-management-unstable-v1.xml"); +} + +pub mod wl_screencopy { + use wayland_client; + // import objects from the core protocol if needed + use wayland_client::protocol::*; + + // This module hosts a low-level representation of the protocol objects + // you will not need to interact with it yourself, but the code generated + // by the generate_client_code! macro will use it + pub mod __interfaces { + // import the interfaces from the core protocol if needed + use wayland_client::protocol::__interfaces::*; + wayland_scanner::generate_interfaces!("./protocols/wlr-screencopy-unstable-v1.xml"); + } + use self::__interfaces::*; + + // This macro generates the actual types that represent the wayland objects of + // your custom protocol + wayland_scanner::generate_client_code!("./protocols/wlr-screencopy-unstable-v1.xml"); +} \ No newline at end of file