@@ -727,32 +727,54 @@ impl CompositorState {
727727#[ macro_export]
728728macro_rules! delegate_compositor {
729729 ( $( @<$( $lt: tt $( : $clt: tt $( + $dlt: tt ) * ) ? ) ,+>) ? $ty: ty) => {
730- $crate:: reexports:: wayland_server:: delegate_global_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
731- $crate:: reexports:: wayland_server:: protocol:: wl_compositor:: WlCompositor : ( )
732- ] => $crate:: wayland:: compositor:: CompositorState ) ;
733- $crate:: reexports:: wayland_server:: delegate_global_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
734- $crate:: reexports:: wayland_server:: protocol:: wl_subcompositor:: WlSubcompositor : ( )
735- ] => $crate:: wayland:: compositor:: CompositorState ) ;
736-
737- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
738- $crate:: reexports:: wayland_server:: protocol:: wl_compositor:: WlCompositor : ( )
739- ] => $crate:: wayland:: compositor:: CompositorState ) ;
740- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
741- $crate:: reexports:: wayland_server:: protocol:: wl_surface:: WlSurface : $crate:: wayland:: compositor:: SurfaceUserData
742- ] => $crate:: wayland:: compositor:: CompositorState ) ;
743- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
744- $crate:: reexports:: wayland_server:: protocol:: wl_region:: WlRegion : $crate:: wayland:: compositor:: RegionUserData
745- ] => $crate:: wayland:: compositor:: CompositorState ) ;
746- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
747- $crate:: reexports:: wayland_server:: protocol:: wl_callback:: WlCallback : ( )
748- ] => $crate:: wayland:: compositor:: CompositorState ) ;
749- // WlSubcompositor
750- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
751- $crate:: reexports:: wayland_server:: protocol:: wl_subcompositor:: WlSubcompositor : ( )
752- ] => $crate:: wayland:: compositor:: CompositorState ) ;
753- $crate:: reexports:: wayland_server:: delegate_dispatch!( $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ? $ty: [
754- $crate:: reexports:: wayland_server:: protocol:: wl_subsurface:: WlSubsurface : $crate:: wayland:: compositor:: SubsurfaceUserData
755- ] => $crate:: wayland:: compositor:: CompositorState ) ;
730+ const _: ( ) = {
731+ use $crate:: {
732+ reexports:: wayland_server:: {
733+ delegate_dispatch, delegate_global_dispatch,
734+ protocol:: {
735+ wl_callback:: WlCallback , wl_compositor:: WlCompositor , wl_region:: WlRegion ,
736+ wl_subcompositor:: WlSubcompositor , wl_subsurface:: WlSubsurface ,
737+ wl_surface:: WlSurface ,
738+ } ,
739+ } ,
740+ wayland:: compositor:: { CompositorState , RegionUserData , SubsurfaceUserData , SurfaceUserData } ,
741+ } ;
742+
743+ delegate_global_dispatch!(
744+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
745+ $ty: [ WlCompositor : ( ) ] => CompositorState
746+ ) ;
747+ delegate_global_dispatch!(
748+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
749+ $ty: [ WlSubcompositor : ( ) ] => CompositorState
750+ ) ;
751+
752+ delegate_dispatch!(
753+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
754+ $ty: [ WlCompositor : ( ) ] => CompositorState
755+ ) ;
756+ delegate_dispatch!(
757+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
758+ $ty: [ WlSurface : SurfaceUserData ] => CompositorState
759+ ) ;
760+ delegate_dispatch!(
761+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
762+ $ty: [ WlRegion : RegionUserData ] => CompositorState
763+ ) ;
764+ delegate_dispatch!(
765+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
766+ $ty: [ WlCallback : ( ) ] => CompositorState
767+ ) ;
768+
769+ delegate_dispatch!(
770+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
771+ $ty: [ WlSubcompositor : ( ) ] => CompositorState
772+ ) ;
773+ delegate_dispatch!(
774+ $( @< $( $lt $( : $clt $( + $dlt ) * ) ? ) ,+ >) ?
775+ $ty: [ WlSubsurface : SubsurfaceUserData ] => CompositorState
776+ ) ;
777+ } ;
756778 } ;
757779}
758780
0 commit comments