1
0
Fork 0
forked from wry/wry

config: expose runtime protocol

This commit is contained in:
kossLAN 2026-05-29 18:36:27 -04:00
parent bcc85c8b1b
commit e3f122e903
No known key found for this signature in database
16 changed files with 179 additions and 157 deletions

View file

@ -16,9 +16,9 @@ use {
},
},
jay_config::{
_private::{
ConfigEntry, VERSION,
messages::{InitMessage, ServerFeature, ServerMessage, V1InitMessage},
protocol::{
ClientMessage, ConfigEntry, InitMessage, ServerFeature, ServerHandler, ServerMessage,
Unref, V1InitMessage, VERSION, handle_client_message, init_client, unref_client,
},
input::{InputDevice, Seat, SwitchEvent},
keyboard::{mods::Modifiers, syms::KeySym},
@ -168,15 +168,15 @@ impl Drop for ConfigProxy {
unsafe fn default_client_init(
srv_data: *const u8,
srv_unref: jay_config::_private::Unref,
srv_handler: jay_config::_private::ServerHandler,
srv_unref: Unref,
srv_handler: ServerHandler,
msg: InitMessage,
) -> *const u8 {
fn configure() {
jay_toml_config::configure();
}
unsafe {
jay_config::_private::client::init(srv_data, srv_unref, srv_handler, msg, configure)
init_client(srv_data, srv_unref, srv_handler, msg, configure)
}
}
@ -241,8 +241,8 @@ impl ConfigProxy {
let entry = ConfigEntry {
version: VERSION,
init: default_client_init,
unref: jay_config::_private::client::unref,
handle_msg: jay_config::_private::client::handle_msg,
unref: unref_client,
handle_msg: handle_client_message,
};
Self::new(&entry, state)
}
@ -260,7 +260,7 @@ unsafe fn unref(data: *const u8) {
}
}
unsafe fn handle_msg(data: *const u8, msg: &jay_config::_private::messages::ClientMessage<'_>) {
unsafe fn handle_msg(data: *const u8, msg: &ClientMessage<'_>) {
unsafe {
let server = (data as *const ConfigProxyHandler).deref();
if server.dropped.get() {