From ffec7db766fb50a32a92d5750e9de6f3711d4eba Mon Sep 17 00:00:00 2001 From: Squibid Date: Tue, 25 Nov 2025 23:52:31 -0500 Subject: [PATCH] add protocol file --- build.zig | 2 + protocol/mez-remote-lua-unstable-v1.xml | 89 +++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 protocol/mez-remote-lua-unstable-v1.xml diff --git a/build.zig b/build.zig index a48cffe..a6e8383 100644 --- a/build.zig +++ b/build.zig @@ -26,7 +26,9 @@ pub fn build(b: *std.Build) void { scanner.addSystemProtocol("stable/xdg-shell/xdg-shell.xml"); scanner.addSystemProtocol("stable/tablet/tablet-v2.xml"); scanner.addSystemProtocol("unstable/xdg-decoration/xdg-decoration-unstable-v1.xml"); + scanner.addCustomProtocol(b.path("protocol/mez-remote-lua-unstable-v1.xml")); + scanner.generate("zmez_remote_lua_manager_v1", 1); scanner.generate("wl_compositor", 6); scanner.generate("wl_subcompositor", 1); scanner.generate("wl_shm", 1); diff --git a/protocol/mez-remote-lua-unstable-v1.xml b/protocol/mez-remote-lua-unstable-v1.xml new file mode 100644 index 0000000..44605af --- /dev/null +++ b/protocol/mez-remote-lua-unstable-v1.xml @@ -0,0 +1,89 @@ + + + + Copyright © 2025 mezzaluna team + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, 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. + + + This protocol allows clients to receive lua errors from mez and execute lua + on a running mez server with the lua mez api. + + 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. + + + + + A global factory for zmez_remote_lua_v1 objects. + + + + + This request indicates that the client will not use the + mez_remote_lua_manager object any more. Objects that have been created + through this instance are not affected. + + + + + + This creates a new mez_remote_lua_v1 object. + All lua related communication is done through this interface. + + + + + + + + This interface allows clients to receive lua logs from the compositor. + Additionally it allow for the client to send lua code for the compositor + to execute. + + + + + This request indicates that the client will not use the + mez_remote_lua_v1 object any more. + + + + + + The compositor sends this event to inform the client that it has a new + log entry for the client. + + The text contains the lua log information the server generates when + executing lua code. The server does not hold logs from before the client + connect, and therefore you will only recieve log information from the + point that you start listening for them and on. + + + + + + + This request sends stringified lua code for the server to run. + The output, if any, will be sent through the new_log_entry event. + + + + +