Instantly share code, notes, and snippets.
Created
May 14, 2020 13:27
-
Star
(0)
0
You must be signed in to star a gist -
Fork
(0)
0
You must be signed in to fork a gist
-
Save psychon/fa5d1880cacb1d715df5cccd1fc3a053 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/protocol/dri2.rs b/src/protocol/dri2.rs | |
index bf23023..f1872b9 100644 | |
--- a/src/protocol/dri2.rs | |
+++ b/src/protocol/dri2.rs | |
@@ -462,6 +462,8 @@ pub struct ConnectReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("driver_name_length") | |
+ // deducible: Some("device_name_length") | |
pub driver_name: Vec<u8>, | |
pub alignment_pad: Vec<u8>, | |
pub device_name: Vec<u8>, | |
@@ -646,6 +648,7 @@ pub struct GetBuffersReply { | |
pub length: u32, | |
pub width: u32, | |
pub height: u32, | |
+ // deducible: Some("count") | |
pub buffers: Vec<DRI2Buffer>, | |
} | |
impl TryParse for GetBuffersReply { | |
@@ -778,6 +781,7 @@ pub struct GetBuffersWithFormatReply { | |
pub length: u32, | |
pub width: u32, | |
pub height: u32, | |
+ // deducible: Some("count") | |
pub buffers: Vec<DRI2Buffer>, | |
} | |
impl TryParse for GetBuffersWithFormatReply { | |
diff --git a/src/protocol/dri3.rs b/src/protocol/dri3.rs | |
index 3f066b9..45fd9b6 100644 | |
--- a/src/protocol/dri3.rs | |
+++ b/src/protocol/dri3.rs | |
@@ -409,6 +409,8 @@ pub struct GetSupportedModifiersReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_window_modifiers") | |
+ // deducible: Some("num_screen_modifiers") | |
pub window_modifiers: Vec<u64>, | |
pub screen_modifiers: Vec<u64>, | |
} | |
@@ -563,6 +565,7 @@ where | |
#[derive(Debug, PartialEq, Eq)] | |
pub struct BuffersFromPixmapReply { | |
pub response_type: u8, | |
+ // deducible: Some("nfd") | |
pub sequence: u16, | |
pub length: u32, | |
pub width: u16, | |
diff --git a/src/protocol/glx.rs b/src/protocol/glx.rs | |
index 856eb8b..325d6ef 100644 | |
--- a/src/protocol/glx.rs | |
+++ b/src/protocol/glx.rs | |
@@ -1124,6 +1124,7 @@ where | |
pub struct GetVisualConfigsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub num_visuals: u32, | |
pub num_properties: u32, | |
pub property_list: Vec<u32>, | |
@@ -1250,6 +1251,7 @@ where | |
pub struct VendorPrivateWithReplyReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub retval: u32, | |
pub data1: [u8; 24], | |
pub data2: Vec<u8>, | |
@@ -1367,6 +1369,7 @@ pub struct QueryServerStringReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("str_len") | |
pub string: Vec<u8>, | |
} | |
impl TryParse for QueryServerStringReply { | |
@@ -1463,6 +1466,7 @@ where | |
pub struct GetFBConfigsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub num_fb_configs: u32, | |
pub num_properties: u32, | |
pub property_list: Vec<u32>, | |
@@ -1652,6 +1656,7 @@ pub struct QueryContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_attribs") | |
pub attribs: Vec<u32>, | |
} | |
impl TryParse for QueryContextReply { | |
@@ -1849,6 +1854,7 @@ pub struct GetDrawableAttributesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_attribs") | |
pub attribs: Vec<u32>, | |
} | |
impl TryParse for GetDrawableAttributesReply { | |
@@ -2426,6 +2432,7 @@ pub struct RenderModeReply { | |
pub sequence: u16, | |
pub length: u32, | |
pub ret_val: u32, | |
+ // deducible: Some("n") | |
pub new_mode: u32, | |
pub data: Vec<u32>, | |
} | |
@@ -2692,6 +2699,7 @@ where | |
pub struct ReadPixelsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<u8>, | |
} | |
impl TryParse for ReadPixelsReply { | |
@@ -2751,6 +2759,7 @@ pub struct GetBooleanvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: bool, | |
pub data: Vec<bool>, | |
} | |
@@ -2812,6 +2821,7 @@ where | |
pub struct GetClipPlaneReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<Float64>, | |
} | |
impl TryParse for GetClipPlaneReply { | |
@@ -2870,6 +2880,7 @@ pub struct GetDoublevReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float64, | |
pub data: Vec<Float64>, | |
} | |
@@ -2984,6 +2995,7 @@ pub struct GetFloatvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3046,6 +3058,7 @@ pub struct GetIntegervReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -3113,6 +3126,7 @@ pub struct GetLightfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3180,6 +3194,7 @@ pub struct GetLightivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -3247,6 +3262,7 @@ pub struct GetMapdvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float64, | |
pub data: Vec<Float64>, | |
} | |
@@ -3314,6 +3330,7 @@ pub struct GetMapfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3381,6 +3398,7 @@ pub struct GetMapivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -3448,6 +3466,7 @@ pub struct GetMaterialfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3515,6 +3534,7 @@ pub struct GetMaterialivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -3577,6 +3597,7 @@ pub struct GetPixelMapfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3639,6 +3660,7 @@ pub struct GetPixelMapuivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: u32, | |
pub data: Vec<u32>, | |
} | |
@@ -3701,6 +3723,7 @@ pub struct GetPixelMapusvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: u16, | |
pub data: Vec<u16>, | |
} | |
@@ -3762,6 +3785,7 @@ where | |
pub struct GetPolygonStippleReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<u8>, | |
} | |
impl TryParse for GetPolygonStippleReply { | |
@@ -3821,6 +3845,7 @@ pub struct GetStringReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub string: Vec<u8>, | |
} | |
impl TryParse for GetStringReply { | |
@@ -3887,6 +3912,7 @@ pub struct GetTexEnvfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -3954,6 +3980,7 @@ pub struct GetTexEnvivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -4021,6 +4048,7 @@ pub struct GetTexGendvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float64, | |
pub data: Vec<Float64>, | |
} | |
@@ -4088,6 +4116,7 @@ pub struct GetTexGenfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -4155,6 +4184,7 @@ pub struct GetTexGenivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -4236,6 +4266,7 @@ where | |
pub struct GetTexImageReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width: i32, | |
pub height: i32, | |
pub depth: i32, | |
@@ -4307,6 +4338,7 @@ pub struct GetTexParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -4374,6 +4406,7 @@ pub struct GetTexParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -4446,6 +4479,7 @@ pub struct GetTexLevelParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -4518,6 +4552,7 @@ pub struct GetTexLevelParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -4725,6 +4760,7 @@ where | |
pub struct AreTexturesResidentReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub ret_val: Bool32, | |
pub data: Vec<bool>, | |
} | |
@@ -4821,6 +4857,7 @@ where | |
pub struct GenTexturesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<u32>, | |
} | |
impl TryParse for GenTexturesReply { | |
@@ -4950,6 +4987,7 @@ where | |
pub struct GetColorTableReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width: i32, | |
pub data: Vec<u8>, | |
} | |
@@ -5017,6 +5055,7 @@ pub struct GetColorTableParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -5084,6 +5123,7 @@ pub struct GetColorTableParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -5160,6 +5200,7 @@ where | |
pub struct GetConvolutionFilterReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width: i32, | |
pub height: i32, | |
pub data: Vec<u8>, | |
@@ -5229,6 +5270,7 @@ pub struct GetConvolutionParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -5296,6 +5338,7 @@ pub struct GetConvolutionParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -5372,6 +5415,7 @@ where | |
pub struct GetSeparableFilterReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub row_w: i32, | |
pub col_h: i32, | |
pub rows_and_cols: Vec<u8>, | |
@@ -5451,6 +5495,7 @@ where | |
pub struct GetHistogramReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width: i32, | |
pub data: Vec<u8>, | |
} | |
@@ -5518,6 +5563,7 @@ pub struct GetHistogramParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -5585,6 +5631,7 @@ pub struct GetHistogramParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -5662,6 +5709,7 @@ where | |
pub struct GetMinmaxReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<u8>, | |
} | |
impl TryParse for GetMinmaxReply { | |
@@ -5726,6 +5774,7 @@ pub struct GetMinmaxParameterfvReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: Float32, | |
pub data: Vec<Float32>, | |
} | |
@@ -5793,6 +5842,7 @@ pub struct GetMinmaxParameterivReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -5859,6 +5909,7 @@ where | |
pub struct GetCompressedTexImageARBReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub size: i32, | |
pub data: Vec<u8>, | |
} | |
@@ -5957,6 +6008,7 @@ where | |
pub struct GenQueriesARBReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub data: Vec<u32>, | |
} | |
impl TryParse for GenQueriesARBReply { | |
@@ -6077,6 +6129,7 @@ pub struct GetQueryivARBReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -6144,6 +6197,7 @@ pub struct GetQueryObjectivARBReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: i32, | |
pub data: Vec<i32>, | |
} | |
@@ -6211,6 +6265,7 @@ pub struct GetQueryObjectuivARBReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("n") | |
pub datum: u32, | |
pub data: Vec<u32>, | |
} | |
diff --git a/src/protocol/present.rs b/src/protocol/present.rs | |
index 075ef3e..1f95f3a 100644 | |
--- a/src/protocol/present.rs | |
+++ b/src/protocol/present.rs | |
@@ -1064,6 +1064,7 @@ pub struct RedirectNotifyEvent { | |
pub divisor: u64, | |
pub remainder: u64, | |
pub notifies: Vec<Notify>, | |
+ // deducible: Some("notifies_len") | |
} | |
impl TryParse for RedirectNotifyEvent { | |
fn try_parse(remaining: &[u8]) -> Result<(Self, &[u8]), ParseError> { | |
diff --git a/src/protocol/randr.rs b/src/protocol/randr.rs | |
index 2288d7c..ae56752 100644 | |
--- a/src/protocol/randr.rs | |
+++ b/src/protocol/randr.rs | |
@@ -453,6 +453,7 @@ impl Serialize for ScreenSize { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct RefreshRates { | |
+ // deducible: Some("nRates") | |
pub rates: Vec<u16>, | |
} | |
impl TryParse for RefreshRates { | |
@@ -847,6 +848,7 @@ pub struct GetScreenInfoReply { | |
pub root: xproto::Window, | |
pub timestamp: xproto::Timestamp, | |
pub config_timestamp: xproto::Timestamp, | |
+ // deducible: Some("nSizes") | |
pub size_id: u16, | |
pub rotation: u16, | |
pub rate: u16, | |
@@ -1211,6 +1213,10 @@ pub struct GetScreenResourcesReply { | |
pub length: u32, | |
pub timestamp: xproto::Timestamp, | |
pub config_timestamp: xproto::Timestamp, | |
+ // deducible: Some("num_crtcs") | |
+ // deducible: Some("num_outputs") | |
+ // deducible: Some("num_modes") | |
+ // deducible: Some("names_len") | |
pub crtcs: Vec<Crtc>, | |
pub outputs: Vec<Output>, | |
pub modes: Vec<ModeInfo>, | |
@@ -1354,7 +1360,11 @@ pub struct GetOutputInfoReply { | |
pub mm_height: u32, | |
pub connection: Connection, | |
pub subpixel_order: render::SubPixel, | |
+ // deducible: Some("num_crtcs") | |
+ // deducible: Some("num_modes") | |
pub num_preferred: u16, | |
+ // deducible: Some("num_clones") | |
+ // deducible: Some("name_len") | |
pub crtcs: Vec<Crtc>, | |
pub modes: Vec<Mode>, | |
pub clones: Vec<Output>, | |
@@ -1428,6 +1438,7 @@ pub struct ListOutputPropertiesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_atoms") | |
pub atoms: Vec<xproto::Atom>, | |
} | |
impl TryParse for ListOutputPropertiesReply { | |
@@ -1486,6 +1497,7 @@ where | |
pub struct QueryOutputPropertyReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub pending: bool, | |
pub range: bool, | |
pub immutable: bool, | |
@@ -1954,6 +1966,8 @@ pub struct GetCrtcInfoReply { | |
pub mode: Mode, | |
pub rotation: u16, | |
pub rotations: u16, | |
+ // deducible: Some("num_outputs") | |
+ // deducible: Some("num_possible_outputs") | |
pub outputs: Vec<Output>, | |
pub possible: Vec<Output>, | |
} | |
@@ -2159,6 +2173,7 @@ pub struct GetCrtcGammaReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("size") | |
pub red: Vec<u16>, | |
pub green: Vec<u16>, | |
pub blue: Vec<u16>, | |
@@ -2262,6 +2277,10 @@ pub struct GetScreenResourcesCurrentReply { | |
pub length: u32, | |
pub timestamp: xproto::Timestamp, | |
pub config_timestamp: xproto::Timestamp, | |
+ // deducible: Some("num_crtcs") | |
+ // deducible: Some("num_outputs") | |
+ // deducible: Some("num_modes") | |
+ // deducible: Some("names_len") | |
pub crtcs: Vec<Crtc>, | |
pub outputs: Vec<Output>, | |
pub modes: Vec<ModeInfo>, | |
@@ -2477,6 +2496,10 @@ pub struct GetCrtcTransformReply { | |
pub pending_transform: render::Transform, | |
pub has_transforms: bool, | |
pub current_transform: render::Transform, | |
+ // deducible: Some("pending_len") | |
+ // deducible: Some("pending_nparams") | |
+ // deducible: Some("current_len") | |
+ // deducible: Some("current_nparams") | |
pub pending_filter_name: Vec<u8>, | |
pub pending_params: Vec<render::Fixed>, | |
pub current_filter_name: Vec<u8>, | |
@@ -2813,6 +2836,7 @@ pub struct GetProvidersReply { | |
pub sequence: u16, | |
pub length: u32, | |
pub timestamp: xproto::Timestamp, | |
+ // deducible: Some("num_providers") | |
pub providers: Vec<Provider>, | |
} | |
impl TryParse for GetProvidersReply { | |
@@ -2945,6 +2969,10 @@ pub struct GetProviderInfoReply { | |
pub length: u32, | |
pub timestamp: xproto::Timestamp, | |
pub capabilities: u32, | |
+ // deducible: Some("num_crtcs") | |
+ // deducible: Some("num_outputs") | |
+ // deducible: Some("num_associated_providers") | |
+ // deducible: Some("name_len") | |
pub crtcs: Vec<Crtc>, | |
pub outputs: Vec<Output>, | |
pub associated_providers: Vec<Provider>, | |
@@ -3087,6 +3115,7 @@ pub struct ListProviderPropertiesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_atoms") | |
pub atoms: Vec<xproto::Atom>, | |
} | |
impl TryParse for ListProviderPropertiesReply { | |
@@ -3145,6 +3174,7 @@ where | |
pub struct QueryProviderPropertyReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub pending: bool, | |
pub range: bool, | |
pub immutable: bool, | |
@@ -4037,6 +4067,7 @@ pub struct MonitorInfo { | |
pub name: xproto::Atom, | |
pub primary: bool, | |
pub automatic: bool, | |
+ // deducible: Some("nOutput") | |
pub x: i16, | |
pub y: i16, | |
pub width: u16, | |
@@ -4130,6 +4161,7 @@ pub struct GetMonitorsReply { | |
pub sequence: u16, | |
pub length: u32, | |
pub timestamp: xproto::Timestamp, | |
+ // deducible: Some("nMonitors") | |
pub n_outputs: u32, | |
pub monitors: Vec<MonitorInfo>, | |
} | |
diff --git a/src/protocol/record.rs b/src/protocol/record.rs | |
index db18c2a..51f3107 100644 | |
--- a/src/protocol/record.rs | |
+++ b/src/protocol/record.rs | |
@@ -370,6 +370,7 @@ impl TryFrom<u32> for CS { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ClientInfo { | |
pub client_resource: ClientSpec, | |
+ // deducible: Some("num_ranges") | |
pub ranges: Vec<Range>, | |
} | |
impl TryParse for ClientInfo { | |
@@ -703,6 +704,7 @@ pub struct GetContextReply { | |
pub sequence: u16, | |
pub length: u32, | |
pub element_header: ElementHeader, | |
+ // deducible: Some("num_intercepted_clients") | |
pub intercepted_clients: Vec<ClientInfo>, | |
} | |
impl TryParse for GetContextReply { | |
@@ -759,6 +761,7 @@ pub struct EnableContextReply { | |
pub response_type: u8, | |
pub category: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub element_header: ElementHeader, | |
pub client_swapped: bool, | |
pub xid_base: u32, | |
diff --git a/src/protocol/render.rs b/src/protocol/render.rs | |
index b3f5c9b..688915b 100644 | |
--- a/src/protocol/render.rs | |
+++ b/src/protocol/render.rs | |
@@ -1298,6 +1298,7 @@ impl Serialize for Pictvisual { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Pictdepth { | |
pub depth: u8, | |
+ // deducible: Some("num_visuals") | |
pub visuals: Vec<Pictvisual>, | |
} | |
impl TryParse for Pictdepth { | |
@@ -1337,6 +1338,7 @@ impl Serialize for Pictdepth { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Pictscreen { | |
+ // deducible: Some("num_depths") | |
pub fallback: Pictformat, | |
pub depths: Vec<Pictdepth>, | |
} | |
@@ -1864,8 +1866,11 @@ pub struct QueryPictFormatsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_formats") | |
+ // deducible: Some("num_screens") | |
pub num_depths: u32, | |
pub num_visuals: u32, | |
+ // deducible: Some("num_subpixel") | |
pub formats: Vec<Pictforminfo>, | |
pub screens: Vec<Pictscreen>, | |
pub subpixels: Vec<SubPixel>, | |
@@ -1936,6 +1941,7 @@ pub struct QueryPictIndexValuesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_values") | |
pub values: Vec<Indexvalue>, | |
} | |
impl TryParse for QueryPictIndexValuesReply { | |
@@ -3356,6 +3362,8 @@ pub struct QueryFiltersReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_aliases") | |
+ // deducible: Some("num_filters") | |
pub aliases: Vec<u16>, | |
pub filters: Vec<xproto::Str>, | |
} | |
diff --git a/src/protocol/res.rs b/src/protocol/res.rs | |
index 1cddba2..bb03bed 100644 | |
--- a/src/protocol/res.rs | |
+++ b/src/protocol/res.rs | |
@@ -223,6 +223,7 @@ impl Serialize for ClientIdSpec { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ClientIdValue { | |
pub spec: ClientIdSpec, | |
+ // deducible: Some("length") | |
pub value: Vec<u32>, | |
} | |
impl TryParse for ClientIdValue { | |
@@ -363,6 +364,7 @@ impl Serialize for ResourceSizeSpec { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ResourceSizeValue { | |
pub size: ResourceSizeSpec, | |
+ // deducible: Some("num_cross_references") | |
pub cross_references: Vec<ResourceSizeSpec>, | |
} | |
impl TryParse for ResourceSizeValue { | |
@@ -478,6 +480,7 @@ pub struct QueryClientsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_clients") | |
pub clients: Vec<Client>, | |
} | |
impl TryParse for QueryClientsReply { | |
@@ -532,6 +535,7 @@ pub struct QueryClientResourcesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_types") | |
pub types: Vec<Type>, | |
} | |
impl TryParse for QueryClientResourcesReply { | |
@@ -645,6 +649,7 @@ pub struct QueryClientIdsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_ids") | |
pub ids: Vec<ClientIdValue>, | |
} | |
impl TryParse for QueryClientIdsReply { | |
@@ -709,6 +714,7 @@ pub struct QueryResourceBytesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_sizes") | |
pub sizes: Vec<ResourceSizeValue>, | |
} | |
impl TryParse for QueryResourceBytesReply { | |
diff --git a/src/protocol/shape.rs b/src/protocol/shape.rs | |
index 43841c8..b2c0187 100644 | |
--- a/src/protocol/shape.rs | |
+++ b/src/protocol/shape.rs | |
@@ -678,6 +678,7 @@ pub struct GetRectanglesReply { | |
pub ordering: xproto::ClipOrdering, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("rectangles_len") | |
pub rectangles: Vec<xproto::Rectangle>, | |
} | |
impl TryParse for GetRectanglesReply { | |
diff --git a/src/protocol/sync.rs b/src/protocol/sync.rs | |
index 17050d5..b3cae48 100644 | |
--- a/src/protocol/sync.rs | |
+++ b/src/protocol/sync.rs | |
@@ -361,6 +361,7 @@ impl Serialize for Int64 { | |
pub struct Systemcounter { | |
pub counter: Counter, | |
pub resolution: Int64, | |
+ // deducible: Some("name_len") | |
pub name: Vec<u8>, | |
} | |
impl TryParse for Systemcounter { | |
@@ -772,6 +773,7 @@ pub struct ListSystemCountersReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("counters_len") | |
pub counters: Vec<Systemcounter>, | |
} | |
impl TryParse for ListSystemCountersReply { | |
diff --git a/src/protocol/xc_misc.rs b/src/protocol/xc_misc.rs | |
index 84435e9..f7e0e81 100644 | |
--- a/src/protocol/xc_misc.rs | |
+++ b/src/protocol/xc_misc.rs | |
@@ -166,6 +166,7 @@ pub struct GetXIDListReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("ids_len") | |
pub ids: Vec<u32>, | |
} | |
impl TryParse for GetXIDListReply { | |
diff --git a/src/protocol/xf86dri.rs b/src/protocol/xf86dri.rs | |
index 7b88796..9aa841a 100644 | |
--- a/src/protocol/xf86dri.rs | |
+++ b/src/protocol/xf86dri.rs | |
@@ -217,6 +217,7 @@ pub struct OpenConnectionReply { | |
pub length: u32, | |
pub sarea_handle_low: u32, | |
pub sarea_handle_high: u32, | |
+ // deducible: Some("bus_id_len") | |
pub bus_id: Vec<u8>, | |
} | |
impl TryParse for OpenConnectionReply { | |
@@ -304,6 +305,7 @@ pub struct GetClientDriverNameReply { | |
pub client_driver_major_version: u32, | |
pub client_driver_minor_version: u32, | |
pub client_driver_patch_version: u32, | |
+ // deducible: Some("client_driver_name_len") | |
pub client_driver_name: Vec<u8>, | |
} | |
impl TryParse for GetClientDriverNameReply { | |
@@ -556,8 +558,10 @@ pub struct GetDrawableInfoReply { | |
pub drawable_origin_y: i16, | |
pub drawable_size_w: i16, | |
pub drawable_size_h: i16, | |
+ // deducible: Some("num_clip_rects") | |
pub back_x: i16, | |
pub back_y: i16, | |
+ // deducible: Some("num_back_clip_rects") | |
pub clip_rects: Vec<DrmClipRect>, | |
pub back_clip_rects: Vec<DrmClipRect>, | |
} | |
@@ -627,6 +631,7 @@ pub struct GetDeviceInfoReply { | |
pub framebuffer_origin_offset: u32, | |
pub framebuffer_size: u32, | |
pub framebuffer_stride: u32, | |
+ // deducible: Some("device_private_size") | |
pub device_private: Vec<u32>, | |
} | |
impl TryParse for GetDeviceInfoReply { | |
diff --git a/src/protocol/xf86vidmode.rs b/src/protocol/xf86vidmode.rs | |
index ad5bf93..e1abde0 100644 | |
--- a/src/protocol/xf86vidmode.rs | |
+++ b/src/protocol/xf86vidmode.rs | |
@@ -455,6 +455,7 @@ pub struct GetModeLineReply { | |
pub vsyncend: u16, | |
pub vtotal: u16, | |
pub flags: u32, | |
+ // deducible: Some("privsize") | |
pub private: Vec<u8>, | |
} | |
impl TryParse for GetModeLineReply { | |
@@ -634,6 +635,10 @@ pub struct GetMonitorReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("vendor_length") | |
+ // deducible: Some("model_length") | |
+ // deducible: Some("num_hsync") | |
+ // deducible: Some("num_vsync") | |
pub hsync: Vec<Syncrange>, | |
pub vsync: Vec<Syncrange>, | |
pub vendor: Vec<u8>, | |
@@ -730,6 +735,7 @@ pub struct GetAllModeLinesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("modecount") | |
pub modeinfo: Vec<ModeInfo>, | |
} | |
impl TryParse for GetAllModeLinesReply { | |
diff --git a/src/protocol/xfixes.rs b/src/protocol/xfixes.rs | |
index 9da3c10..32e8178 100644 | |
--- a/src/protocol/xfixes.rs | |
+++ b/src/protocol/xfixes.rs | |
@@ -1527,6 +1527,7 @@ where | |
pub struct FetchRegionReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub extents: xproto::Rectangle, | |
pub rectangles: Vec<xproto::Rectangle>, | |
} | |
@@ -1744,6 +1745,7 @@ pub struct GetCursorNameReply { | |
pub sequence: u16, | |
pub length: u32, | |
pub atom: xproto::Atom, | |
+ // deducible: Some("nbytes") | |
pub name: Vec<u8>, | |
} | |
impl TryParse for GetCursorNameReply { | |
@@ -1803,6 +1805,7 @@ pub struct GetCursorImageAndNameReply { | |
pub yhot: u16, | |
pub cursor_serial: u32, | |
pub cursor_atom: xproto::Atom, | |
+ // deducible: Some("nbytes") | |
pub cursor_image: Vec<u32>, | |
pub name: Vec<u8>, | |
} | |
diff --git a/src/protocol/xinerama.rs b/src/protocol/xinerama.rs | |
index 78d7bbd..8f2ce2f 100644 | |
--- a/src/protocol/xinerama.rs | |
+++ b/src/protocol/xinerama.rs | |
@@ -379,6 +379,7 @@ pub struct QueryScreensReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("number") | |
pub screen_info: Vec<ScreenInfo>, | |
} | |
impl TryParse for QueryScreensReply { | |
diff --git a/src/protocol/xinput.rs b/src/protocol/xinput.rs | |
index 586d999..b8fe370 100644 | |
--- a/src/protocol/xinput.rs | |
+++ b/src/protocol/xinput.rs | |
@@ -569,6 +569,7 @@ impl Serialize for AxisInfo { | |
pub struct ValuatorInfo { | |
pub class_id: InputClass, | |
pub len: u8, | |
+ // deducible: Some("axes_len") | |
pub mode: ValuatorMode, | |
pub motion_size: u32, | |
pub axes: Vec<AxisInfo>, | |
@@ -690,6 +691,7 @@ impl Serialize for InputInfoInfoButton { | |
} | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct InputInfoInfoValuator { | |
+ // deducible: Some("axes_len") | |
pub mode: ValuatorMode, | |
pub motion_size: u32, | |
pub axes: Vec<AxisInfo>, | |
@@ -809,6 +811,7 @@ impl InputInfoInfo { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct InputInfo { | |
+ // deducible: Some("class_id") | |
pub len: u8, | |
pub info: InputInfoInfo, | |
} | |
@@ -845,6 +848,7 @@ impl Serialize for InputInfo { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceName { | |
+ // deducible: Some("len") | |
pub string: Vec<u8>, | |
} | |
impl TryParse for DeviceName { | |
@@ -904,6 +908,7 @@ pub struct ListInputDevicesReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("devices_len") | |
pub devices: Vec<DeviceInfo>, | |
pub infos: Vec<InputInfo>, | |
pub names: Vec<xproto::Str>, | |
@@ -1007,6 +1012,7 @@ pub struct OpenDeviceReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_classes") | |
pub class_info: Vec<InputClassInfo>, | |
} | |
impl TryParse for OpenDeviceReply { | |
@@ -1187,6 +1193,8 @@ pub struct GetSelectedExtensionEventsReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_this_classes") | |
+ // deducible: Some("num_all_classes") | |
pub this_classes: Vec<EventClass>, | |
pub all_classes: Vec<EventClass>, | |
} | |
@@ -1353,6 +1361,7 @@ pub struct GetDeviceDontPropagateListReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_classes") | |
pub classes: Vec<EventClass>, | |
} | |
impl TryParse for GetDeviceDontPropagateListReply { | |
@@ -1448,6 +1457,7 @@ pub struct GetDeviceMotionEventsReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_events") | |
pub num_axes: u8, | |
pub device_mode: ValuatorMode, | |
pub events: Vec<DeviceTimeCoord>, | |
@@ -2520,6 +2530,7 @@ pub struct StringFeedbackState { | |
pub feedback_id: u8, | |
pub len: u16, | |
pub max_symbols: u16, | |
+ // deducible: Some("num_keysyms") | |
pub keysyms: Vec<xproto::Keysym>, | |
} | |
impl TryParse for StringFeedbackState { | |
@@ -2841,6 +2852,7 @@ impl Serialize for FeedbackStateDataPointer { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct FeedbackStateDataString { | |
pub max_symbols: u16, | |
+ // deducible: Some("num_keysyms") | |
pub keysyms: Vec<xproto::Keysym>, | |
} | |
impl TryParse for FeedbackStateDataString { | |
@@ -3137,6 +3149,7 @@ impl FeedbackStateData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct FeedbackState { | |
+ // deducible: Some("class_id") | |
pub feedback_id: u8, | |
pub len: u16, | |
pub data: FeedbackStateData, | |
@@ -3207,6 +3220,7 @@ pub struct GetFeedbackControlReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_feedbacks") | |
pub feedbacks: Vec<FeedbackState>, | |
} | |
impl TryParse for GetFeedbackControlReply { | |
@@ -3441,6 +3455,7 @@ pub struct StringFeedbackCtl { | |
pub class_id: FeedbackClass, | |
pub feedback_id: u8, | |
pub len: u16, | |
+ // deducible: Some("num_keysyms") | |
pub keysyms: Vec<xproto::Keysym>, | |
} | |
impl TryParse for StringFeedbackCtl { | |
@@ -3727,6 +3742,7 @@ impl Serialize for FeedbackCtlDataPointer { | |
} | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct FeedbackCtlDataString { | |
+ // deducible: Some("num_keysyms") | |
pub keysyms: Vec<xproto::Keysym>, | |
} | |
impl TryParse for FeedbackCtlDataString { | |
@@ -4007,6 +4023,7 @@ impl FeedbackCtlData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct FeedbackCtl { | |
+ // deducible: Some("class_id") | |
pub feedback_id: u8, | |
pub len: u16, | |
pub data: FeedbackCtlData, | |
@@ -4179,6 +4196,7 @@ pub struct GetDeviceKeyMappingReply { | |
pub response_type: u8, | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub keysyms_per_keycode: u8, | |
pub keysyms: Vec<xproto::Keysym>, | |
} | |
@@ -4270,6 +4288,7 @@ pub struct GetDeviceModifierMappingReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("keycodes_per_modifier") | |
pub keymaps: Vec<u8>, | |
} | |
impl TryParse for GetDeviceModifierMappingReply { | |
@@ -4387,6 +4406,7 @@ pub struct GetDeviceButtonMappingReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("map_size") | |
pub map: Vec<u8>, | |
} | |
impl TryParse for GetDeviceButtonMappingReply { | |
@@ -4704,6 +4724,7 @@ bitmask_binop!(ValuatorStateModeMask, u8); | |
pub struct ValuatorState { | |
pub class_id: InputClass, | |
pub len: u8, | |
+ // deducible: Some("num_valuators") | |
pub mode: u8, | |
pub valuators: Vec<i32>, | |
} | |
@@ -4883,6 +4904,7 @@ impl Serialize for InputStateDataButton { | |
} | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct InputStateDataValuator { | |
+ // deducible: Some("num_valuators") | |
pub mode: u8, | |
pub valuators: Vec<i32>, | |
} | |
@@ -4998,6 +5020,7 @@ impl InputStateData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct InputState { | |
+ // deducible: Some("class_id") | |
pub len: u8, | |
pub data: InputStateData, | |
} | |
@@ -5065,6 +5088,7 @@ pub struct QueryDeviceStateReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_classes") | |
pub classes: Vec<InputState>, | |
} | |
impl TryParse for QueryDeviceStateReply { | |
@@ -5254,6 +5278,7 @@ impl TryFrom<u32> for DeviceControl { | |
pub struct DeviceResolutionState { | |
pub control_id: DeviceControl, | |
pub len: u16, | |
+ // deducible: Some("num_valuators") | |
pub resolution_values: Vec<u32>, | |
pub resolution_min: Vec<u32>, | |
pub resolution_max: Vec<u32>, | |
@@ -5592,6 +5617,7 @@ impl Serialize for DeviceEnableState { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceStateDataResolution { | |
+ // deducible: Some("num_valuators") | |
pub resolution_values: Vec<u32>, | |
pub resolution_min: Vec<u32>, | |
pub resolution_max: Vec<u32>, | |
@@ -5948,6 +5974,7 @@ impl DeviceStateData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceState { | |
+ // deducible: Some("control_id") | |
pub len: u16, | |
pub data: DeviceStateData, | |
} | |
@@ -6044,6 +6071,7 @@ pub struct DeviceResolutionCtl { | |
pub control_id: DeviceControl, | |
pub len: u16, | |
pub first_valuator: u8, | |
+ // deducible: Some("num_valuators") | |
pub resolution_values: Vec<u32>, | |
} | |
impl TryParse for DeviceResolutionCtl { | |
@@ -6375,6 +6403,7 @@ impl Serialize for DeviceEnableCtrl { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceCtlDataResolution { | |
pub first_valuator: u8, | |
+ // deducible: Some("num_valuators") | |
pub resolution_values: Vec<u32>, | |
} | |
impl TryParse for DeviceCtlDataResolution { | |
@@ -6724,6 +6753,7 @@ impl DeviceCtlData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceCtl { | |
+ // deducible: Some("control_id") | |
pub len: u16, | |
pub data: DeviceCtlData, | |
} | |
@@ -6850,6 +6880,7 @@ pub struct ListDevicePropertiesReply { | |
pub xi_reply_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_atoms") | |
pub atoms: Vec<xproto::Atom>, | |
} | |
impl TryParse for ListDevicePropertiesReply { | |
@@ -7207,6 +7238,7 @@ pub struct GetDevicePropertyReply { | |
pub type_: xproto::Atom, | |
pub bytes_after: u32, | |
pub num_items: u32, | |
+ // deducible: Some("format") | |
pub device_id: u8, | |
pub items: GetDevicePropertyItems, | |
} | |
@@ -7454,6 +7486,7 @@ pub struct XIQueryPointerReply { | |
pub win_x: Fp1616, | |
pub win_y: Fp1616, | |
pub same_screen: bool, | |
+ // deducible: Some("buttons_len") | |
pub mods: ModifierInfo, | |
pub group: GroupInfo, | |
pub buttons: Vec<u32>, | |
@@ -7725,6 +7758,7 @@ impl TryFrom<u32> for ChangeMode { | |
pub struct AddMaster { | |
pub type_: HierarchyChangeType, | |
pub len: u16, | |
+ // deducible: Some("name_len") | |
pub send_core: bool, | |
pub enable: bool, | |
pub name: Vec<u8>, | |
@@ -7942,6 +7976,7 @@ impl Serialize for DetachSlave { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct HierarchyChangeDataAddMaster { | |
+ // deducible: Some("name_len") | |
pub send_core: bool, | |
pub enable: bool, | |
pub name: Vec<u8>, | |
@@ -8206,6 +8241,7 @@ impl HierarchyChangeData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct HierarchyChange { | |
+ // deducible: Some("type") | |
pub len: u16, | |
pub data: HierarchyChangeData, | |
} | |
@@ -8468,6 +8504,7 @@ bitmask_binop!(XIEventMask, u32); | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct EventMask { | |
pub deviceid: DeviceId, | |
+ // deducible: Some("mask_len") | |
pub mask: Vec<u32>, | |
} | |
impl TryParse for EventMask { | |
@@ -8928,6 +8965,7 @@ pub struct ButtonClass { | |
pub type_: DeviceClassType, | |
pub len: u16, | |
pub sourceid: DeviceId, | |
+ // deducible: Some("num_buttons") | |
pub state: Vec<u32>, | |
pub labels: Vec<xproto::Atom>, | |
} | |
@@ -8975,6 +9013,7 @@ pub struct KeyClass { | |
pub type_: DeviceClassType, | |
pub len: u16, | |
pub sourceid: DeviceId, | |
+ // deducible: Some("num_keys") | |
pub keys: Vec<u32>, | |
} | |
impl TryParse for KeyClass { | |
@@ -9267,6 +9306,7 @@ impl Serialize for ValuatorClass { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceClassDataKey { | |
+ // deducible: Some("num_keys") | |
pub keys: Vec<u32>, | |
} | |
impl TryParse for DeviceClassDataKey { | |
@@ -9298,6 +9338,7 @@ impl Serialize for DeviceClassDataKey { | |
} | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceClassDataButton { | |
+ // deducible: Some("num_buttons") | |
pub state: Vec<u32>, | |
pub labels: Vec<xproto::Atom>, | |
} | |
@@ -9635,6 +9676,7 @@ impl DeviceClassData { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct DeviceClass { | |
+ // deducible: Some("type") | |
pub len: u16, | |
pub sourceid: DeviceId, | |
pub data: DeviceClassData, | |
@@ -9677,6 +9719,8 @@ pub struct XIDeviceInfo { | |
pub deviceid: DeviceId, | |
pub type_: DeviceType, | |
pub attachment: DeviceId, | |
+ // deducible: Some("num_classes") | |
+ // deducible: Some("name_len") | |
pub enabled: bool, | |
pub name: Vec<u8>, | |
pub classes: Vec<DeviceClass>, | |
@@ -9767,6 +9811,7 @@ pub struct XIQueryDeviceReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_infos") | |
pub infos: Vec<XIDeviceInfo>, | |
} | |
impl TryParse for XIQueryDeviceReply { | |
@@ -10491,6 +10536,7 @@ pub struct XIPassiveGrabDeviceReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_modifiers") | |
pub modifiers: Vec<GrabModifierInfo>, | |
} | |
impl TryParse for XIPassiveGrabDeviceReply { | |
@@ -10597,6 +10643,7 @@ pub struct XIListPropertiesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_properties") | |
pub properties: Vec<xproto::Atom>, | |
} | |
impl TryParse for XIListPropertiesReply { | |
@@ -10894,6 +10941,7 @@ pub struct XIGetPropertyReply { | |
pub type_: xproto::Atom, | |
pub bytes_after: u32, | |
pub num_items: u32, | |
+ // deducible: Some("format") | |
pub items: XIGetPropertyItems, | |
} | |
impl TryParse for XIGetPropertyReply { | |
@@ -10951,6 +10999,7 @@ pub struct XIGetSelectedEventsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_masks") | |
pub masks: Vec<EventMask>, | |
} | |
impl TryParse for XIGetSelectedEventsReply { | |
@@ -12297,6 +12346,7 @@ pub struct DeviceChangedEvent { | |
pub event_type: u16, | |
pub deviceid: DeviceId, | |
pub time: xproto::Timestamp, | |
+ // deducible: Some("num_classes") | |
pub sourceid: DeviceId, | |
pub reason: ChangeReason, | |
pub classes: Vec<DeviceClass>, | |
@@ -12374,6 +12424,8 @@ pub struct KeyPressEvent { | |
pub root_y: Fp1616, | |
pub event_x: Fp1616, | |
pub event_y: Fp1616, | |
+ // deducible: Some("buttons_len") | |
+ // deducible: Some("valuators_len") | |
pub sourceid: DeviceId, | |
pub flags: u32, | |
pub mods: ModifierInfo, | |
@@ -12471,6 +12523,8 @@ pub struct ButtonPressEvent { | |
pub root_y: Fp1616, | |
pub event_x: Fp1616, | |
pub event_y: Fp1616, | |
+ // deducible: Some("buttons_len") | |
+ // deducible: Some("valuators_len") | |
pub sourceid: DeviceId, | |
pub flags: u32, | |
pub mods: ModifierInfo, | |
@@ -12702,6 +12756,7 @@ pub struct EnterEvent { | |
pub event_y: Fp1616, | |
pub same_screen: bool, | |
pub focus: bool, | |
+ // deducible: Some("buttons_len") | |
pub mods: ModifierInfo, | |
pub group: GroupInfo, | |
pub buttons: Vec<u32>, | |
@@ -12910,6 +12965,7 @@ pub struct HierarchyEvent { | |
pub deviceid: DeviceId, | |
pub time: xproto::Timestamp, | |
pub flags: u32, | |
+ // deducible: Some("num_infos") | |
pub infos: Vec<HierarchyInfo>, | |
} | |
impl TryParse for HierarchyEvent { | |
@@ -13052,6 +13108,7 @@ pub struct RawKeyPressEvent { | |
pub time: xproto::Timestamp, | |
pub detail: u32, | |
pub sourceid: DeviceId, | |
+ // deducible: Some("valuators_len") | |
pub flags: u32, | |
pub valuator_mask: Vec<u32>, | |
pub axisvalues: Vec<Fp3232>, | |
@@ -13102,6 +13159,7 @@ pub struct RawButtonPressEvent { | |
pub time: xproto::Timestamp, | |
pub detail: u32, | |
pub sourceid: DeviceId, | |
+ // deducible: Some("valuators_len") | |
pub flags: u32, | |
pub valuator_mask: Vec<u32>, | |
pub axisvalues: Vec<Fp3232>, | |
@@ -13193,6 +13251,8 @@ pub struct TouchBeginEvent { | |
pub root_y: Fp1616, | |
pub event_x: Fp1616, | |
pub event_y: Fp1616, | |
+ // deducible: Some("buttons_len") | |
+ // deducible: Some("valuators_len") | |
pub sourceid: DeviceId, | |
pub flags: u32, | |
pub mods: ModifierInfo, | |
@@ -13366,6 +13426,7 @@ pub struct RawTouchBeginEvent { | |
pub time: xproto::Timestamp, | |
pub detail: u32, | |
pub sourceid: DeviceId, | |
+ // deducible: Some("valuators_len") | |
pub flags: u32, | |
pub valuator_mask: Vec<u32>, | |
pub axisvalues: Vec<Fp3232>, | |
diff --git a/src/protocol/xkb.rs b/src/protocol/xkb.rs | |
index eb431b9..b120fb5 100644 | |
--- a/src/protocol/xkb.rs | |
+++ b/src/protocol/xkb.rs | |
@@ -2600,6 +2600,7 @@ impl Serialize for KeyAlias { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct CountedString16 { | |
+ // deducible: Some("length") | |
pub string: Vec<u8>, | |
pub alignment_pad: Vec<u8>, | |
} | |
@@ -2698,6 +2699,7 @@ pub struct KeyType { | |
pub mods_mods: u8, | |
pub mods_vmods: u16, | |
pub num_levels: u8, | |
+ // deducible: Some("nMapEntries") | |
pub has_preserve: bool, | |
pub map: Vec<KTMapEntry>, | |
pub preserve: Vec<ModDef>, | |
@@ -2751,6 +2753,7 @@ pub struct KeySymMap { | |
pub kt_index: [u8; 4], | |
pub group_info: u8, | |
pub width: u8, | |
+ // deducible: Some("nSyms") | |
pub syms: Vec<xproto::Keysym>, | |
} | |
impl TryParse for KeySymMap { | |
@@ -3368,6 +3371,7 @@ pub struct SetKeyType { | |
pub real_mods: u8, | |
pub virtual_mods: u16, | |
pub num_levels: u8, | |
+ // deducible: Some("nMapEntries") | |
pub preserve: bool, | |
pub entries: Vec<KTSetMapEntry>, | |
pub preserve_entries: Vec<KTSetMapEntry>, | |
@@ -3420,6 +3424,7 @@ pub type String8 = u8; | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Outline { | |
+ // deducible: Some("nPoints") | |
pub corner_radius: u8, | |
pub points: Vec<xproto::Point>, | |
} | |
@@ -3459,6 +3464,7 @@ impl Serialize for Outline { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Shape { | |
pub name: xproto::Atom, | |
+ // deducible: Some("nOutlines") | |
pub primary_ndx: u8, | |
pub approx_ndx: u8, | |
pub outlines: Vec<Outline>, | |
@@ -3595,6 +3601,7 @@ impl Serialize for OverlayKey { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct OverlayRow { | |
pub row_under: u8, | |
+ // deducible: Some("nKeys") | |
pub keys: Vec<OverlayKey>, | |
} | |
impl TryParse for OverlayRow { | |
@@ -3633,6 +3640,7 @@ impl Serialize for OverlayRow { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Overlay { | |
pub name: xproto::Atom, | |
+ // deducible: Some("nRows") | |
pub rows: Vec<OverlayRow>, | |
} | |
impl TryParse for Overlay { | |
@@ -3672,6 +3680,7 @@ impl Serialize for Overlay { | |
pub struct Row { | |
pub top: i16, | |
pub left: i16, | |
+ // deducible: Some("nKeys") | |
pub vertical: bool, | |
pub keys: Vec<Key>, | |
} | |
@@ -3786,6 +3795,7 @@ impl TryFrom<u32> for DoodadType { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Listing { | |
pub flags: u16, | |
+ // deducible: Some("length") | |
pub string: Vec<String8>, | |
} | |
impl TryParse for Listing { | |
@@ -7323,6 +7333,7 @@ pub struct GetMapReply { | |
pub length: u32, | |
pub min_key_code: xproto::Keycode, | |
pub max_key_code: xproto::Keycode, | |
+ // deducible: Some("present") | |
pub first_type: u8, | |
pub n_types: u8, | |
pub total_types: u8, | |
@@ -7677,6 +7688,7 @@ pub struct GetCompatMapReply { | |
pub length: u32, | |
pub groups_rtrn: u8, | |
pub first_si_rtrn: u16, | |
+ // deducible: Some("nSIRtrn") | |
pub n_total_si: u16, | |
pub si_rtrn: Vec<SymInterpret>, | |
pub group_rtrn: Vec<ModDef>, | |
@@ -8283,6 +8295,7 @@ pub struct GetNamesReply { | |
pub device_id: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("which") | |
pub min_key_code: xproto::Keycode, | |
pub max_key_code: xproto::Keycode, | |
pub n_types: u8, | |
@@ -8747,6 +8760,12 @@ pub struct ListComponentsReply { | |
pub device_id: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("nKeymaps") | |
+ // deducible: Some("nKeycodes") | |
+ // deducible: Some("nTypes") | |
+ // deducible: Some("nCompatMaps") | |
+ // deducible: Some("nSymbols") | |
+ // deducible: Some("nGeometries") | |
pub extra: u16, | |
pub keymaps: Vec<Listing>, | |
pub keycodes: Vec<Listing>, | |
@@ -8951,6 +8970,7 @@ pub struct GetKbdByNameRepliesTypes { | |
pub getmap_length: u32, | |
pub type_min_key_code: xproto::Keycode, | |
pub type_max_key_code: xproto::Keycode, | |
+ // deducible: Some("present") | |
pub first_type: u8, | |
pub n_types: u8, | |
pub total_types: u8, | |
@@ -9027,6 +9047,7 @@ pub struct GetKbdByNameRepliesCompatMap { | |
pub compatmap_length: u32, | |
pub groups_rtrn: u8, | |
pub first_si_rtrn: u16, | |
+ // deducible: Some("nSIRtrn") | |
pub n_total_si: u16, | |
pub si_rtrn: Vec<SymInterpret>, | |
pub group_rtrn: Vec<ModDef>, | |
@@ -9063,6 +9084,7 @@ pub struct GetKbdByNameRepliesIndicatorMaps { | |
pub indicatormap_length: u32, | |
pub which: u32, | |
pub real_indicators: u32, | |
+ // deducible: Some("nIndicators") | |
pub maps: Vec<IndicatorMap>, | |
} | |
impl TryParse for GetKbdByNameRepliesIndicatorMaps { | |
@@ -9249,6 +9271,7 @@ pub struct GetKbdByNameRepliesKeyNames { | |
pub key_device_id: u8, | |
pub keyname_sequence: u16, | |
pub keyname_length: u32, | |
+ // deducible: Some("which") | |
pub key_min_key_code: xproto::Keycode, | |
pub key_max_key_code: xproto::Keycode, | |
pub n_types: u8, | |
@@ -9487,14 +9510,17 @@ pub struct GetDeviceInfoReply { | |
pub present: u16, | |
pub supported: u16, | |
pub unsupported: u16, | |
+ // deducible: Some("nDeviceLedFBs") | |
pub first_btn_wanted: u8, | |
pub n_btns_wanted: u8, | |
pub first_btn_rtrn: u8, | |
+ // deducible: Some("nBtnsRtrn") | |
pub total_btns: u8, | |
pub has_own_state: bool, | |
pub dflt_kbd_fb: u16, | |
pub dflt_led_fb: u16, | |
pub dev_type: xproto::Atom, | |
+ // deducible: Some("nameLen") | |
pub name: Vec<String8>, | |
pub btn_actions: Vec<Action>, | |
pub leds: Vec<DeviceLedInfo>, | |
diff --git a/src/protocol/xprint.rs b/src/protocol/xprint.rs | |
index 246398b..87c7d8e 100644 | |
--- a/src/protocol/xprint.rs | |
+++ b/src/protocol/xprint.rs | |
@@ -35,7 +35,9 @@ pub type String8 = u8; | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Printer { | |
+ // deducible: Some("nameLen") | |
pub name: Vec<String8>, | |
+ // deducible: Some("descLen") | |
pub description: Vec<String8>, | |
} | |
impl TryParse for Printer { | |
@@ -465,6 +467,7 @@ pub struct PrintGetPrinterListReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("listCount") | |
pub printers: Vec<Printer>, | |
} | |
impl TryParse for PrintGetPrinterListReply { | |
@@ -893,6 +896,7 @@ pub struct PrintGetDocumentDataReply { | |
pub length: u32, | |
pub status_code: u32, | |
pub finished_flag: u32, | |
+ // deducible: Some("dataLen") | |
pub data: Vec<u8>, | |
} | |
impl TryParse for PrintGetDocumentDataReply { | |
@@ -1095,6 +1099,7 @@ pub struct PrintGetAttributesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("stringLen") | |
pub attributes: Vec<String8>, | |
} | |
impl TryParse for PrintGetAttributesReply { | |
@@ -1164,6 +1169,7 @@ pub struct PrintGetOneAttributesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("valueLen") | |
pub value: Vec<String8>, | |
} | |
impl TryParse for PrintGetOneAttributesReply { | |
@@ -1317,6 +1323,7 @@ pub struct PrintQueryScreensReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("listCount") | |
pub roots: Vec<xproto::Window>, | |
} | |
impl TryParse for PrintQueryScreensReply { | |
diff --git a/src/protocol/xproto.rs b/src/protocol/xproto.rs | |
index b8d4cd2..3a6081c 100644 | |
--- a/src/protocol/xproto.rs | |
+++ b/src/protocol/xproto.rs | |
@@ -444,6 +444,7 @@ impl Serialize for Visualtype { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Depth { | |
pub depth: u8, | |
+ // deducible: Some("visuals_len") | |
pub visuals: Vec<Visualtype>, | |
} | |
impl TryParse for Depth { | |
@@ -666,6 +667,7 @@ pub struct Screen { | |
pub backing_stores: BackingStore, | |
pub save_unders: bool, | |
pub root_depth: u8, | |
+ // deducible: Some("allowed_depths_len") | |
pub allowed_depths: Vec<Depth>, | |
} | |
impl TryParse for Screen { | |
@@ -733,6 +735,8 @@ pub struct SetupRequest { | |
pub byte_order: u8, | |
pub protocol_major_version: u16, | |
pub protocol_minor_version: u16, | |
+ // deducible: Some("authorization_protocol_name_len") | |
+ // deducible: Some("authorization_protocol_data_len") | |
pub authorization_protocol_name: Vec<u8>, | |
pub authorization_protocol_data: Vec<u8>, | |
} | |
@@ -796,6 +800,7 @@ impl Serialize for SetupRequest { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct SetupFailed { | |
pub status: u8, | |
+ // deducible: Some("reason_len") | |
pub protocol_major_version: u16, | |
pub protocol_minor_version: u16, | |
pub length: u16, | |
@@ -842,6 +847,7 @@ impl Serialize for SetupFailed { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct SetupAuthenticate { | |
pub status: u8, | |
+ // deducible: Some("length") | |
pub reason: Vec<u8>, | |
} | |
impl TryParse for SetupAuthenticate { | |
@@ -959,7 +965,10 @@ pub struct Setup { | |
pub resource_id_base: u32, | |
pub resource_id_mask: u32, | |
pub motion_buffer_size: u32, | |
+ // deducible: Some("vendor_len") | |
pub maximum_request_length: u16, | |
+ // deducible: Some("roots_len") | |
+ // deducible: Some("pixmap_formats_len") | |
pub image_byte_order: ImageOrder, | |
pub bitmap_format_bit_order: ImageOrder, | |
pub bitmap_format_scanline_unit: u8, | |
@@ -7435,6 +7444,7 @@ pub struct QueryTreeReply { | |
pub length: u32, | |
pub root: Window, | |
pub parent: Window, | |
+ // deducible: Some("children_len") | |
pub children: Vec<Window>, | |
} | |
impl TryParse for QueryTreeReply { | |
@@ -7589,6 +7599,7 @@ pub struct GetAtomNameReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("name_len") | |
pub name: Vec<u8>, | |
} | |
impl TryParse for GetAtomNameReply { | |
@@ -8235,6 +8246,7 @@ pub struct ListPropertiesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("atoms_len") | |
pub atoms: Vec<Atom>, | |
} | |
impl TryParse for ListPropertiesReply { | |
@@ -10098,6 +10110,7 @@ pub struct GetMotionEventsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("events_len") | |
pub events: Vec<Timecoord>, | |
} | |
impl TryParse for GetMotionEventsReply { | |
@@ -10817,12 +10830,14 @@ pub struct QueryFontReply { | |
pub min_char_or_byte2: u16, | |
pub max_char_or_byte2: u16, | |
pub default_char: u16, | |
+ // deducible: Some("properties_len") | |
pub draw_direction: FontDraw, | |
pub min_byte1: u8, | |
pub max_byte1: u8, | |
pub all_chars_exist: bool, | |
pub font_ascent: i16, | |
pub font_descent: i16, | |
+ // deducible: Some("char_infos_len") | |
pub properties: Vec<Fontprop>, | |
pub char_infos: Vec<Charinfo>, | |
} | |
@@ -10968,6 +10983,7 @@ impl TryFrom<&[u8]> for QueryTextExtentsReply { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Str { | |
+ // deducible: Some("name_len") | |
pub name: Vec<u8>, | |
} | |
impl TryParse for Str { | |
@@ -11050,6 +11066,7 @@ pub struct ListFontsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("names_len") | |
pub names: Vec<Str>, | |
} | |
impl TryParse for ListFontsReply { | |
@@ -11134,6 +11151,7 @@ where | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ListFontsWithInfoReply { | |
pub response_type: u8, | |
+ // deducible: Some("name_len") | |
pub sequence: u16, | |
pub length: u32, | |
pub min_bounds: Charinfo, | |
@@ -11141,6 +11159,7 @@ pub struct ListFontsWithInfoReply { | |
pub min_char_or_byte2: u16, | |
pub max_char_or_byte2: u16, | |
pub default_char: u16, | |
+ // deducible: Some("properties_len") | |
pub draw_direction: FontDraw, | |
pub min_byte1: u8, | |
pub max_byte1: u8, | |
@@ -11242,6 +11261,7 @@ pub struct GetFontPathReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("path_len") | |
pub path: Vec<Str>, | |
} | |
impl TryParse for GetFontPathReply { | |
@@ -13992,6 +14012,7 @@ pub struct GetImageReply { | |
pub response_type: u8, | |
pub depth: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub visual: Visualid, | |
pub data: Vec<u8>, | |
} | |
@@ -14487,6 +14508,7 @@ pub struct ListInstalledColormapsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("cmaps_len") | |
pub cmaps: Vec<Colormap>, | |
} | |
impl TryParse for ListInstalledColormapsReply { | |
@@ -14703,6 +14725,8 @@ pub struct AllocColorCellsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("pixels_len") | |
+ // deducible: Some("masks_len") | |
pub pixels: Vec<u32>, | |
pub masks: Vec<u32>, | |
} | |
@@ -14771,6 +14795,7 @@ pub struct AllocColorPlanesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("pixels_len") | |
pub red_mask: u32, | |
pub green_mask: u32, | |
pub blue_mask: u32, | |
@@ -15113,6 +15138,7 @@ pub struct QueryColorsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("colors_len") | |
pub colors: Vec<Rgb>, | |
} | |
impl TryParse for QueryColorsReply { | |
@@ -15792,6 +15818,7 @@ where | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ListExtensionsReply { | |
pub response_type: u8, | |
+ // deducible: Some("names_len") | |
pub sequence: u16, | |
pub length: u32, | |
pub names: Vec<Str>, | |
@@ -15878,6 +15905,7 @@ pub struct GetKeyboardMappingReply { | |
pub response_type: u8, | |
pub keysyms_per_keycode: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub keysyms: Vec<Keysym>, | |
} | |
impl TryParse for GetKeyboardMappingReply { | |
@@ -16822,6 +16850,7 @@ where | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct Host { | |
pub family: Family, | |
+ // deducible: Some("address_len") | |
pub address: Vec<u8>, | |
} | |
impl TryParse for Host { | |
@@ -16891,6 +16920,7 @@ pub struct ListHostsReply { | |
pub mode: AccessControl, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("hosts_len") | |
pub hosts: Vec<Host>, | |
} | |
impl TryParse for ListHostsReply { | |
@@ -17461,6 +17491,7 @@ where | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct GetPointerMappingReply { | |
pub response_type: u8, | |
+ // deducible: Some("map_len") | |
pub sequence: u16, | |
pub length: u32, | |
pub map: Vec<u8>, | |
@@ -17639,6 +17670,7 @@ where | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct GetModifierMappingReply { | |
pub response_type: u8, | |
+ // deducible: Some("keycodes_per_modifier") | |
pub sequence: u16, | |
pub length: u32, | |
pub keycodes: Vec<Keycode>, | |
diff --git a/src/protocol/xselinux.rs b/src/protocol/xselinux.rs | |
index e1c081a..3443df1 100644 | |
--- a/src/protocol/xselinux.rs | |
+++ b/src/protocol/xselinux.rs | |
@@ -144,6 +144,7 @@ pub struct GetDeviceCreateContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetDeviceCreateContextReply { | |
@@ -235,6 +236,7 @@ pub struct GetDeviceContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetDeviceContextReply { | |
@@ -316,6 +318,7 @@ pub struct GetWindowCreateContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetWindowCreateContextReply { | |
@@ -371,6 +374,7 @@ pub struct GetWindowContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetWindowContextReply { | |
@@ -397,6 +401,8 @@ impl TryFrom<&[u8]> for GetWindowContextReply { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct ListItem { | |
pub name: xproto::Atom, | |
+ // deducible: Some("object_context_len") | |
+ // deducible: Some("data_context_len") | |
pub object_context: Vec<u8>, | |
pub data_context: Vec<u8>, | |
} | |
@@ -507,6 +513,7 @@ pub struct GetPropertyCreateContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetPropertyCreateContextReply { | |
@@ -588,6 +595,7 @@ pub struct GetPropertyUseContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetPropertyUseContextReply { | |
@@ -648,6 +656,7 @@ pub struct GetPropertyContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetPropertyContextReply { | |
@@ -708,6 +717,7 @@ pub struct GetPropertyDataContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetPropertyDataContextReply { | |
@@ -763,6 +773,7 @@ pub struct ListPropertiesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("properties_len") | |
pub properties: Vec<ListItem>, | |
} | |
impl TryParse for ListPropertiesReply { | |
@@ -843,6 +854,7 @@ pub struct GetSelectionCreateContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetSelectionCreateContextReply { | |
@@ -924,6 +936,7 @@ pub struct GetSelectionUseContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetSelectionUseContextReply { | |
@@ -979,6 +992,7 @@ pub struct GetSelectionContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetSelectionContextReply { | |
@@ -1034,6 +1048,7 @@ pub struct GetSelectionDataContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetSelectionDataContextReply { | |
@@ -1084,6 +1099,7 @@ pub struct ListSelectionsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("selections_len") | |
pub selections: Vec<ListItem>, | |
} | |
impl TryParse for ListSelectionsReply { | |
@@ -1138,6 +1154,7 @@ pub struct GetClientContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("context_len") | |
pub context: Vec<u8>, | |
} | |
impl TryParse for GetClientContextReply { | |
diff --git a/src/protocol/xv.rs b/src/protocol/xv.rs | |
index ecb264b..6438514 100644 | |
--- a/src/protocol/xv.rs | |
+++ b/src/protocol/xv.rs | |
@@ -616,7 +616,9 @@ impl Serialize for Format { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct AdaptorInfo { | |
pub base_id: Port, | |
+ // deducible: Some("name_size") | |
pub num_ports: u16, | |
+ // deducible: Some("num_formats") | |
pub type_: u8, | |
pub name: Vec<u8>, | |
pub formats: Vec<Format>, | |
@@ -673,6 +675,7 @@ impl Serialize for AdaptorInfo { | |
#[derive(Debug, Clone, PartialEq, Eq)] | |
pub struct EncodingInfo { | |
pub encoding: Encoding, | |
+ // deducible: Some("name_size") | |
pub width: u16, | |
pub height: u16, | |
pub rate: Rational, | |
@@ -729,6 +732,8 @@ pub struct Image { | |
pub id: u32, | |
pub width: u16, | |
pub height: u16, | |
+ // deducible: Some("data_size") | |
+ // deducible: Some("num_planes") | |
pub pitches: Vec<u32>, | |
pub offsets: Vec<u32>, | |
pub data: Vec<u8>, | |
@@ -782,6 +787,7 @@ pub struct AttributeInfo { | |
pub flags: u32, | |
pub min: i32, | |
pub max: i32, | |
+ // deducible: Some("size") | |
pub name: Vec<u8>, | |
} | |
impl TryParse for AttributeInfo { | |
@@ -1538,6 +1544,7 @@ pub struct QueryAdaptorsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_adaptors") | |
pub info: Vec<AdaptorInfo>, | |
} | |
impl TryParse for QueryAdaptorsReply { | |
@@ -1592,6 +1599,7 @@ pub struct QueryEncodingsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_encodings") | |
pub info: Vec<EncodingInfo>, | |
} | |
impl TryParse for QueryEncodingsReply { | |
@@ -2244,6 +2252,7 @@ pub struct QueryPortAttributesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_attributes") | |
pub text_size: u32, | |
pub attributes: Vec<AttributeInfo>, | |
} | |
@@ -2300,6 +2309,7 @@ pub struct ListImageFormatsReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_formats") | |
pub format: Vec<ImageFormatInfo>, | |
} | |
impl TryParse for ListImageFormatsReply { | |
@@ -2365,6 +2375,7 @@ pub struct QueryImageAttributesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num_planes") | |
pub data_size: u32, | |
pub width: u16, | |
pub height: u16, | |
diff --git a/src/protocol/xvmc.rs b/src/protocol/xvmc.rs | |
index ec48558..d382715 100644 | |
--- a/src/protocol/xvmc.rs | |
+++ b/src/protocol/xvmc.rs | |
@@ -204,6 +204,7 @@ pub struct ListSurfaceTypesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num") | |
pub surfaces: Vec<SurfaceInfo>, | |
} | |
impl TryParse for ListSurfaceTypesReply { | |
@@ -278,6 +279,7 @@ where | |
pub struct CreateContextReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width_actual: u16, | |
pub height_actual: u16, | |
pub flags_return: u32, | |
@@ -368,6 +370,7 @@ where | |
pub struct CreateSurfaceReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub priv_data: Vec<u32>, | |
} | |
impl TryParse for CreateSurfaceReply { | |
@@ -463,6 +466,7 @@ where | |
pub struct CreateSubpictureReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
+ // deducible: Some("length") | |
pub width_actual: u16, | |
pub height_actual: u16, | |
pub num_palette_entries: u16, | |
@@ -559,6 +563,7 @@ pub struct ListSubpictureTypesReply { | |
pub response_type: u8, | |
pub sequence: u16, | |
pub length: u32, | |
+ // deducible: Some("num") | |
pub types: Vec<xv::ImageFormatInfo>, | |
} | |
impl TryParse for ListSubpictureTypesReply { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment