Skip to content

Commit

Permalink
Update wayland-protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
morr0ne committed Oct 15, 2024
1 parent 90132f6 commit 4d26103
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 25 deletions.
2 changes: 1 addition & 1 deletion protocols/wayland-protocols
Submodule wayland-protocols updated from 4878e0 to 9ac1a0
7 changes: 4 additions & 3 deletions src/client/protocol/stable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ pub mod presentation_time {
#[doc = "Trait to implement the wp_presentation interface. See the module level documentation for more info"]
pub trait WpPresentation {
const INTERFACE: &'static str = "wp_presentation";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -602,7 +602,7 @@ pub mod presentation_time {
#[doc = "Trait to implement the wp_presentation_feedback interface. See the module level documentation for more info"]
pub trait WpPresentationFeedback {
const INTERFACE: &'static str = "wp_presentation_feedback";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
async fn handle_event(
&self,
message: &mut crate::wire::Message,
Expand Down Expand Up @@ -2130,7 +2130,8 @@ pub mod xdg_shell {
#[doc = "manipulate a buffer prior to the first xdg_surface.configure call must"]
#[doc = "also be treated as errors."]
#[doc = ""]
#[doc = "After creating a role-specific object and setting it up, the client must"]
#[doc = "After creating a role-specific object and setting it up (e.g. by sending"]
#[doc = "the title, app ID, size constraints, parent, etc), the client must"]
#[doc = "perform an initial commit without any buffer attached. The compositor"]
#[doc = "will reply with initial wl_surface state such as"]
#[doc = "wl_surface.preferred_buffer_scale followed by an xdg_surface.configure"]
Expand Down
27 changes: 20 additions & 7 deletions src/client/protocol/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,9 @@ pub mod cursor_shape_v1 {
.map_err(crate::client::Error::IoError)
}
#[doc = "Obtain a wp_cursor_shape_device_v1 for a wl_pointer object."]
#[doc = ""]
#[doc = "When the pointer capability is removed from the wl_seat, the"]
#[doc = "wp_cursor_shape_device_v1 object becomes inert."]
async fn get_pointer(
&self,
socket: &mut crate::wire::Socket,
Expand All @@ -375,6 +378,9 @@ pub mod cursor_shape_v1 {
.map_err(crate::client::Error::IoError)
}
#[doc = "Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object."]
#[doc = ""]
#[doc = "When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1"]
#[doc = "object becomes inert."]
async fn get_tablet_tool_v2(
&self,
socket: &mut crate::wire::Socket,
Expand Down Expand Up @@ -843,6 +849,10 @@ pub mod drm_lease_v1 {
#[doc = "The client should send this to indicate that it no longer wishes to use"]
#[doc = "this lease. The compositor should use drmModeRevokeLease on the"]
#[doc = "appropriate file descriptor, if necessary."]
#[doc = ""]
#[doc = "Upon destruction, the compositor should advertise the connector for"]
#[doc = "leasing again by sending the connector event through the"]
#[doc = "wp_drm_lease_device_v1 interface."]
async fn destroy(
&self,
socket: &mut crate::wire::Socket,
Expand Down Expand Up @@ -1398,7 +1408,7 @@ pub mod ext_image_copy_capture_v1 {
#[doc = "formats are supported for reading from the session. The compositor may"]
#[doc = "re-send buffer constraint events whenever they change."]
#[doc = ""]
#[doc = "The advertise buffer constraints, the compositor must send in no"]
#[doc = "To advertise buffer constraints, the compositor must send in no"]
#[doc = "particular order: zero or more shm_format and dmabuf_format events, zero"]
#[doc = "or one dmabuf_device event, and exactly one buffer_size event. Then the"]
#[doc = "compositor must send a done event."]
Expand Down Expand Up @@ -1547,7 +1557,7 @@ pub mod ext_image_copy_capture_v1 {
_ => Err(crate::client::Error::UnknownOpcode),
}
}
#[doc = "Destroys the session. This request can be sent at any time by the"]
#[doc = "Destroys the frame. This request can be sent at any time by the"]
#[doc = "client."]
async fn destroy(
&self,
Expand Down Expand Up @@ -2775,7 +2785,7 @@ pub mod security_context_v1 {
#[doc = "sent by the client. In other words, the client must call bind(2) and"]
#[doc = "listen(2) before sending the FD."]
#[doc = ""]
#[doc = "close_fd is a FD closed by the client when the compositor should stop"]
#[doc = "close_fd is a FD that will signal hangup when the compositor should stop"]
#[doc = "accepting new connections on listen_fd."]
#[doc = ""]
#[doc = "The compositor must continue to accept connections on listen_fd when"]
Expand Down Expand Up @@ -3801,9 +3811,10 @@ pub mod xdg_toplevel_drag_v1 {
#[doc = "Request that the window will be moved with the cursor during the drag"]
#[doc = "operation. The offset is a hint to the compositor how the toplevel"]
#[doc = "should be positioned relative to the cursor hotspot in surface local"]
#[doc = "coordinates. For example it might only be used when an unmapped window"]
#[doc = "is attached. The attached window does not participate in the selection"]
#[doc = "of the drag target."]
#[doc = "coordinates and relative to the geometry of the toplevel being attached."]
#[doc = "See xdg_surface.set_window_geometry. For example it might only"]
#[doc = "be used when an unmapped window is attached. The attached window"]
#[doc = "does not participate in the selection of the drag target."]
#[doc = ""]
#[doc = "If the toplevel is unmapped while it is attached, it is automatically"]
#[doc = "detached from the drag. In this case this request has to be called again"]
Expand Down Expand Up @@ -4046,7 +4057,9 @@ pub mod xdg_toplevel_icon_v1 {
#[doc = "The wl_buffer must be kept alive for as long as the xdg_toplevel_icon"]
#[doc = "it is associated with is not destroyed, otherwise a 'no_buffer' error"]
#[doc = "is raised. The buffer contents must not be modified after it was"]
#[doc = "assigned to the icon."]
#[doc = "assigned to the icon. As a result, the region of the wl_shm_pool's"]
#[doc = "backing storage used for the wl_buffer must not be modified after this"]
#[doc = "request is sent. The wl_buffer.release event is unused."]
#[doc = ""]
#[doc = "If this request is made after the icon has been assigned to a toplevel"]
#[doc = "via 'set_icon', a 'immutable' error must be raised."]
Expand Down
6 changes: 6 additions & 0 deletions src/client/protocol/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5161,6 +5161,8 @@ pub mod xdg_decoration_unstable_v1 {
AlreadyConstructed = 1u32,
#[doc = "xdg_toplevel destroyed before the decoration object"]
Orphaned = 2u32,
#[doc = "invalid mode"]
InvalidMode = 3u32,
}
impl TryFrom<u32> for Error {
type Error = crate::wire::DecodeError;
Expand All @@ -5169,6 +5171,7 @@ pub mod xdg_decoration_unstable_v1 {
0u32 => Ok(Self::UnconfiguredBuffer),
1u32 => Ok(Self::AlreadyConstructed),
2u32 => Ok(Self::Orphaned),
3u32 => Ok(Self::InvalidMode),
_ => Err(crate::wire::DecodeError::MalformedPayload),
}
}
Expand Down Expand Up @@ -5237,6 +5240,9 @@ pub mod xdg_decoration_unstable_v1 {
#[doc = "Such clients are responsible for preventing configure loops and must"]
#[doc = "make sure not to send multiple successive set_mode requests with the"]
#[doc = "same decoration mode."]
#[doc = ""]
#[doc = "If an invalid mode is supplied by the client, the invalid_mode protocol"]
#[doc = "error is raised by the compositor."]
async fn set_mode(
&self,
socket: &mut crate::wire::Socket,
Expand Down
16 changes: 10 additions & 6 deletions src/server/protocol/stable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ pub mod presentation_time {
#[doc = "Trait to implement the wp_presentation interface. See the module level documentation for more info"]
pub trait WpPresentation: crate::server::Dispatcher {
const INTERFACE: &'static str = "wp_presentation";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
fn into_object(self, id: crate::wire::ObjectId) -> crate::server::Object
where
Self: Sized,
Expand Down Expand Up @@ -990,7 +990,7 @@ pub mod presentation_time {
#[doc = "Trait to implement the wp_presentation_feedback interface. See the module level documentation for more info"]
pub trait WpPresentationFeedback: crate::server::Dispatcher {
const INTERFACE: &'static str = "wp_presentation_feedback";
const VERSION: u32 = 1u32;
const VERSION: u32 = 2u32;
fn into_object(self, id: crate::wire::ObjectId) -> crate::server::Object
where
Self: Sized,
Expand Down Expand Up @@ -1055,9 +1055,12 @@ pub mod presentation_time {
#[doc = "targeting the next few vblanks. If such prediction cannot"]
#[doc = "usefully be done, the argument is zero."]
#[doc = ""]
#[doc = "If the output does not have a constant refresh rate, explicit"]
#[doc = "video mode switches excluded, then the refresh argument must"]
#[doc = "be zero."]
#[doc = "For version 2 and later, if the output does not have a constant"]
#[doc = "refresh rate, explicit video mode switches excluded, then the"]
#[doc = "refresh argument must be either an appropriate rate picked by the"]
#[doc = "compositor (e.g. fastest rate), or 0 if no such rate exists."]
#[doc = "For version 1, if the output does not have a constant refresh rate,"]
#[doc = "the refresh argument must be zero."]
#[doc = ""]
#[doc = "The 64-bit value combined from seq_hi and seq_lo is the value"]
#[doc = "of the output's vertical retrace counter when the content"]
Expand Down Expand Up @@ -3784,7 +3787,8 @@ pub mod xdg_shell {
#[doc = "manipulate a buffer prior to the first xdg_surface.configure call must"]
#[doc = "also be treated as errors."]
#[doc = ""]
#[doc = "After creating a role-specific object and setting it up, the client must"]
#[doc = "After creating a role-specific object and setting it up (e.g. by sending"]
#[doc = "the title, app ID, size constraints, parent, etc), the client must"]
#[doc = "perform an initial commit without any buffer attached. The compositor"]
#[doc = "will reply with initial wl_surface state such as"]
#[doc = "wl_surface.preferred_buffer_scale followed by an xdg_surface.configure"]
Expand Down
35 changes: 27 additions & 8 deletions src/server/protocol/staging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ pub mod cursor_shape_v1 {
client: &mut crate::server::Client,
) -> crate::server::Result<()>;
#[doc = "Obtain a wp_cursor_shape_device_v1 for a wl_pointer object."]
#[doc = ""]
#[doc = "When the pointer capability is removed from the wl_seat, the"]
#[doc = "wp_cursor_shape_device_v1 object becomes inert."]
async fn get_pointer(
&self,
object: &crate::server::Object,
Expand All @@ -417,6 +420,9 @@ pub mod cursor_shape_v1 {
pointer: crate::wire::ObjectId,
) -> crate::server::Result<()>;
#[doc = "Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object."]
#[doc = ""]
#[doc = "When the zwp_tablet_tool_v2 is removed, the wp_cursor_shape_device_v1"]
#[doc = "object becomes inert."]
async fn get_tablet_tool_v2(
&self,
object: &crate::server::Object,
Expand Down Expand Up @@ -926,6 +932,10 @@ pub mod drm_lease_v1 {
#[doc = "encouraged to send this event when they lose access to connector, for"]
#[doc = "example when the connector is hot-unplugged, when the connector gets"]
#[doc = "leased to a client or when the compositor loses DRM master."]
#[doc = ""]
#[doc = "If a client holds a lease for the connector, the status of the lease"]
#[doc = "remains the same. The client should destroy the object after receiving"]
#[doc = "this event."]
async fn withdrawn(
&self,
object: &crate::server::Object,
Expand Down Expand Up @@ -1079,6 +1089,10 @@ pub mod drm_lease_v1 {
#[doc = "The client should send this to indicate that it no longer wishes to use"]
#[doc = "this lease. The compositor should use drmModeRevokeLease on the"]
#[doc = "appropriate file descriptor, if necessary."]
#[doc = ""]
#[doc = "Upon destruction, the compositor should advertise the connector for"]
#[doc = "leasing again by sending the connector event through the"]
#[doc = "wp_drm_lease_device_v1 interface."]
async fn destroy(
&self,
object: &crate::server::Object,
Expand Down Expand Up @@ -1114,7 +1128,9 @@ pub mod drm_lease_v1 {
#[doc = "no further events for this object after sending the finish event."]
#[doc = "Compositors should revoke the lease when any of the leased resources"]
#[doc = "become unavailable, namely when a hot-unplug occurs or when the"]
#[doc = "compositor loses DRM master."]
#[doc = "compositor loses DRM master. Compositors may advertise the connector"]
#[doc = "for leasing again, if the resource is available, by sending the"]
#[doc = "connector event through the wp_drm_lease_device_v1 interface."]
async fn finished(
&self,
object: &crate::server::Object,
Expand Down Expand Up @@ -1907,7 +1923,7 @@ pub mod ext_image_copy_capture_v1 {
#[doc = "formats are supported for reading from the session. The compositor may"]
#[doc = "re-send buffer constraint events whenever they change."]
#[doc = ""]
#[doc = "The advertise buffer constraints, the compositor must send in no"]
#[doc = "To advertise buffer constraints, the compositor must send in no"]
#[doc = "particular order: zero or more shm_format and dmabuf_format events, zero"]
#[doc = "or one dmabuf_device event, and exactly one buffer_size event. Then the"]
#[doc = "compositor must send a done event."]
Expand Down Expand Up @@ -2240,7 +2256,7 @@ pub mod ext_image_copy_capture_v1 {
_ => Err(crate::server::error::Error::UnknownOpcode),
}
}
#[doc = "Destroys the session. This request can be sent at any time by the"]
#[doc = "Destroys the frame. This request can be sent at any time by the"]
#[doc = "client."]
async fn destroy(
&self,
Expand Down Expand Up @@ -3858,7 +3874,7 @@ pub mod security_context_v1 {
#[doc = "sent by the client. In other words, the client must call bind(2) and"]
#[doc = "listen(2) before sending the FD."]
#[doc = ""]
#[doc = "close_fd is a FD closed by the client when the compositor should stop"]
#[doc = "close_fd is a FD that will signal hangup when the compositor should stop"]
#[doc = "accepting new connections on listen_fd."]
#[doc = ""]
#[doc = "The compositor must continue to accept connections on listen_fd when"]
Expand Down Expand Up @@ -4956,9 +4972,10 @@ pub mod xdg_toplevel_drag_v1 {
#[doc = "Request that the window will be moved with the cursor during the drag"]
#[doc = "operation. The offset is a hint to the compositor how the toplevel"]
#[doc = "should be positioned relative to the cursor hotspot in surface local"]
#[doc = "coordinates. For example it might only be used when an unmapped window"]
#[doc = "is attached. The attached window does not participate in the selection"]
#[doc = "of the drag target."]
#[doc = "coordinates and relative to the geometry of the toplevel being attached."]
#[doc = "See xdg_surface.set_window_geometry. For example it might only"]
#[doc = "be used when an unmapped window is attached. The attached window"]
#[doc = "does not participate in the selection of the drag target."]
#[doc = ""]
#[doc = "If the toplevel is unmapped while it is attached, it is automatically"]
#[doc = "detached from the drag. In this case this request has to be called again"]
Expand Down Expand Up @@ -5251,7 +5268,9 @@ pub mod xdg_toplevel_icon_v1 {
#[doc = "The wl_buffer must be kept alive for as long as the xdg_toplevel_icon"]
#[doc = "it is associated with is not destroyed, otherwise a 'no_buffer' error"]
#[doc = "is raised. The buffer contents must not be modified after it was"]
#[doc = "assigned to the icon."]
#[doc = "assigned to the icon. As a result, the region of the wl_shm_pool's"]
#[doc = "backing storage used for the wl_buffer must not be modified after this"]
#[doc = "request is sent. The wl_buffer.release event is unused."]
#[doc = ""]
#[doc = "If this request is made after the icon has been assigned to a toplevel"]
#[doc = "via 'set_icon', a 'immutable' error must be raised."]
Expand Down
6 changes: 6 additions & 0 deletions src/server/protocol/unstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8671,6 +8671,8 @@ pub mod xdg_decoration_unstable_v1 {
AlreadyConstructed = 1u32,
#[doc = "xdg_toplevel destroyed before the decoration object"]
Orphaned = 2u32,
#[doc = "invalid mode"]
InvalidMode = 3u32,
}
impl TryFrom<u32> for Error {
type Error = crate::wire::DecodeError;
Expand All @@ -8679,6 +8681,7 @@ pub mod xdg_decoration_unstable_v1 {
0u32 => Ok(Self::UnconfiguredBuffer),
1u32 => Ok(Self::AlreadyConstructed),
2u32 => Ok(Self::Orphaned),
3u32 => Ok(Self::InvalidMode),
_ => Err(crate::wire::DecodeError::MalformedPayload),
}
}
Expand Down Expand Up @@ -8761,6 +8764,9 @@ pub mod xdg_decoration_unstable_v1 {
#[doc = "Such clients are responsible for preventing configure loops and must"]
#[doc = "make sure not to send multiple successive set_mode requests with the"]
#[doc = "same decoration mode."]
#[doc = ""]
#[doc = "If an invalid mode is supplied by the client, the invalid_mode protocol"]
#[doc = "error is raised by the compositor."]
async fn set_mode(
&self,
object: &crate::server::Object,
Expand Down

0 comments on commit 4d26103

Please sign in to comment.