Skip to content

Commit

Permalink
Update all protocols to their latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed Nov 21, 2024
1 parent 449775a commit 19a3eac
Show file tree
Hide file tree
Showing 9 changed files with 363 additions and 24 deletions.
2 changes: 1 addition & 1 deletion protocols/weston
Submodule weston updated from 609819 to 61f224
2 changes: 1 addition & 1 deletion protocols/wlr-protocols
Submodule wlr-protocols updated from 2b8d43 to ffb89a
78 changes: 74 additions & 4 deletions src/client/protocol/cosmic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ pub mod cosmic_output_management_unstable_v1 {
#[doc = "Trait to implement the zcosmic_output_manager_v1 interface. See the module level documentation for more info"]
pub trait ZcosmicOutputManagerV1 {
const INTERFACE: &'static str = "zcosmic_output_manager_v1";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -363,10 +363,54 @@ pub mod cosmic_output_management_unstable_v1 {
#[doc = "No guarantees are made regarding the order in which properties are sent."]
pub mod zcosmic_output_head_v1 {
use futures_util::SinkExt;
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
pub enum AdaptiveSyncAvailability {
#[doc = "adaptive sync is not supported"]
Unsupported = 0u32,
#[doc = "automatic adaptive_sync is unavailable"]
RequiresModeset = 1u32,
#[doc = "adaptive sync is supported in all states"]
Supported = 2u32,
}
impl TryFrom<u32> for AdaptiveSyncAvailability {
type Error = crate::wire::DecodeError;
fn try_from(v: u32) -> Result<Self, Self::Error> {
match v {
0u32 => Ok(Self::Unsupported),
1u32 => Ok(Self::RequiresModeset),
2u32 => Ok(Self::Supported),
_ => Err(crate::wire::DecodeError::MalformedPayload),
}
}
}
#[repr(u32)]
#[non_exhaustive]
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
pub enum AdaptiveSyncStateExt {
#[doc = "adaptive sync is disabled"]
Disabled = 0u32,
#[doc = "adaptive sync will be actived automatically"]
Automatic = 1u32,
#[doc = "adaptive sync is forced to be always active"]
Always = 2u32,
}
impl TryFrom<u32> for AdaptiveSyncStateExt {
type Error = crate::wire::DecodeError;
fn try_from(v: u32) -> Result<Self, Self::Error> {
match v {
0u32 => Ok(Self::Disabled),
1u32 => Ok(Self::Automatic),
2u32 => Ok(Self::Always),
_ => Err(crate::wire::DecodeError::MalformedPayload),
}
}
}
#[doc = "Trait to implement the zcosmic_output_head_v1 interface. See the module level documentation for more info"]
pub trait ZcosmicOutputHeadV1 {
const INTERFACE: &'static str = "zcosmic_output_head_v1";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -484,13 +528,14 @@ pub mod cosmic_output_management_unstable_v1 {
#[doc = ""]
#[doc = "Adds additional/alternative parameters to the original zwlr_output_configuration_head_v1."]
#[doc = ""]
#[doc = "Once the original `zwlr_output_configuration_head_v1` is destroyed this object will also be destroyed."]
#[doc = "Once the original `zwlr_output_configuration_head_v1` is destroyed this object will"]
#[doc = "become inert and all requests except `release` will be ignored."]
pub mod zcosmic_output_configuration_head_v1 {
use futures_util::SinkExt;
#[doc = "Trait to implement the zcosmic_output_configuration_head_v1 interface. See the module level documentation for more info"]
pub trait ZcosmicOutputConfigurationHeadV1 {
const INTERFACE: &'static str = "zcosmic_output_configuration_head_v1";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -543,6 +588,31 @@ pub mod cosmic_output_management_unstable_v1 {
.await
.map_err(crate::client::Error::IoError)
}
#[doc = "This request requests a new adaptive sync state."]
#[doc = ""]
#[doc = "This request is meant to be used in place of `zwlr_output_configuration_head_v1::set_adaptive_sync`."]
#[doc = "Using `set_adaptive_sync` and `set_adaptive_sync_ext` at once will thus raise an `already_set` error on the"]
#[doc = "original `zwlr_output_configuration_head_v1`."]
#[doc = ""]
#[doc = "Any request conflicting with `set_adaptive_sync` will also conflict with `set_adaptive_sync_ext`."]
async fn set_adaptive_sync_ext(
&self,
socket: &mut crate::wire::Socket,
object_id: crate::wire::ObjectId,
state : super :: super :: super :: cosmic :: cosmic_output_management_unstable_v1 :: zcosmic_output_head_v1 :: AdaptiveSyncStateExt,
) -> crate::client::Result<()> {
tracing::debug!(
"-> zcosmic_output_configuration_head_v1#{}.set_adaptive_sync_ext()",
object_id
);
let (payload, fds) = crate::wire::PayloadBuilder::new()
.put_uint(state as u32)
.build();
socket
.send(crate::wire::Message::new(object_id, 2u16, payload, fds))
.await
.map_err(crate::client::Error::IoError)
}
}
}
}
Expand Down
73 changes: 67 additions & 6 deletions src/client/protocol/plasma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,11 @@ pub mod dpms {
#[doc = "Signaling state (see https://en.wikipedia.org/wiki/VESA_Display_Power_Management_Signaling )."]
#[doc = "In addition it allows to request a state change. A compositor is not obliged to honor it"]
#[doc = "and will normally automatically switch back to on state."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod org_kde_kwin_dpms_manager {
use futures_util::SinkExt;
#[doc = "Trait to implement the org_kde_kwin_dpms_manager interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -3400,6 +3405,11 @@ pub mod fake_input {
#[doc = "A compositor should not trust the input received from this interface."]
#[doc = "Clients should not expect that the compositor honors the requests from this"]
#[doc = "interface."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod org_kde_kwin_fake_input {
use futures_util::SinkExt;
#[doc = "Trait to implement the org_kde_kwin_fake_input interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -3625,6 +3635,11 @@ pub mod kde_lockscreen_overlay_v1 {
#[doc = "Allows a client to request a surface to be visible when the system is locked."]
#[doc = ""]
#[doc = "This is meant to be used for specific high urgency cases like phone calls or alarms."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod kde_lockscreen_overlay_v1 {
use futures_util::SinkExt;
#[repr(u32)]
Expand Down Expand Up @@ -3704,6 +3719,11 @@ pub mod kde_output_device_v2 {
#[doc = "This object is published as global during start up for every available"]
#[doc = "display devices, or when one later becomes available, for example by"]
#[doc = "being hotplugged via a physical connector."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod kde_output_device_v2 {
#[doc = "This enumeration describes how the physical pixels on an output are"]
#[doc = "laid out."]
Expand Down Expand Up @@ -3771,7 +3791,7 @@ pub mod kde_output_device_v2 {
}
}
}
bitflags::bitflags! { # [doc = "Describes what capabilities this device has."] # [derive (Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Copy)] pub struct Capability : u32 { # [doc = "if this output_device can use overscan"] const Overscan = 1u32 ; # [doc = "if this outputdevice supports variable refresh rate"] const Vrr = 2u32 ; # [doc = "if setting the rgb range is possible"] const RgbRange = 4u32 ; # [doc = "if this outputdevice supports high dynamic range"] const HighDynamicRange = 8u32 ; # [doc = "if this outputdevice supports a wide color gamut"] const WideColorGamut = 16u32 ; # [doc = "if this outputdevice supports autorotation"] const AutoRotate = 32u32 ; # [doc = "if this outputdevice supports icc profiles"] const IccProfile = 64u32 ; } }
bitflags::bitflags! { # [doc = "Describes what capabilities this device has."] # [derive (Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Copy)] pub struct Capability : u32 { # [doc = "if this output_device can use overscan"] const Overscan = 1u32 ; # [doc = "if this outputdevice supports variable refresh rate"] const Vrr = 2u32 ; # [doc = "if setting the rgb range is possible"] const RgbRange = 4u32 ; # [doc = "if this outputdevice supports high dynamic range"] const HighDynamicRange = 8u32 ; # [doc = "if this outputdevice supports a wide color gamut"] const WideColorGamut = 16u32 ; # [doc = "if this outputdevice supports autorotation"] const AutoRotate = 32u32 ; # [doc = "if this outputdevice supports icc profiles"] const IccProfile = 64u32 ; # [doc = "if this outputdevice supports the brightness setting"] const Brightness = 128u32 ; } }
impl TryFrom<u32> for Capability {
type Error = crate::wire::DecodeError;
fn try_from(v: u32) -> Result<Self, Self::Error> {
Expand Down Expand Up @@ -3859,7 +3879,7 @@ pub mod kde_output_device_v2 {
#[doc = "Trait to implement the kde_output_device_v2 interface. See the module level documentation for more info"]
pub trait KdeOutputDeviceV2 {
const INTERFACE: &'static str = "kde_output_device_v2";
const VERSION: u32 = 8u32;
const VERSION: u32 = 9u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -3933,6 +3953,10 @@ pub mod kde_output_management_v2 {
#[doc = ""]
#[doc = "Through this design the interface enables atomic output configuration changes if"]
#[doc = "internally supported by the server."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment implementation"]
#[doc = "detail. Regular clients must not use this protocol. Backward incompatible"]
#[doc = "changes may be added without bumping the major version of the extension."]
pub mod kde_output_management_v2 {
use futures_util::SinkExt;
#[doc = "Trait to implement the kde_output_management_v2 interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -4494,7 +4518,9 @@ pub mod kde_output_management_v2 {
#[doc = "brightness values, like sdr_brightness and brightness_metadata."]
#[doc = "0 is the minimum brightness (not completely dark) and 10000 is"]
#[doc = "the maximum brightness."]
#[doc = "This is currently only supported / meaningful while HDR is active."]
#[doc = "This is supported while HDR is active in versions 8 and below,"]
#[doc = "or when the device supports the brightness_control capability in"]
#[doc = "versions 9 and above."]
async fn set_brightness(
&self,
socket: &mut crate::wire::Socket,
Expand All @@ -4521,6 +4547,11 @@ pub mod kde_output_management_v2 {
pub mod kde_output_order_v1 {
#[doc = "Announce the order in which desktop environment components should be placed on outputs."]
#[doc = "The compositor will send the list of outputs when the global is bound and whenever there is a change."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod kde_output_order_v1 {
use futures_util::SinkExt;
#[doc = "Trait to implement the kde_output_order_v1 interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -4551,7 +4582,13 @@ pub mod kde_output_order_v1 {
}
}
pub mod kde_primary_output_v1 {
#[doc = "Protocol for telling which is the primary display among the selection of enabled outputs."]
#[doc = "Protocol for telling which is the primary display among the selection"]
#[doc = "of enabled outputs."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod kde_primary_output_v1 {
use futures_util::SinkExt;
#[doc = "Trait to implement the kde_primary_output_v1 interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -4589,6 +4626,11 @@ pub mod kde_screen_edge_v1 {
#[doc = "policies. As an example, the compositor may consider the screen edge to be"]
#[doc = "triggered if the pointer hits its associated screen border. Other ways may"]
#[doc = "include using touchscreen or touchpad gestures."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod kde_screen_edge_manager_v1 {
use futures_util::SinkExt;
#[repr(u32)]
Expand Down Expand Up @@ -4789,6 +4831,11 @@ pub mod org_kde_plasma_virtual_desktop {
}
}
#[doc = "Given the id of a particular virtual desktop, get the corresponding org_kde_plasma_virtual_desktop which represents only the desktop with that id."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
async fn get_virtual_desktop(
&self,
socket: &mut crate::wire::Socket,
Expand Down Expand Up @@ -4881,6 +4928,11 @@ pub mod org_kde_plasma_virtual_desktop {
pub mod plasma_shell {
#[doc = "This interface is used by KF5 powered Wayland shells to communicate with"]
#[doc = "the compositor and can only be bound one time."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod org_kde_plasma_shell {
use futures_util::SinkExt;
#[doc = "Trait to implement the org_kde_plasma_shell interface. See the module level documentation for more info"]
Expand Down Expand Up @@ -5315,6 +5367,11 @@ pub mod plasma_window_management {
#[doc = "use it to manage the window."]
#[doc = ""]
#[doc = "Only one client can bind this interface at a time."]
#[doc = ""]
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod org_kde_plasma_window_management {
use futures_util::SinkExt;
#[repr(u32)]
Expand Down Expand Up @@ -5388,7 +5445,7 @@ pub mod plasma_window_management {
#[doc = "Trait to implement the org_kde_plasma_window_management interface. See the module level documentation for more info"]
pub trait OrgKdePlasmaWindowManagement {
const INTERFACE: &'static str = "org_kde_plasma_window_management";
const VERSION: u32 = 17u32;
const VERSION: u32 = 18u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -5483,7 +5540,7 @@ pub mod plasma_window_management {
#[doc = "Trait to implement the org_kde_plasma_window interface. See the module level documentation for more info"]
pub trait OrgKdePlasmaWindow {
const INTERFACE: &'static str = "org_kde_plasma_window";
const VERSION: u32 = 17u32;
const VERSION: u32 = 18u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -5848,6 +5905,10 @@ pub mod plasma_window_management {
}
}
pub mod zkde_screencast_unstable_v1 {
#[doc = "Warning! The protocol described in this file is a desktop environment"]
#[doc = "implementation detail. Regular clients must not use this protocol."]
#[doc = "Backward incompatible changes may be added without bumping the major"]
#[doc = "version of the extension."]
pub mod zkde_screencast_unstable_v1 {
use futures_util::SinkExt;
#[repr(u32)]
Expand Down
Loading

0 comments on commit 19a3eac

Please sign in to comment.