1pub const MIRACLE_PLUGIN_VERSION: u32 = 1;
4pub const MirWindowAttrib_mir_window_attrib_type: MirWindowAttrib = 0;
5pub const MirWindowAttrib_mir_window_attrib_state: MirWindowAttrib = 1;
6pub const MirWindowAttrib_mir_window_attrib_focus: MirWindowAttrib = 3;
7pub const MirWindowAttrib_mir_window_attrib_dpi: MirWindowAttrib = 4;
8pub const MirWindowAttrib_mir_window_attrib_visibility: MirWindowAttrib = 5;
9pub const MirWindowAttrib_mir_window_attrib_preferred_orientation: MirWindowAttrib = 6;
10pub const MirWindowAttrib_mir_window_attribs: MirWindowAttrib = 7;
11#[doc = " Attributes of a window that the client and server/shell may wish to\n get or set over the wire."]
12pub type MirWindowAttrib = ::std::os::raw::c_uint;
13#[doc = "< AKA \"regular\""]
14pub const MirWindowType_mir_window_type_normal: MirWindowType = 0;
15#[doc = "< AKA \"floating\""]
16pub const MirWindowType_mir_window_type_utility: MirWindowType = 1;
17pub const MirWindowType_mir_window_type_dialog: MirWindowType = 2;
18pub const MirWindowType_mir_window_type_gloss: MirWindowType = 3;
19pub const MirWindowType_mir_window_type_freestyle: MirWindowType = 4;
20pub const MirWindowType_mir_window_type_menu: MirWindowType = 5;
21#[doc = "< AKA \"OSK\" or handwriting etc."]
22pub const MirWindowType_mir_window_type_inputmethod: MirWindowType = 6;
23#[doc = "< AKA \"toolbox\"/\"toolbar\""]
24pub const MirWindowType_mir_window_type_satellite: MirWindowType = 7;
25#[doc = "< AKA \"tooltip\""]
26pub const MirWindowType_mir_window_type_tip: MirWindowType = 8;
27pub const MirWindowType_mir_window_type_decoration: MirWindowType = 9;
28pub const MirWindowType_mir_window_types: MirWindowType = 10;
29pub type MirWindowType = ::std::os::raw::c_uint;
30pub const MirWindowState_mir_window_state_unknown: MirWindowState = 0;
31pub const MirWindowState_mir_window_state_restored: MirWindowState = 1;
32pub const MirWindowState_mir_window_state_minimized: MirWindowState = 2;
33pub const MirWindowState_mir_window_state_maximized: MirWindowState = 3;
34pub const MirWindowState_mir_window_state_vertmaximized: MirWindowState = 4;
35pub const MirWindowState_mir_window_state_fullscreen: MirWindowState = 5;
36pub const MirWindowState_mir_window_state_horizmaximized: MirWindowState = 6;
37pub const MirWindowState_mir_window_state_hidden: MirWindowState = 7;
38#[doc = "< Used for panels, notifications and other windows attached to output edges"]
39pub const MirWindowState_mir_window_state_attached: MirWindowState = 8;
40pub const MirWindowState_mir_window_states: MirWindowState = 9;
41pub type MirWindowState = ::std::os::raw::c_uint;
42#[doc = "< Inactive and does not have focus"]
43pub const MirWindowFocusState_mir_window_focus_state_unfocused: MirWindowFocusState = 0;
44#[doc = "< Active and has keybaord focus"]
45pub const MirWindowFocusState_mir_window_focus_state_focused: MirWindowFocusState = 1;
46#[doc = "< Active but does not have keyboard focus"]
47pub const MirWindowFocusState_mir_window_focus_state_active: MirWindowFocusState = 2;
48pub type MirWindowFocusState = ::std::os::raw::c_uint;
49pub const MirWindowVisibility_mir_window_visibility_occluded: MirWindowVisibility = 0;
50pub const MirWindowVisibility_mir_window_visibility_exposed: MirWindowVisibility = 1;
51pub type MirWindowVisibility = ::std::os::raw::c_uint;
52pub const MirLifecycleState_mir_lifecycle_state_will_suspend: MirLifecycleState = 0;
53pub const MirLifecycleState_mir_lifecycle_state_resumed: MirLifecycleState = 1;
54pub const MirLifecycleState_mir_lifecycle_connection_lost: MirLifecycleState = 2;
55pub type MirLifecycleState = ::std::os::raw::c_uint;
56pub const MirPowerMode_mir_power_mode_on: MirPowerMode = 0;
57pub const MirPowerMode_mir_power_mode_standby: MirPowerMode = 1;
58pub const MirPowerMode_mir_power_mode_suspend: MirPowerMode = 2;
59pub const MirPowerMode_mir_power_mode_off: MirPowerMode = 3;
60pub type MirPowerMode = ::std::os::raw::c_uint;
61pub const MirOutputType_mir_output_type_unknown: MirOutputType = 0;
62pub const MirOutputType_mir_output_type_vga: MirOutputType = 1;
63pub const MirOutputType_mir_output_type_dvii: MirOutputType = 2;
64pub const MirOutputType_mir_output_type_dvid: MirOutputType = 3;
65pub const MirOutputType_mir_output_type_dvia: MirOutputType = 4;
66pub const MirOutputType_mir_output_type_composite: MirOutputType = 5;
67pub const MirOutputType_mir_output_type_svideo: MirOutputType = 6;
68pub const MirOutputType_mir_output_type_lvds: MirOutputType = 7;
69pub const MirOutputType_mir_output_type_component: MirOutputType = 8;
70pub const MirOutputType_mir_output_type_ninepindin: MirOutputType = 9;
71pub const MirOutputType_mir_output_type_displayport: MirOutputType = 10;
72pub const MirOutputType_mir_output_type_hdmia: MirOutputType = 11;
73pub const MirOutputType_mir_output_type_hdmib: MirOutputType = 12;
74pub const MirOutputType_mir_output_type_tv: MirOutputType = 13;
75pub const MirOutputType_mir_output_type_edp: MirOutputType = 14;
76pub const MirOutputType_mir_output_type_virtual: MirOutputType = 15;
77pub const MirOutputType_mir_output_type_dsi: MirOutputType = 16;
78pub const MirOutputType_mir_output_type_dpi: MirOutputType = 17;
79pub type MirOutputType = ::std::os::raw::c_uint;
80pub const MirPromptSessionState_mir_prompt_session_state_stopped: MirPromptSessionState = 0;
81pub const MirPromptSessionState_mir_prompt_session_state_started: MirPromptSessionState = 1;
82pub const MirPromptSessionState_mir_prompt_session_state_suspended: MirPromptSessionState = 2;
83pub type MirPromptSessionState = ::std::os::raw::c_uint;
84pub const MirPixelFormat_mir_pixel_format_invalid: MirPixelFormat = 0;
85pub const MirPixelFormat_mir_pixel_format_abgr_8888: MirPixelFormat = 1;
86pub const MirPixelFormat_mir_pixel_format_xbgr_8888: MirPixelFormat = 2;
87pub const MirPixelFormat_mir_pixel_format_argb_8888: MirPixelFormat = 3;
88pub const MirPixelFormat_mir_pixel_format_xrgb_8888: MirPixelFormat = 4;
89pub const MirPixelFormat_mir_pixel_format_bgr_888: MirPixelFormat = 5;
90pub const MirPixelFormat_mir_pixel_format_rgb_888: MirPixelFormat = 6;
91pub const MirPixelFormat_mir_pixel_format_rgb_565: MirPixelFormat = 7;
92pub const MirPixelFormat_mir_pixel_format_rgba_5551: MirPixelFormat = 8;
93pub const MirPixelFormat_mir_pixel_format_rgba_4444: MirPixelFormat = 9;
94pub const MirPixelFormat_mir_pixel_formats: MirPixelFormat = 10;
95#[doc = " 32-bit pixel formats (8888):\n The order of components in the enum matches the order of the components\n as they would be written in an integer representing a pixel value of that\n format. For example; abgr_8888 should be coded as 0xAABBGGRR, which will\n end up as R,G,B,A in memory on a little endian system, and as A,B,G,R on a\n big endian system.\n\n 24-bit pixel formats (888):\n These are in literal byte order, regardless of CPU architecture it's always\n the same. Writing these 3-byte pixels is typically slower than other formats\n but uses less memory than 32-bit and is endian-independent.\n\n 16-bit pixel formats (565/5551/4444):\n Always interpreted as one 16-bit integer per pixel with components in\n high-to-low bit order following the format name. These are the fastest\n formats, however colour quality is visibly lower."]
96pub type MirPixelFormat = ::std::os::raw::c_uint;
97pub const MirOrientation_mir_orientation_normal: MirOrientation = 0;
98pub const MirOrientation_mir_orientation_left: MirOrientation = 90;
99pub const MirOrientation_mir_orientation_inverted: MirOrientation = 180;
100pub const MirOrientation_mir_orientation_right: MirOrientation = 270;
101#[doc = " Describes transformations applied to both outputs and client surfaces.\n Rotations are counter-clockwise."]
102pub type MirOrientation = ::std::os::raw::c_uint;
103pub const MirMirrorMode_mir_mirror_mode_none: MirMirrorMode = 0;
104pub const MirMirrorMode_mir_mirror_mode_vertical: MirMirrorMode = 1;
105pub const MirMirrorMode_mir_mirror_mode_horizontal: MirMirrorMode = 2;
106#[doc = " Describes a mirror transformation that is applied to client surfaces."]
107pub type MirMirrorMode = ::std::os::raw::c_uint;
108pub const MirOrientationMode_mir_orientation_mode_portrait: MirOrientationMode = 1;
109pub const MirOrientationMode_mir_orientation_mode_landscape: MirOrientationMode = 2;
110pub const MirOrientationMode_mir_orientation_mode_portrait_inverted: MirOrientationMode = 4;
111pub const MirOrientationMode_mir_orientation_mode_landscape_inverted: MirOrientationMode = 8;
112pub const MirOrientationMode_mir_orientation_mode_portrait_any: MirOrientationMode = 5;
113pub const MirOrientationMode_mir_orientation_mode_landscape_any: MirOrientationMode = 10;
114pub const MirOrientationMode_mir_orientation_mode_any: MirOrientationMode = 15;
115pub type MirOrientationMode = ::std::os::raw::c_uint;
116pub const MirEdgeAttachment_mir_edge_attachment_vertical: MirEdgeAttachment = 1;
117pub const MirEdgeAttachment_mir_edge_attachment_horizontal: MirEdgeAttachment = 2;
118pub const MirEdgeAttachment_mir_edge_attachment_any: MirEdgeAttachment = 3;
119pub type MirEdgeAttachment = ::std::os::raw::c_uint;
120#[doc = " the reference point is at the center."]
121pub const MirPlacementGravity_mir_placement_gravity_center: MirPlacementGravity = 0;
122#[doc = " the reference point is at the middle of the left edge."]
123pub const MirPlacementGravity_mir_placement_gravity_west: MirPlacementGravity = 1;
124#[doc = " the reference point is at the middle of the right edge."]
125pub const MirPlacementGravity_mir_placement_gravity_east: MirPlacementGravity = 2;
126#[doc = " the reference point is in the middle of the top edge."]
127pub const MirPlacementGravity_mir_placement_gravity_north: MirPlacementGravity = 4;
128#[doc = " the reference point is at the middle of the lower edge."]
129pub const MirPlacementGravity_mir_placement_gravity_south: MirPlacementGravity = 8;
130#[doc = " the reference point is at the top left corner."]
131pub const MirPlacementGravity_mir_placement_gravity_northwest: MirPlacementGravity = 5;
132#[doc = " the reference point is at the top right corner."]
133pub const MirPlacementGravity_mir_placement_gravity_northeast: MirPlacementGravity = 6;
134#[doc = " the reference point is at the lower left corner."]
135pub const MirPlacementGravity_mir_placement_gravity_southwest: MirPlacementGravity = 9;
136#[doc = " the reference point is at the lower right corner."]
137pub const MirPlacementGravity_mir_placement_gravity_southeast: MirPlacementGravity = 10;
138#[doc = " Reference point for aligning a surface relative to a rectangle.\n Each element (surface and rectangle) has a MirPlacementGravity assigned."]
139pub type MirPlacementGravity = ::std::os::raw::c_uint;
140#[doc = " allow flipping anchors horizontally"]
141pub const MirPlacementHints_mir_placement_hints_flip_x: MirPlacementHints = 1;
142#[doc = " allow flipping anchors vertically"]
143pub const MirPlacementHints_mir_placement_hints_flip_y: MirPlacementHints = 2;
144#[doc = " allow sliding window horizontally"]
145pub const MirPlacementHints_mir_placement_hints_slide_x: MirPlacementHints = 4;
146#[doc = " allow sliding window vertically"]
147pub const MirPlacementHints_mir_placement_hints_slide_y: MirPlacementHints = 8;
148#[doc = " allow resizing window horizontally"]
149pub const MirPlacementHints_mir_placement_hints_resize_x: MirPlacementHints = 16;
150#[doc = " allow resizing window vertically"]
151pub const MirPlacementHints_mir_placement_hints_resize_y: MirPlacementHints = 32;
152#[doc = " allow flipping aux_anchor to opposite corner"]
153pub const MirPlacementHints_mir_placement_hints_antipodes: MirPlacementHints = 64;
154#[doc = " allow flipping anchors on both axes"]
155pub const MirPlacementHints_mir_placement_hints_flip_any: MirPlacementHints = 3;
156#[doc = " allow sliding window on both axes"]
157pub const MirPlacementHints_mir_placement_hints_slide_any: MirPlacementHints = 12;
158#[doc = " allow resizing window on both axes"]
159pub const MirPlacementHints_mir_placement_hints_resize_any: MirPlacementHints = 48;
160#[doc = " Positioning hints for aligning a window relative to a rectangle.\n\n These hints determine how the window should be positioned in the case that\n the surface would fall off-screen if placed in its ideal position.\n\n For example, \\p mir_placement_hints_flip_x will invert the x component of\n \\p aux_rect_placement_offset and replace \\p mir_placement_gravity_northwest\n with \\p mir_placement_gravity_northeast and vice versa if the window extends\n beyond the left or right edges of the monitor.\n\n If \\p mir_placement_hints_slide_x is set, the window can be shifted\n horizontally to fit on-screen.\n\n If \\p mir_placement_hints_resize_x is set, the window can be shrunken\n horizontally to fit.\n\n If \\p mir_placement_hints_antipodes is set then the rect gravity may be\n substituted with the opposite corner (e.g. \\p mir_placement_gravity_northeast\n to \\p mir_placement_gravity_southwest) in combination with other options.\n\n When multiple flags are set, flipping should take precedence over sliding,\n which should take precedence over resizing."]
161pub type MirPlacementHints = ::std::os::raw::c_uint;
162pub const MirResizeEdge_mir_resize_edge_none: MirResizeEdge = 0;
163pub const MirResizeEdge_mir_resize_edge_west: MirResizeEdge = 1;
164pub const MirResizeEdge_mir_resize_edge_east: MirResizeEdge = 2;
165pub const MirResizeEdge_mir_resize_edge_north: MirResizeEdge = 4;
166pub const MirResizeEdge_mir_resize_edge_south: MirResizeEdge = 8;
167pub const MirResizeEdge_mir_resize_edge_northwest: MirResizeEdge = 5;
168pub const MirResizeEdge_mir_resize_edge_northeast: MirResizeEdge = 6;
169pub const MirResizeEdge_mir_resize_edge_southwest: MirResizeEdge = 9;
170pub const MirResizeEdge_mir_resize_edge_southeast: MirResizeEdge = 10;
171#[doc = " Hints for resizing a window.\n\n These values are used to indicate which edge(s) of a surface\n is being dragged in a resize operation."]
172pub type MirResizeEdge = ::std::os::raw::c_uint;
173pub const MirFormFactor_mir_form_factor_unknown: MirFormFactor = 0;
174pub const MirFormFactor_mir_form_factor_phone: MirFormFactor = 1;
175pub const MirFormFactor_mir_form_factor_tablet: MirFormFactor = 2;
176pub const MirFormFactor_mir_form_factor_monitor: MirFormFactor = 3;
177pub const MirFormFactor_mir_form_factor_tv: MirFormFactor = 4;
178pub const MirFormFactor_mir_form_factor_projector: MirFormFactor = 5;
179#[doc = " Form factor associated with a physical output"]
180pub type MirFormFactor = ::std::os::raw::c_uint;
181#[doc = "< Arrangement of subpixels cannot be determined"]
182pub const MirSubpixelArrangement_mir_subpixel_arrangement_unknown: MirSubpixelArrangement = 0;
183#[doc = "< Subpixels are arranged horizontally, R, G, B from left to right"]
184pub const MirSubpixelArrangement_mir_subpixel_arrangement_horizontal_rgb: MirSubpixelArrangement =
185 1;
186#[doc = "< Subpixels are arranged horizontally, B, G, R from left to right"]
187pub const MirSubpixelArrangement_mir_subpixel_arrangement_horizontal_bgr: MirSubpixelArrangement =
188 2;
189#[doc = "< Subpixels are arranged vertically, R, G, B from top to bottom"]
190pub const MirSubpixelArrangement_mir_subpixel_arrangement_vertical_rgb: MirSubpixelArrangement = 3;
191#[doc = "< Subpixels are arranged vertically, B, G, R from top to bottom"]
192pub const MirSubpixelArrangement_mir_subpixel_arrangement_vertical_bgr: MirSubpixelArrangement = 4;
193#[doc = "< Device does not have regular subpixels"]
194pub const MirSubpixelArrangement_mir_subpixel_arrangement_none: MirSubpixelArrangement = 5;
195#[doc = " Physical arrangement of subpixels on the physical output\n\n This is always relative to the “natural” orientation of the display - mir_orientation_normal."]
196pub type MirSubpixelArrangement = ::std::os::raw::c_uint;
197pub const MirShellChrome_mir_shell_chrome_normal: MirShellChrome = 0;
198pub const MirShellChrome_mir_shell_chrome_low: MirShellChrome = 1;
199#[doc = " Shell chrome"]
200pub type MirShellChrome = ::std::os::raw::c_uint;
201pub const MirPointerConfinementState_mir_pointer_unconfined: MirPointerConfinementState = 0;
202pub const MirPointerConfinementState_mir_pointer_confined_oneshot: MirPointerConfinementState = 1;
203pub const MirPointerConfinementState_mir_pointer_confined_persistent: MirPointerConfinementState =
204 2;
205pub const MirPointerConfinementState_mir_pointer_locked_oneshot: MirPointerConfinementState = 3;
206pub const MirPointerConfinementState_mir_pointer_locked_persistent: MirPointerConfinementState = 4;
207#[doc = " Pointer Confinement"]
208pub type MirPointerConfinementState = ::std::os::raw::c_uint;
209pub const MirOutputGammaSupported_mir_output_gamma_unsupported: MirOutputGammaSupported = 0;
210pub const MirOutputGammaSupported_mir_output_gamma_supported: MirOutputGammaSupported = 1;
211#[doc = " Supports gamma correction"]
212pub type MirOutputGammaSupported = ::std::os::raw::c_uint;
213#[doc = "< For desktop backgrounds and alike (lowest layer)"]
214pub const MirDepthLayer_mir_depth_layer_background: MirDepthLayer = 0;
215#[doc = "< For panels or other controls/decorations below normal windows"]
216pub const MirDepthLayer_mir_depth_layer_below: MirDepthLayer = 1;
217#[doc = "< For normal application windows"]
218pub const MirDepthLayer_mir_depth_layer_application: MirDepthLayer = 2;
219#[doc = "< For always-on-top application windows"]
220pub const MirDepthLayer_mir_depth_layer_always_on_top: MirDepthLayer = 3;
221#[doc = "< For panels or notifications that want to be above normal windows"]
222pub const MirDepthLayer_mir_depth_layer_above: MirDepthLayer = 4;
223#[doc = "< For overlays such as lock screens (heighest layer)"]
224pub const MirDepthLayer_mir_depth_layer_overlay: MirDepthLayer = 5;
225#[doc = " Depth layer controls Z ordering of surfaces.\n\n A surface will always appear on top of surfaces with a lower depth layer, and below those with a higher one.\n A depth layer can be converted to a number with mir::mir_depth_layer_get_index().\n This is useful for creating a list indexed by depth layer, or comparing the height of two layers."]
226pub type MirDepthLayer = ::std::os::raw::c_uint;
227#[doc = "< The surface can gain and lose focus normally"]
228pub const MirFocusMode_mir_focus_mode_focusable: MirFocusMode = 0;
229#[doc = "< The surface will never be given focus"]
230pub const MirFocusMode_mir_focus_mode_disabled: MirFocusMode = 1;
231#[doc = "< This mode causes the surface to take focus if possible, and prevents focus from\nleaving it as long as it has this mode"]
232pub const MirFocusMode_mir_focus_mode_grabbing: MirFocusMode = 2;
233#[doc = " Focus mode controls how a surface gains and loses focus."]
234pub type MirFocusMode = ::std::os::raw::c_uint;
235pub const MirTiledEdge_mir_tiled_edge_none: MirTiledEdge = 0;
236pub const MirTiledEdge_mir_tiled_edge_north: MirTiledEdge = 1;
237pub const MirTiledEdge_mir_tiled_edge_east: MirTiledEdge = 2;
238pub const MirTiledEdge_mir_tiled_edge_south: MirTiledEdge = 4;
239pub const MirTiledEdge_mir_tiled_edge_west: MirTiledEdge = 8;
240#[doc = " Hints describing which edges of a surface are considered adjacent\n to another part of the tiling grid."]
241pub type MirTiledEdge = ::std::os::raw::c_uint;
242#[doc = "< No filter applied"]
243pub const MirOutputFilter_mir_output_filter_none: MirOutputFilter = 0;
244#[doc = "< Colors are converted to grayscale"]
245pub const MirOutputFilter_mir_output_filter_grayscale: MirOutputFilter = 1;
246#[doc = "< Colors are inverted"]
247pub const MirOutputFilter_mir_output_filter_invert: MirOutputFilter = 2;
248#[doc = " Filters that can be applied to output."]
249pub type MirOutputFilter = ::std::os::raw::c_uint;
250#[doc = " A 2D point with integer coordinates."]
251#[repr(C)]
252#[derive(Debug, Default, Copy, Clone)]
253pub struct miracle_point_t {
254 #[doc = " The x coordinate."]
255 pub x: i32,
256 #[doc = " The y coordinate."]
257 pub y: i32,
258}
259#[doc = " A size with integer dimensions."]
260#[repr(C)]
261#[derive(Debug, Default, Copy, Clone)]
262pub struct miracle_size_t {
263 #[doc = " The width."]
264 pub w: i32,
265 #[doc = " The height."]
266 pub h: i32,
267}
268pub const miracle_animation_type_miracle_animation_type_window_open: miracle_animation_type = 0;
269pub const miracle_animation_type_miracle_animation_type_window_close: miracle_animation_type = 1;
270pub const miracle_animation_type_miracle_animation_type_window_move: miracle_animation_type = 2;
271pub const miracle_animation_type_miracle_animation_type_workspace_switch: miracle_animation_type =
272 3;
273pub const miracle_animation_type_miracle_animation_type_window_none: miracle_animation_type = 4;
274pub type miracle_animation_type = ::std::os::raw::c_uint;
275#[repr(C)]
276#[derive(Debug, Default, Copy, Clone)]
277pub struct miracle_plugin_animation_frame_data_t {
278 #[doc = " Animation type.\n\n This one of #miracle_animation_type."]
279 pub type_: u32,
280 #[doc = " The runtime of the animation frame in seconds."]
281 pub runtime_seconds: f32,
282 #[doc = " The total duration of the animation in seconds."]
283 pub duration_seconds: f32,
284 #[doc = " The origin area, packed with x, y, w, and h."]
285 pub origin: [f32; 4usize],
286 #[doc = " The destination area, packed with x, y, w, and h."]
287 pub destination: [f32; 4usize],
288 #[doc = " The opacity start of the animation."]
289 pub opacity_start: f32,
290 #[doc = " The opacity end of the animation."]
291 pub opacity_end: f32,
292}
293#[repr(C)]
294#[derive(Debug, Default, Copy, Clone)]
295pub struct miracle_plugin_animation_frame_result_t {
296 #[doc = " If set to `TRUE`, the animation is considered completed.\n\n At this point, the animated object will be moved to its destination\n with the appropriate opacity. The animation will be removed from the\n system."]
297 pub completed: i32,
298 #[doc = " If `TRUE`, #area is set."]
299 pub has_area: i32,
300 #[doc = " The area as a packed rectangle of x, y, width, and height.\n\n Be careful when using this value, as Mir will set this as the _actual_\n rectangle of the object. For example, if setting a window's rectangle,\n Mir will issue a position and resize request to the window. This is\n NOT something that you would want to do every frame. It is better to use\n the #transform if you want to animate the scale."]
301 pub area: [f32; 4usize],
302 #[doc = " If `TRUE`, #transform is set."]
303 pub has_transform: i32,
304 #[doc = " The transform to apply to the animated object.\n\n This transform is backed by a glm::mat4, which is a column-major transform."]
305 pub transform: [f32; 16usize],
306 #[doc = " If `TRUE`, #opacity is set."]
307 pub has_opacity: i32,
308 #[doc = " The opacity of the object.\n\n This must be [0, 1]."]
309 pub opacity: f32,
310}
311#[doc = " Describes the properties of an application.\n\n Plugin authors may use #miracle_plugin_get_application to get the application\n given a window."]
312#[repr(C)]
313#[derive(Debug, Copy, Clone)]
314pub struct miracle_application_info_t {
315 #[doc = " The name of the application."]
316 pub application_name: *const ::std::os::raw::c_char,
317 #[doc = " Internal data."]
318 pub internal: u64,
319}
320impl Default for miracle_application_info_t {
321 fn default() -> Self {
322 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
323 unsafe {
324 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
325 s.assume_init()
326 }
327 }
328}
329#[doc = " Describes the properties of a window.\n\n Plugin authors may use this information to decide on the placement of a window.\n\n Use #miracle_plugin_get_application to get the application from which this window\n originated.\n\n Use #miracle_plugin_get_workspace to get the workspace of the window."]
330#[repr(C)]
331#[derive(Debug, Copy, Clone)]
332pub struct miracle_window_info_t {
333 #[doc = " The type of this window."]
334 pub window_type: MirWindowType,
335 #[doc = " The state of the window."]
336 pub state: MirWindowState,
337 #[doc = " The position of the window.\n\n If the window has not yet been placed, this will be arbitrary."]
338 pub top_left: miracle_point_t,
339 #[doc = " The size of the window."]
340 pub size: miracle_size_t,
341 #[doc = " The depth layer of the window."]
342 pub depth_layer: MirDepthLayer,
343 #[doc = " Pointer to internal data.\n\n Please do not use unless you plan to be very sneaky!"]
344 pub internal: u64,
345 #[doc = " The 4x4 transform matrix of the window (column-major).\n\n Defaults to the identity matrix."]
346 pub transform: [f32; 16usize],
347 #[doc = " The alpha (opacity) of the window.\n\n Defaults to 1.0 (fully opaque)."]
348 pub alpha: f32,
349}
350impl Default for miracle_window_info_t {
351 fn default() -> Self {
352 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
353 unsafe {
354 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
355 s.assume_init()
356 }
357 }
358}
359#[doc = " The container has a single window in it."]
360pub const miracle_container_type_miracle_container_type_window: miracle_container_type = 0;
361#[doc = " The container has multiple children in it."]
362pub const miracle_container_type_miracle_container_type_parent: miracle_container_type = 1;
363#[doc = " The type of the container."]
364pub type miracle_container_type = ::std::os::raw::c_uint;
365#[doc = " None layout."]
366pub const miracle_layout_scheme_miracle_layout_scheme_none: miracle_layout_scheme = 0;
367#[doc = " A horizontal layout."]
368pub const miracle_layout_scheme_miracle_layout_scheme_horizontal: miracle_layout_scheme = 1;
369#[doc = " A vertical layout."]
370pub const miracle_layout_scheme_miracle_layout_scheme_vertical: miracle_layout_scheme = 2;
371#[doc = " A tabbed layout."]
372pub const miracle_layout_scheme_miracle_layout_scheme_tabbed: miracle_layout_scheme = 3;
373#[doc = " A stacked layout."]
374pub const miracle_layout_scheme_miracle_layout_scheme_stacking: miracle_layout_scheme = 4;
375#[doc = " Describes a layout for a container."]
376pub type miracle_layout_scheme = ::std::os::raw::c_uint;
377#[doc = " Describes a container in a tree.\n\n A container may either a parent or a window. Parent containers\n have children, which can be retrieved via #miracle_plugin_get_child_from_container.\n\n The window of a window container can be retrieved via\n #miracle_plugin_get_window_info_from_container."]
378#[repr(C)]
379#[derive(Debug, Default, Copy, Clone)]
380pub struct miracle_container_t {
381 #[doc = " The type of the container.\n\n This is a #miracle_container_type."]
382 pub type_: u32,
383 #[doc = " If `TRUE`, the container is floating within its workspace.\n\n This is only set if #type is #miracle_container_type_parent."]
384 pub is_floating: i32,
385 #[doc = " Describes how a container is laying out its content.\n\n This is #miracle_layut_scheme.\n\n This is only set if #type is #miracle_container_type_parent."]
386 pub layout_scheme: u32,
387 #[doc = " The number of child containers inside of this container.\n\n Use #miracle_plugin_get_child_from_container to query the container by index."]
388 pub num_child_containers: u32,
389 #[doc = " Pointer to internal data.\n\n Please do not use unless you plan to be very sneaky!"]
390 pub internal: u64,
391}
392#[doc = " Describes a workspace."]
393#[repr(C)]
394#[derive(Debug, Default, Copy, Clone)]
395pub struct miracle_workspace_t {
396 #[doc = " If `TRUE`, the workspace is valid.\n\n This may be `FALSE` for shell components that are not tethered to a particular\n workspace."]
397 pub is_set: i32,
398 #[doc = " If `TRUE`, #number is set."]
399 pub has_number: i32,
400 #[doc = " The number of the workspace.\n\n Only valid if #has_number is `TRUE`."]
401 pub number: u32,
402 #[doc = " If `TRUE`, #name is set."]
403 pub has_name: i32,
404 #[doc = " The number of container trees in this workspace.\n\n Use #miracle_plugin_get_workspace_tree to get the tree at a particular index.\n Each tree is represented by a #miracle_container_t which is the root of the tree."]
405 pub num_trees: u32,
406 #[doc = " Pointer to internal data.\n\n Please do not use unless you plan to be very sneaky."]
407 pub internal: u64,
408 #[doc = " The position of the workspace area."]
409 pub position: miracle_point_t,
410 #[doc = " The size of the workspace area."]
411 pub size: miracle_size_t,
412}
413#[doc = " Describes an output."]
414#[repr(C)]
415#[derive(Debug, Default, Copy, Clone)]
416pub struct miracle_output_t {
417 #[doc = " The position of the output."]
418 pub position: miracle_point_t,
419 #[doc = " The size of the output."]
420 pub size: miracle_size_t,
421 #[doc = " If `TRUE`, the output is the primary output, otherwise `FALSE`."]
422 pub is_primary: i32,
423 #[doc = " The number of workspaces on this output."]
424 pub num_workspaces: u32,
425 #[doc = " Pointer to internal data.\n\n Please do not use unless you plan to be very sneaky."]
426 pub internal: u64,
427}
428#[doc = " If selected, the plugin lets miracle place the window according\n to its own strategy."]
429pub const miracle_window_management_strategy_t_miracle_window_management_strategy_system:
430 miracle_window_management_strategy_t = 0;
431#[doc = " Describes a window that will be placed in the tiling grid."]
432pub const miracle_window_management_strategy_t_miracle_window_management_strategy_tiled:
433 miracle_window_management_strategy_t = 1;
434#[doc = " Describes a window whose behavior is entirely determined by\n the plugin."]
435pub const miracle_window_management_strategy_t_miracle_window_management_strategy_freestyle:
436 miracle_window_management_strategy_t = 2;
437#[doc = " Describes the placement strategy for a window.\n\n This is used by #miracle_placement_t."]
438pub type miracle_window_management_strategy_t = ::std::os::raw::c_uint;
439#[doc = " Describes a tiled placement which is controlled by the plugin system."]
440#[repr(C)]
441#[derive(Debug, Copy, Clone)]
442pub struct miracle_tiled_placement_t {
443 #[doc = " The ID of the parent container that this window should be placed inside.\n\n If the container has #miracle_container_t::type of #miracle_container_type_window, then\n the #layout_scheme will be applied to that window to form a new\n parent before placing the window at the #index.\n\n If the container has #miracle_container_t::type of #miracle_container_type_parent, then\n the #layout_scheme will be ignored and the window will be placed at\n the #index.\n\n If this is 0, then it is assumed to be null."]
444 pub parent_internal: u64,
445 #[doc = " The index at which this container will be placed within the parent."]
446 pub index: u32,
447 #[doc = " The requested layout scheme of the new parent.\n\n This will only be used if #miracle_container_type_parent has #miracle_container_t::type of #miracle_container_type_parent."]
448 pub layout_scheme: miracle_layout_scheme,
449}
450impl Default for miracle_tiled_placement_t {
451 fn default() -> Self {
452 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
453 unsafe {
454 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
455 s.assume_init()
456 }
457 }
458}
459#[doc = " Describes a freestyle placement which is fully controlled by the plugin."]
460#[repr(C)]
461#[derive(Debug, Default, Copy, Clone)]
462pub struct miracle_freestyle_placement_t {
463 #[doc = " The top left position of the window."]
464 pub top_left: miracle_point_t,
465 #[doc = " The depth layer of the window.\n\n Plugin authors are encouraged to use #miracle_window_info_t::depth_layer\n unless they would like to force the window into a different depth for\n whatever reason."]
466 pub depth_layer: u32,
467 #[doc = " The workspace that this window should be placed on.\n\n If `0`, the window will always be shown.\n\n Defaults to the currently selected workspace."]
468 pub workspace_internal: u64,
469 #[doc = " The size of the window.\n\n This value may not be honored by the window itself."]
470 pub size: miracle_size_t,
471 #[doc = " The 4x4 transform matrix applied to the window (column-major).\n\n Defaults to the identity matrix."]
472 pub transform: [f32; 16usize],
473 #[doc = " The alpha (opacity) of the window.\n\n Defaults to 1.0 (fully opaque)."]
474 pub alpha: f32,
475 #[doc = " Whether the window can be resized.\n\n Defaults to `TRUE`."]
476 pub resizable: i32,
477 #[doc = " Whether the window can be moved.\n\n Defaults to `TRUE`."]
478 pub movable: i32,
479}
480#[repr(C)]
481#[derive(Debug, Copy, Clone)]
482pub struct miracle_placement_t {
483 #[doc = " The placement strategy for this window.\n\n This is miracle_window_management_strategy_t.\n\n Defaults to the #miracle_window_management_strategy_system."]
484 pub strategy: u32,
485 #[doc = " The freestyle placement strategy.\n\n This is only honored if #strategy is #miracle_window_management_strategy_freestyle."]
486 pub freestyle_placement: miracle_freestyle_placement_t,
487 #[doc = " The titled placement strategy.\n\n This is only honored if #strategy is #miracle_window_management_strategy_tiled."]
488 pub tiled_placement: miracle_tiled_placement_t,
489}
490impl Default for miracle_placement_t {
491 fn default() -> Self {
492 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
493 unsafe {
494 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
495 s.assume_init()
496 }
497 }
498}
499#[doc = " Describes a keyboard event."]
500#[repr(C)]
501#[derive(Debug, Default, Copy, Clone)]
502pub struct miracle_keyboard_event_t {
503 #[doc = " The keyboard action."]
504 pub action: u32,
505 #[doc = " The keysym."]
506 pub keysym: u32,
507 #[doc = " The raw scan code."]
508 pub scan_code: i32,
509 #[doc = " The modifiers held during the event."]
510 pub modifiers: u32,
511}
512#[doc = " Describes a pointer event."]
513#[repr(C)]
514#[derive(Debug, Default, Copy, Clone)]
515pub struct miracle_pointer_event_t {
516 #[doc = " The x position of the pointer."]
517 pub x: f32,
518 #[doc = " The y position of the pointer."]
519 pub y: f32,
520 #[doc = " The pointer action.\n\n This is one of the MirPointerAction values."]
521 pub action: u32,
522 #[doc = " The modifiers held during the event."]
523 pub modifiers: u32,
524 #[doc = " The buttons held during the event."]
525 pub buttons: u32,
526}
527pub const MirEventType_mir_event_type_key: MirEventType = 0;
528pub const MirEventType_mir_event_type_motion: MirEventType = 1;
529pub const MirEventType_mir_event_type_window: MirEventType = 2;
530pub const MirEventType_mir_event_type_resize: MirEventType = 3;
531pub const MirEventType_mir_event_type_prompt_session_state_change: MirEventType = 4;
532pub const MirEventType_mir_event_type_orientation: MirEventType = 5;
533pub const MirEventType_mir_event_type_close_window: MirEventType = 6;
534pub const MirEventType_mir_event_type_input: MirEventType = 7;
535pub const MirEventType_mir_event_type_input_configuration: MirEventType = 8;
536pub const MirEventType_mir_event_type_window_output: MirEventType = 9;
537pub const MirEventType_mir_event_type_input_device_state: MirEventType = 10;
538pub const MirEventType_mir_event_type_window_placement: MirEventType = 11;
539pub type MirEventType = ::std::os::raw::c_uint;
540pub const MirInputEventType_mir_input_event_type_key: MirInputEventType = 0;
541pub const MirInputEventType_mir_input_event_type_touch: MirInputEventType = 1;
542pub const MirInputEventType_mir_input_event_type_pointer: MirInputEventType = 2;
543pub const MirInputEventType_mir_input_event_type_keyboard_resync: MirInputEventType = 3;
544pub const MirInputEventType_mir_input_event_types: MirInputEventType = 4;
545pub type MirInputEventType = ::std::os::raw::c_uint;
546pub const MirInputEventModifier_mir_input_event_modifier_none: MirInputEventModifier = 1;
547pub const MirInputEventModifier_mir_input_event_modifier_alt: MirInputEventModifier = 2;
548pub const MirInputEventModifier_mir_input_event_modifier_alt_left: MirInputEventModifier = 4;
549pub const MirInputEventModifier_mir_input_event_modifier_alt_right: MirInputEventModifier = 8;
550pub const MirInputEventModifier_mir_input_event_modifier_shift: MirInputEventModifier = 16;
551pub const MirInputEventModifier_mir_input_event_modifier_shift_left: MirInputEventModifier = 32;
552pub const MirInputEventModifier_mir_input_event_modifier_shift_right: MirInputEventModifier = 64;
553pub const MirInputEventModifier_mir_input_event_modifier_sym: MirInputEventModifier = 128;
554pub const MirInputEventModifier_mir_input_event_modifier_function: MirInputEventModifier = 256;
555pub const MirInputEventModifier_mir_input_event_modifier_ctrl: MirInputEventModifier = 512;
556pub const MirInputEventModifier_mir_input_event_modifier_ctrl_left: MirInputEventModifier = 1024;
557pub const MirInputEventModifier_mir_input_event_modifier_ctrl_right: MirInputEventModifier = 2048;
558pub const MirInputEventModifier_mir_input_event_modifier_meta: MirInputEventModifier = 4096;
559pub const MirInputEventModifier_mir_input_event_modifier_meta_left: MirInputEventModifier = 8192;
560pub const MirInputEventModifier_mir_input_event_modifier_meta_right: MirInputEventModifier = 16384;
561pub const MirInputEventModifier_mir_input_event_modifier_caps_lock: MirInputEventModifier = 32768;
562pub const MirInputEventModifier_mir_input_event_modifier_num_lock: MirInputEventModifier = 65536;
563pub const MirInputEventModifier_mir_input_event_modifier_scroll_lock: MirInputEventModifier =
564 131072;
565#[doc = " Description of key modifier state."]
566pub type MirInputEventModifier = ::std::os::raw::c_uint;
567pub type MirInputEventModifiers = ::std::os::raw::c_uint;
568pub const MirKeyboardAction_mir_keyboard_action_up: MirKeyboardAction = 0;
569pub const MirKeyboardAction_mir_keyboard_action_down: MirKeyboardAction = 1;
570pub const MirKeyboardAction_mir_keyboard_action_repeat: MirKeyboardAction = 2;
571pub const MirKeyboardAction_mir_keyboard_action_modifiers: MirKeyboardAction = 3;
572pub const MirKeyboardAction_mir_keyboard_actions: MirKeyboardAction = 4;
573#[doc = " Possible actions for changing key state"]
574pub type MirKeyboardAction = ::std::os::raw::c_uint;
575pub const MirTouchAction_mir_touch_action_up: MirTouchAction = 0;
576pub const MirTouchAction_mir_touch_action_down: MirTouchAction = 1;
577pub const MirTouchAction_mir_touch_action_change: MirTouchAction = 2;
578pub const MirTouchAction_mir_touch_actions: MirTouchAction = 3;
579#[doc = " Possible per touch actions for state changing"]
580pub type MirTouchAction = ::std::os::raw::c_uint;
581pub const MirTouchAxis_mir_touch_axis_x: MirTouchAxis = 0;
582pub const MirTouchAxis_mir_touch_axis_y: MirTouchAxis = 1;
583pub const MirTouchAxis_mir_touch_axis_pressure: MirTouchAxis = 2;
584pub const MirTouchAxis_mir_touch_axis_touch_major: MirTouchAxis = 3;
585pub const MirTouchAxis_mir_touch_axis_touch_minor: MirTouchAxis = 4;
586pub const MirTouchAxis_mir_touch_axis_size: MirTouchAxis = 5;
587pub const MirTouchAxis_mir_touch_axes: MirTouchAxis = 6;
588#[doc = " Identifiers for touch axis"]
589pub type MirTouchAxis = ::std::os::raw::c_uint;
590pub const MirTouchTooltype_mir_touch_tooltype_unknown: MirTouchTooltype = 0;
591pub const MirTouchTooltype_mir_touch_tooltype_finger: MirTouchTooltype = 1;
592pub const MirTouchTooltype_mir_touch_tooltype_stylus: MirTouchTooltype = 2;
593pub const MirTouchTooltype_mir_touch_tooltypes: MirTouchTooltype = 3;
594#[doc = " Identifiers for per-touch tool types"]
595pub type MirTouchTooltype = ::std::os::raw::c_uint;
596pub const MirPointerAction_mir_pointer_action_button_up: MirPointerAction = 0;
597pub const MirPointerAction_mir_pointer_action_button_down: MirPointerAction = 1;
598pub const MirPointerAction_mir_pointer_action_enter: MirPointerAction = 2;
599pub const MirPointerAction_mir_pointer_action_leave: MirPointerAction = 3;
600pub const MirPointerAction_mir_pointer_action_motion: MirPointerAction = 4;
601pub const MirPointerAction_mir_pointer_actions: MirPointerAction = 5;
602#[doc = " Possible pointer actions"]
603pub type MirPointerAction = ::std::os::raw::c_uint;
604pub const MirPointerAxis_mir_pointer_axis_x: MirPointerAxis = 0;
605pub const MirPointerAxis_mir_pointer_axis_y: MirPointerAxis = 1;
606pub const MirPointerAxis_mir_pointer_axis_vscroll: MirPointerAxis = 2;
607pub const MirPointerAxis_mir_pointer_axis_hscroll: MirPointerAxis = 3;
608pub const MirPointerAxis_mir_pointer_axis_relative_x: MirPointerAxis = 4;
609pub const MirPointerAxis_mir_pointer_axis_relative_y: MirPointerAxis = 5;
610pub const MirPointerAxis_mir_pointer_axis_vscroll_discrete: MirPointerAxis = 6;
611pub const MirPointerAxis_mir_pointer_axis_hscroll_discrete: MirPointerAxis = 7;
612pub const MirPointerAxis_mir_pointer_axis_vscroll_value120: MirPointerAxis = 8;
613pub const MirPointerAxis_mir_pointer_axis_hscroll_value120: MirPointerAxis = 9;
614pub const MirPointerAxis_mir_pointer_axes: MirPointerAxis = 10;
615#[doc = " Identifiers for pointer axis"]
616pub type MirPointerAxis = ::std::os::raw::c_uint;
617pub const MirPointerButton_mir_pointer_button_primary: MirPointerButton = 1;
618pub const MirPointerButton_mir_pointer_button_secondary: MirPointerButton = 2;
619pub const MirPointerButton_mir_pointer_button_tertiary: MirPointerButton = 4;
620pub const MirPointerButton_mir_pointer_button_back: MirPointerButton = 8;
621pub const MirPointerButton_mir_pointer_button_forward: MirPointerButton = 16;
622pub const MirPointerButton_mir_pointer_button_side: MirPointerButton = 32;
623pub const MirPointerButton_mir_pointer_button_extra: MirPointerButton = 64;
624pub const MirPointerButton_mir_pointer_button_task: MirPointerButton = 128;
625pub type MirPointerButton = ::std::os::raw::c_uint;
626pub type MirPointerButtons = ::std::os::raw::c_uint;
627pub const MirPointerAxisSource_mir_pointer_axis_source_none: MirPointerAxisSource = 0;
628pub const MirPointerAxisSource_mir_pointer_axis_source_wheel: MirPointerAxisSource = 1;
629pub const MirPointerAxisSource_mir_pointer_axis_source_finger: MirPointerAxisSource = 2;
630pub const MirPointerAxisSource_mir_pointer_axis_source_continuous: MirPointerAxisSource = 3;
631pub const MirPointerAxisSource_mir_pointer_axis_source_wheel_tilt: MirPointerAxisSource = 4;
632#[doc = " Identifiers for pointer event source"]
633pub type MirPointerAxisSource = ::std::os::raw::c_uint;