Mir
Classes | Macros | Typedefs | Enumerations | Functions | Variables
MIR graphics tools API

Classes

struct  MirSurfaceParameters
 MirWindowParameters is the structure of minimum required information that you must provide to Mir in order to create a window. More...
 
struct  MirPlatformPackage
 
struct  MirModuleProperties
 Retrieved information about a loadable module. More...
 
struct  MirGraphicsRegion
 Retrieved information about a MirWindow. More...
 
struct  MirDisplayInfo
 
struct  MirDisplayCard
 MirDisplayConfiguration provides details of the graphics environment. More...
 
struct  MirDisplayMode
 
struct  MirDisplayOutput
 
struct  MirDisplayConfiguration
 
struct  MirBufferStreamInfo
 The displacement from the top-left corner of the surface. More...
 
struct  MirRectangle
 
struct  MirScreencastParameters
 MirScreencastParameters is the structure of required information that you must provide to Mir in order to create a MirScreencast. More...
 
struct  MirPlatformMessageData
 
struct  MirPlatformMessageFds
 

Macros

#define MIR_BYTES_PER_PIXEL(f)
 
#define MIR_CLIENT_API_VERSION_MAJOR   (0)
 
#define MIR_CLIENT_API_VERSION_MINOR   (32)
 
#define MIR_CLIENT_API_VERSION_PATCH   (0)
 
#define MIR_CLIENT_API_VERSION
 The current version of the Mir client headers in use. More...
 
#define MIR_CLIENT_MAJOR_VERSION   (3)
 
#define MIR_CLIENT_MINOR_VERSION   (5)
 
#define MIR_CLIENT_MICRO_VERSION   (0)
 
#define MIR_CLIENT_VERSION
 

Typedefs

typedef enum MirWindowAttrib MirWindowAttrib
 Attributes of a window that the client and server/shell may wish to get or set over the wire. More...
 
typedef enum MirWindowType MirWindowType
 
typedef enum MirWindowState MirWindowState
 
typedef enum MirWindowFocusState MirWindowFocusState
 
typedef enum MirWindowVisibility MirWindowVisibility
 
typedef enum MirLifecycleState MirLifecycleState
 
typedef enum MirPowerMode MirPowerMode
 
typedef enum MirOutputType MirOutputType
 
typedef enum MirPromptSessionState MirPromptSessionState
 
typedef enum MirPixelFormat MirPixelFormat
 32-bit pixel formats (8888): The order of components in the enum matches the order of the components as they would be written in an integer representing a pixel value of that format. More...
 
typedef enum MirOrientation MirOrientation
 Direction relative to the "natural" orientation of the display. More...
 
typedef enum MirMirrorMode MirMirrorMode
 Mirroring axis relative to the "natural" orientation of the display. More...
 
typedef enum MirOrientationMode MirOrientationMode
 
typedef enum MirEdgeAttachment MirEdgeAttachment
 
typedef enum MirPlacementGravity MirPlacementGravity
 Reference point for aligning a surface relative to a rectangle. More...
 
typedef enum MirPlacementHints MirPlacementHints
 Positioning hints for aligning a window relative to a rectangle. More...
 
typedef enum MirResizeEdge MirResizeEdge
 Hints for resizing a window. More...
 
typedef enum MirFormFactor MirFormFactor
 Form factor associated with a physical output. More...
 
typedef enum MirSubpixelArrangement MirSubpixelArrangement
 Physical arrangement of subpixels on the physical output. More...
 
typedef enum MirShellChrome MirShellChrome
 Shell chrome. More...
 
typedef enum MirPointerConfinementState MirPointerConfinementState
 Pointer Confinement. More...
 
typedef enum MirOutputGammaSupported MirOutputGammaSupported
 Supports gamma correction. More...
 
typedef int64_t MirInputDeviceId
 
typedef enum MirPointerHandedness MirPointerHandedness
 
typedef enum MirPointerAcceleration MirPointerAcceleration
 MirPointerAcceleration describes the way pointer movement is filtered: More...
 
typedef enum MirTouchpadClickMode MirTouchpadClickMode
 MirTouchpadClickMode configures how the touchpad itself should generate pointer button events. More...
 
typedef unsigned int MirTouchpadClickModes
 
typedef enum MirTouchpadScrollMode MirTouchpadScrollMode
 MirTouchpadScrollMode configures how the touchpad should generate scroll events. More...
 
typedef unsigned int MirTouchpadScrollModes
 
typedef unsigned int MirInputDeviceCapabilities
 
typedef enum MirTouchscreenMappingMode MirTouchscreenMappingMode
 Mapping modes for touchscreen devices. More...
 
typedef void * MirEGLNativeWindowType
 
typedef void * MirEGLNativeDisplayType
 
typedef struct MirConnection MirConnection
 
typedef struct MirSurface MirWindow
 
typedef struct MirSurfaceSpec MirWindowSpec
 
typedef struct MirScreencast MirScreencast
 
typedef struct MirScreencastSpec MirScreencastSpec
 
typedef struct MirPromptSession MirPromptSession
 
typedef struct MirBufferStream MirBufferStream
 
typedef struct MirPersistentId MirWindowId
 
typedef struct MirBlob MirBlob
 
typedef struct MirDisplayConfig MirDisplayConfig
 
typedef struct MirError MirError
 
typedef struct MirPresentationChain MirPresentationChain
 
typedef struct MirBuffer MirBuffer
 
typedef struct MirRenderSurface MirRenderSurface
 
typedef struct MirOutput MirOutput
 Descriptor for an output connection. More...
 
typedef struct MirWaitHandle MirWaitHandle
 Returned by asynchronous functions. More...
 
typedef struct MirPlatformMessage MirPlatformMessage
 
typedef void(* MirConnectedCallback) (MirConnection *connection, void *client_context)
 Callback to be passed when issuing a mir_connect request. More...
 
typedef MirConnectedCallback mir_connected_callback MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnectedCallback instead")
 
typedef void(* MirWindowCallback) (MirWindow *window, void *client_context)
 Callback to be passed when calling window functions : More...
 
typedef void(* MirBufferStreamCallback) (MirBufferStream *stream, void *client_context)
 Callback to be passed when calling: More...
 
typedef void(* MirWindowEventCallback) (MirWindow *window, MirEvent const *event, void *context)
 Callback for handling of window events. More...
 
typedef void(* MirLifecycleEventCallback) (MirConnection *connection, MirLifecycleState state, void *context)
 Callback called when a lifecycle event/callback is requested from the running server. More...
 
typedef void(* MirPingEventCallback) (MirConnection *connection, int32_t serial, void *context)
 Callback called when the server pings for responsiveness testing. More...
 
typedef void(* MirDisplayConfigCallback) (MirConnection *connection, void *context)
 Callback called when a display config change has occurred. More...
 
typedef void(* MirClientFdCallback) (MirPromptSession *prompt_session, size_t count, int const *fds, void *context)
 Callback called when a request for client file descriptors completes. More...
 
typedef void(* MirWindowIdCallback) (MirWindow *window, MirPersistentId *id, void *context)
 
typedef enum MirPlatformType MirPlatformType
 The native buffer type for the system the client is connected on. More...
 
typedef struct MirPlatformPackage MirPlatformPackage
 
typedef struct MirModuleProperties MirModuleProperties
 Retrieved information about a loadable module. More...
 
typedef enum MirBufferLayout MirBufferLayout
 
typedef enum MirPresentMode MirPresentMode
 
typedef struct MirGraphicsRegion MirGraphicsRegion
 Retrieved information about a MirWindow. More...
 
typedef struct MirDisplayInfo MirDisplayInfo
 
typedef struct MirDisplayCard MirDisplayCard
 MirDisplayConfiguration provides details of the graphics environment. More...
 
typedef enum MirDisplayOutputType MirDisplayOutputType
 
typedef enum MirOutputConnectionState MirOutputConnectionState
 
typedef struct MirDisplayMode MirDisplayMode
 
typedef struct MirDisplayOutput MirDisplayOutput
 
typedef struct MirDisplayConfiguration MirDisplayConfiguration
 
typedef struct MirBufferStreamInfo MirBufferStreamInfo
 The displacement from the top-left corner of the surface. More...
 
typedef struct MirRectangle MirRectangle
 
typedef struct MirInputConfig MirInputConfig
 
typedef struct MirInputDevice MirInputDevice
 
typedef struct MirKeyboardConfig MirKeyboardConfig
 
typedef struct MirPointerConfig MirPointerConfig
 
typedef struct MirTouchpadConfig MirTouchpadConfig
 
typedef struct MirTouchscreenConfig MirTouchscreenConfig
 
typedef struct MirScreencastParameters MirScreencastParameters
 MirScreencastParameters is the structure of required information that you must provide to Mir in order to create a MirScreencast. More...
 
typedef void(* MirScreencastCallback) (MirScreencast *screencast, void *client_context)
 Callback to be passed when calling MirScreencast functions. More...
 
typedef void(* MirPromptSessionCallback) (MirPromptSession *prompt_provider, void *context)
 Callback member of MirPromptSession for handling of prompt sessions. More...
 
typedef void(* MirPromptSessionStateChangeCallback) (MirPromptSession *prompt_provider, MirPromptSessionState state, void *context)
 Callback member of MirPromptSession for handling of prompt sessions events. More...
 
typedef void(* MirPlatformOperationCallback) (MirConnection *connection, MirPlatformMessage *reply, void *context)
 Callback called when a platform operation completes. More...
 
typedef void(* MirInputConfigCallback) (MirConnection *connection, void *context)
 Callback called when a change of input devices has occurred. More...
 
typedef void(* MirBufferCallback) (MirBuffer *, void *context)
 
typedef enum MirErrorDomain MirErrorDomain
 Specifies the origin of an error. More...
 
typedef enum MirDisplayConfigurationError MirDisplayConfigurationError
 Errors from the mir_error_domain_display_configuration MirErrorDomain. More...
 
typedef enum MirInputConfigurationError MirInputConfigurationError
 Errors from the mir_error_domain_input_configuration MirErrorDomain. More...
 
typedef void(* MirErrorCallback) (MirConnection *connection, MirError const *error, void *context)
 
typedef void(* mir_surface_callback) (MirSurface *surface, void *client_context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead")
 
typedef void(* mir_surface_event_callback) (MirSurface *surface, MirEvent const *event, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead")
 
typedef void(* mir_surface_id_callback) (MirSurface *surface, MirPersistentId *id, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead")
 
typedef struct MirSurfaceEvent MirWindowEvent
 
typedef struct MirResizeEvent MirResizeEvent
 
typedef struct MirPromptSessionEvent MirPromptSessionEvent
 
typedef struct MirOrientationEvent MirOrientationEvent
 
typedef struct MirCloseSurfaceEvent MirCloseWindowEvent
 
typedef struct MirInputEvent MirInputEvent
 
typedef struct MirKeymapEvent MirKeymapEvent
 
typedef struct MirSurfaceOutputEvent MirWindowOutputEvent
 
typedef struct MirInputDeviceStateEvent MirInputDeviceStateEvent
 
typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent
 
typedef struct MirCookie MirCookie
 
typedef struct MirEvent MirEvent
 
typedef unsigned int MirInputEventModifiers
 
typedef struct MirKeyboardEvent MirKeyboardEvent
 An event type describing a change in keyboard state. More...
 
typedef struct MirPointerEvent MirPointerEvent
 An event type describing a change in pointer device state. More...
 
typedef unsigned int MirPointerButtons
 
typedef struct MirTouchEvent MirTouchEvent
 An event type describing a change in touch device state. More...
 
typedef int32_t MirTouchId
 An identifier for a touch-point. More...
 
typedef struct MirSurfacePlacementEvent MirSurfacePlacementEvent
 
typedef struct MirOutputMode MirOutputMode
 A descriptor for a display mode. More...
 
typedef enum MirScreencastResult MirScreencastResult
 
typedef void(* MirScreencastBufferCallback) (MirScreencastResult status, MirBuffer *buffer, void *context)
 
typedef void(* MirRenderSurfaceCallback) (MirRenderSurface *, void *context) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 

Enumerations

enum  MirSurfaceAttrib
 Attributes of a surface that the client and server/shell may wish to get or set over the wire. More...
 
enum  MirWindowAttrib {
  mir_window_attrib_type, mir_window_attrib_state, mir_window_attrib_swapinterval, mir_window_attrib_focus,
  mir_window_attrib_dpi, mir_window_attrib_visibility, mir_window_attrib_preferred_orientation, mir_window_attribs
}
 Attributes of a window that the client and server/shell may wish to get or set over the wire. More...
 
enum  MirSurfaceType
 
enum  MirWindowType {
  mir_window_type_normal, mir_window_type_utility, mir_window_type_dialog, mir_window_type_gloss,
  mir_window_type_freestyle, mir_window_type_menu, mir_window_type_inputmethod, mir_window_type_satellite,
  mir_window_type_tip, mir_window_types
}
 
enum  MirSurfaceState
 
enum  MirWindowState {
  mir_window_state_unknown, mir_window_state_restored, mir_window_state_minimized, mir_window_state_maximized,
  mir_window_state_vertmaximized, mir_window_state_fullscreen, mir_window_state_horizmaximized, mir_window_state_hidden,
  mir_window_states
}
 
enum  MirSurfaceFocusState
 
enum  MirWindowFocusState { mir_window_focus_state_unfocused = 0, mir_window_focus_state_focused }
 
enum  MirSurfaceVisibility
 
enum  MirWindowVisibility { mir_window_visibility_occluded = 0, mir_window_visibility_exposed }
 
enum  MirLifecycleState { mir_lifecycle_state_will_suspend, mir_lifecycle_state_resumed, mir_lifecycle_connection_lost }
 
enum  MirPowerMode { mir_power_mode_on, mir_power_mode_standby, mir_power_mode_suspend, mir_power_mode_off }
 
enum  MirOutputType {
  mir_output_type_unknown = 0, mir_output_type_vga = 1, mir_output_type_dvii = 2, mir_output_type_dvid = 3,
  mir_output_type_dvia = 4, mir_output_type_composite = 5, mir_output_type_svideo = 6, mir_output_type_lvds = 7,
  mir_output_type_component = 8, mir_output_type_ninepindin = 9, mir_output_type_displayport = 10, mir_output_type_hdmia = 11,
  mir_output_type_hdmib = 12, mir_output_type_tv = 13, mir_output_type_edp = 14, mir_output_type_virtual = 15,
  mir_output_type_dsi = 16, mir_output_type_dpi = 17
}
 
enum  MirPromptSessionState { mir_prompt_session_state_stopped = 0, mir_prompt_session_state_started, mir_prompt_session_state_suspended }
 
enum  MirPixelFormat {
  mir_pixel_format_invalid = 0, mir_pixel_format_abgr_8888 = 1, mir_pixel_format_xbgr_8888 = 2, mir_pixel_format_argb_8888 = 3,
  mir_pixel_format_xrgb_8888 = 4, mir_pixel_format_bgr_888 = 5, mir_pixel_format_rgb_888 = 6, mir_pixel_format_rgb_565 = 7,
  mir_pixel_format_rgba_5551 = 8, mir_pixel_format_rgba_4444 = 9, mir_pixel_formats
}
 32-bit pixel formats (8888): The order of components in the enum matches the order of the components as they would be written in an integer representing a pixel value of that format. More...
 
enum  MirOrientation { mir_orientation_normal = 0, mir_orientation_left = 90, mir_orientation_inverted = 180, mir_orientation_right = 270 }
 Direction relative to the "natural" orientation of the display. More...
 
enum  MirMirrorMode { mir_mirror_mode_none, mir_mirror_mode_vertical, mir_mirror_mode_horizontal }
 Mirroring axis relative to the "natural" orientation of the display. More...
 
enum  MirOrientationMode {
  mir_orientation_mode_portrait = 1 << 0, mir_orientation_mode_landscape = 1 << 1, mir_orientation_mode_portrait_inverted = 1 << 2, mir_orientation_mode_landscape_inverted = 1 << 3,
  mir_orientation_mode_portrait_any, mir_orientation_mode_landscape_any, mir_orientation_mode_any
}
 
enum  MirEdgeAttachment { mir_edge_attachment_vertical = 1 << 0, mir_edge_attachment_horizontal = 1 << 1, mir_edge_attachment_any }
 
enum  MirPlacementGravity {
  mir_placement_gravity_center = 0, mir_placement_gravity_west = 1 << 0, mir_placement_gravity_east = 1 << 1, mir_placement_gravity_north = 1 << 2,
  mir_placement_gravity_south = 1 << 3, mir_placement_gravity_northwest = mir_placement_gravity_north | mir_placement_gravity_west, mir_placement_gravity_northeast = mir_placement_gravity_north | mir_placement_gravity_east, mir_placement_gravity_southwest = mir_placement_gravity_south | mir_placement_gravity_west,
  mir_placement_gravity_southeast = mir_placement_gravity_south | mir_placement_gravity_east
}
 Reference point for aligning a surface relative to a rectangle. More...
 
enum  MirPlacementHints {
  mir_placement_hints_flip_x = 1 << 0, mir_placement_hints_flip_y = 1 << 1, mir_placement_hints_slide_x = 1 << 2, mir_placement_hints_slide_y = 1 << 3,
  mir_placement_hints_resize_x = 1 << 4, mir_placement_hints_resize_y = 1 << 5, mir_placement_hints_antipodes = 1 << 6, mir_placement_hints_flip_any = mir_placement_hints_flip_x|mir_placement_hints_flip_y,
  mir_placement_hints_slide_any = mir_placement_hints_slide_x|mir_placement_hints_slide_y, mir_placement_hints_resize_any = mir_placement_hints_resize_x|mir_placement_hints_resize_y
}
 Positioning hints for aligning a window relative to a rectangle. More...
 
enum  MirResizeEdge {
  mir_resize_edge_none = 0, mir_resize_edge_west = 1 << 0, mir_resize_edge_east = 1 << 1, mir_resize_edge_north = 1 << 2,
  mir_resize_edge_south = 1 << 3, mir_resize_edge_northwest = mir_resize_edge_north | mir_resize_edge_west, mir_resize_edge_northeast = mir_resize_edge_north | mir_resize_edge_east, mir_resize_edge_southwest = mir_resize_edge_south | mir_resize_edge_west,
  mir_resize_edge_southeast = mir_resize_edge_south | mir_resize_edge_east
}
 Hints for resizing a window. More...
 
enum  MirFormFactor {
  mir_form_factor_unknown, mir_form_factor_phone, mir_form_factor_tablet, mir_form_factor_monitor,
  mir_form_factor_tv, mir_form_factor_projector
}
 Form factor associated with a physical output. More...
 
enum  MirSubpixelArrangement {
  mir_subpixel_arrangement_unknown, mir_subpixel_arrangement_horizontal_rgb, mir_subpixel_arrangement_horizontal_bgr, mir_subpixel_arrangement_vertical_rgb,
  mir_subpixel_arrangement_vertical_bgr, mir_subpixel_arrangement_none
}
 Physical arrangement of subpixels on the physical output. More...
 
enum  MirShellChrome { mir_shell_chrome_normal, mir_shell_chrome_low }
 Shell chrome. More...
 
enum  MirPointerConfinementState { mir_pointer_unconfined, MIR_DEPRECATED_ENUM =(mir_pointer_confined_to_surface, "mir_pointer_confined_to_window"), mir_pointer_confined_to_window = mir_pointer_confined_to_surface }
 Pointer Confinement. More...
 
enum  MirOutputGammaSupported { mir_output_gamma_unsupported, mir_output_gamma_supported }
 Supports gamma correction. More...
 
enum  MirPointerHandedness { mir_pointer_handedness_right = 0, mir_pointer_handedness_left = 1 }
 
enum  MirPointerAcceleration { mir_pointer_acceleration_none = 1, mir_pointer_acceleration_adaptive = 2 }
 MirPointerAcceleration describes the way pointer movement is filtered: More...
 
enum  MirTouchpadClickMode { mir_touchpad_click_mode_none = 0, mir_touchpad_click_mode_area_to_click = 1 << 0, mir_touchpad_click_mode_finger_count = 1 << 1 }
 MirTouchpadClickMode configures how the touchpad itself should generate pointer button events. More...
 
enum  MirTouchpadScrollMode { mir_touchpad_scroll_mode_none = 0, mir_touchpad_scroll_mode_two_finger_scroll = 1 << 0, mir_touchpad_scroll_mode_edge_scroll = 1 << 1, mir_touchpad_scroll_mode_button_down_scroll = 1 << 2 }
 MirTouchpadScrollMode configures how the touchpad should generate scroll events. More...
 
enum  MirInputDeviceCapability {
  mir_input_device_capability_none = 0, mir_input_device_capability_pointer = 1<<1, mir_input_device_capability_keyboard = 1<<2, mir_input_device_capability_touchpad = 1<<3,
  mir_input_device_capability_touchscreen = 1<<4, mir_input_device_capability_gamepad = 1<<5, mir_input_device_capability_joystick = 1<<6, mir_input_device_capability_switch = 1<<7,
  mir_input_device_capability_multitouch = 1<<8, mir_input_device_capability_alpha_numeric = 1<<9
}
 
enum  MirTouchscreenMappingMode { mir_touchscreen_mapping_mode_to_output, mir_touchscreen_mapping_mode_to_display_wall }
 Mapping modes for touchscreen devices. More...
 
enum  MirBufferUsage
 MirBufferUsage specifies how a surface can and will be used. More...
 
enum  { mir_platform_package_max = 32 }
 
enum  MirPlatformType { mir_platform_type_gbm, mir_platform_type_android, mir_platform_type_eglstream }
 The native buffer type for the system the client is connected on. More...
 
enum  MirBufferLayout { mir_buffer_layout_unknown = 0, mir_buffer_layout_linear = 1 }
 
enum  MirPresentMode {
  mir_present_mode_immediate, mir_present_mode_mailbox, mir_present_mode_fifo, mir_present_mode_fifo_relaxed,
  mir_present_mode_num_modes
}
 
enum  { mir_supported_pixel_format_max = 32 }
 DEPRECATED. More...
 
enum  MirDisplayOutputType {
  mir_display_output_type_unknown = mir_output_type_unknown, mir_display_output_type_vga = mir_output_type_vga, mir_display_output_type_dvii = mir_output_type_dvii, mir_display_output_type_dvid = mir_output_type_dvid,
  mir_display_output_type_dvia = mir_output_type_dvia, mir_display_output_type_composite = mir_output_type_composite, mir_display_output_type_svideo = mir_output_type_svideo, mir_display_output_type_lvds = mir_output_type_lvds,
  mir_display_output_type_component = mir_output_type_component, mir_display_output_type_ninepindin = mir_output_type_ninepindin, mir_display_output_type_displayport = mir_output_type_displayport, mir_display_output_type_hdmia = mir_output_type_hdmia,
  mir_display_output_type_hdmib = mir_output_type_hdmib, mir_display_output_type_tv = mir_output_type_tv, mir_display_output_type_edp = mir_output_type_edp, mir_display_output_type_virtual = mir_output_type_virtual,
  mir_display_output_type_dsi = mir_output_type_dsi, mir_display_output_type_dpi = mir_output_type_dpi
}
 
enum  MirOutputConnectionState { mir_output_connection_state_disconnected = 0, mir_output_connection_state_connected, mir_output_connection_state_unknown }
 
enum  { mir_display_output_id_invalid = 0 }
 
enum  MirErrorDomain { mir_error_domain_display_configuration, mir_error_domain_input_configuration }
 Specifies the origin of an error. More...
 
enum  MirDisplayConfigurationError { mir_display_configuration_error_unauthorized, mir_display_configuration_error_in_progress, mir_display_configuration_error_no_preview_in_progress, mir_display_configuration_error_rejected_by_hardware }
 Errors from the mir_error_domain_display_configuration MirErrorDomain. More...
 
enum  MirInputConfigurationError { mir_input_configuration_error_rejected_by_driver, mir_input_configuration_error_base_configuration_unauthorized, mir_input_configuration_error_unauthorized }
 Errors from the mir_error_domain_input_configuration MirErrorDomain. More...
 
enum  MirEventType {
  MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"), MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"), MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"), mir_event_type_window = mir_event_type_surface,
  mir_event_type_resize, mir_event_type_prompt_session_state_change, mir_event_type_orientation, MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"),
  mir_event_type_close_window = mir_event_type_close_surface, mir_event_type_input, mir_event_type_keymap, MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"),
  MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"), mir_event_type_window_output = mir_event_type_surface_output, mir_event_type_input_device_state, MIR_DEPRECATED_ENUM =(mir_event_type_key, "mir_event_type_input"),
  mir_event_type_window_placement = mir_event_type_surface_placement
}
 
enum  MirInputEventType { mir_input_event_type_key = 0, mir_input_event_type_touch = 1, mir_input_event_type_pointer = 2, mir_input_event_types }
 
enum  MirInputEventModifier {
  mir_input_event_modifier_none = 1 << 0, mir_input_event_modifier_alt = 1 << 1, mir_input_event_modifier_alt_left = 1 << 2, mir_input_event_modifier_alt_right = 1 << 3,
  mir_input_event_modifier_shift = 1 << 4, mir_input_event_modifier_shift_left = 1 << 5, mir_input_event_modifier_shift_right = 1 << 6, mir_input_event_modifier_sym = 1 << 7,
  mir_input_event_modifier_function = 1 << 8, mir_input_event_modifier_ctrl = 1 << 9, mir_input_event_modifier_ctrl_left = 1 << 10, mir_input_event_modifier_ctrl_right = 1 << 11,
  mir_input_event_modifier_meta = 1 << 12, mir_input_event_modifier_meta_left = 1 << 13, mir_input_event_modifier_meta_right = 1 << 14, mir_input_event_modifier_caps_lock = 1 << 15,
  mir_input_event_modifier_num_lock = 1 << 16, mir_input_event_modifier_scroll_lock = 1 << 17
}
 Description of key modifier state. More...
 
enum  MirKeyboardAction { mir_keyboard_action_up, mir_keyboard_action_down, mir_keyboard_action_repeat, mir_keyboard_actions }
 Possible actions for changing key state. More...
 
enum  MirPointerAction {
  mir_pointer_action_button_up = 0, mir_pointer_action_button_down = 1, mir_pointer_action_enter = 2, mir_pointer_action_leave = 3,
  mir_pointer_action_motion = 4, mir_pointer_actions
}
 Possible pointer actions. More...
 
enum  MirPointerAxis {
  mir_pointer_axis_x = 0, mir_pointer_axis_y = 1, mir_pointer_axis_vscroll = 2, mir_pointer_axis_hscroll = 3,
  mir_pointer_axis_relative_x = 4, mir_pointer_axis_relative_y = 5, mir_pointer_axes
}
 Identifiers for pointer axis. More...
 
enum  MirPointerButton {
  mir_pointer_button_primary = 1 << 0, mir_pointer_button_secondary = 1 << 1, mir_pointer_button_tertiary = 1 << 2, mir_pointer_button_back = 1 << 3,
  mir_pointer_button_forward = 1 << 4, mir_pointer_button_side = 1 << 5, mir_pointer_button_extra = 1 << 6, mir_pointer_button_task = 1 << 7
}
 
enum  MirTouchAction { mir_touch_action_up = 0, mir_touch_action_down = 1, mir_touch_action_change = 2, mir_touch_actions }
 Possible per touch actions for state changing. More...
 
enum  MirTouchAxis {
  mir_touch_axis_x = 0, mir_touch_axis_y = 1, mir_touch_axis_pressure = 2, mir_touch_axis_touch_major = 3,
  mir_touch_axis_touch_minor = 4, mir_touch_axis_size = 5, mir_touch_axes
}
 Identifiers for touch axis. More...
 
enum  MirTouchTooltype { mir_touch_tooltype_unknown = 0, mir_touch_tooltype_finger = 1, mir_touch_tooltype_stylus = 2, mir_touch_tooltypes }
 Identifiers for per-touch tool types. More...
 
enum  MirInputConfigurationAction { mir_input_configuration_action_configuration_changed, mir_input_configuration_action_device_reset }
 MirInputConfigurationEvent indicates a configuration change in the input device subsystem. Eventually it's usage will be required to properly interpret MirInputEvent, for example: If we receive a button down, and then a device reset, we should not expect to receive the button up. More...
 
enum  MirScreencastResult { mir_screencast_success, mir_screencast_error_failure }
 

Functions

enum MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowAttrib")
 Attributes of a surface that the client and server/shell may wish to get or set over the wire. More...
 
enum MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowType")
 
enum MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowState")
 
enum MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowFocusState")
 
struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1 ("Use MirWindow instead")
 
struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1 ("Use MirWindowSpec instead")
 
struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1 ("Use MirWindowId instead")
 
struct MirCursorConfiguration MirCursorConfiguration MIR_FOR_REMOVAL_IN_VERSION_1 ("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead")
 Opaque structure containing cursor parameterization. More...
 
enum MirBufferUsage MIR_FOR_REMOVAL_IN_VERSION_1 ("No longer applicable when using MirRenderSurface")
 MirBufferUsage specifies how a surface can and will be used. More...
 
struct MirSurfaceParameters MIR_FOR_REMOVAL_IN_VERSION_1 ("Use mir_window_get apis or listen for attribute events instead")
 MirWindowParameters is the structure of minimum required information that you must provide to Mir in order to create a window. More...
 
struct MirSurfaceEvent MirSurfaceEvent MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowEvent instead")
 
struct MirCloseSurfaceEvent MirCloseSurfaceEvent MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirCloseWindowEvent instead")
 
struct MirInputConfigurationEvent MirInputConfigurationEvent MIR_FOR_REMOVAL_IN_VERSION_1 ("Use MirInputDeviceStateEvent and the MirInputConfig callback instead")
 
struct MirSurfaceOutputEvent MirSurfaceOutputEvent MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowOutputEvent instead")
 
struct MirSurfacePlacementEvent MirSurfacePlacementEvent MIR_FOR_REMOVAL_IN_VERSION_1 ("use MirWindowPlacementEvent instead")
 
MirEventType mir_event_get_type (MirEvent const *event)
 Retrieves the type of a MirEvent. More...
 
MirInputEvent const * mir_event_get_input_event (MirEvent const *event)
 Retrieve the MirInputEvent associated with a MirEvent of type mir_event_type_input. More...
 
MirSurfaceEvent const * mir_event_get_surface_event (MirEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_event instead")
 Retrieve the MirSurfaceEvent associated with a MirEvent of type mir_event_type_surface. More...
 
MirWindowEvent const * mir_event_get_window_event (MirEvent const *event)
 Retrieve the MirWindowEvent associated with a MirEvent of type mir_event_type_window. More...
 
MirResizeEvent const * mir_event_get_resize_event (MirEvent const *event)
 Retrieve the MirResizeEvent associated with a MirEvent of type mir_event_type_resize. More...
 
MirPromptSessionEvent const * mir_event_get_prompt_session_event (MirEvent const *event)
 Retrieve the MirPromptSessionEvent associated with a MirEvent of type mir_event_type_prompt_session_state_change. More...
 
MirOrientationEvent const * mir_event_get_orientation_event (MirEvent const *event)
 Retrieve the MirOrientationEvent associated with a MirEvent of type mir_event_type_orientation. More...
 
MirCloseSurfaceEvent const * mir_event_get_close_surface_event (MirEvent const *event)
 Retrieve the MirCloseSurfaceEvent associated with a MirEvent of type mir_event_type_close_surface. More...
 
MirKeymapEvent const * mir_event_get_keymap_event (MirEvent const *event)
 Retrieve the MirKeymapEvent associated with a MirEvent of type mir_event_type_keymap. More...
 
MirInputConfigurationEvent const * mir_event_get_input_configuration_event (MirEvent const *event)
 Retrieve the MirInputConfig associated with a MirEvent of type mir_event_type_input_configuration. More...
 
MirSurfaceOutputEvent const * mir_event_get_surface_output_event (MirEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_output_event")
 Retrieve the MirSurfaceOutputEvent associated with a MirEvent of type mir_event_type_surface_output. More...
 
MirWindowOutputEvent const * mir_event_get_window_output_event (MirEvent const *event)
 Retrieve the MirWindowOutputEvent associated with a MirEvent of type mir_event_type_window_output. More...
 
MirInputDeviceStateEvent const * mir_event_get_input_device_state_event (MirEvent const *event)
 Retrieve the MirInputDeviceStateEvent associated with a MirEvent of type mir_event_type_input_device_state. More...
 
MirSurfacePlacementEvent const * mir_event_get_surface_placement_event (MirEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_event_get_window_placement_event")
 Retrieve the MirSurfacePlacementEvent associated with a MirEvent of type mir_event_type_surface_placement. More...
 
MirWindowPlacementEvent const * mir_event_get_window_placement_event (MirEvent const *event)
 Retrieve the MirWindowPlacementEvent associated with a MirEvent of type mir_event_type_window_placement. More...
 
MirEvent const * mir_event_ref (MirEvent const *event) __attribute__((warn_unused_result))
 Reference this MirEvent and return a pointer to the newly referenced instance. More...
 
void mir_event_unref (MirEvent const *event)
 Release a reference to a MirEvent. More...
 
MirInputDeviceId mir_input_event_get_device_id (MirInputEvent const *event)
 Retrieves the device id responsible for generating an input event. More...
 
int64_t mir_input_event_get_event_time (MirInputEvent const *event)
 Retrieve the time at which an input event occurred. More...
 
MirInputEventType mir_input_event_get_type (MirInputEvent const *event)
 Retrieve the type of an input event. More...
 
MirKeyboardEvent const * mir_input_event_get_keyboard_event (MirInputEvent const *event)
 Retrieve the MirKeyboardEvent associated with a given input event. More...
 
MirTouchEvent const * mir_input_event_get_touch_event (MirInputEvent const *event)
 Retrieve the MirTouchEvent associated with a given input event. More...
 
MirPointerEvent const * mir_input_event_get_pointer_event (MirInputEvent const *event)
 Retrieve the MirPointerEvent associated with a given input event. More...
 
bool mir_input_event_has_cookie (MirInputEvent const *ev)
 Query if an input event contains a cookie. More...
 
MirCookie const * mir_input_event_get_cookie (MirInputEvent const *ev)
 Returns the cookie associated with an input event. More...
 
MirEvent const * mir_input_event_get_event (MirInputEvent const *event)
 Retrieve the MirEvent associated with a given input event. More...
 
MirKeyboardAction mir_keyboard_event_action (MirKeyboardEvent const *event)
 Retrieve the action which triggered a given key event. More...
 
xkb_keysym_t mir_keyboard_event_key_code (MirKeyboardEvent const *event)
 Retrieve the xkb mapped keycode associated with the key acted on. More...
 
int mir_keyboard_event_scan_code (MirKeyboardEvent const *event)
 Retrieve the raw hardware scan code associated with the key acted on. More...
 
char const * mir_keyboard_event_key_text (MirKeyboardEvent const *event)
 Retrieve the text the key press would emit as null terminated utf8 string. More...
 
MirInputEventModifiers mir_keyboard_event_modifiers (MirKeyboardEvent const *event)
 Retrieve the modifier keys pressed when the key action occured. More...
 
MirInputEvent const * mir_keyboard_event_input_event (MirKeyboardEvent const *event)
 Retrieve the corresponding input event. More...
 
MirInputEventModifiers mir_pointer_event_modifiers (MirPointerEvent const *event)
 Retrieve the modifier keys pressed when the pointer action occured. More...
 
MirPointerAction mir_pointer_event_action (MirPointerEvent const *event)
 Retrieve the action which occured to generate a given pointer event. More...
 
bool mir_pointer_event_button_state (MirPointerEvent const *event, MirPointerButton button)
 Retrieve the state of a given pointer button when the action occurred. More...
 
MirPointerButtons mir_pointer_event_buttons (MirPointerEvent const *event)
 Retreive the pointer button state as a masked set of values. More...
 
float mir_pointer_event_axis_value (MirPointerEvent const *event, MirPointerAxis axis)
 Retrieve the axis value reported by a given pointer event. More...
 
MirInputEvent const * mir_pointer_event_input_event (MirPointerEvent const *event)
 Retrieve the corresponding input event. More...
 
MirInputEventModifiers mir_touch_event_modifiers (MirTouchEvent const *event)
 Retrieve the modifier keys pressed when the touch action occured. More...
 
unsigned int mir_touch_event_point_count (MirTouchEvent const *event)
 Retrieve the number of touches reported for a given touch event. More...
 
MirTouchId mir_touch_event_id (MirTouchEvent const *event, size_t touch_index)
 Retrieve the TouchID for a touch at given index. More...
 
MirTouchAction mir_touch_event_action (MirTouchEvent const *event, size_t touch_index)
 Retrieve the action which occured for a touch at given index. More...
 
MirTouchTooltype mir_touch_event_tooltype (MirTouchEvent const *event, size_t touch_index)
 Retrieve the tooltype for touch at given index. More...
 
float mir_touch_event_axis_value (MirTouchEvent const *event, size_t touch_index, MirTouchAxis axis)
 Retrieve the axis value for a given axis on an indexed touch. More...
 
MirInputEvent const * mir_touch_event_input_event (MirTouchEvent const *event)
 Retrieve the corresponding input event. More...
 
MirInputConfigurationAction mir_input_configuration_event_get_action (MirInputConfigurationEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
 Retrieve the input configuration action which occurred. More...
 
int64_t mir_input_configuration_event_get_time (MirInputConfigurationEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
 Retreive the time associated with a MirInputConfiguration event. More...
 
MirInputDeviceId mir_input_configuration_event_get_device_id (MirInputConfigurationEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("Input devices and changes to the input devices are indicated via the MirInputConfigCallback")
 Retreive the device id associated with a MirInputConfiguration event. More...
 
MirPointerButtons mir_input_device_state_event_pointer_buttons (MirInputDeviceStateEvent const *ev)
 MirInputDeviceStateEvent informs clients about the current state of the input devices. More...
 
float mir_input_device_state_event_pointer_axis (MirInputDeviceStateEvent const *ev, MirPointerAxis axis)
 Retrieve the pointer position. More...
 
int64_t mir_input_device_state_event_time (MirInputDeviceStateEvent const *ev)
 Retrieve the time associated with a MirInputDeviceStateEvent. More...
 
MirInputEventModifiers mir_input_device_state_event_modifiers (MirInputDeviceStateEvent const *ev)
 Retrieve the modifier keys pressed on all input devices. More...
 
uint32_t mir_input_device_state_event_device_count (MirInputDeviceStateEvent const *ev)
 Retrieve the number of attached input devices. More...
 
MirInputDeviceId mir_input_device_state_event_device_id (MirInputDeviceStateEvent const *ev, uint32_t index)
 Retrieve the device id. More...
 
uint32_t mir_input_device_state_event_device_pressed_keys_for_index (MirInputDeviceStateEvent const *ev, uint32_t index, uint32_t pressed_index)
 
uint32_t mir_input_device_state_event_device_pressed_keys_count (MirInputDeviceStateEvent const *ev, uint32_t index)
 Retrieve the size of scan code array of the device identified by the index. More...
 
MirPointerButtons mir_input_device_state_event_device_pointer_buttons (MirInputDeviceStateEvent const *ev, uint32_t index)
 Retrieve the pointer button state of the device identified by the index. More...
 
void mir_keymap_event_get_rules (MirKeymapEvent const *ev, struct xkb_rule_names *rules) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_keymap_event_get_keymap_buffer() instead")
 Retrieve the new keymap reported by this MirKeymapEvent. More...
 
void mir_keymap_event_get_keymap_buffer (MirKeymapEvent const *ev, char const **buffer, size_t *length)
 Retrieve the new keymap reported by this MirKeymapEvent. More...
 
MirInputDeviceId mir_keymap_event_get_device_id (MirKeymapEvent const *ev)
 Retrieve the device id the keymap reported by this MirKeymapEvent applies to. More...
 
MirOrientation mir_orientation_event_get_direction (MirOrientationEvent const *ev)
 Retrieve the new orientation reported by this MirOrientationEvent. More...
 
MirPromptSessionState mir_prompt_session_event_get_state (MirPromptSessionEvent const *event)
 Retrieve the new prompt session state reported by a given MirPromptSessionEvent. More...
 
int mir_resize_event_get_width (MirResizeEvent const *ev)
 Retrieve the new width reported by a given MirResizeEvent. More...
 
int mir_resize_event_get_height (MirResizeEvent const *ev)
 Retrieve the new height reported by a given MirResizeEvent. More...
 
MirSurfaceAttrib mir_surface_event_get_attribute (MirSurfaceEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute instead")
 Retrieve the attribute index configured with a given MirSurfaceEvent. More...
 
int mir_surface_event_get_attribute_value (MirSurfaceEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_event_get_attribute_value with MirWindowEvent instead")
 Retrieve the new value of the associated attribute for a given MirSurfaceEvent. More...
 
int mir_surface_output_event_get_dpi (MirSurfaceOutputEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_dpi instead")
 Retrieve the DPI of the new output configuration of a MirSurfaceOutputEvent. More...
 
MirFormFactor mir_surface_output_event_get_form_factor (MirSurfaceOutputEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_form_factor instead")
 Retrieve the form factor of the new output configuration of a MirSurfaceOutputEvent. More...
 
float mir_surface_output_event_get_scale (MirSurfaceOutputEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_scale instead")
 Retrieve the suggested scaling factor of the new output configuration of a MirSurfaceOutputEvent. More...
 
double mir_surface_output_event_get_refresh_rate (MirSurfaceOutputEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_refresh_rate instead")
 Retrieve the maximum refresh rate of the output(s) associated with a MirSurfaceOutputEvent. More...
 
uint32_t mir_surface_output_event_get_output_id (MirSurfaceOutputEvent const *ev) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_output_event_get_output_id instead")
 Retrieve the ID of the output this surface is on from a MirSurfaceOutputEvent. More...
 
MirRectangle mir_surface_placement_get_relative_position (MirSurfacePlacementEvent const *event) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_placement_get_relative_position instead")
 Retrieve the relative position from a placement notification. More...
 
MirWindowAttrib mir_window_event_get_attribute (MirWindowEvent const *event)
 Retrieve the attribute index configured with a given MirWindowEvent. More...
 
int mir_window_event_get_attribute_value (MirWindowEvent const *event)
 Retrieve the new value of the associated attribute for a given MirWindowEvent. More...
 
int mir_window_output_event_get_dpi (MirWindowOutputEvent const *ev)
 Retrieve the DPI of the new output configuration of a MirWindowOutputEvent. More...
 
MirFormFactor mir_window_output_event_get_form_factor (MirWindowOutputEvent const *ev)
 Retrieve the form factor of the new output configuration of a MirWindowOutputEvent. More...
 
float mir_window_output_event_get_scale (MirWindowOutputEvent const *ev)
 Retrieve the suggested scaling factor of the new output configuration of a MirWindowOutputEvent. More...
 
double mir_window_output_event_get_refresh_rate (MirWindowOutputEvent const *ev)
 Retrieve the maximum refresh rate of the output(s) associated with a MirWindowOutputEvent. More...
 
uint32_t mir_window_output_event_get_output_id (MirWindowOutputEvent const *ev)
 Retrieve the ID of the output this window is on from a MirWindowOutputEvent. More...
 
MirRectangle mir_window_placement_get_relative_position (MirWindowPlacementEvent const *event)
 Retrieve the relative position from a placement notification. More...
 
MirBlobmir_blob_from_display_configuration (MirDisplayConfiguration *configuration) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_from_display_config instead")
 Create a blob from a display configuration. More...
 
MirBlobmir_blob_from_display_config (MirDisplayConfig *config)
 Create a blob from a display config. More...
 
MirBlobmir_blob_onto_buffer (void const *buffer, size_t buffer_size)
 Create a blob from a buffer. More...
 
MirDisplayConfigurationmir_blob_to_display_configuration (MirBlob *blob) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_blob_to_display_config instead")
 Create a blob from a display configuration. More...
 
MirDisplayConfigmir_blob_to_display_config (MirBlob *blob)
 Create a blob from a display config. More...
 
size_t mir_blob_size (MirBlob *blob)
 Get the size of a blob. More...
 
void const * mir_blob_data (MirBlob *blob)
 Get the data of a blob. More...
 
void mir_blob_release (MirBlob *blob)
 Release a blob object. More...
 
void mir_connection_allocate_buffer (MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferCallback available_callback, void *available_context)
 Allocate a MirBuffer and do not wait for the server to return it. More...
 
MirBuffermir_connection_allocate_buffer_sync (MirConnection *connection, int width, int height, MirPixelFormat format)
 Allocate a MirBuffer and wait for the server to return it. More...
 
bool mir_buffer_is_valid (MirBuffer const *buffer)
 Test for a valid buffer. More...
 
char const * mir_buffer_get_error_message (MirBuffer const *buffer)
 Retrieve a text description an error associated with a MirBuffer. More...
 
MirBufferPackagemir_buffer_get_buffer_package (MirBuffer *buffer)
 Access the MirBufferPackage. More...
 
bool mir_buffer_map (MirBuffer *buffer, MirGraphicsRegion *region, MirBufferLayout *layout)
 Access a CPU-mapped region associated with a given buffer. More...
 
void mir_buffer_unmap (MirBuffer *buffer)
 Flush the CPU caches for the buffer. More...
 
unsigned int mir_buffer_get_width (MirBuffer const *buffer)
 Retrieve the width of the buffer in pixels. More...
 
unsigned int mir_buffer_get_height (MirBuffer const *buffer)
 Retrieve the height of the buffer in pixels. More...
 
MirPixelFormat mir_buffer_get_pixel_format (MirBuffer const *buffer)
 Retrieve the pixel format of the buffer. More...
 
bool mir_buffer_stream_is_valid (MirBufferStream *buffer_stream)
 Test for a valid buffer stream. More...
 
char const * mir_buffer_stream_get_error_message (MirBufferStream *buffer_stream)
 Retrieve a text description of the error. More...
 
MirWaitHandlemir_connection_create_buffer_stream (MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead")
 Create a new buffer stream. More...
 
MirBufferStreammir_connection_create_buffer_stream_sync (MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead")
 Create a new buffer stream unattached to a surface and wait for the result. More...
 
MirWaitHandlemir_buffer_stream_release (MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.")
 Release the supplied stream and any associated buffer. More...
 
void mir_buffer_stream_release_sync (MirBufferStream *buffer_stream) MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.")
 Release the specified buffer stream like in mir,_buffer_stream_release(), but also wait for the operation to complete. More...
 
MirPlatformType mir_buffer_stream_get_platform_type (MirBufferStream *stream) MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \ "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()")
 Get the underlying platform type so the buffer obtained in "raw" representation in mir_buffer_stream_get_current_buffer() may be understood. More...
 
void mir_buffer_stream_get_current_buffer (MirBufferStream *buffer_stream, MirNativeBuffer **buffer_package) MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead")
 Retrieve the current buffer in "raw" representation. More...
 
MirWaitHandlemir_buffer_stream_swap_buffers (MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero." " And a client API for manual vsync will soon be available.")
 Advance a buffer stream's buffer. More...
 
void mir_buffer_stream_swap_buffers_sync (MirBufferStream *buffer_stream)
 Advance a buffer stream's buffer as in mir_buffer stream_swap_buffers(), but also wait for the operation to complete. More...
 
bool mir_buffer_stream_get_graphics_region (MirBufferStream *buffer_stream, MirGraphicsRegion *graphics_region)
 Retrieve a buffer stream's graphics region. More...
 
MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window (MirBufferStream *buffer_stream) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type")
 Retrieve a window type which may be used by EGL. More...
 
MirWaitHandlemir_buffer_stream_set_scale (MirBufferStream *buffer_stream, float scale) MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface")
 Set the scale associated with all buffers in the stream. More...
 
void mir_buffer_stream_set_scale_sync (MirBufferStream *buffer_stream, float scale) MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface")
 Set the scale as in mir_buffer_stream_set_scale(), but also wait for the operation to complete. More...
 
MirWaitHandlemir_buffer_stream_set_swapinterval (MirBufferStream *stream, int interval)
 Set the swapinterval for the stream. More...
 
int mir_buffer_stream_get_swapinterval (MirBufferStream *stream)
 Query the swapinterval that the stream is operating with. More...
 
unsigned long mir_buffer_stream_get_microseconds_till_vblank (MirBufferStream const *stream)
 Query the approximate time interval in microseconds until the next vblank for a given buffer stream (actually the next vblank for the monitor deemed most relevant to the window using the buffer stream). More...
 
void mir_buffer_stream_set_size (MirBufferStream *stream, int width, int height)
 Set the physical size of the buffers provided by the buffer stream. More...
 
void mir_buffer_stream_get_size (MirBufferStream *stream, int *width, int *height)
 Get the physical size of the next buffer that will be provided by the stream. More...
 
MirWaitHandlemir_connect (char const *server, char const *app_name, MirConnectedCallback callback, void *context)
 Request a connection to the Mir server. More...
 
MirConnectionmir_connect_sync (char const *server, char const *app_name)
 Perform a mir_connect() but also wait for and return the result. More...
 
bool mir_connection_is_valid (MirConnection *connection)
 Test for a valid connection. More...
 
char const * mir_connection_get_error_message (MirConnection *connection)
 Retrieve a text description of the last error. More...
 
void mir_connection_release (MirConnection *connection)
 Release a connection to the Mir server. More...
 
void mir_connection_get_platform (MirConnection *connection, MirPlatformPackage *platform_package) MIR_FOR_REMOVAL_IN_VERSION_1("use platform extensions instead")
 Query platform-specific data and/or file descriptors that are required to initialize GL/EGL features. More...
 
void mir_connection_get_graphics_module (MirConnection *connection, MirModuleProperties *properties) MIR_FOR_REMOVAL_IN_VERSION_1("use graphics module extension instead")
 Query graphics platform module. More...
 
void mir_connection_set_lifecycle_event_callback (MirConnection *connection, MirLifecycleEventCallback callback, void *context)
 Register a callback to be called when a Lifecycle state change occurs. More...
 
void mir_connection_set_ping_event_callback (MirConnection *connection, MirPingEventCallback callback, void *context)
 Register a callback for server ping events. More...
 
void mir_connection_pong (MirConnection *connection, int32_t serial)
 Respond to a ping event. More...
 
MirDisplayConfigurationmir_connection_create_display_config (MirConnection *connection) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_create_display_configuration instead")
 Query the display. More...
 
MirDisplayConfigmir_connection_create_display_configuration (MirConnection *connection)
 Query the display. More...
 
void mir_connection_set_display_config_change_callback (MirConnection *connection, MirDisplayConfigCallback callback, void *context)
 Register a callback to be called when the hardware display configuration changes. More...
 
void mir_display_config_destroy (MirDisplayConfiguration *display_configuration) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_display_config_release instead")
 Destroy the DisplayConfiguration resource acquired from mir_connection_create_display_config. More...
 
MirWaitHandlemir_connection_apply_display_config (MirConnection *connection, MirDisplayConfiguration *display_configuration) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_apply_session_display_config instead")
 Apply the display configuration. More...
 
void mir_connection_apply_session_display_config (MirConnection *connection, MirDisplayConfig const *display_config)
 Apply the display config for the connection. More...
 
void mir_connection_remove_session_display_config (MirConnection *connection)
 Remove the display configuration for the connection. More...
 
MirWaitHandlemir_connection_set_base_display_config (MirConnection *connection, MirDisplayConfiguration const *display_configuration) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_connection_preview_base_display_configuration/mir_connection_confirm_base_display_configuration")
 Set the base display configuration. More...
 
void mir_connection_preview_base_display_configuration (MirConnection *connection, MirDisplayConfig const *configuration, int timeout_seconds)
 Preview a new base display configuration. More...
 
void mir_connection_confirm_base_display_configuration (MirConnection *connection, MirDisplayConfig const *configuration)
 Confirm a base configuration change initiated by mir_connection_preview_base_display_configuration() More...
 
void mir_connection_cancel_base_display_configuration_preview (MirConnection *connection)
 Cancel a pending base display configuration preview. More...
 
MirEGLNativeDisplayType mir_connection_get_egl_native_display (MirConnection *connection) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirConnection * as the native display instead")
 Get a display type that can be used with EGL. More...
 
MirPixelFormat mir_connection_get_egl_pixel_format (MirConnection *connection, void *egldisplay, void *eglconfig) MIR_FOR_REMOVAL_IN_VERSION_1("Use EGL directly
 Get the exact MirPixelFormat to use in creating a surface for a chosen EGLConfig. More...
 
void mir_connection_get_available_surface_formats (MirConnection *connection, MirPixelFormat *formats, unsigned const int formats_size, unsigned int *num_valid_formats)
 Get the list of possible formats that a surface can be created with. More...
 
MirWaitHandlemir_connection_platform_operation (MirConnection *connection, MirPlatformMessage const *request, MirPlatformOperationCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use platform specific extensions instead")
 Perform a platform specific operation. More...
 
MirInputConfigmir_connection_create_input_config (MirConnection *connection)
 Create a snapshot of the attached input devices and device configurations. More...
 
void mir_connection_apply_session_input_config (MirConnection *connection, MirInputConfig const *config)
 Apply the input configuration for the connection. More...
 
void mir_connection_set_base_input_config (MirConnection *connection, MirInputConfig const *config)
 Set the input configuration as base configuration. More...
 
void mir_input_config_destroy (MirInputConfig const *config) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_input_config_release instead")
 
void mir_input_config_release (MirInputConfig const *config)
 Release this snapshot of the input configuration. More...
 
void mir_connection_set_input_config_change_callback (MirConnection *connection, MirInputConfigCallback callback, void *context)
 Register a callback to be called when the input devices change. More...
 
void mir_connection_set_error_callback (MirConnection *connection, MirErrorCallback callback, void *context)
 Register a callback to be called on non-fatal errors. More...
 
unsigned mir_get_client_api_version ()
 Returns client API version. More...
 
void mir_connection_enumerate_extensions (MirConnection *connection, void *context, void(*enumerator)(void *context, char const *extension, int version))
 Enumerates the supported extensions. More...
 
size_t mir_cookie_buffer_size (MirCookie const *cookie)
 Queries the size needed to serialize a given cookie. More...
 
void mir_cookie_to_buffer (MirCookie const *cookie, void *buffer, size_t size)
 Serializes a cookie into the given buffer. More...
 
MirCookie const * mir_cookie_from_buffer (void const *buffer, size_t size)
 Create a cookie from a serialized representation. More...
 
void mir_cookie_release (MirCookie const *cookie)
 Release the MirCookie. More...
 
void mir_cursor_configuration_destroy (MirCursorConfiguration *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("MirCursorConfiguration is deprecated")
 Release resources assosciated with cursor parameters. More...
 
MirCursorConfiguration * mir_cursor_configuration_from_name (char const *name) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name() instead")
 Returns a new MirCursorConfiguration representing a named cursor from the system cursor theme. More...
 
MirCursorConfiguration * mir_cursor_configuration_from_buffer_stream (MirBufferStream const *stream, int hotspot_x, int hotspot_y) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_render_surface instead")
 Returns a new cursor configuration tied to a given buffer stream. More...
 
void mir_display_config_release (MirDisplayConfig *config)
 Release resources associated with a MirDisplayConfig handle. More...
 
int mir_display_config_get_max_simultaneous_outputs (MirDisplayConfig const *config) MIR_FOR_REMOVAL_IN_VERSION_1("Not accurate in Mir 0.26 and later. May be removed in future.")
 Get the maximum possible number of simultaneously active outputs this system supports. More...
 
int mir_display_config_get_num_outputs (MirDisplayConfig const *config)
 Get the number of outputs available in this display configuration. More...
 
MirOutput const * mir_display_config_get_output (MirDisplayConfig const *config, size_t index)
 Get a read-only handle to the index 'th output of this configuration. More...
 
MirOutputmir_display_config_get_mutable_output (MirDisplayConfig *config, size_t index)
 Get a modifyable handle to the index 'th output of this configuration. More...
 
int mir_output_get_num_modes (MirOutput const *output)
 Get the number of modes in the supported mode list of this output. More...
 
MirOutputMode const * mir_output_get_mode (MirOutput const *output, size_t index)
 Get a handle for a mode descriptor from the list of supported modes. More...
 
MirOutputMode const * mir_output_get_preferred_mode (MirOutput const *output)
 Get a handle to the output's preferred mode. More...
 
size_t mir_output_get_preferred_mode_index (MirOutput const *output)
 Get the index of the output's preferred mode. More...
 
MirOutputMode const * mir_output_get_current_mode (MirOutput const *output)
 Get a handle to the output's current mode. More...
 
size_t mir_output_get_current_mode_index (MirOutput const *output)
 Get the index of to the output's current mode. More...
 
void mir_output_set_current_mode (MirOutput *output, MirOutputMode const *mode)
 Set the current mode of an output. More...
 
int mir_output_get_num_pixel_formats (MirOutput const *output)
 Get the number of pixel formats supported by this output. More...
 
MirPixelFormat mir_output_get_pixel_format (MirOutput const *output, size_t index)
 Get a pixel format from the list of supported formats. More...
 
MirPixelFormat mir_output_get_current_pixel_format (MirOutput const *output)
 Get the current pixel format. More...
 
void mir_output_set_pixel_format (MirOutput *output, MirPixelFormat format)
 Set the output format. More...
 
int mir_output_get_id (MirOutput const *output)
 Get the ID of an output. More...
 
MirOutputType mir_output_get_type (MirOutput const *output)
 Get the physical connection type of an output. More...
 
char const * mir_display_output_type_name (MirDisplayOutputType type) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_output_type_name instead")
 Get the textual name of an output type. More...
 
char const * mir_output_type_name (MirOutputType type)
 Get the textual name of an output type. More...
 
int mir_output_get_position_x (MirOutput const *output)
 Get the x coordinate of the top-left point of the output in the virtual display space. More...
 
int mir_output_get_position_y (MirOutput const *output)
 Get the y coordinate of the top-left point of the output in the virtual display space. More...
 
unsigned int mir_output_get_logical_width (MirOutput const *output)
 Get the width of the virtual display space occupied by an output. More...
 
unsigned int mir_output_get_logical_height (MirOutput const *output)
 Get the height of the virtual display space occupied by an output. More...
 
void mir_output_set_logical_size (MirOutput *output, unsigned w, unsigned h)
 Set the logical size of the virtual display space occupied by an output. More...
 
bool mir_output_has_custom_logical_size (MirOutput const *output)
 
void mir_output_set_position (MirOutput *output, int x, int y)
 Set the coordinates of the top-left point of the output in the virtual display space. More...
 
MirOutputConnectionState mir_output_get_connection_state (MirOutput const *output)
 Get whether there is a display physically connected to the output. More...
 
bool mir_output_is_enabled (MirOutput const *output)
 Get whether this output is enabled in the current configuration. More...
 
void mir_output_enable (MirOutput *output)
 Enable this output. More...
 
void mir_output_disable (MirOutput *output)
 Disable this output. More...
 
char const * mir_output_get_model (MirOutput const *output)
 Get a descriptive manufacturer/model string for the connected display. More...
 
int mir_output_get_physical_width_mm (MirOutput const *output)
 Get the physical width of the connected display, in millimetres. More...
 
int mir_output_get_physical_height_mm (MirOutput const *output)
 Get the physical height of the connected display, in millimetres. More...
 
MirPowerMode mir_output_get_power_mode (MirOutput const *output)
 Get the power state of a connected display. More...
 
void mir_output_set_power_mode (MirOutput *output, MirPowerMode mode)
 Set the power state of a connected display. More...
 
MirOrientation mir_output_get_orientation (MirOutput const *output)
 Get the orientation of a display. More...
 
void mir_output_set_orientation (MirOutput *output, MirOrientation orientation)
 Set the orientation of a display. More...
 
float mir_output_get_scale_factor (MirOutput const *output)
 Get the scale-factor of a display. More...
 
MirSubpixelArrangement mir_output_get_subpixel_arrangement (MirOutput const *output)
 Get the subpixel arrangement of a display. More...
 
MirFormFactor mir_output_get_form_factor (MirOutput const *output)
 Get the form-factor of a connected output. More...
 
bool mir_output_is_gamma_supported (MirOutput const *output)
 Gets if the platform supports gamma correction. More...
 
uint32_t mir_output_get_gamma_size (MirOutput const *output)
 Gets the gamma size. More...
 
void mir_output_get_gamma (MirOutput const *output, uint16_t *red, uint16_t *green, uint16_t *blue, uint32_t size)
 Get the gamma ramp of a display. More...
 
void mir_output_set_gamma (MirOutput *output, uint16_t const *red, uint16_t const *green, uint16_t const *blue, uint32_t size)
 Set the gamma ramp of a display. More...
 
void mir_output_set_scale_factor (MirOutput *output, float scale)
 Set the scale-factor of a display. More...
 
uint8_t const * mir_output_get_edid (MirOutput const *output)
 Get the raw EDID data of a display. More...
 
size_t mir_output_get_edid_size (MirOutput const *output)
 Get the size of the EDID of this display. More...
 
int mir_output_mode_get_width (MirOutputMode const *mode)
 Get the width, in pixels, of a MirOutputMode. More...
 
int mir_output_mode_get_height (MirOutputMode const *mode)
 Get the height, in pixels, of a MirOutputMode. More...
 
double mir_output_mode_get_refresh_rate (MirOutputMode const *mode)
 Get the refresh rate, in Hz, of a MirOutputMode. More...
 
MirErrorDomain mir_error_get_domain (MirError const *error)
 Get the domain of a MirError. More...
 
uint32_t mir_error_get_code (MirError const *error)
 Get the domain-specific error code of a MirError. More...
 
size_t mir_input_config_device_count (MirInputConfig const *config)
 Retrieve the number of available input devices. More...
 
MirInputDevice const * mir_input_config_get_device (MirInputConfig const *config, size_t index)
 Retrieve the input device at given index. More...
 
MirInputDevice const * mir_input_config_get_device_by_id (MirInputConfig const *config, MirInputDeviceId id)
 Retrieve the input device by id. More...
 
MirInputDevicemir_input_config_get_mutable_device (MirInputConfig *config, size_t index)
 Retrieve the input device at given index. More...
 
MirInputDevicemir_input_config_get_mutable_device_by_id (MirInputConfig *config, MirInputDeviceId id)
 Retrieve the input device by id. More...
 
MirInputDeviceCapabilities mir_input_device_get_capabilities (MirInputDevice const *device)
 Retrieve the capabilities of the input device at the given index. More...
 
MirInputDeviceId mir_input_device_get_id (MirInputDevice const *device)
 Retrieve the device id of the input device. More...
 
char const * mir_input_device_get_name (MirInputDevice const *device)
 Retrieve the name of the input device. More...
 
char const * mir_input_device_get_unique_id (MirInputDevice const *device)
 Retrieve the unique id of the input device. More...
 
MirKeyboardConfig const * mir_input_device_get_keyboard_config (MirInputDevice const *device)
 Retrieve a structure containing the keyboard related config options of the input device. More...
 
char const * mir_keyboard_config_get_keymap_model (MirKeyboardConfig const *conf)
 Retrieve the keyboard model of the keymap as a null terminated string. More...
 
char const * mir_keyboard_config_get_keymap_layout (MirKeyboardConfig const *conf)
 Retrieve the layout of the keymap as a null terminated string. More...
 
char const * mir_keyboard_config_get_keymap_variant (MirKeyboardConfig const *conf)
 Retrieve the layout of the keymap as a null terminated string. More...
 
char const * mir_keyboard_config_get_keymap_options (MirKeyboardConfig const *conf)
 Retrieve the options of the keymap as a null terminated string. More...
 
MirKeyboardConfigmir_input_device_get_mutable_keyboard_config (MirInputDevice *device)
 Retrieve a mutable structure containing the keyboard related config options of the input device. More...
 
void mir_keyboard_config_set_keymap_model (MirKeyboardConfig *conf, char const *model)
 Set the keyboard model of the keymap as a null terminated string. More...
 
void mir_keyboard_config_set_keymap_layout (MirKeyboardConfig *conf, char const *layout)
 Set the layout of the keymap as a null terminated string. More...
 
void mir_keyboard_config_set_keymap_options (MirKeyboardConfig *conf, char const *options)
 Set the options of the keymap as a null terminated string. More...
 
void mir_keyboard_config_set_keymap_variant (MirKeyboardConfig *conf, char const *variant)
 Set the variant of the keymap as a null terminated string. More...
 
MirPointerConfig const * mir_input_device_get_pointer_config (MirInputDevice const *device)
 Retrieve a structure containing the pointer related config options of the input device. More...
 
MirPointerAcceleration mir_pointer_config_get_acceleration (MirPointerConfig const *conf)
 Retrieve the cursor acceleration profile. More...
 
double mir_pointer_config_get_acceleration_bias (MirPointerConfig const *conf)
 Retrieve the cursor acceleration bias. More...
 
double mir_pointer_config_get_horizontal_scroll_scale (MirPointerConfig const *conf)
 Retrieve the horizontal scroll scale. More...
 
double mir_pointer_config_get_vertical_scroll_scale (MirPointerConfig const *conf)
 Retrieve the vertical scroll scale. More...
 
MirPointerHandedness mir_pointer_config_get_handedness (MirPointerConfig const *conf)
 Retrieve whether the pointer device is configured for right or left handed use. More...
 
MirPointerConfigmir_input_device_get_mutable_pointer_config (MirInputDevice *device)
 Retrieve a structure containing the pointer related config options of the input device that can be manipulated. More...
 
void mir_pointer_config_set_acceleration (MirPointerConfig *conf, MirPointerAcceleration acceleration)
 Set the acceleration mode of the pointer device. More...
 
void mir_pointer_config_set_acceleration_bias (MirPointerConfig *conf, double acceleration_bias)
 Set the acceleration bias of the pointer device. More...
 
void mir_pointer_config_set_horizontal_scroll_scale (MirPointerConfig *conf, double horizontal_scroll_scale)
 Set the horizontal scroll scale. More...
 
void mir_pointer_config_set_vertical_scroll_scale (MirPointerConfig *conf, double vertical_scroll_scale)
 Set the vertical scroll scale. More...
 
void mir_pointer_config_set_handedness (MirPointerConfig *conf, MirPointerHandedness handedness)
 Configure left and right hand use of the pointer device. More...
 
MirTouchpadConfig const * mir_input_device_get_touchpad_config (MirInputDevice const *device)
 Retrieve a structure containing the touchpad related config options of the input device. More...
 
MirTouchpadClickModes mir_touchpad_config_get_click_modes (MirTouchpadConfig const *conf)
 Retrieve the click modes of the touchpad. More...
 
MirTouchpadScrollModes mir_touchpad_config_get_scroll_modes (MirTouchpadConfig const *conf)
 Retrieve the scroll modes of the touchpad. More...
 
int mir_touchpad_config_get_button_down_scroll_button (MirTouchpadConfig const *conf)
 Retrieve the configured button down for button down scroll mode. More...
 
bool mir_touchpad_config_get_tap_to_click (MirTouchpadConfig const *conf)
 Retrieve whether a tap gesture generates pointer button events. More...
 
bool mir_touchpad_config_get_middle_mouse_button_emulation (MirTouchpadConfig const *conf)
 Retrieve whether middle mouse button should be emulated. More...
 
bool mir_touchpad_config_get_disable_with_mouse (MirTouchpadConfig const *conf)
 Retrieve whether the touchpad should be disabled when an external pointer device like a mouse is connected. More...
 
bool mir_touchpad_config_get_disable_while_typing (MirTouchpadConfig const *conf)
 Retrieve whether the touchpad events should be blocked while the user types. More...
 
MirTouchpadConfigmir_input_device_get_mutable_touchpad_config (MirInputDevice *device)
 Retrieve a structure containing the touchpad related config options of the input device that can be manipulated. More...
 
void mir_touchpad_config_set_click_modes (MirTouchpadConfig *conf, MirTouchpadClickModes modes)
 Configure the enable click modes for the touchpad. More...
 
void mir_touchpad_config_set_scroll_modes (MirTouchpadConfig *conf, MirTouchpadScrollModes modes)
 Configure the enabled scroll modes for the touchpad. More...
 
void mir_touchpad_config_set_button_down_scroll_button (MirTouchpadConfig *conf, int button)
 Configure the button for button down scroll mode. More...
 
void mir_touchpad_config_set_tap_to_click (MirTouchpadConfig *conf, bool tap_to_click)
 Configure whether tap to click should be enabled. More...
 
void mir_touchpad_config_set_middle_mouse_button_emulation (MirTouchpadConfig *conf, bool middle_emulation)
 Configure whether middle mouse button emulation should be enabled. More...
 
void mir_touchpad_config_set_disable_with_mouse (MirTouchpadConfig *conf, bool active)
 Configure whether the touchpad should be turned off while a mouse is attached. More...
 
void mir_touchpad_config_set_disable_while_typing (MirTouchpadConfig *conf, bool active)
 Configure whether the touchpad should be turned off while typing. More...
 
MirTouchscreenConfig const * mir_input_device_get_touchscreen_config (MirInputDevice const *device)
 Retrieve a structure containing the touchscreen related config options of the input device. More...
 
uint32_t mir_touchscreen_config_get_output_id (MirTouchscreenConfig const *device)
 Get the output ID of the display the coordinates of this device will be mapped to. More...
 
enum MirTouchscreenMappingMode mir_touchscreen_config_get_mapping_mode (MirTouchscreenConfig const *device)
 Get the mapping mode used for the touchscreen. More...
 
MirTouchscreenConfigmir_input_device_get_mutable_touchscreen_config (MirInputDevice *device)
 Retrieve a mutable structure containing the touchscreen related options of the input device to change the device configuration. More...
 
void mir_touchscreen_config_set_output_id (MirTouchscreenConfig *config, uint32_t output)
 Set the output ID of the display the coordinates of this device will be mapped to. More...
 
void mir_touchscreen_config_set_mapping_mode (MirTouchscreenConfig *config, enum MirTouchscreenMappingMode mode)
 Set the mapping mode used for the touchscreen. More...
 
bool mir_persistent_id_is_valid (MirPersistentId *id) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_is_valid() instead")
 Check the validity of a MirPersistentId. More...
 
void mir_persistent_id_release (MirPersistentId *id) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_release() instead")
 Free a MirPersistentId. More...
 
char const * mir_persistent_id_as_string (MirPersistentId *id) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_as_string() instead")
 Get a string representation of a MirSurfaceId. More...
 
MirPersistentId * mir_persistent_id_from_string (char const *string_representation) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_id_from_string() instead")
 Deserialise a string representation of a MirSurfaceId. More...
 
MirPlatformMessagemir_platform_message_create (unsigned int opcode)
 Create a platform message to use with mir_connection_platform_operation(). More...
 
void mir_platform_message_release (MirPlatformMessage const *message)
 Release a platform message. More...
 
void mir_platform_message_set_data (MirPlatformMessage *message, void const *data, size_t data_size)
 Set the data associated with a message. More...
 
void mir_platform_message_set_fds (MirPlatformMessage *message, int const *fds, size_t num_fds)
 Sets the fds associated with a message. More...
 
unsigned int mir_platform_message_get_opcode (MirPlatformMessage const *message)
 Get the opcode of a message. More...
 
MirPlatformMessageData mir_platform_message_get_data (MirPlatformMessage const *message)
 Get the data associated with a message. More...
 
MirPlatformMessageFds mir_platform_message_get_fds (MirPlatformMessage const *message)
 Gets the fds associated with a message. More...
 
bool mir_presentation_chain_is_valid (MirPresentationChain *presentation_chain)
 Test for a valid presentation chain. More...
 
char const * mir_presentation_chain_get_error_message (MirPresentationChain *presentation_chain)
 Retrieve a text description of the error. More...
 
void mir_presentation_chain_submit_buffer (MirPresentationChain *presentation_chain, MirBuffer *buffer, MirBufferCallback available_callback, void *available_context)
 Submit a buffer to the server so the server can display it. More...
 
MirPromptSessionmir_connection_create_prompt_session_sync (MirConnection *connection, pid_t application_pid, MirPromptSessionStateChangeCallback state_change_callback, void *context)
 Create and start a new prompt session. More...
 
MirWaitHandlemir_prompt_session_new_fds_for_prompt_providers (MirPromptSession *prompt_session, unsigned int no_of_fds, MirClientFdCallback callback, void *context)
 Allocate some FDs for prompt providers to connect on. More...
 
size_t mir_prompt_session_new_fds_for_prompt_providers_sync (MirPromptSession *prompt_session, unsigned int no_of_fds, int *fds)
 Allocate some FDs for prompt providers to connect on. More...
 
void mir_prompt_session_release_sync (MirPromptSession *prompt_session)
 Stop and release the specified prompt session. More...
 
bool mir_prompt_session_is_valid (MirPromptSession *prompt_session)
 Test for a valid prompt session. More...
 
char const * mir_prompt_session_error_message (MirPromptSession *prompt_session)
 Retrieve a text description of the last error. More...
 
MirScreencastSpecmir_create_screencast_spec (MirConnection *connection)
 Create a screencast specification. More...
 
void mir_screencast_spec_set_width (MirScreencastSpec *spec, unsigned int width)
 Set the requested width, in pixels. More...
 
void mir_screencast_spec_set_height (MirScreencastSpec *spec, unsigned int height)
 Set the requested height, in pixels. More...
 
void mir_screencast_spec_set_pixel_format (MirScreencastSpec *spec, MirPixelFormat format)
 Set the requested pixel format. More...
 
void mir_screencast_spec_set_capture_region (MirScreencastSpec *spec, MirRectangle const *region)
 Set the rectangular region to capture. More...
 
void mir_screencast_spec_set_mirror_mode (MirScreencastSpec *spec, MirMirrorMode mode)
 Set the requested mirror mode. More...
 
void mir_screencast_spec_set_number_of_buffers (MirScreencastSpec *spec, unsigned int nbuffers)
 Set the requested number of buffers to use. More...
 
void mir_screencast_spec_release (MirScreencastSpec *spec)
 Release the resources held by a MirScreencastSpec. More...
 
MirScreencastmir_screencast_create_sync (MirScreencastSpec *spec)
 Create a screencast from a given specification. More...
 
bool mir_screencast_is_valid (MirScreencast *screencast)
 Test for a valid screencast. More...
 
char const * mir_screencast_get_error_message (MirScreencast *screencast)
 Retrieve a text description of the error. More...
 
MirScreencastmir_connection_create_screencast_sync (MirConnection *connection, MirScreencastParameters *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead")
 Create a screencast on the supplied connection. More...
 
void mir_screencast_release_sync (MirScreencast *screencast)
 Release the specified screencast. More...
 
MirBufferStreammir_screencast_get_buffer_stream (MirScreencast *screencast)
 Retrieve the MirBufferStream associated with a screencast (to advance buffers, obtain EGLNativeWindowType, etc...) More...
 
void mir_screencast_capture_to_buffer (MirScreencast *screencast, MirBuffer *buffer, MirScreencastBufferCallback available_callback, void *available_context)
 Capture the contents of the screen to a particular buffer. More...
 
MirScreencastResult mir_screencast_capture_to_buffer_sync (MirScreencast *screencast, MirBuffer *buffer)
 Capture the contents of the screen to a particular buffer and wait for the capture to complete. More...
 
MirSurfaceSpec * mir_connection_create_spec_for_normal_surface (MirConnection *connection, int width, int height, MirPixelFormat format) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_normal_window_spec() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_menu (MirConnection *connection, int width, int height, MirPixelFormat format, MirSurface *parent, MirRectangle *rect, MirEdgeAttachment edge) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_specify_menu() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_tooltip (MirConnection *connection, int width, int height, MirPixelFormat format, MirSurface *parent, MirRectangle *zone) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_tip (MirConnection *connection, int width, int height, MirPixelFormat format, MirSurface *parent, MirRectangle *rect, MirEdgeAttachment edge) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_tip_window_spec() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_modal_dialog (MirConnection *connection, int width, int height, MirPixelFormat format, MirSurface *parent) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_modal_dialog_window_spec() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_dialog (MirConnection *connection, int width, int height, MirPixelFormat format) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_dialog_window_spec() instead")
 
MirSurfaceSpec * mir_create_surface_spec (MirConnection *connection) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_changes (MirConnection *connection) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_create_window_spec() instead")
 
void mir_surface_spec_set_parent (MirSurfaceSpec *spec, MirSurface *parent) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_parent() instead")
 
int mir_surface_get_swapinterval (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("This will soon be a property of the backing content")
 
void mir_surface_spec_set_type (MirSurfaceSpec *spec, MirSurfaceType type) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_type() instead")
 
void mir_surface_spec_set_name (MirSurfaceSpec *spec, char const *name) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_name() instead")
 
void mir_surface_spec_set_width (MirSurfaceSpec *spec, unsigned width) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width() instead")
 
void mir_surface_spec_set_height (MirSurfaceSpec *spec, unsigned height) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height() instead")
 
void mir_surface_spec_set_width_increment (MirSurfaceSpec *spec, unsigned width_inc) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_width_increment() instead")
 
void mir_surface_spec_set_height_increment (MirSurfaceSpec *spec, unsigned height_inc) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_height_increment() instead")
 
void mir_surface_spec_set_min_width (MirSurfaceSpec *spec, unsigned min_width) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_width() instead")
 
void mir_surface_spec_set_min_height (MirSurfaceSpec *spec, unsigned min_height) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_height() instead")
 
void mir_surface_spec_set_max_width (MirSurfaceSpec *spec, unsigned max_width) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_width() instead")
 
void mir_surface_spec_set_max_height (MirSurfaceSpec *spec, unsigned max_height) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_height() instead")
 
void mir_surface_spec_set_min_aspect_ratio (MirSurfaceSpec *spec, unsigned width, unsigned height) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_min_aspect_ratio() instead")
 
void mir_surface_spec_set_max_aspect_ratio (MirSurfaceSpec *spec, unsigned width, unsigned height) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_max_aspect_ratio() instead")
 
void mir_surface_spec_set_fullscreen_on_output (MirSurfaceSpec *spec, uint32_t output_id) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_fullscreen_on_output() instead")
 
void mir_surface_spec_set_preferred_orientation (MirSurfaceSpec *spec, MirOrientationMode mode) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_preferred_orientation() instead")
 
bool mir_surface_spec_attach_to_foreign_parent (MirSurfaceSpec *spec, MirPersistentId *parent, MirRectangle *attachment_rect, MirEdgeAttachment edge) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_attach_to_foreign_parent() instead")
 
void mir_surface_spec_set_state (MirSurfaceSpec *spec, MirSurfaceState state) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_state() instead")
 
void mir_surface_spec_release (MirSurfaceSpec *spec) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_release() instead")
 
void mir_surface_spec_set_input_shape (MirSurfaceSpec *spec, MirRectangle const *rectangles, size_t n_rects) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_input_shape() instead")
 
void mir_surface_spec_set_event_handler (MirSurfaceSpec *spec, mir_surface_event_callback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_event_handler() instead")
 
void mir_surface_spec_set_shell_chrome (MirSurfaceSpec *spec, MirShellChrome style) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_shell_chrome() instead")
 
void mir_surface_spec_set_pointer_confinement (MirSurfaceSpec *spec, MirPointerConfinementState state) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pointer_confinement() instead")
 
void mir_surface_spec_set_placement (MirSurfaceSpec *spec, const MirRectangle *rect, MirPlacementGravity rect_gravity, MirPlacementGravity window_gravity, MirPlacementHints placement_hints, int offset_dx, int offset_dy) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_placement() instead")
 
MirSurfaceSpec * mir_connection_create_spec_for_input_method (MirConnection *connection, int width, int height, MirPixelFormat format) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_input_method_window_spec() instead")
 
void mir_surface_spec_set_pixel_format (MirSurfaceSpec *spec, MirPixelFormat format) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_pixel_format() instead")
 
void mir_surface_spec_set_buffer_usage (MirSurfaceSpec *spec, MirBufferUsage usage) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_buffer_usage() instead")
 
void mir_surface_spec_set_streams (MirSurfaceSpec *spec, MirBufferStreamInfo *streams, unsigned int num_streams) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_spec_set_streams() instead")
 
void mir_surface_apply_spec (MirSurface *surface, MirSurfaceSpec *spec) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_apply_spec() instead")
 
bool mir_surface_is_valid (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_is_valid() instead")
 
MirWaitHandlemir_surface_create (MirSurfaceSpec *requested_specification, mir_surface_callback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window() instead")
 
MirSurface * mir_surface_create_sync (MirSurfaceSpec *requested_specification) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_create_window_sync() instead")
 
MirWaitHandlemir_surface_release (MirSurface *surface, mir_surface_callback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release() instead")
 
void mir_surface_release_sync (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_release_sync() instead")
 
void mir_surface_set_event_handler (MirSurface *surface, mir_surface_event_callback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_event_handler() instead")
 
MirBufferStreammir_surface_get_buffer_stream (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_buffer_stream() instead")
 
char const * mir_surface_get_error_message (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_error_message() instead")
 
void mir_surface_get_parameters (MirSurface *surface, MirSurfaceParameters *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_parameters() instead")
 
MirSurfaceType mir_surface_get_type (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_type() instead")
 
MirWaitHandlemir_surface_set_state (MirSurface *surface, MirSurfaceState state) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_state() instead")
 
MirSurfaceState mir_surface_get_state (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_state() instead")
 
MirWaitHandlemir_surface_set_swapinterval (MirSurface *surface, int interval) MIR_FOR_REMOVAL_IN_VERSION_1("Swap interval should be set on the backing content")
 Set the swapinterval for the default stream. More...
 
int mir_surface_get_dpi (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_dpi() instead")
 
MirSurfaceFocusState mir_surface_get_focus (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_focus_state() instead")
 
MirSurfaceVisibility mir_surface_get_visibility (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_visibility() instead")
 
MirWaitHandlemir_surface_configure_cursor (MirSurface *surface, MirCursorConfiguration const *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_configure_cursor() instead")
 
MirOrientation mir_surface_get_orientation (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_orientation() instead")
 
MirWaitHandlemir_surface_set_preferred_orientation (MirSurface *surface, MirOrientationMode orientation) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_set_preferred_orientation() instead")
 
MirOrientationMode mir_surface_get_preferred_orientation (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_get_preferred_orientation() instead")
 
MirWaitHandlemir_surface_request_persistent_id (MirSurface *surface, mir_surface_id_callback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id() instead")
 
MirPersistentId * mir_surface_request_persistent_id_sync (MirSurface *surface) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_request_persistent_id_sync() instead")
 
void mir_surface_raise (MirSurface *surface, MirCookie const *cookie) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_window_raise() instead")
 
void mir_wait_for (MirWaitHandle *wait_handle) MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes")
 Wait on the supplied handle until all instances of the associated request have completed. More...
 
void mir_wait_for_one (MirWaitHandle *wait_handle) MIR_FOR_REMOVAL_IN_VERSION_1("No longer supported - use callbacks or wait for state changes")
 Wait on the supplied handle until one instance of the associated request has completed. More...
 
MirWindowSpecmir_create_normal_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for a normal window. More...
 
MirWindowSpecmir_create_menu_window_spec (MirConnection *connection, int width, int height, MirWindow *parent, MirRectangle *rect, MirEdgeAttachment edge)
 Create a window specification for a menu window. More...
 
MirWindowSpecmir_create_tip_window_spec (MirConnection *connection, int width, int height, MirWindow *parent, MirRectangle *rect, MirEdgeAttachment edge)
 Create a window specification for a tip window. More...
 
MirWindowSpecmir_create_modal_dialog_window_spec (MirConnection *connection, int width, int height, MirWindow *parent)
 Create a window specification for a modal dialog window. More...
 
MirWindowSpecmir_create_dialog_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for a parentless dialog window. More...
 
MirWindowSpecmir_create_input_method_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for an input method window. More...
 
MirWindowSpecmir_create_gloss_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for a gloss window. More...
 
MirWindowSpecmir_create_satellite_window_spec (MirConnection *connection, int width, int height, MirWindow *parent)
 Create a window specification for a satellite window. More...
 
MirWindowSpecmir_create_utility_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for a utility window. More...
 
MirWindowSpecmir_create_freestyle_window_spec (MirConnection *connection, int width, int height)
 Create a window specification for a freestyle window. More...
 
MirWindowSpecmir_create_window_spec (MirConnection *connection)
 Create a window specification. More...
 
MirConnectionmir_window_get_connection (MirWindow *window)
 Retrieve the connection. More...
 
void mir_window_spec_set_parent (MirWindowSpec *spec, MirWindow *parent)
 Set the requested parent. More...
 
void mir_window_spec_set_type (MirWindowSpec *spec, MirWindowType type)
 Update a window specification with a window type. More...
 
void mir_window_spec_set_name (MirWindowSpec *spec, char const *name)
 Set the requested name. More...
 
void mir_window_spec_set_width (MirWindowSpec *spec, unsigned width)
 Set the requested width, in pixels. More...
 
void mir_window_spec_set_height (MirWindowSpec *spec, unsigned height)
 Set the requested height, in pixels. More...
 
void mir_window_spec_set_width_increment (MirWindowSpec *spec, unsigned width_inc)
 Set the requested width increment, in pixels. More...
 
void mir_window_spec_set_height_increment (MirWindowSpec *spec, unsigned height_inc)
 Set the requested height increment, in pixels Defines an arithmetic progression of sizes starting with min_height (if set, otherwise 0) into which the window prefers to be resized. More...
 
void mir_window_spec_set_min_width (MirWindowSpec *spec, unsigned min_width)
 Set the minimum width, in pixels. More...
 
void mir_window_spec_set_min_height (MirWindowSpec *spec, unsigned min_height)
 Set the minimum height, in pixels. More...
 
void mir_window_spec_set_max_width (MirWindowSpec *spec, unsigned max_width)
 Set the maximum width, in pixels. More...
 
void mir_window_spec_set_max_height (MirWindowSpec *spec, unsigned max_height)
 Set the maximum height, in pixels. More...
 
void mir_window_spec_set_min_aspect_ratio (MirWindowSpec *spec, unsigned width, unsigned height)
 Set the minimum aspect ratio. More...
 
void mir_window_spec_set_max_aspect_ratio (MirWindowSpec *spec, unsigned width, unsigned height)
 Set the maximum aspect ratio. More...
 
void mir_window_spec_set_fullscreen_on_output (MirWindowSpec *spec, uint32_t output_id)
 
void mir_window_spec_set_preferred_orientation (MirWindowSpec *spec, MirOrientationMode mode)
 Set the requested preferred orientation mode. More...
 
bool mir_window_spec_attach_to_foreign_parent (MirWindowSpec *spec, MirWindowId *parent, MirRectangle *attachment_rect, MirEdgeAttachment edge)
 Request that the created window be attached to a window of a different client. More...
 
void mir_window_spec_set_state (MirWindowSpec *spec, MirWindowState state)
 Set the requested state. More...
 
void mir_window_spec_set_input_shape (MirWindowSpec *spec, MirRectangle const *rectangles, size_t n_rects)
 Set a collection of input rectangles associated with the spec. More...
 
void mir_window_spec_set_event_handler (MirWindowSpec *spec, MirWindowEventCallback callback, void *context)
 Set the event handler to be called when events arrive for a window. More...
 
void mir_window_spec_set_shell_chrome (MirWindowSpec *spec, MirShellChrome style)
 Ask the shell to customize "chrome" for this window. More...
 
void mir_window_spec_set_pointer_confinement (MirWindowSpec *spec, MirPointerConfinementState state)
 Attempts to set the pointer confinement spec for this window. More...
 
void mir_window_spec_set_placement (MirWindowSpec *spec, const MirRectangle *rect, MirPlacementGravity rect_gravity, MirPlacementGravity window_gravity, MirPlacementHints placement_hints, int offset_dx, int offset_dy)
 Set the window placement on the spec. More...
 
void mir_window_spec_set_cursor_name (MirWindowSpec *spec, char const *name)
 Set the name for the cursor from the system cursor theme. More...
 
void mir_window_spec_set_pixel_format (MirWindowSpec *spec, MirPixelFormat format) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_connection_allocate_buffer/mir_render_surface_get_buffer_stream instead")
 Set the requested pixel format. More...
 
void mir_window_spec_set_buffer_usage (MirWindowSpec *spec, MirBufferUsage usage) MIR_FOR_REMOVAL_IN_VERSION_1("No longer applicable
 
void mir_window_spec_set_streams (MirWindowSpec *spec, MirBufferStreamInfo *streams, unsigned int num_streams) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface instead")
 Set the streams associated with the spec. More...
 
void mir_window_spec_release (MirWindowSpec *spec)
 Release the resources held by a MirWindowSpec. More...
 
void mir_window_apply_spec (MirWindow *window, MirWindowSpec *spec)
 Request changes to the specification of a window. More...
 
void mir_create_window (MirWindowSpec *requested_specification, MirWindowCallback callback, void *context)
 Create a window from a given specification. More...
 
MirWindowmir_create_window_sync (MirWindowSpec *requested_specification)
 Create a window from a given specification and wait for the result. More...
 
void mir_window_release (MirWindow *window, MirWindowCallback callback, void *context)
 Release the supplied window and any associated buffer. More...
 
void mir_window_release_sync (MirWindow *window)
 Release the specified window like in mir_window_release(), but also wait for the operation to complete. More...
 
bool mir_window_is_valid (MirWindow *window)
 Test for a valid window. More...
 
void mir_window_set_event_handler (MirWindow *window, MirWindowEventCallback callback, void *context)
 Set the event handler to be called when events arrive for a window. More...
 
MirBufferStreammir_window_get_buffer_stream (MirWindow *window) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_add_render_surface during window creation/modification instead")
 Retrieve the primary MirBufferStream associated with a window (to advance buffers, obtain EGLNativeWindow, etc...) More...
 
char const * mir_window_get_error_message (MirWindow *window)
 Retrieve a text description of the error. More...
 
void mir_window_get_parameters (MirWindow *window, MirWindowParameters *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen to state/attribute change events instead")
 Get a window's parameters. More...
 
MirOrientation mir_window_get_orientation (MirWindow *window)
 Get the orientation of a window. More...
 
void mir_window_raise (MirWindow *window, MirCookie const *cookie)
 Attempts to raise the window to the front. More...
 
void mir_window_request_user_move (MirWindow *window, MirCookie const *cookie)
 Informs the window manager that the user is moving the window. More...
 
void mir_window_request_user_resize (MirWindow *window, MirResizeEdge edge, MirCookie const *cookie)
 Informs the window manager that the user is resizing the window. More...
 
MirWindowType mir_window_get_type (MirWindow *window)
 Get the type (purpose) of a window. More...
 
void mir_window_set_state (MirWindow *window, MirWindowState state)
 Change the state of a window. More...
 
MirWindowState mir_window_get_state (MirWindow *window)
 Get the current state of a window. More...
 
MirWindowFocusState mir_window_get_focus_state (MirWindow *window)
 Query the focus state for a window. More...
 
MirWindowVisibility mir_window_get_visibility (MirWindow *window)
 Query the visibility state for a window. More...
 
int mir_window_get_dpi (MirWindow *window)
 Query the DPI value of the window (dots per inch). More...
 
void mir_window_configure_cursor (MirWindow *window, MirCursorConfiguration const *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead")
 Choose the cursor state for a window: whether a cursor is shown, and which cursor if so. More...
 
void mir_window_set_preferred_orientation (MirWindow *window, MirOrientationMode orientation)
 Request to set the preferred orientations of a window. More...
 
MirOrientationMode mir_window_get_preferred_orientation (MirWindow *window)
 Get the preferred orientation modes of a window. More...
 
void mir_window_request_persistent_id (MirWindow *window, MirWindowIdCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id() instead")
 Request an ID for the window that can be shared cross-process and across restarts. More...
 
void mir_window_request_window_id (MirWindow *window, MirWindowIdCallback callback, void *context)
 
MirPersistentId * mir_window_request_persistent_id_sync (MirWindow *window) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_request_window_id_sync")
 Request a persistent ID for a window and wait for the result. More...
 
MirWindowIdmir_window_request_window_id_sync (MirWindow *window)
 
bool mir_window_id_is_valid (MirWindowId *id)
 Check the validity of a MirWindowId. More...
 
void mir_window_id_release (MirWindowId *id)
 Free a MirWindowId. More...
 
char const * mir_window_id_as_string (MirWindowId *id)
 Get a string representation of a MirSurfaceId. More...
 
MirWindowIdmir_window_id_from_string (char const *string_representation)
 Deserialise a string representation of a MirSurfaceId. More...
 
void mir_connection_create_render_surface (MirConnection *connection, int width, int height, MirRenderSurfaceCallback callback, void *context) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Create a render surface. More...
 
MirRenderSurfacemir_connection_create_render_surface_sync (MirConnection *connection, int width, int height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Create a render surface and wait for the result. More...
 
void mir_render_surface_get_size (MirRenderSurface *render_surface, int *width, int *height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Get the size of the MirRenderSurface. More...
 
void mir_render_surface_set_size (MirRenderSurface *render_surface, int width, int height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Set the size of the MirRenderSurface. More...
 
bool mir_render_surface_is_valid (MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Test for a valid render surface. More...
 
char const * mir_render_surface_get_error_message (MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Retrieve a text description of the error. More...
 
void mir_render_surface_release (MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Release the specified render surface. More...
 
MirBufferStreammir_render_surface_get_buffer_stream (MirRenderSurface *render_surface, int width, int height, MirPixelFormat format) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Obtain the buffer stream backing a given render surface. More...
 
MirPresentationChainmir_render_surface_get_presentation_chain (MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Obtain the presentation chain backing a given render surface. More...
 
bool mir_connection_present_mode_supported (MirConnection *connection, MirPresentMode mode)
 Query whether the server supports a given presentation mode. More...
 
void mir_presentation_chain_set_mode (MirPresentationChain *chain, MirPresentMode mode)
 Respecify the submission mode that the MirPresentationChain is operating with. More...
 
void mir_window_spec_set_cursor_render_surface (MirWindowSpec *spec, MirRenderSurface *render_surface, int hotspot_x, int hotspot_y) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Set the MirWindowSpec to contain a specific cursor. More...
 
MirCursorConfiguration * mir_cursor_configuration_from_render_surface (MirRenderSurface *surface, int hotspot_x, int hotspot_y) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Returns a new cursor configuration tied to a given render surface. More...
 
void mir_window_spec_add_render_surface (MirWindowSpec *spec, MirRenderSurface *render_surface, int logical_width, int logical_height, int displacement_x, int displacement_y) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
 Set the MirWindowSpec to display content contained in a render surface. More...
 

Variables

char const *const mir_default_cursor_name
 A special cursor name for use with mir_cursor_configuration_from_name representing the system default cursor. More...
 
char const *const mir_disabled_cursor_name
 A special cursor name for use with mir_cursor_configuration_from_name representing a disabled cursor image. More...
 
char const *const mir_arrow_cursor_name
 The standard arrow cursor (typically the system default) More...
 
char const *const mir_busy_cursor_name
 The "wait" cursor, typically an hourglass or watch used during operations which prevent the user from interacting. More...
 
char const *const mir_caret_cursor_name
 The caret or ibeam cursor, indicating acceptance of text input. More...
 
char const *const mir_pointing_hand_cursor_name
 The pointing hand cursor, typically used for clickable elements such as hyperlinks. More...
 
char const *const mir_open_hand_cursor_name
 The open handed cursor, typically used to indicate that the area beneath the cursor may be clicked and dragged around. More...
 
char const *const mir_closed_hand_cursor_name
 The close handed cursor, typically used to indicate that a drag operation is in process which involves scrolling. More...
 
char const *const mir_horizontal_resize_cursor_name
 The cursor used to indicate a horizontal resize operation. More...
 
char const *const mir_vertical_resize_cursor_name
 The cursor used to indicate a vertical resize operation. More...
 
char const *const mir_diagonal_resize_bottom_to_top_cursor_name
 The cursor used to indicate diagonal resizing a top right corner. More...
 
char const *const mir_diagonal_resize_top_to_bottom_cursor_name
 The cursor used to indicate diagonal resizing a bottom right corner. More...
 
char const *const mir_omnidirectional_resize_cursor_name
 The cursor used to indicate resize with no directional constraint. More...
 
char const *const mir_vsplit_resize_cursor_name
 The cursor used for vertical splitters, indicating that a handle may be dragged to adjust vertical space. More...
 
char const *const mir_hsplit_resize_cursor_name
 The cursor used for horizontal splitters, indicating that a handle may be dragged to adjust horizontal space. More...
 
char const *const mir_crosshair_cursor_name
 The cursor used for crosshair, which may be used for picking colors or finer precision. More...
 
MirPixelFormat the EGL implementation will now set correct pixel format
 
void use mir_render_surface apis
 

Detailed Description

Macro Definition Documentation

◆ MIR_BYTES_PER_PIXEL

#define MIR_BYTES_PER_PIXEL (   f)
Value:
((f) == mir_pixel_format_bgr_888 ? 3 : \
(f) == mir_pixel_format_rgb_888 ? 3 : \
(f) == mir_pixel_format_rgb_565 ? 2 : \
4)
Definition: common.h:249
Definition: common.h:252
Definition: common.h:248
Definition: common.h:251
Definition: common.h:250

◆ MIR_CLIENT_API_VERSION

#define MIR_CLIENT_API_VERSION
Value:
#define MIR_CLIENT_API_VERSION_MINOR
Definition: version.h:29
#define MIR_CLIENT_API_VERSION_MAJOR
Definition: version.h:28
#define MIR_VERSION_NUMBER(major, minor, micro)
MIR_VERSION_NUMBER.
Definition: mir_version_number.h:34
#define MIR_CLIENT_API_VERSION_PATCH
Definition: version.h:30

The current version of the Mir client headers in use.

For example, to test for a feature introduced in Mir version 1.2.3 you would write: #if defined(MIR_CLIENT_API_VERSION) && \ MIR_CLIENT_API_VERSION >= MIR_VERSION_NUMBER(1,2,3)

◆ MIR_CLIENT_API_VERSION_MAJOR

#define MIR_CLIENT_API_VERSION_MAJOR   (0)

◆ MIR_CLIENT_API_VERSION_MINOR

#define MIR_CLIENT_API_VERSION_MINOR   (32)

◆ MIR_CLIENT_API_VERSION_PATCH

#define MIR_CLIENT_API_VERSION_PATCH   (0)

◆ MIR_CLIENT_MAJOR_VERSION

#define MIR_CLIENT_MAJOR_VERSION   (3)

◆ MIR_CLIENT_MICRO_VERSION

#define MIR_CLIENT_MICRO_VERSION   (0)

◆ MIR_CLIENT_MINOR_VERSION

#define MIR_CLIENT_MINOR_VERSION   (5)

◆ MIR_CLIENT_VERSION

#define MIR_CLIENT_VERSION
Value:
#define MIR_CLIENT_MINOR_VERSION
Definition: version.h:46
#define MIR_CLIENT_MICRO_VERSION
Definition: version.h:47
#define MIR_VERSION_NUMBER(major, minor, micro)
MIR_VERSION_NUMBER.
Definition: mir_version_number.h:34
#define MIR_CLIENT_MAJOR_VERSION
Definition: version.h:45

Typedef Documentation

◆ MIR_FOR_REMOVAL_IN_VERSION_1

typedef MirSurfaceParameters MirWindowParameters MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_window_get_xxx apis or listen for attribute events instead")

◆ mir_surface_callback

typedef void(* mir_surface_callback) (MirSurface *surface, void *client_context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowCallback instead")

◆ mir_surface_event_callback

typedef void(* mir_surface_event_callback) (MirSurface *surface, MirEvent const *event, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowEventCallback instead")

◆ mir_surface_id_callback

typedef void(* mir_surface_id_callback) (MirSurface *surface, MirPersistentId *id, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirWindowIdCallback instead")

◆ MirBlob

typedef struct MirBlob MirBlob

◆ MirBuffer

typedef struct MirBuffer MirBuffer

◆ MirBufferCallback

typedef void(* MirBufferCallback) (MirBuffer *, void *context)

◆ MirBufferLayout

◆ MirBufferStream

◆ MirBufferStreamCallback

typedef void(* MirBufferStreamCallback) (MirBufferStream *stream, void *client_context)

Callback to be passed when calling:

  • mir_buffer_stream_* functions requiring a callback.
    Parameters
    [in]streamthe buffer stream being updated
    [in,out]client_contextcontext provided by client in calling mir_connect

◆ MirBufferStreamInfo

The displacement from the top-left corner of the surface.

◆ MirClientFdCallback

typedef void(* MirClientFdCallback) (MirPromptSession *prompt_session, size_t count, int const *fds, void *context)

Callback called when a request for client file descriptors completes.

Parameters
[in]prompt_sessionThe prompt session
[in]countThe number of FDs allocated
[in]fdsArray of FDs
[in,out]contextThe context provided by client
Note
Copy the FDs as the array will be invalidated after callback completes

◆ MirCloseWindowEvent

typedef struct MirCloseSurfaceEvent MirCloseWindowEvent

◆ MirConnectedCallback

typedef void(* MirConnectedCallback) (MirConnection *connection, void *client_context)

Callback to be passed when issuing a mir_connect request.

Parameters
[in]connectionthe new connection
[in,out]client_contextcontext provided by client in calling mir_connect

◆ MirConnection

typedef struct MirConnection MirConnection

◆ MirCookie

typedef struct MirCookie MirCookie

◆ MirDisplayCard

MirDisplayConfiguration provides details of the graphics environment.

◆ MirDisplayConfig

◆ MirDisplayConfigCallback

typedef void(* MirDisplayConfigCallback) (MirConnection *connection, void *context)

Callback called when a display config change has occurred.

Parameters
[in]connectionThe connection associated with the display change
[in,out]contextThe context provided by client

◆ MirDisplayConfiguration

◆ MirDisplayConfigurationError

◆ MirDisplayInfo

◆ MirDisplayMode

◆ MirDisplayOutput

◆ MirDisplayOutputType

◆ MirEdgeAttachment

◆ MirEGLNativeDisplayType

typedef void* MirEGLNativeDisplayType

◆ MirEGLNativeWindowType

typedef void* MirEGLNativeWindowType

◆ MirError

typedef struct MirError MirError

◆ MirErrorCallback

typedef void(* MirErrorCallback) (MirConnection *connection, MirError const *error, void *context)

◆ MirErrorDomain

Specifies the origin of an error.

This is required to interpret the other aspects of a MirError.

◆ MirEvent

typedef struct MirEvent MirEvent

◆ MirFormFactor

Form factor associated with a physical output.

◆ MirGraphicsRegion

Retrieved information about a MirWindow.

This is most useful for learning how and where to write to a 'mir_buffer_usage_software' surface.

◆ MirInputConfig

◆ MirInputConfigCallback

typedef void(* MirInputConfigCallback) (MirConnection *connection, void *context)

Callback called when a change of input devices has occurred.

Parameters
[in]connectionThe connection associated with the input device change
[in,out]contextThe context provided by client

◆ MirInputConfigurationError

◆ MirInputDevice

◆ MirInputDeviceCapabilities

typedef unsigned int MirInputDeviceCapabilities

◆ MirInputDeviceId

typedef int64_t MirInputDeviceId

◆ MirInputDeviceStateEvent

◆ MirInputEvent

typedef struct MirInputEvent MirInputEvent

◆ MirInputEventModifiers

typedef unsigned int MirInputEventModifiers

◆ MirKeyboardConfig

◆ MirKeyboardEvent

An event type describing a change in keyboard state.

Apology #1: Keyboard events almost always come from a keyboard, except they can also come from system buttons (power, volume, home). This is an issue we've inherited from the Linux kernel and Android, but could be solved in future by giving such system switch events their own input group such as MirSwitchEvent.

◆ MirKeymapEvent

◆ MirLifecycleEventCallback

typedef void(* MirLifecycleEventCallback) (MirConnection *connection, MirLifecycleState state, void *context)

Callback called when a lifecycle event/callback is requested from the running server.

Parameters
[in]connectionThe connection associated with the lifecycle event
[in]cbThe callback requested
[in,out]contextThe context provided by the client

◆ MirLifecycleState

◆ MirMirrorMode

Mirroring axis relative to the "natural" orientation of the display.

◆ MirModuleProperties

Retrieved information about a loadable module.

This allows clients to identify the underlying platform. E.g. whether the graphics are "mir:android" or "mir:mesa". Third party graphics platforms do not currently exist but should be named according to the vendor and platform. Vis: "<vendor>:<platform>"

◆ MirOrientation

Direction relative to the "natural" orientation of the display.

◆ MirOrientationEvent

◆ MirOrientationMode

◆ MirOutput

typedef struct MirOutput MirOutput

Descriptor for an output connection.

Each MirOutput corresponds to a video output. This may be a physical connection on the system, like HDMI or DisplayPort, or may be a virtual output such as a remote display or screencast display.

◆ MirOutputConnectionState

◆ MirOutputGammaSupported

Supports gamma correction.

◆ MirOutputMode

typedef struct MirOutputMode MirOutputMode

A descriptor for a display mode.

A display mode contains all the information necessary to drive a display. It includes resolution and refresh rate, but also pixel clock, vsync and hsync timings, and so on.

◆ MirOutputType

◆ MirPingEventCallback

typedef void(* MirPingEventCallback) (MirConnection *connection, int32_t serial, void *context)

Callback called when the server pings for responsiveness testing.

Parameters
[in]connectionThe connection associated with this ping
[in]serialIdentifier of this ping, to be passed to mir_connection_pong()
[in,out]contextThe context provided by the client

◆ MirPixelFormat

32-bit pixel formats (8888): The order of components in the enum matches the order of the components as they would be written in an integer representing a pixel value of that format.

For example; abgr_8888 should be coded as 0xAABBGGRR, which will end up as R,G,B,A in memory on a little endian system, and as A,B,G,R on a big endian system.

24-bit pixel formats (888): These are in literal byte order, regardless of CPU architecture it's always the same. Writing these 3-byte pixels is typically slower than other formats but uses less memory than 32-bit and is endian-independent.

16-bit pixel formats (565/5551/4444): Always interpreted as one 16-bit integer per pixel with components in high-to-low bit order following the format name. These are the fastest formats, however colour quality is visibly lower.

◆ MirPlacementGravity

Reference point for aligning a surface relative to a rectangle.

Each element (surface and rectangle) has a MirPlacementGravity assigned.

◆ MirPlacementHints

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the surface would fall off-screen if placed in its ideal position.

For example, mir_placement_hints_flip_x will invert the x component of aux_rect_placement_offset and replace mir_placement_gravity_northwest with mir_placement_gravity_northeast and vice versa if the window extends beyond the left or right edges of the monitor.

If mir_placement_hints_slide_x is set, the window can be shifted horizontally to fit on-screen.

If mir_placement_hints_resize_x is set, the window can be shrunken horizontally to fit.

If mir_placement_hints_antipodes is set then the rect gravity may be substituted with the opposite corner (e.g. mir_placement_gravity_northeast to mir_placement_gravity_southwest) in combination with other options.

When multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

◆ MirPlatformMessage

◆ MirPlatformOperationCallback

typedef void(* MirPlatformOperationCallback) (MirConnection *connection, MirPlatformMessage *reply, void *context)

Callback called when a platform operation completes.

Warning
The reply is owned by the callee, who should release it when it's not needed any more.
Parameters
[in]connectionThe connection associated with the platform operation
[in]replyThe platform operation reply
[in,out]contextThe context provided by the client

◆ MirPlatformPackage

◆ MirPlatformType

The native buffer type for the system the client is connected on.

Deprecated:
Use of this type is inherently non-portable in the presence of plug-in platform modules as these need not correspond to the available types.
Todo:
This should be removed from the public API at the next API break.

◆ MirPointerAcceleration

MirPointerAcceleration describes the way pointer movement is filtered:

  • mir_pointer_acceleration_none: (acceleration bias + 1.0) is applied as a factor to the current velocity of the pointer. So a bias of 0 to results to no change of velocity.
  • mir_pointer_acceleration_adaptive: acceleration bias selects an acceleration function based on the current velocity that usually consists of two linear inclines separated by a plateau.

◆ MirPointerButtons

typedef unsigned int MirPointerButtons

◆ MirPointerConfig

◆ MirPointerConfinementState

Pointer Confinement.

◆ MirPointerEvent

An event type describing a change in pointer device state.

◆ MirPointerHandedness

◆ MirPowerMode

typedef enum MirPowerMode MirPowerMode

◆ MirPresentationChain

◆ MirPresentMode

◆ MirPromptSession

◆ MirPromptSessionCallback

typedef void(* MirPromptSessionCallback) (MirPromptSession *prompt_provider, void *context)

Callback member of MirPromptSession for handling of prompt sessions.

Parameters
[in]prompt_providerThe prompt session associated with the callback
[in,out]contextThe context provided by the client

◆ MirPromptSessionEvent

◆ MirPromptSessionState

◆ MirPromptSessionStateChangeCallback

typedef void(* MirPromptSessionStateChangeCallback) (MirPromptSession *prompt_provider, MirPromptSessionState state, void *context)

Callback member of MirPromptSession for handling of prompt sessions events.

Parameters
[in]prompt_providerThe prompt session associated with the callback
[in]stateThe state of the prompt session
[in,out]contextThe context provided by the client

◆ MirRectangle

typedef struct MirRectangle MirRectangle

◆ MirRenderSurface

◆ MirRenderSurfaceCallback

typedef void(* MirRenderSurfaceCallback) (MirRenderSurface *, void *context) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME

◆ MirResizeEdge

Hints for resizing a window.

These values are used to indicate which edge(s) of a surface is being dragged in a resize operation.

◆ MirResizeEvent

◆ MirScreencast

typedef struct MirScreencast MirScreencast

◆ MirScreencastBufferCallback

typedef void(* MirScreencastBufferCallback) (MirScreencastResult status, MirBuffer *buffer, void *context)

◆ MirScreencastCallback

typedef void(* MirScreencastCallback) (MirScreencast *screencast, void *client_context)

Callback to be passed when calling MirScreencast functions.

Parameters
[in]screencastthe screencast being updated
[in,out]client_contextcontext provided by the client

◆ MirScreencastParameters

MirScreencastParameters is the structure of required information that you must provide to Mir in order to create a MirScreencast.

The width and height parameters can be used to down-scale the screencast For no scaling set them to the region width and height.

◆ MirScreencastResult

◆ MirScreencastSpec

◆ MirShellChrome

Shell chrome.

◆ MirSubpixelArrangement

Physical arrangement of subpixels on the physical output.

This is always relative to the “natural” orientation of the display - mir_orientation_normal.

◆ MirSurfacePlacementEvent

◆ MirTouchEvent

typedef struct MirTouchEvent MirTouchEvent

An event type describing a change in touch device state.

◆ MirTouchId

typedef int32_t MirTouchId

An identifier for a touch-point.

TouchId's are unique per-gesture. That is to say, once a touch has gone down at time T, no other touch will use that touch's ID until all touches at time T have come up.

◆ MirTouchpadClickMode

MirTouchpadClickMode configures how the touchpad itself should generate pointer button events.

The available click modes may be active simultaneously.

  • mir_touchpad_click_mode_none: no active click mode
  • mir_touchpad_click_mode_area_to_click: simulate pointer buttons using click areas on the touchpad
  • mir_touchpad_click_mode_finger_count: simulate pointer buttons using the number of fingers down

◆ MirTouchpadClickModes

typedef unsigned int MirTouchpadClickModes

◆ MirTouchpadConfig

◆ MirTouchpadScrollMode

MirTouchpadScrollMode configures how the touchpad should generate scroll events.

  • mir_touchpad_scroll_mode_none: no scroll
  • mir_touchpad_scroll_mode_two_finger_scroll: two finger movement generates generates vertical and horizontal scroll events
  • mir_touchpad_scroll_mode_edge_scroll: touch movement at the edge of the touchpad genertes scroll events
  • mir_touchpad_scroll_mode_button_down_scroll: movement on the touchpad generates scroll events when a button is held down simultaneously

◆ MirTouchpadScrollModes

typedef unsigned int MirTouchpadScrollModes

◆ MirTouchscreenConfig

◆ MirTouchscreenMappingMode

Mapping modes for touchscreen devices.

The mode defines how coordinates from the touchscreen frequently referred to as device coordinates are translated into scene coordinates.

This configuration mode is relevant for different classes of input devices, i.e handheld devices with builtin touchscreens or external graphic tablets or external monitors with touchscreen capabilities.

◆ MirWaitHandle

typedef struct MirWaitHandle MirWaitHandle

Returned by asynchronous functions.

Must not be free'd by callers. See the individual function documentation for information on the lifetime of wait handles.

◆ MirWindow

typedef struct MirSurface MirWindow

◆ MirWindowAttrib

Attributes of a window that the client and server/shell may wish to get or set over the wire.

◆ MirWindowCallback

typedef void(* MirWindowCallback) (MirWindow *window, void *client_context)

Callback to be passed when calling window functions :

Parameters
[in]windowthe window being updated
[in,out]client_contextcontext provided by client in calling mir_connect

◆ MirWindowEvent

typedef struct MirSurfaceEvent MirWindowEvent

◆ MirWindowEventCallback

typedef void(* MirWindowEventCallback) (MirWindow *window, MirEvent const *event, void *context)

Callback for handling of window events.

Parameters
[in]windowThe window on which an event has occurred
[in]eventThe event to be handled
[in,out]contextThe context provided by client

◆ MirWindowFocusState

◆ MirWindowId

typedef struct MirPersistentId MirWindowId

◆ MirWindowIdCallback

typedef void(* MirWindowIdCallback) (MirWindow *window, MirPersistentId *id, void *context)

◆ MirWindowOutputEvent

typedef struct MirSurfaceOutputEvent MirWindowOutputEvent

◆ MirWindowPlacementEvent

◆ MirWindowSpec

typedef struct MirSurfaceSpec MirWindowSpec

◆ MirWindowState

◆ MirWindowType

◆ MirWindowVisibility

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
mir_platform_package_max 

◆ anonymous enum

anonymous enum

DEPRECATED.

use MirDisplayConfiguration

Enumerator
mir_supported_pixel_format_max 

◆ anonymous enum

anonymous enum
Enumerator
mir_display_output_id_invalid 

◆ MirBufferLayout

Enumerator
mir_buffer_layout_unknown 
mir_buffer_layout_linear 

◆ MirBufferUsage

MirBufferUsage specifies how a surface can and will be used.

A "hardware" surface can be used for OpenGL accelerated rendering. A "software" surface is one that can be addressed in main memory and blitted to directly.

◆ MirDisplayConfigurationError

Errors from the mir_error_domain_display_configuration MirErrorDomain.

Enumerator
mir_display_configuration_error_unauthorized 

Client is not permitted to change global display configuration.

mir_display_configuration_error_in_progress 

A global configuration change request is already pending.

mir_display_configuration_error_no_preview_in_progress 

A cancel request was received, but no global display configuration preview is in progress.

mir_display_configuration_error_rejected_by_hardware 

Display configuration was attempted but was rejected by the hardware.

◆ MirDisplayOutputType

Enumerator
mir_display_output_type_unknown 
mir_display_output_type_vga 
mir_display_output_type_dvii 
mir_display_output_type_dvid 
mir_display_output_type_dvia 
mir_display_output_type_composite 
mir_display_output_type_svideo 
mir_display_output_type_lvds 
mir_display_output_type_component 
mir_display_output_type_ninepindin 
mir_display_output_type_displayport 
mir_display_output_type_hdmia 
mir_display_output_type_hdmib 
mir_display_output_type_tv 
mir_display_output_type_edp 
mir_display_output_type_virtual 
mir_display_output_type_dsi 
mir_display_output_type_dpi 

◆ MirEdgeAttachment

Enumerator
mir_edge_attachment_vertical 
mir_edge_attachment_horizontal 
mir_edge_attachment_any 

◆ MirErrorDomain

Specifies the origin of an error.

This is required to interpret the other aspects of a MirError.

Enumerator
mir_error_domain_display_configuration 

Errors relating to display configuration.

Associated error codes are found in MirDisplayConfigurationError.

mir_error_domain_input_configuration 

Errors relating to input configuration.

Associated error codes are found in MirInputConfigurationError.

◆ MirEventType

Enumerator
MIR_DEPRECATED_ENUM 
MIR_DEPRECATED_ENUM 
MIR_DEPRECATED_ENUM 
mir_event_type_window 
mir_event_type_resize 
mir_event_type_prompt_session_state_change 
mir_event_type_orientation 
MIR_DEPRECATED_ENUM 
mir_event_type_close_window 
mir_event_type_input 
mir_event_type_keymap 
MIR_DEPRECATED_ENUM 
MIR_DEPRECATED_ENUM 
mir_event_type_window_output 
mir_event_type_input_device_state 
MIR_DEPRECATED_ENUM 
mir_event_type_window_placement 

◆ MirFormFactor

Form factor associated with a physical output.

Enumerator
mir_form_factor_unknown 
mir_form_factor_phone 
mir_form_factor_tablet 
mir_form_factor_monitor 
mir_form_factor_tv 
mir_form_factor_projector 

◆ MirInputConfigurationAction

MirInputConfigurationEvent indicates a configuration change in the input device subsystem. Eventually it's usage will be required to properly interpret MirInputEvent, for example: If we receive a button down, and then a device reset, we should not expect to receive the button up.

Another example, the maximum/minimum axis values for a device may have been reconfigured and need to be required.

Of course as things stand there is no client input-device introspection API so these events are difficult to use.

Enumerator
mir_input_configuration_action_configuration_changed 
mir_input_configuration_action_device_reset 

◆ MirInputConfigurationError

Errors from the mir_error_domain_input_configuration MirErrorDomain.

Enumerator
mir_input_configuration_error_rejected_by_driver 

Input configuration was attempted but was rejected by driver.

mir_input_configuration_error_base_configuration_unauthorized 

Client is not permitted to change global input configuration.

mir_input_configuration_error_unauthorized 

Client is not permitted to change its input configuration.

◆ MirInputDeviceCapability

Enumerator
mir_input_device_capability_none 
mir_input_device_capability_pointer 
mir_input_device_capability_keyboard 
mir_input_device_capability_touchpad 
mir_input_device_capability_touchscreen 
mir_input_device_capability_gamepad 
mir_input_device_capability_joystick 
mir_input_device_capability_switch 
mir_input_device_capability_multitouch 
mir_input_device_capability_alpha_numeric 

capable to detect multiple contacts

◆ MirInputEventModifier

Description of key modifier state.

Enumerator
mir_input_event_modifier_none 
mir_input_event_modifier_alt 
mir_input_event_modifier_alt_left 
mir_input_event_modifier_alt_right 
mir_input_event_modifier_shift 
mir_input_event_modifier_shift_left 
mir_input_event_modifier_shift_right 
mir_input_event_modifier_sym 
mir_input_event_modifier_function 
mir_input_event_modifier_ctrl 
mir_input_event_modifier_ctrl_left 
mir_input_event_modifier_ctrl_right 
mir_input_event_modifier_meta 
mir_input_event_modifier_meta_left 
mir_input_event_modifier_meta_right 
mir_input_event_modifier_caps_lock 
mir_input_event_modifier_num_lock 
mir_input_event_modifier_scroll_lock 

◆ MirInputEventType

Enumerator
mir_input_event_type_key 
mir_input_event_type_touch 
mir_input_event_type_pointer 
mir_input_event_types 

◆ MirKeyboardAction

Possible actions for changing key state.

Enumerator
mir_keyboard_action_up 
mir_keyboard_action_down 
mir_keyboard_action_repeat 
mir_keyboard_actions 

◆ MirLifecycleState

Enumerator
mir_lifecycle_state_will_suspend 
mir_lifecycle_state_resumed 
mir_lifecycle_connection_lost 

◆ MirMirrorMode

Mirroring axis relative to the "natural" orientation of the display.

Enumerator
mir_mirror_mode_none 
mir_mirror_mode_vertical 
mir_mirror_mode_horizontal 

◆ MirOrientation

Direction relative to the "natural" orientation of the display.

Enumerator
mir_orientation_normal 
mir_orientation_left 
mir_orientation_inverted 
mir_orientation_right 

◆ MirOrientationMode

Enumerator
mir_orientation_mode_portrait 
mir_orientation_mode_landscape 
mir_orientation_mode_portrait_inverted 
mir_orientation_mode_landscape_inverted 
mir_orientation_mode_portrait_any 
mir_orientation_mode_landscape_any 
mir_orientation_mode_any 

◆ MirOutputConnectionState

Enumerator
mir_output_connection_state_disconnected 
mir_output_connection_state_connected 
mir_output_connection_state_unknown 

◆ MirOutputGammaSupported

Supports gamma correction.

Enumerator
mir_output_gamma_unsupported 
mir_output_gamma_supported 

◆ MirOutputType

Enumerator
mir_output_type_unknown 
mir_output_type_vga 
mir_output_type_dvii 
mir_output_type_dvid 
mir_output_type_dvia 
mir_output_type_composite 
mir_output_type_svideo 
mir_output_type_lvds 
mir_output_type_component 
mir_output_type_ninepindin 
mir_output_type_displayport 
mir_output_type_hdmia 
mir_output_type_hdmib 
mir_output_type_tv 
mir_output_type_edp 
mir_output_type_virtual 
mir_output_type_dsi 
mir_output_type_dpi 

◆ MirPixelFormat

32-bit pixel formats (8888): The order of components in the enum matches the order of the components as they would be written in an integer representing a pixel value of that format.

For example; abgr_8888 should be coded as 0xAABBGGRR, which will end up as R,G,B,A in memory on a little endian system, and as A,B,G,R on a big endian system.

24-bit pixel formats (888): These are in literal byte order, regardless of CPU architecture it's always the same. Writing these 3-byte pixels is typically slower than other formats but uses less memory than 32-bit and is endian-independent.

16-bit pixel formats (565/5551/4444): Always interpreted as one 16-bit integer per pixel with components in high-to-low bit order following the format name. These are the fastest formats, however colour quality is visibly lower.

Enumerator
mir_pixel_format_invalid 
mir_pixel_format_abgr_8888 
mir_pixel_format_xbgr_8888 
mir_pixel_format_argb_8888 
mir_pixel_format_xrgb_8888 
mir_pixel_format_bgr_888 
mir_pixel_format_rgb_888 
mir_pixel_format_rgb_565 
mir_pixel_format_rgba_5551 
mir_pixel_format_rgba_4444 
mir_pixel_formats 

◆ MirPlacementGravity

Reference point for aligning a surface relative to a rectangle.

Each element (surface and rectangle) has a MirPlacementGravity assigned.

Enumerator
mir_placement_gravity_center 

the reference point is at the center.

mir_placement_gravity_west 

the reference point is at the middle of the left edge.

mir_placement_gravity_east 

the reference point is at the middle of the right edge.

mir_placement_gravity_north 

the reference point is in the middle of the top edge.

mir_placement_gravity_south 

the reference point is at the middle of the lower edge.

mir_placement_gravity_northwest 

the reference point is at the top left corner.

mir_placement_gravity_northeast 

the reference point is at the top right corner.

mir_placement_gravity_southwest 

the reference point is at the lower left corner.

mir_placement_gravity_southeast 

the reference point is at the lower right corner.

◆ MirPlacementHints

Positioning hints for aligning a window relative to a rectangle.

These hints determine how the window should be positioned in the case that the surface would fall off-screen if placed in its ideal position.

For example, mir_placement_hints_flip_x will invert the x component of aux_rect_placement_offset and replace mir_placement_gravity_northwest with mir_placement_gravity_northeast and vice versa if the window extends beyond the left or right edges of the monitor.

If mir_placement_hints_slide_x is set, the window can be shifted horizontally to fit on-screen.

If mir_placement_hints_resize_x is set, the window can be shrunken horizontally to fit.

If mir_placement_hints_antipodes is set then the rect gravity may be substituted with the opposite corner (e.g. mir_placement_gravity_northeast to mir_placement_gravity_southwest) in combination with other options.

When multiple flags are set, flipping should take precedence over sliding, which should take precedence over resizing.

Enumerator
mir_placement_hints_flip_x 

allow flipping anchors horizontally

mir_placement_hints_flip_y 

allow flipping anchors vertically

mir_placement_hints_slide_x 

allow sliding window horizontally

mir_placement_hints_slide_y 

allow sliding window vertically

mir_placement_hints_resize_x 

allow resizing window horizontally

mir_placement_hints_resize_y 

allow resizing window vertically

mir_placement_hints_antipodes 

allow flipping aux_anchor to opposite corner

mir_placement_hints_flip_any 

allow flipping anchors on both axes

mir_placement_hints_slide_any 

allow sliding window on both axes

mir_placement_hints_resize_any 

allow resizing window on both axes

◆ MirPlatformType

The native buffer type for the system the client is connected on.

Deprecated:
Use of this type is inherently non-portable in the presence of plug-in platform modules as these need not correspond to the available types.
Todo:
This should be removed from the public API at the next API break.
Enumerator
mir_platform_type_gbm 
mir_platform_type_android 
mir_platform_type_eglstream 

◆ MirPointerAcceleration

MirPointerAcceleration describes the way pointer movement is filtered:

  • mir_pointer_acceleration_none: (acceleration bias + 1.0) is applied as a factor to the current velocity of the pointer. So a bias of 0 to results to no change of velocity.
  • mir_pointer_acceleration_adaptive: acceleration bias selects an acceleration function based on the current velocity that usually consists of two linear inclines separated by a plateau.
Enumerator
mir_pointer_acceleration_none 
mir_pointer_acceleration_adaptive 

◆ MirPointerAction

Possible pointer actions.

Enumerator
mir_pointer_action_button_up 
mir_pointer_action_button_down 
mir_pointer_action_enter 
mir_pointer_action_leave 
mir_pointer_action_motion 
mir_pointer_actions 

◆ MirPointerAxis

Identifiers for pointer axis.

Enumerator
mir_pointer_axis_x 
mir_pointer_axis_y 
mir_pointer_axis_vscroll 
mir_pointer_axis_hscroll 
mir_pointer_axis_relative_x 
mir_pointer_axis_relative_y 
mir_pointer_axes 

◆ MirPointerButton

Enumerator
mir_pointer_button_primary 
mir_pointer_button_secondary 
mir_pointer_button_tertiary 
mir_pointer_button_back 
mir_pointer_button_forward 
mir_pointer_button_side 
mir_pointer_button_extra 
mir_pointer_button_task 

◆ MirPointerConfinementState

Pointer Confinement.

Enumerator
mir_pointer_unconfined 
MIR_DEPRECATED_ENUM 
mir_pointer_confined_to_window 

◆ MirPointerHandedness

Enumerator
mir_pointer_handedness_right 
mir_pointer_handedness_left 

◆ MirPowerMode

Enumerator
mir_power_mode_on 
mir_power_mode_standby 
mir_power_mode_suspend 
mir_power_mode_off 

◆ MirPresentMode

Enumerator
mir_present_mode_immediate 
mir_present_mode_mailbox 
mir_present_mode_fifo 
mir_present_mode_fifo_relaxed 
mir_present_mode_num_modes 

◆ MirPromptSessionState

Enumerator
mir_prompt_session_state_stopped 
mir_prompt_session_state_started 
mir_prompt_session_state_suspended 

◆ MirResizeEdge

Hints for resizing a window.

These values are used to indicate which edge(s) of a surface is being dragged in a resize operation.

Enumerator
mir_resize_edge_none 
mir_resize_edge_west 
mir_resize_edge_east 
mir_resize_edge_north 
mir_resize_edge_south 
mir_resize_edge_northwest 
mir_resize_edge_northeast 
mir_resize_edge_southwest 
mir_resize_edge_southeast 

◆ MirScreencastResult

Enumerator
mir_screencast_success 

Screencasting to the MirBuffer succeeded.

mir_screencast_error_failure 

Screencasting failed.

◆ MirShellChrome

Shell chrome.

Enumerator
mir_shell_chrome_normal 
mir_shell_chrome_low 

◆ MirSubpixelArrangement

Physical arrangement of subpixels on the physical output.

This is always relative to the “natural” orientation of the display - mir_orientation_normal.

Enumerator
mir_subpixel_arrangement_unknown 

Arrangement of subpixels cannot be determined.

mir_subpixel_arrangement_horizontal_rgb 

Subpixels are arranged horizontally, R, G, B from left to right.

mir_subpixel_arrangement_horizontal_bgr 

Subpixels are arranged horizontally, B, G, R from left to right.

mir_subpixel_arrangement_vertical_rgb 

Subpixels are arranged vertically, R, G, B from top to bottom.

mir_subpixel_arrangement_vertical_bgr 

Subpixels are arranged vertically, B, G, R from top to bottom.

mir_subpixel_arrangement_none 

Device does not have regular subpixels.

◆ MirSurfaceAttrib

Attributes of a surface that the client and server/shell may wish to get or set over the wire.

◆ MirSurfaceFocusState

◆ MirSurfaceState

◆ MirSurfaceType

◆ MirSurfaceVisibility

◆ MirTouchAction

Possible per touch actions for state changing.

Enumerator
mir_touch_action_up 
mir_touch_action_down 
mir_touch_action_change 
mir_touch_actions 

◆ MirTouchAxis

Identifiers for touch axis.

Enumerator
mir_touch_axis_x 
mir_touch_axis_y 
mir_touch_axis_pressure 
mir_touch_axis_touch_major 
mir_touch_axis_touch_minor 
mir_touch_axis_size 
mir_touch_axes 

◆ MirTouchpadClickMode

MirTouchpadClickMode configures how the touchpad itself should generate pointer button events.

The available click modes may be active simultaneously.

  • mir_touchpad_click_mode_none: no active click mode
  • mir_touchpad_click_mode_area_to_click: simulate pointer buttons using click areas on the touchpad
  • mir_touchpad_click_mode_finger_count: simulate pointer buttons using the number of fingers down
Enumerator
mir_touchpad_click_mode_none 
mir_touchpad_click_mode_area_to_click 
mir_touchpad_click_mode_finger_count 

◆ MirTouchpadScrollMode

MirTouchpadScrollMode configures how the touchpad should generate scroll events.

  • mir_touchpad_scroll_mode_none: no scroll
  • mir_touchpad_scroll_mode_two_finger_scroll: two finger movement generates generates vertical and horizontal scroll events
  • mir_touchpad_scroll_mode_edge_scroll: touch movement at the edge of the touchpad genertes scroll events
  • mir_touchpad_scroll_mode_button_down_scroll: movement on the touchpad generates scroll events when a button is held down simultaneously
Enumerator
mir_touchpad_scroll_mode_none 
mir_touchpad_scroll_mode_two_finger_scroll 
mir_touchpad_scroll_mode_edge_scroll 
mir_touchpad_scroll_mode_button_down_scroll 

◆ MirTouchscreenMappingMode

Mapping modes for touchscreen devices.

The mode defines how coordinates from the touchscreen frequently referred to as device coordinates are translated into scene coordinates.

This configuration mode is relevant for different classes of input devices, i.e handheld devices with builtin touchscreens or external graphic tablets or external monitors with touchscreen capabilities.

Enumerator
mir_touchscreen_mapping_mode_to_output 

Map the device coordinates onto specific output.

mir_touchscreen_mapping_mode_to_display_wall 

Map the device coordinates onto the whole wall of outputs.

◆ MirTouchTooltype

Identifiers for per-touch tool types.

Enumerator
mir_touch_tooltype_unknown 
mir_touch_tooltype_finger 
mir_touch_tooltype_stylus 
mir_touch_tooltypes 

◆ MirWindowAttrib

Attributes of a window that the client and server/shell may wish to get or set over the wire.

Enumerator
mir_window_attrib_type 
mir_window_attrib_state 
mir_window_attrib_swapinterval 
Deprecated:
Do not listen for events reporting this attribute.

Use the "mir_*_get_swapinterval()" functions instead if you wish query its value

mir_window_attrib_focus 
mir_window_attrib_dpi 
mir_window_attrib_visibility 
mir_window_attrib_preferred_orientation 
mir_window_attribs 

◆ MirWindowFocusState

Enumerator
mir_window_focus_state_unfocused 
mir_window_focus_state_focused 

◆ MirWindowState

Enumerator
mir_window_state_unknown 
mir_window_state_restored 
mir_window_state_minimized 
mir_window_state_maximized 
mir_window_state_vertmaximized 
mir_window_state_fullscreen 
mir_window_state_horizmaximized 
mir_window_state_hidden 
mir_window_states 

◆ MirWindowType

Enumerator
mir_window_type_normal 

AKA "regular".

mir_window_type_utility 

AKA "floating".

mir_window_type_dialog 
mir_window_type_gloss 
mir_window_type_freestyle 
mir_window_type_menu 
mir_window_type_inputmethod 

AKA "OSK" or handwriting etc.

mir_window_type_satellite 

AKA "toolbox"/"toolbar".

mir_window_type_tip 

AKA "tooltip".

mir_window_types 

◆ MirWindowVisibility

Enumerator
mir_window_visibility_occluded 
mir_window_visibility_exposed 

Function Documentation

◆ mir_blob_data()

void const* mir_blob_data ( MirBlob blob)

Get the data of a blob.

Parameters
[in]blobThe blob
Returns
the data

◆ mir_blob_from_display_config()

MirBlob* mir_blob_from_display_config ( MirDisplayConfig config)

Create a blob from a display config.

Parameters
[in]configThe display config
Returns
A blob

◆ mir_blob_from_display_configuration()

MirBlob* mir_blob_from_display_configuration ( MirDisplayConfiguration configuration)

Create a blob from a display configuration.

Parameters
[in]configurationThe display configuration
Returns
A blob

◆ mir_blob_onto_buffer()

MirBlob* mir_blob_onto_buffer ( void const *  buffer,
size_t  buffer_size 
)

Create a blob from a buffer.

Note
this does not copy the data, the buffer is assumed to be available until the blob is released.
Parameters
[in]bufferthe buffer
[in]buffer_sizethe buffer size
Returns
A blob

◆ mir_blob_release()

void mir_blob_release ( MirBlob blob)

Release a blob object.

Parameters
[in]blobThe blob

◆ mir_blob_size()

size_t mir_blob_size ( MirBlob blob)

Get the size of a blob.

Parameters
[in]blobThe blob
Returns
the size

◆ mir_blob_to_display_config()

MirDisplayConfig* mir_blob_to_display_config ( MirBlob blob)

Create a blob from a display config.

Warning
will abort() if the blob doesn't represent a meaningful display config
Parameters
[in]blobThe blob
Returns
A display config

◆ mir_blob_to_display_configuration()

MirDisplayConfiguration* mir_blob_to_display_configuration ( MirBlob blob)

Create a blob from a display configuration.

Warning
will abort() if the blob doesn't represent a meaningful display configuration
Parameters
[in]blobThe blob
Returns
A display configuration

◆ mir_buffer_get_buffer_package()

MirBufferPackage* mir_buffer_get_buffer_package ( MirBuffer buffer)

Access the MirBufferPackage.

Parameters
[in]bufferThe buffer
Returns
The MirBufferPackage representing buffer

◆ mir_buffer_get_error_message()

char const* mir_buffer_get_error_message ( MirBuffer const *  buffer)

Retrieve a text description an error associated with a MirBuffer.

The returned string is owned by the library and remains valid until the buffer or the associated connection has been released.

Parameters
[in]bufferThe buffer
Returns
A text description of any error resulting in an invalid buffer, or the empty string "" if the connection is valid.

◆ mir_buffer_get_height()

unsigned int mir_buffer_get_height ( MirBuffer const *  buffer)

Retrieve the height of the buffer in pixels.

Parameters
[in]bufferThe buffer
Returns
The height of the buffer in pixels

◆ mir_buffer_get_pixel_format()

MirPixelFormat mir_buffer_get_pixel_format ( MirBuffer const *  buffer)

Retrieve the pixel format of the buffer.

Parameters
[in]bufferThe buffer
Returns
The pixel format of the buffer

◆ mir_buffer_get_width()

unsigned int mir_buffer_get_width ( MirBuffer const *  buffer)

Retrieve the width of the buffer in pixels.

Parameters
[in]bufferThe buffer
Returns
The width of the buffer in pixels

◆ mir_buffer_is_valid()

bool mir_buffer_is_valid ( MirBuffer const *  buffer)

Test for a valid buffer.

Parameters
[in]bufferThe buffer
Returns
True if the buffer is valid, or false otherwise.

◆ mir_buffer_map()

bool mir_buffer_map ( MirBuffer buffer,
MirGraphicsRegion region,
MirBufferLayout layout 
)

Access a CPU-mapped region associated with a given buffer.

Parameters
[in]bufferThe buffer
[out]regionThe mapped region
[out]layoutThe memory layout of the region
Returns
true if success, false if failure
Warning
The buffer should be flushed via mir_buffer_munmap() before submitting the buffer to the server.

◆ mir_buffer_stream_get_current_buffer()

void mir_buffer_stream_get_current_buffer ( MirBufferStream buffer_stream,
MirNativeBuffer **  buffer_package 
)

Retrieve the current buffer in "raw" representation.

Deprecated:
Use platform specific platform extensions instead
Precondition
The buffer stream is valid
Parameters
[in]buffer_streamThe buffer stream
[out]buffer_packageStructure to be populated

◆ mir_buffer_stream_get_egl_native_window()

MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window ( MirBufferStream buffer_stream)

Retrieve a window type which may be used by EGL.

Deprecated:
Use MirRenderSurface *as the window type
Parameters
[in]buffer_streamThe buffer stream
Returns
An EGLNativeWindowType that the client can use

◆ mir_buffer_stream_get_error_message()

char const* mir_buffer_stream_get_error_message ( MirBufferStream buffer_stream)

Retrieve a text description of the error.

The returned string is owned by the library and remains valid until the stream or the associated connection has been released.

Parameters
[in]buffer_streamThe buffer stream
Returns
A text description of any error resulting in an invalid stream, or the empty string "" if the connection is valid.

◆ mir_buffer_stream_get_graphics_region()

bool mir_buffer_stream_get_graphics_region ( MirBufferStream buffer_stream,
MirGraphicsRegion graphics_region 
)

Retrieve a buffer stream's graphics region.

Warning
Depending on platform, this can map the graphics buffer each time its called. The region remains mapped until mir_buffer_stream_swap_buffers().
Precondition
The buffer stream is valid
Parameters
[in]buffer_streamThe buffer stream
[out]graphics_regionStructure to be populated
Returns
True if the region is valid, false otherwise.

◆ mir_buffer_stream_get_microseconds_till_vblank()

unsigned long mir_buffer_stream_get_microseconds_till_vblank ( MirBufferStream const *  stream)

Query the approximate time interval in microseconds until the next vblank for a given buffer stream (actually the next vblank for the monitor deemed most relevant to the window using the buffer stream).

The result of (current_time + mir_buffer_stream_get_microseconds_till_vblank()) is the precise time at which the client should start rendering the next frame (or at least when it should sample its inputs/scene) so as to produce perfectly smooth rendering.

Note
This function is only needed for streams that have been configured with a swap interval of zero. Streams with non-zero swap intervals already have accurate synchronization and throttling built in to the mir_buffer_stream_swap_buffers_sync() function.
Parameters
[in]streamThe buffer stream
Returns
Time in microseconds to the next vblank for the given buffer stream (may be as low as zero).

◆ mir_buffer_stream_get_platform_type()

MirPlatformType mir_buffer_stream_get_platform_type ( MirBufferStream stream)

Get the underlying platform type so the buffer obtained in "raw" representation in mir_buffer_stream_get_current_buffer() may be understood.

Deprecated:
Use of this function is inherently non-portable in the presence of plug-in platform modules as these need not correspond to the available types. To identify the graphics platform use mir_connection_get_graphics_module(). To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region().
Todo:
This should be removed from the public API at the next API break.
Precondition
The stream is valid
Parameters
[in]streamThe stream
Returns
One of mir_platform_type_android or mir_platform_type_gbm

◆ mir_buffer_stream_get_size()

void mir_buffer_stream_get_size ( MirBufferStream stream,
int *  width,
int *  height 
)

Get the physical size of the next buffer that will be provided by the stream.

Parameters
[in]streamThe buffer stream
[out]widthThe physical width of the stream
[out]heightThe physical height of the stream

◆ mir_buffer_stream_get_swapinterval()

int mir_buffer_stream_get_swapinterval ( MirBufferStream stream)

Query the swapinterval that the stream is operating with.

The default interval is 1.

Parameters
[in]streamThe buffer stream
Returns
The swapinterval value that the client is operating with. Returns -1 if stream is invalid.

◆ mir_buffer_stream_is_valid()

bool mir_buffer_stream_is_valid ( MirBufferStream buffer_stream)

Test for a valid buffer stream.

Parameters
[in]buffer_streamThe buffer stream
Returns
True if the supplied buffer_stream is valid, or false otherwise.

◆ mir_buffer_stream_release()

MirWaitHandle* mir_buffer_stream_release ( MirBufferStream buffer_stream,
MirBufferStreamCallback  callback,
void *  context 
)

Release the supplied stream and any associated buffer.

The returned wait handle remains valid until the connection to the server is released.

Deprecated:
A stream obtained through mir_render_surface_get_buffer_stream does not need to be released.
Warning
callback could be called from another thread. You must do any locking appropriate to protect your data accessed in the callback.
Parameters
[in]buffer_streamThe stream
[in]callbackCallback function to be invoked when the request completes
[in,out]contextUser data passed to the callback function
Returns
A handle that can be passed to mir_wait_for

◆ mir_buffer_stream_release_sync()

void mir_buffer_stream_release_sync ( MirBufferStream buffer_stream)

Release the specified buffer stream like in mir,_buffer_stream_release(), but also wait for the operation to complete.

Deprecated:
A stream obtained through mir_render_surface_get_buffer_stream does not need to be released.
Parameters
[in]buffer_streamThe buffer stream to be released

◆ mir_buffer_stream_set_scale()

MirWaitHandle* mir_buffer_stream_set_scale ( MirBufferStream buffer_stream,
float  scale 
)

Set the scale associated with all buffers in the stream.

Deprecated:
Parameters
[in]buffer_streamThe buffer stream
[in]scaleThe scale
Returns
A handle that can be passed to mir_wait_for

◆ mir_buffer_stream_set_scale_sync()

void mir_buffer_stream_set_scale_sync ( MirBufferStream buffer_stream,
float  scale 
)

Set the scale as in mir_buffer_stream_set_scale(), but also wait for the operation to complete.

Parameters
[in]buffer_streamThe buffer stream
[in]scaleThe scale

◆ mir_buffer_stream_set_size()

void mir_buffer_stream_set_size ( MirBufferStream stream,
int  width,
int  height 
)

Set the physical size of the buffers provided by the buffer stream.

Warning
: This does not affect the size of the current buffer. The next buffer after calling mir_buffer_stream_swap_buffers will have the designated size.
Parameters
[in]streamThe buffer stream
[in]widthThe desired physical width
[in]heightThe desired physical height

◆ mir_buffer_stream_set_swapinterval()

MirWaitHandle* mir_buffer_stream_set_swapinterval ( MirBufferStream stream,
int  interval 
)

Set the swapinterval for the stream.

Warning
EGL users should use eglSwapInterval directly.
Parameters
[in]streamThe buffer stream
[in]intervalThe number of vblank signals that mir_buffer_stream_swap_buffers will wait for
Returns
A wait handle that can be passed to mir_wait_for, or NULL if the interval could not be supported

◆ mir_buffer_stream_swap_buffers()

MirWaitHandle* mir_buffer_stream_swap_buffers ( MirBufferStream buffer_stream,
MirBufferStreamCallback  callback,
void *  context 
)

Advance a buffer stream's buffer.

The returned handle remains valid until the next call to mir_buffer_stream_swap_buffers, until the buffer stream has been released or the connection to the server has been released.

Warning
callback could be called from another thread. You must do any locking appropriate to protect your data accessed in the callback.
Parameters
[in]buffer_streamThe buffer stream
[in]callbackCallback function to be invoked when the request completes
[in,out]contextUser data passed to the callback function
Returns
A handle that can be passed to mir_wait_for

◆ mir_buffer_stream_swap_buffers_sync()

void mir_buffer_stream_swap_buffers_sync ( MirBufferStream buffer_stream)

Advance a buffer stream's buffer as in mir_buffer stream_swap_buffers(), but also wait for the operation to complete.

Parameters
[in]buffer_streamThe buffer stream whose buffer to advance

◆ mir_buffer_unmap()

void mir_buffer_unmap ( MirBuffer buffer)

Flush the CPU caches for the buffer.

Postcondition
MirGraphicsRegions that are associated with the buffer will be invalid.
Parameters
[in]bufferThe buffer

◆ mir_connect()

MirWaitHandle* mir_connect ( char const *  server,
char const *  app_name,
MirConnectedCallback  callback,
void *  context 
)

Request a connection to the Mir server.

The supplied callback is called when the connection is established, or fails. The returned wait handle remains valid until the connection has been released.

Warning
callback could be called from another thread. You must do any locking appropriate to protect your data accessed in the callback.
Parameters
[in]serverFile path of the server socket to connect to, or NULL to choose the default server (can be set by the $MIR_SOCKET environment variable)
[in]app_nameA name referring to the application
[in]callbackCallback function to be invoked when request completes
[in,out]contextUser data passed to the callback function
Returns
A handle that can be passed to mir_wait_for

◆ mir_connect_sync()

MirConnection* mir_connect_sync ( char const *  server,
char const *  app_name 
)

Perform a mir_connect() but also wait for and return the result.

Parameters
[in]serverFile path of the server socket to connect to, or NULL to choose the default server
[in]app_nameA name referring to the application
Returns
The resulting MirConnection

◆ mir_connection_allocate_buffer()

void mir_connection_allocate_buffer ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirBufferCallback  available_callback,
void *  available_context 
)

Allocate a MirBuffer and do not wait for the server to return it.

The buffer will be suitable for writing to via the CPU. Buffers that will be used on a GPU should be allocated via the platform appropriate extensions. (eg, mir_extension_gbm_buffer or mir_extension_android_buffer)

The callback will be called when the buffer is created.

Parameters
[in]connectionThe connection
[in]widthRequested buffer width
[in]heightRequested buffer height
[in]formatRequested buffer pixel format
[in]available_callbackThe callback called when the buffer is available
[in]available_contextThe context for the available_callback

◆ mir_connection_allocate_buffer_sync()

MirBuffer* mir_connection_allocate_buffer_sync ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format 
)

Allocate a MirBuffer and wait for the server to return it.

Parameters
[in]connectionThe connection
[in]widthRequested buffer width
[in]heightRequested buffer height
[in]formatRequested buffer pixel format
Returns
The buffer

◆ mir_connection_apply_display_config()

MirWaitHandle* mir_connection_apply_display_config ( MirConnection connection,
MirDisplayConfiguration display_configuration 
)

Apply the display configuration.

The display configuration is applied to this connection only (per-connection configuration) and is invalidated when a hardware change occurs. Clients should register a callback with mir_connection_set_display_config_change_callback() to get notified about hardware changes, so that the can apply a new configuration.

Warning
This request may be denied. Check that the request succeeded with mir_connection_get_error_message.
Parameters
[in]connectionThe connection
[in]display_configurationThe display_configuration to apply
Returns
A handle that can be passed to mir_wait_for

◆ mir_connection_apply_session_display_config()

void mir_connection_apply_session_display_config ( MirConnection connection,
MirDisplayConfig const *  display_config 
)

Apply the display config for the connection.

The display config is applied to this connection only (per-connection config) and is invalidated when a hardware change occurs. Clients should register a callback with mir_connection_set_display_config_change_callback() to get notified about hardware changes, so that they can apply a new config.

Parameters
[in]connectionThe connection
[in]display_configThe display_config to apply

◆ mir_connection_apply_session_input_config()

void mir_connection_apply_session_input_config ( MirConnection connection,
MirInputConfig const *  config 
)

Apply the input configuration for the connection.

Configure the behavior of input device attached to a server when the session this connection represents is the focused. If the session is not focused the configuration will be stored for later use.

The call returns after sending the configuration to the server.

Errors during application of the configuration will be indicated through the error callback.

Parameters
[in]connectionThe connection
[in]configThe input config

◆ mir_connection_cancel_base_display_configuration_preview()

void mir_connection_cancel_base_display_configuration_preview ( MirConnection connection)

Cancel a pending base display configuration preview.

If this request succeeds a configuration change event is sent to the client, with the now-current base display configuration.

This call will fail if there is no display configuration preview current. A client can detect this by registering a callback with mir_connection_set_error_callback() and checking for mir_display_configuration_error_no_preview_in_progress.

Parameters
[in]connectionThe connection

◆ mir_connection_confirm_base_display_configuration()

void mir_connection_confirm_base_display_configuration ( MirConnection connection,
MirDisplayConfig const *  configuration 
)

Confirm a base configuration change initiated by mir_connection_preview_base_display_configuration()

The base display configuration is the configuration the server applies when there is no active per-connection configuration.

If this request succeeds a second configuration change event is sent to the client, identical to the one sent after mir_connection_preview_base_display_configuration(). Clients should register a callback with mir_connection_set_display_config_change_callback() in order to determine when this call succeeds.

The MirDisplayConfig must be the same as the one passed to mir_connection_preview_base_display_configuration().

Parameters
[in]connectionThe connection
[in]configurationThe MirDisplayConfig to confirm as base configuration.

◆ mir_connection_create_buffer_stream()

MirWaitHandle* mir_connection_create_buffer_stream ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirBufferUsage  buffer_usage,
MirBufferStreamCallback  callback,
void *  context 
)

Create a new buffer stream.

For example, the resulting buffer stream may be used with mir_cursor_configuration_from_buffer_stream, in order to post images to the system cursor.

Deprecated:
Use mir_render_surface_get_buffer_stream instead
Parameters
[in]connectionA valid connection
[in]widthRequested buffer width
[in]heightRequested buffer height
[in]formatRequested pixel format
[in]buffer_usageRequested buffer usage, use mir_buffer_usage_software for cursor image streams
[in]callbackCallback to be invoked when the request completes The callback is guaranteed to be called and called with a non-null MirBufferStream*, but the stream may be invalid in case of an error.
[in]contextUserdata to pass to callback function
Returns
A handle that can be supplied to mir_wait_for

◆ mir_connection_create_buffer_stream_sync()

MirBufferStream* mir_connection_create_buffer_stream_sync ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirBufferUsage  buffer_usage 
)

Create a new buffer stream unattached to a surface and wait for the result.

The resulting buffer stream may be used with mir_cursor_configuration_from_buffer_stream in order to post images to the system cursor.

Deprecated:
Use mir_render_surface_get_buffer_stream instead
Parameters
[in]connectionA valid connection
[in]widthRequested buffer width
[in]heightRequested buffer height
[in]formatRequested pixel format
[in]buffer_usageRequested buffer usage, use mir_buffer_usage_software for cursor image streams
Returns
The new buffer stream. This is guaranteed non-null, but may be invalid in the case of error.

◆ mir_connection_create_display_config()

MirDisplayConfiguration* mir_connection_create_display_config ( MirConnection connection)

Query the display.

Deprecated:
Use mir_connection_create_display_configuration() instead.
Warning
return value must be destroyed via mir_display_config_destroy()
may return null if connection is invalid
Parameters
[in]connectionThe connection
Returns
structure that describes the display configuration

◆ mir_connection_create_display_configuration()

MirDisplayConfig* mir_connection_create_display_configuration ( MirConnection connection)

Query the display.

Precondition
mir_connection_is_valid(connection) == true
Warning
return value must be destroyed via mir_display_config_release()
Parameters
[in]connectionThe connection
Returns
structure that describes the display configuration

◆ mir_connection_create_input_config()

MirInputConfig* mir_connection_create_input_config ( MirConnection connection)

Create a snapshot of the attached input devices and device configurations.

Warning
return value must be destroyed via mir_input_config_release()
may return null if connection is invalid
Parameters
[in]connectionThe connection
Returns
structure that describes the input configuration

◆ mir_connection_create_prompt_session_sync()

MirPromptSession* mir_connection_create_prompt_session_sync ( MirConnection connection,
pid_t  application_pid,
MirPromptSessionStateChangeCallback  state_change_callback,
void *  context 
)

Create and start a new prompt session.

Parameters
[in]connectionThe connection
[in]application_pidThe process id of the initiating application
[in]state_change_callbackThe function to be called when a prompt session state change occurs
[in,out]contextUser data passed to the callback functions
Returns
A handle that can be passed to mir_wait_for

◆ mir_connection_create_render_surface()

void mir_connection_create_render_surface ( MirConnection connection,
int  width,
int  height,
MirRenderSurfaceCallback  callback,
void *  context 
)

Create a render surface.

Parameters
[in]connectionA valid connection
[in]widthThe width in pixels
[in]heightThe height in pixels
[in]callbackCallback to be invoked when the request completes. The callback is guaranteed to be called and called with a non-null MirRenderSurface*, but the render surface may be invalid in case of error.
[in,out]contextUser data to pass to callback function

◆ mir_connection_create_render_surface_sync()

MirRenderSurface* mir_connection_create_render_surface_sync ( MirConnection connection,
int  width,
int  height 
)

Create a render surface and wait for the result.

Parameters
[in]connectionA valid connection
[in]widthThe width in pixels
[in]heightThe height in pixels
Returns
The new render surface, guaranteed to be non-null, but may be invalid in case of error

◆ mir_connection_create_screencast_sync()

MirScreencast* mir_connection_create_screencast_sync ( MirConnection connection,
MirScreencastParameters parameters 
)

Create a screencast on the supplied connection.

A screencast allows clients to read the contents of the screen.

Warning
This request may be denied.
Parameters
[in]connectionThe connection
[in]parametersThe screencast parameters
Returns
The resulting screencast

◆ mir_connection_create_spec_for_changes()

MirSurfaceSpec* mir_connection_create_spec_for_changes ( MirConnection connection)

◆ mir_connection_create_spec_for_dialog()

MirSurfaceSpec* mir_connection_create_spec_for_dialog ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format 
)

◆ mir_connection_create_spec_for_input_method()

MirSurfaceSpec* mir_connection_create_spec_for_input_method ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format 
)

◆ mir_connection_create_spec_for_menu()

MirSurfaceSpec* mir_connection_create_spec_for_menu ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirSurface *  parent,
MirRectangle rect,
MirEdgeAttachment  edge 
)

◆ mir_connection_create_spec_for_modal_dialog()

MirSurfaceSpec* mir_connection_create_spec_for_modal_dialog ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirSurface *  parent 
)

◆ mir_connection_create_spec_for_normal_surface()

MirSurfaceSpec* mir_connection_create_spec_for_normal_surface ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format 
)

◆ mir_connection_create_spec_for_tip()

MirSurfaceSpec* mir_connection_create_spec_for_tip ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirSurface *  parent,
MirRectangle rect,
MirEdgeAttachment  edge 
)

◆ mir_connection_create_spec_for_tooltip()

MirSurfaceSpec* mir_connection_create_spec_for_tooltip ( MirConnection connection,
int  width,
int  height,
MirPixelFormat  format,
MirSurface *  parent,
MirRectangle zone 
)

◆ mir_connection_enumerate_extensions()

void mir_connection_enumerate_extensions ( MirConnection connection,
void *  context,
void(*)(void *context, char const *extension, int version)  enumerator 
)

Enumerates the supported extensions.

Parameters
[in]connectionThe connection
[out]contextUser data passed to the enumerator function
[in]enumeratorThe function to be called for each extension

◆ mir_connection_get_available_surface_formats()

void mir_connection_get_available_surface_formats ( MirConnection connection,
MirPixelFormat formats,
unsigned const int  formats_size,
unsigned int *  num_valid_formats 
)

Get the list of possible formats that a surface can be created with.

Parameters
[in]connectionThe connection
[out]formatsList of valid formats to create surfaces with
[in]formats_sizesize of formats list
[out]num_valid_formatsnumber of valid formats returned in formats
Note
Users of EGL should call mir_connection_get_egl_pixel_format instead, as it will take the guesswork out of choosing between similar pixel formats. At the moment, this function returns a compatible list of formats likely to work for either software or hardware rendering. However it is not the full or accurate list and will be replaced in future by a function that takes the intended MirBufferUsage into account.

◆ mir_connection_get_egl_native_display()

MirEGLNativeDisplayType mir_connection_get_egl_native_display ( MirConnection connection)

Get a display type that can be used with EGL.

Deprecated:
Use MirConnection * as the native display instead
Parameters
[in]connectionThe connection
Returns
An EGLNativeDisplayType that the client can use

◆ mir_connection_get_egl_pixel_format()

MirPixelFormat mir_connection_get_egl_pixel_format ( MirConnection connection,
void *  egldisplay,
void *  eglconfig 
)

Get the exact MirPixelFormat to use in creating a surface for a chosen EGLConfig.

Deprecated:
Use EGL directly, the EGL implementation will now set correct pixel format"
Parameters
[in]connectionThe connection
[in]egldisplayThe EGLDisplay for the given config
[in]eglconfigThe EGLConfig you have chosen to use
Returns
The MirPixelFormat to use in surface creation

◆ mir_connection_get_error_message()

char const* mir_connection_get_error_message ( MirConnection connection)

Retrieve a text description of the last error.

The returned string is owned by the library and remains valid until the connection has been released.

Parameters
[in]connectionThe connection
Returns
A text description of any error resulting in an invalid connection, or the empty string "" if the connection is valid.

◆ mir_connection_get_graphics_module()

void mir_connection_get_graphics_module ( MirConnection connection,
MirModuleProperties properties 
)

Query graphics platform module.

Note
The char pointers in MirModuleProperties are owned by the connection and should not be freed. They remain valid until the connection is released.
Parameters
[in]connectionThe connection
[out]propertiesStructure to be populated

◆ mir_connection_get_platform()

void mir_connection_get_platform ( MirConnection connection,
MirPlatformPackage platform_package 
)

Query platform-specific data and/or file descriptors that are required to initialize GL/EGL features.

Parameters
[in]connectionThe connection
[out]platform_packageStructure to be populated

◆ mir_connection_is_valid()

bool mir_connection_is_valid ( MirConnection connection)

Test for a valid connection.

Parameters
[in]connectionThe connection
Returns
True if the supplied connection is valid, or false otherwise.

◆ mir_connection_platform_operation()

MirWaitHandle* mir_connection_platform_operation ( MirConnection connection,
MirPlatformMessage const *  request,
MirPlatformOperationCallback  callback,
void *  context 
)

Perform a platform specific operation.

The MirPlatformMessage used for the request needs to remain valid until this operation finishes.

Parameters
[in]connectionThe connection
[in]requestThe message used for this operation
[in]callbackThe callback to call when the operation finishes
[in,out]contextUser data passed to the callback function
Returns
A handle that can be passed to mir_wait_for

◆ mir_connection_pong()

void mir_connection_pong ( MirConnection connection,
int32_t  serial 
)

Respond to a ping event.

Parameters
[in]connectionThe connection
[in]serialSerial from the ping event

◆ mir_connection_present_mode_supported()

bool mir_connection_present_mode_supported ( MirConnection connection,
MirPresentMode  mode 
)

Query whether the server supports a given presentation mode.

Parameters
[in]connectionThe connection
[in]modeThe MirPresentMode
Returns
True if supported, false if not

◆ mir_connection_preview_base_display_configuration()

void mir_connection_preview_base_display_configuration ( MirConnection connection,
MirDisplayConfig const *  configuration,
int  timeout_seconds 
)

Preview a new base display configuration.

The base display configuration is the configuration the server applies when there is no active per-connection configuration.

The display configuration will automatically revert to the previous settings after timeout_seconds unless confirmed by a call to mir_connection_confirm_base_display_configuration(), or is reverted immediately after a call to mir_connection_cancel_display_configuration_preview().

If this request succeeds a configuration change event is sent to the client. Clients should register a callback with mir_connection_set_display_config_change_callback() in order to determine when this call succeeds.

If the configuration is not confirmed before timeout_seconds have elapsed a second configuration change event is sent, with the old config.

Parameters
[in]connectionThe connection
[in]configurationThe MirDisplayConfig to set as base
[in]timeout_secondsThe time the server should wait, in seconds, for the change to be confirmed before reverting to the previous configuration.

◆ mir_connection_release()

void mir_connection_release ( MirConnection connection)

Release a connection to the Mir server.

Parameters
[in]connectionThe connection

◆ mir_connection_remove_session_display_config()

void mir_connection_remove_session_display_config ( MirConnection connection)

Remove the display configuration for the connection.

If a session display config is applied to the connection it is removed, and the base display config is used. If there was no previous call to mir_connection_apply_session_display_config this will do nothing.

Parameters
[in]connectionThe connection

◆ mir_connection_set_base_display_config()

MirWaitHandle* mir_connection_set_base_display_config ( MirConnection connection,
MirDisplayConfiguration const *  display_configuration 
)

Set the base display configuration.

The base display configuration is the configuration the server applies when there is no active per-connection configuration.

When the wait handle returned by this function becomes ready, clients can use mir_connection_get_error_message() to check if an authorization error occurred. Only authorization errors are guaranteed to return an error message for this operation.

A successful result (i.e. no error) does not guarantee that the base display configuration has been changed to the desired value. Clients should register a callback with mir_connection_set_display_config_change_callback() to monitor actual base display configuration changes.

Warning
This request may be denied. Check that the request succeeded with mir_connection_get_error_message.
Parameters
[in]connectionThe connection
[in]display_configurationThe display_configuration to set as base
Returns
A handle that can be passed to mir_wait_for

◆ mir_connection_set_base_input_config()

void mir_connection_set_base_input_config ( MirConnection connection,
MirInputConfig const *  config 
)

Set the input configuration as base configuration.

Configure the behavior of input device attached to a server. When allowed by the shell the configuration will be used as base configuration.

So whenever the active session has no session specific configuration this input configuration will be used.

The call returns after sending the configuration to the server.

Errors during application of the configuration will be indicated through the error callback.

Parameters
[in]connectionThe connection
[in]configThe input config

◆ mir_connection_set_display_config_change_callback()

void mir_connection_set_display_config_change_callback ( MirConnection connection,
MirDisplayConfigCallback  callback,
void *  context 
)

Register a callback to be called when the hardware display configuration changes.

Once a change has occurred, you can use mir_connection_create_display_configuration to see the new configuration.

Parameters
[in]connectionThe connection
[in]callbackThe function to be called when a display change occurs
[in,out]contextUser data passed to the callback function

◆ mir_connection_set_error_callback()

void mir_connection_set_error_callback ( MirConnection connection,
MirErrorCallback  callback,
void *  context 
)

Register a callback to be called on non-fatal errors.

Parameters
[in]connectionThe connection
[in]callbackThe function to be called when an error occurs
[in,out]contextUser data passed to the callback function

◆ mir_connection_set_input_config_change_callback()

void mir_connection_set_input_config_change_callback ( MirConnection connection,
MirInputConfigCallback  callback,
void *  context 
)

Register a callback to be called when the input devices change.

Once a change has occurred, you can use mir_connection_create_input_config to get an updated snapshot of the input device configuration.

Parameters
[in]connectionThe connection
[in]callbackThe function to be called when a change occurs
[in,out]contextUser data passed to the callback function

◆ mir_connection_set_lifecycle_event_callback()

void mir_connection_set_lifecycle_event_callback ( MirConnection connection,
MirLifecycleEventCallback  callback,
void *  context 
)

Register a callback to be called when a Lifecycle state change occurs.

Parameters
[in]connectionThe connection
[in]callbackThe function to be called when the state change occurs
[in,out]contextUser data passed to the callback function

◆ mir_connection_set_ping_event_callback()

void mir_connection_set_ping_event_callback ( MirConnection connection,
MirPingEventCallback  callback,
void *  context 
)

Register a callback for server ping events.

The server may send ping requests to detect unresponsive applications. Clients should process this with their regular event handling, and call mir_connection_pong() in response.

The shell may treat a client which fails to pong in a timely fashion differently; a common response is to overlay the surface with an unresponsive application message.

A default implementation that immediately calls pong is provided; toolkits SHOULD override this default implementation to more accurately reflect the state of their event processing loop.

Parameters
[in]connectionThe connection
[in]callbackThe function to be called on ping events.
[in]contextUser data passed to the callback function

◆ mir_cookie_buffer_size()

size_t mir_cookie_buffer_size ( MirCookie const *  cookie)

Queries the size needed to serialize a given cookie.

Parameters
[in]cookieA cookie instance
Returns
The size of the serialized representation of the given cookie

◆ mir_cookie_from_buffer()

MirCookie const* mir_cookie_from_buffer ( void const *  buffer,
size_t  size 
)

Create a cookie from a serialized representation.

Parameters
[in]bufferThe buffer containing a serialized cookie.
[in]sizeThe size of the buffer. The buffer may be freed immediately after this call.
Returns
A MirCookie instance. The instance must be released with a call to mir_cookie_release. NULL will be returned if the buffer and size don't describe the contents of a MirCookie.

◆ mir_cookie_release()

void mir_cookie_release ( MirCookie const *  cookie)

Release the MirCookie.

Parameters
[in]cookieThe cookie to release

◆ mir_cookie_to_buffer()

void mir_cookie_to_buffer ( MirCookie const *  cookie,
void *  buffer,
size_t  size 
)

Serializes a cookie into the given buffer.

Precondition
The size must be equal to mir_cookie_size
Parameters
[in]cookieA cookie instance
[in]bufferA buffer which is filled with the serialized representation of the given cookie
[in]sizeThe size of the given buffer

◆ mir_create_dialog_window_spec()

MirWindowSpec* mir_create_dialog_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for a parentless dialog window.

A parentless dialog window is similar to a normal window, but it cannot be fullscreen and typically won't have any maximize/close button decorations.

A parentless dialog is not allowed to have other dialog children. The server may decide to close the parent and show the child dialog only.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.

◆ mir_create_freestyle_window_spec()

MirWindowSpec* mir_create_freestyle_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for a freestyle window.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_gloss_window_spec()

MirWindowSpec* mir_create_gloss_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for a gloss window.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_input_method_window_spec()

MirWindowSpec* mir_create_input_method_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for an input method window.

Currently this is only appropriate for the Unity On-Screen-Keyboard.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_menu_window_spec()

MirWindowSpec* mir_create_menu_window_spec ( MirConnection connection,
int  width,
int  height,
MirWindow parent,
MirRectangle rect,
MirEdgeAttachment  edge 
)

Create a window specification for a menu window.

Positioning of the window is specified with respect to the parent window via an adjacency rectangle. The server will attempt to choose an edge of the adjacency rectangle on which to place the window taking in to account screen-edge proximity or similar constraints. In addition, the server can use the edge affinity hint to consider only horizontal or only vertical adjacency edges in the given rectangle.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
[in]parentA valid parent window for this menu.
[in]rectThe adjacency rectangle. The server is not guaranteed to create a window at the requested location.
[in]edgeThe preferred edge direction to attach to. Use mir_edge_attachment_any for no preference.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_modal_dialog_window_spec()

MirWindowSpec* mir_create_modal_dialog_window_spec ( MirConnection connection,
int  width,
int  height,
MirWindow parent 
)

Create a window specification for a modal dialog window.

The dialog window will have input focus; the parent can still be moved, resized or hidden/minimized but no interaction is possible until the dialog is dismissed.

A dialog will typically have no close/maximize button decorations.

During window creation, if the specified parent is another dialog window the server may choose to close the specified parent in order to show this new dialog window.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
[in]parentA valid parent window.

◆ mir_create_normal_window_spec()

MirWindowSpec* mir_create_normal_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for a normal window.

A normal window is suitable for most application windows. It has no special semantics. On a desktop shell it will typically have a title-bar, be movable, resizeable, etc.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_satellite_window_spec()

MirWindowSpec* mir_create_satellite_window_spec ( MirConnection connection,
int  width,
int  height,
MirWindow parent 
)

Create a window specification for a satellite window.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
[in]parentA valid parent window.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_screencast_spec()

MirScreencastSpec* mir_create_screencast_spec ( MirConnection connection)

Create a screencast specification.

Remarks
For use with mir_screencast_create() at the width, height, pixel format and capture region must be set.
Parameters
[in]connectiona valid mir connection
Returns
A handle that can ultimately be passed to mir_create_window() or mir_window_apply_spec()

◆ mir_create_surface_spec()

MirSurfaceSpec* mir_create_surface_spec ( MirConnection connection)

◆ mir_create_tip_window_spec()

MirWindowSpec* mir_create_tip_window_spec ( MirConnection connection,
int  width,
int  height,
MirWindow parent,
MirRectangle rect,
MirEdgeAttachment  edge 
)

Create a window specification for a tip window.

Positioning of the window is specified with respect to the parent window via an adjacency rectangle. The server will attempt to choose an edge of the adjacency rectangle on which to place the window taking in to account screen-edge proximity or similar constraints. In addition, the server can use the edge affinity hint to consider only horizontal or only vertical adjacency edges in the given rectangle.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
[in]parentA valid parent window for this tip.
[in]rectThe adjacency rectangle. The server is not guaranteed to create a window at the requested location.
[in]edgeThe preferred edge direction to attach to. Use mir_edge_attachment_any for no preference.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_utility_window_spec()

MirWindowSpec* mir_create_utility_window_spec ( MirConnection connection,
int  width,
int  height 
)

Create a window specification for a utility window.

Parameters
[in]connectionConnection the window will be created on
[in]widthRequested width. The server is not guaranteed to return a window of this width.
[in]heightRequested height. The server is not guaranteed to return a window of this height.
Returns
A handle that can be passed to mir_create_window() to complete construction.

◆ mir_create_window()

void mir_create_window ( MirWindowSpec requested_specification,
MirWindowCallback  callback,
void *  context 
)

Create a window from a given specification.

Parameters
[in]requested_specificationSpecification of the attributes for the created window
[in]callbackCallback function to be invoked when creation is complete
[in,out]contextUser data passed to callback function. This callback is guaranteed to be called, and called with a non-null MirWindow*, but the window may be invalid in case of an error.

◆ mir_create_window_spec()

MirWindowSpec* mir_create_window_spec ( MirConnection connection)

Create a window specification.

This can be used with mir_create_window() to create a window or with mir_window_apply_spec() to change an existing window.

Remarks
For use with mir_create_window() at least the type, width and height must be set. (And for types requiring a parent that too must be set.)
Parameters
[in]connectiona valid mir connection
Returns
A handle that can ultimately be passed to mir_create_window() or mir_window_apply_spec()

◆ mir_create_window_sync()

MirWindow* mir_create_window_sync ( MirWindowSpec requested_specification)

Create a window from a given specification and wait for the result.

Parameters
[in]requested_specificationSpecification of the attributes for the created window
Returns
The new window. This is guaranteed non-null, but may be invalid in the case of error.

◆ mir_cursor_configuration_destroy()

void mir_cursor_configuration_destroy ( MirCursorConfiguration *  parameters)

Release resources assosciated with cursor parameters.

Parameters
[in]parametersThe operand

◆ mir_cursor_configuration_from_buffer_stream()

MirCursorConfiguration* mir_cursor_configuration_from_buffer_stream ( MirBufferStream const *  stream,
int  hotspot_x,
int  hotspot_y 
)

Returns a new cursor configuration tied to a given buffer stream.

If the configuration is successfully applied buffers from the stream will be used to fill the system cursor.

Deprecated:
Users should use mir_window_spec_set_cursor_render_surface.
Parameters
[in]streamThe buffer stream
[in]hotspot_xThe x-coordinate to use as the cursor's hotspot.
[in]hotspot_yThe y-coordinate to use as the cursor's hotspot.
Returns
A cursor parameters object which must be passed to_mir_cursor_configuration_destroy

◆ mir_cursor_configuration_from_name()

MirCursorConfiguration* mir_cursor_configuration_from_name ( char const *  name)

Returns a new MirCursorConfiguration representing a named cursor from the system cursor theme.

Symbolic cursor names, such as mir_default_cursor_name and mir_caret_cursor_name are available see (mir_toolkit/cursors.h). as input.

Deprecated:
Users should use mir_window_spec_set_cursor_name.
Parameters
[in]nameThe cursor name
Returns
A cursor parameters object which must be passed to_mir_cursor_configuration_destroy

◆ mir_cursor_configuration_from_render_surface()

MirCursorConfiguration* mir_cursor_configuration_from_render_surface ( MirRenderSurface surface,
int  hotspot_x,
int  hotspot_y 
)

Returns a new cursor configuration tied to a given render surface.

If the configuration is successfully applied buffers from the surface will be used to fill the system cursor.

Parameters
[in]surfaceThe render surface
[in]hotspot_xThe x-coordinate to use as the cursor's hotspot.
[in]hotspot_yThe y-coordinate to use as the cursor's hotspot.
Returns
A cursor parameters object which must be passed to_mir_cursor_configuration_destroy

◆ mir_display_config_destroy()

void mir_display_config_destroy ( MirDisplayConfiguration display_configuration)

Destroy the DisplayConfiguration resource acquired from mir_connection_create_display_config.

Parameters
[in]display_configurationThe display_configuration information resource to be destroyed

◆ mir_display_config_get_max_simultaneous_outputs()

int mir_display_config_get_max_simultaneous_outputs ( MirDisplayConfig const *  config)

Get the maximum possible number of simultaneously active outputs this system supports.

Note
There may be restrictions on the configuration required to achieve this many active outputs. Typically the achievable number of simultaneously active outputs is lower than this number.
Parameters
[in]configThe configuration to query
Returns
The maximum number of simultaneously active outputs supportable at this time.

◆ mir_display_config_get_mutable_output()

MirOutput* mir_display_config_get_mutable_output ( MirDisplayConfig config,
size_t  index 
)

Get a modifyable handle to the index 'th output of this configuration.

Note
The MirOutput handle is only valid while config is valid.
Precondition
0 <= index < mir_display_config_get_num_outputs(config)
Parameters
[in]configThe configuration to query
[in]indexThe index of the output to get
Returns
A handle to a MirOutput within config which is valid until mir_display_config_release(config) is called.

◆ mir_display_config_get_num_outputs()

int mir_display_config_get_num_outputs ( MirDisplayConfig const *  config)

Get the number of outputs available in this display configuration.

This returns the total number of outputs the system has. This includes both enabled and disabled output connections, and is typically larger than the value returned from mir_display_config_get_max_simultaneous_outputs().

Typically this will be constant over the lifetime of a client as devices usually do not gain extra physical ports at runtime. However, hotpluggable display devices exist and the number of virtual outputs may change at runtime, so this should always be called to determine the number of outputs to iterate over.

Parameters
[in]configThe configuration to query
Returns
The number of outputs available in this configuration.

◆ mir_display_config_get_output()

MirOutput const* mir_display_config_get_output ( MirDisplayConfig const *  config,
size_t  index 
)

Get a read-only handle to the index 'th output of this configuration.

Note
The MirOutput handle is only valid while config is valid.
Precondition
0 <= index < mir_display_config_get_num_outputs(config)
Parameters
[in]configThe configuration to query
[in]indexThe index of the output to get
Returns
A read-only handle to a MirOutput within config which is valid until mir_display_config_release(config) is called.

◆ mir_display_config_release()

void mir_display_config_release ( MirDisplayConfig config)

Release resources associated with a MirDisplayConfig handle.

Parameters
[in]configThe handle to release

◆ mir_display_output_type_name()

char const* mir_display_output_type_name ( MirDisplayOutputType  type)

Get the textual name of an output type.

Parameters
[in]typeThe MirDisplayOutputType to describe.
Returns
The name of the output type.

◆ mir_error_get_code()

uint32_t mir_error_get_code ( MirError const *  error)

Get the domain-specific error code of a MirError.

Parameters
[in]errorThe MirError to query
Returns
The domain-specific error code

◆ mir_error_get_domain()

MirErrorDomain mir_error_get_domain ( MirError const *  error)

Get the domain of a MirError.

The error domain is required to interpret the rest of the error details.

Parameters
[in]errorThe MirError to query
Returns
The MirErrorDomain that this error belongs to.

◆ mir_event_get_close_surface_event()

MirCloseSurfaceEvent const* mir_event_get_close_surface_event ( MirEvent const *  event)

Retrieve the MirCloseSurfaceEvent associated with a MirEvent of type mir_event_type_close_surface.

The event is a request to close the surface it is delivered to and has no accessors.

Deprecated:
Use of this function is pointless as there is no way to use the return value.
Todo:
This should be removed from the public API at the next API break.
Parameters
[in]eventThe event
Returns
The associated MirCloseSurfaceEvent

◆ mir_event_get_input_configuration_event()

MirInputConfigurationEvent const* mir_event_get_input_configuration_event ( MirEvent const *  event)

Retrieve the MirInputConfig associated with a MirEvent of type mir_event_type_input_configuration.

The event signifies that the input device configuration has changed.

Deprecated:
Input devices and changes to the input devices are indicated via the MirInputConfigCallback
Parameters
[in]eventThe event
Returns
The associated MirInputConfigurationEvent

◆ mir_event_get_input_device_state_event()

MirInputDeviceStateEvent const* mir_event_get_input_device_state_event ( MirEvent const *  event)

Retrieve the MirInputDeviceStateEvent associated with a MirEvent of type mir_event_type_input_device_state.

The event signifies that the client has not received the most recent input events, and thus receives a state update for all attached devices.

Parameters
[in]eventThe event
Returns
The associated MirInputConfigurationEvent

◆ mir_event_get_input_event()

MirInputEvent const* mir_event_get_input_event ( MirEvent const *  event)

Retrieve the MirInputEvent associated with a MirEvent of type mir_event_type_input.

See <mir_toolkit/events/input/input_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirInputEvent

◆ mir_event_get_keymap_event()

MirKeymapEvent const* mir_event_get_keymap_event ( MirEvent const *  event)

Retrieve the MirKeymapEvent associated with a MirEvent of type mir_event_type_keymap.

The event signifies that the keymap applied for the relevant surface has changed.

Parameters
[in]eventThe event
Returns
The associated MirKeymapEvent

◆ mir_event_get_orientation_event()

MirOrientationEvent const* mir_event_get_orientation_event ( MirEvent const *  event)

Retrieve the MirOrientationEvent associated with a MirEvent of type mir_event_type_orientation.

See <mir_toolkit/events/orientation_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirOrientationEvent

◆ mir_event_get_prompt_session_event()

MirPromptSessionEvent const* mir_event_get_prompt_session_event ( MirEvent const *  event)

Retrieve the MirPromptSessionEvent associated with a MirEvent of type mir_event_type_prompt_session_state_change.

See <mir_toolkits/events/prompt_session_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirPromptSessionEvent

◆ mir_event_get_resize_event()

MirResizeEvent const* mir_event_get_resize_event ( MirEvent const *  event)

Retrieve the MirResizeEvent associated with a MirEvent of type mir_event_type_resize.

See <mir_toolkits/events/resize_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirResizeEvent

◆ mir_event_get_surface_event()

MirSurfaceEvent const* mir_event_get_surface_event ( MirEvent const *  event)

Retrieve the MirSurfaceEvent associated with a MirEvent of type mir_event_type_surface.

See <mir_toolkit/events/surface_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirSurfaceEvent

◆ mir_event_get_surface_output_event()

MirSurfaceOutputEvent const* mir_event_get_surface_output_event ( MirEvent const *  event)

Retrieve the MirSurfaceOutputEvent associated with a MirEvent of type mir_event_type_surface_output.

The event signifies that the properties of the output the surface is displayed upon have changed.

A MirSurfaceOutputEvent is generated either when the properties of the output the surface is primarily on change (for example: by user configuration of resolution) or when the output the surface is primarily on changes (for example: when a user moves the surface from one monitor to another).

Parameters
[in]eventThe event
Returns
The associated MirSurfaceOutputEvent

◆ mir_event_get_surface_placement_event()

MirSurfacePlacementEvent const* mir_event_get_surface_placement_event ( MirEvent const *  event)

Retrieve the MirSurfacePlacementEvent associated with a MirEvent of type mir_event_type_surface_placement.

The event signifies that the the server has fulfilled a request for relative surface placement.

Parameters
[in]eventThe event
Returns
The associated MirSurfacePlacementEvent

◆ mir_event_get_type()

MirEventType mir_event_get_type ( MirEvent const *  event)

Retrieves the type of a MirEvent.

Now preferred over direct access to ev->type. In particular ev->type will never be mir_event_type_input and mir_event_get_type is the only way to ensure mir_event_get_input_event will succeed.

Parameters
[in]eventThe event
Returns
The event type

◆ mir_event_get_window_event()

MirWindowEvent const* mir_event_get_window_event ( MirEvent const *  event)

Retrieve the MirWindowEvent associated with a MirEvent of type mir_event_type_window.

See <mir_toolkit/events/surface_event.h> for accessors.

Parameters
[in]eventThe event
Returns
The associated MirWindowEvent

◆ mir_event_get_window_output_event()

MirWindowOutputEvent const* mir_event_get_window_output_event ( MirEvent const *  event)

Retrieve the MirWindowOutputEvent associated with a MirEvent of type mir_event_type_window_output.

The event signifies that the properties of the output the window is displayed upon have changed.

A MirWindowOutputEvent is generated either when the properties of the output the window is primarily on change (for example: by user configuration of resolution) or when the output the window is primarily on changes (for example: when a user moves the window from one monitor to another).

Parameters
[in]eventThe event
Returns
The associated MirWindowOutputEvent

◆ mir_event_get_window_placement_event()

MirWindowPlacementEvent const* mir_event_get_window_placement_event ( MirEvent const *  event)

Retrieve the MirWindowPlacementEvent associated with a MirEvent of type mir_event_type_window_placement.

The event signifies that the the server has fulfilled a request for relative window placement.

Parameters
[in]eventThe event
Returns
The associated MirWindowPlacementEvent

◆ mir_event_ref()

MirEvent const* mir_event_ref ( MirEvent const *  event)

Reference this MirEvent and return a pointer to the newly referenced instance.

Parameters
[in]eventThe event to reference
Returns
The event pointer to now use

◆ mir_event_unref()

void mir_event_unref ( MirEvent const *  event)

Release a reference to a MirEvent.

Parameters
[in]eventThe event to un-reference

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [1/15]

enum MirSurfaceType MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowType )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [2/15]

enum MirSurfaceState MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowState )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [3/15]

enum MirSurfaceFocusState MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowFocusState )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [4/15]

enum MirSurfaceAttrib MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowAttrib )

Attributes of a surface that the client and server/shell may wish to get or set over the wire.

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [5/15]

struct MirCursorConfiguration MirCursorConfiguration MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use mir_window_spec_set_cursor_name/mir_window_spec_set_cursor_render_surface instead"  )

Opaque structure containing cursor parameterization.

Create with mir_cursor* family. Used with mir_window_configure_cursor.

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [6/15]

struct MirSurface MirSurface MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use MirWindow instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [7/15]

struct MirSurfaceSpec MirSurfaceSpec MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use MirWindowSpec instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [8/15]

struct MirPersistentId MirPersistentId MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use MirWindowId instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [9/15]

struct MirSurfaceEvent MirSurfaceEvent MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowEvent instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [10/15]

struct MirCloseSurfaceEvent MirCloseSurfaceEvent MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirCloseWindowEvent instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [11/15]

struct MirInputConfigurationEvent MirInputConfigurationEvent MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use MirInputDeviceStateEvent and the MirInputConfig callback instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [12/15]

struct MirSurfaceOutputEvent MirSurfaceOutputEvent MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowOutputEvent instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [13/15]

struct MirSurfacePlacementEvent MirSurfacePlacementEvent MIR_FOR_REMOVAL_IN_VERSION_1 ( "use MirWindowPlacementEvent instead"  )

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [14/15]

enum MirBufferUsage MIR_FOR_REMOVAL_IN_VERSION_1 ( "No longer applicable when using MirRenderSurface )

MirBufferUsage specifies how a surface can and will be used.

A "hardware" surface can be used for OpenGL accelerated rendering. A "software" surface is one that can be addressed in main memory and blitted to directly.

◆ MIR_FOR_REMOVAL_IN_VERSION_1() [15/15]

struct MirSurfaceParameters MIR_FOR_REMOVAL_IN_VERSION_1 ( "Use mir_window_get apis or listen for attribute events instead"  )

MirWindowParameters is the structure of minimum required information that you must provide to Mir in order to create a window.

◆ mir_get_client_api_version()

unsigned mir_get_client_api_version ( )

Returns client API version.

Result of the function should be compared to result of MIR_VERSION_NUMBER

Returns
The client API version

◆ mir_input_config_destroy()

void mir_input_config_destroy ( MirInputConfig const *  config)
Deprecated:
Use mir_input_config_release() instead.

Release this snapshot of the input configuration. This invalidates any pointers retrieved from this structure.

Parameters
[in]configThe input configuration

◆ mir_input_config_device_count()

size_t mir_input_config_device_count ( MirInputConfig const *  config)

Retrieve the number of available input devices.

Parameters
[in]configThe input configuration snapshot
Returns
Number of input devices

◆ mir_input_config_get_device()

MirInputDevice const* mir_input_config_get_device ( MirInputConfig const *  config,
size_t  index 
)

Retrieve the input device at given index.

The pointer returned stays valid until mir_input_config_release is called with config.

Parameters
[in]configThe input configuration snapshot
[in]indexThe index of the input device to return.
Returns
input device

◆ mir_input_config_get_device_by_id()

MirInputDevice const* mir_input_config_get_device_by_id ( MirInputConfig const *  config,
MirInputDeviceId  id 
)

Retrieve the input device by id.

The MirInputDevice returned stays valid until mir_input_config_release is called with config. If no device with the given id is found NULL will be returned.

Parameters
[in]configThe input configuration snapshot
[in]idThe input device id to search for
Returns
input device

◆ mir_input_config_get_mutable_device()

MirInputDevice* mir_input_config_get_mutable_device ( MirInputConfig config,
size_t  index 
)

Retrieve the input device at given index.

The pointer returned stays valid until mir_input_config_release is called with config.

Parameters
[in]configThe input configuration snapshot
[in]indexThe index of the input device to return.
Returns
input device

◆ mir_input_config_get_mutable_device_by_id()

MirInputDevice* mir_input_config_get_mutable_device_by_id ( MirInputConfig config,
MirInputDeviceId  id 
)

Retrieve the input device by id.

The MirInputDevice returned stays valid until mir_input_config_release is called with config. If no device with the given id is found NULL will be returned.

Parameters
[in]configThe input configuration snapshot
[in]idThe input device id to search for
Returns
input device

◆ mir_input_config_release()

void mir_input_config_release ( MirInputConfig const *  config)

Release this snapshot of the input configuration.

This invalidates any pointers retrieved from this structure.

Parameters
[in]configThe input configuration

◆ mir_input_configuration_event_get_action()

MirInputConfigurationAction mir_input_configuration_event_get_action ( MirInputConfigurationEvent const *  ev)

Retrieve the input configuration action which occurred.

Parameters
[in]evThe input configuration event
Returns
The action

◆ mir_input_configuration_event_get_device_id()

MirInputDeviceId mir_input_configuration_event_get_device_id ( MirInputConfigurationEvent const *  ev)

Retreive the device id associated with a MirInputConfiguration event.

Parameters
[in]evThe input configuration event
Returns
The device id or -1 if not applicable to events of this action

◆ mir_input_configuration_event_get_time()

int64_t mir_input_configuration_event_get_time ( MirInputConfigurationEvent const *  ev)

Retreive the time associated with a MirInputConfiguration event.

Parameters
[in]evThe input configuration event
Returns
The time in nanoseconds since epoch

◆ mir_input_device_get_capabilities()

MirInputDeviceCapabilities mir_input_device_get_capabilities ( MirInputDevice const *  device)

Retrieve the capabilities of the input device at the given index.

Parameters
[in]deviceThe input device
Returns
The capability flags of the input device

◆ mir_input_device_get_id()

MirInputDeviceId mir_input_device_get_id ( MirInputDevice const *  device)

Retrieve the device id of the input device.

The device id is a unique integer value, only valid while the device is attached. The device id matches the device id attached every input event.

Parameters
[in]deviceThe input device
Returns
The device id of the input device

◆ mir_input_device_get_keyboard_config()

MirKeyboardConfig const* mir_input_device_get_keyboard_config ( MirInputDevice const *  device)

Retrieve a structure containing the keyboard related config options of the input device.

If the input device does not contain keys, there will be no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The keyboard config

◆ mir_input_device_get_mutable_keyboard_config()

MirKeyboardConfig* mir_input_device_get_mutable_keyboard_config ( MirInputDevice device)

Retrieve a mutable structure containing the keyboard related config options of the input device.

If the input device does not contain keys, there will be no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The keyboard config

◆ mir_input_device_get_mutable_pointer_config()

MirPointerConfig* mir_input_device_get_mutable_pointer_config ( MirInputDevice device)

Retrieve a structure containing the pointer related config options of the input device that can be manipulated.

If the input device does not control the mouse cursor, there will be no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The pointer config

◆ mir_input_device_get_mutable_touchpad_config()

MirTouchpadConfig* mir_input_device_get_mutable_touchpad_config ( MirInputDevice device)

Retrieve a structure containing the touchpad related config options of the input device that can be manipulated.

If the input device is not a touchpad this function will return null pointer.

Parameters
[in]deviceThe input device
Returns
A mutable touchpad config

◆ mir_input_device_get_mutable_touchscreen_config()

MirTouchscreenConfig* mir_input_device_get_mutable_touchscreen_config ( MirInputDevice device)

Retrieve a mutable structure containing the touchscreen related options of the input device to change the device configuration.

If the input device does not contain a touchscreen, there are no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The touchscreen config

◆ mir_input_device_get_name()

char const* mir_input_device_get_name ( MirInputDevice const *  device)

Retrieve the name of the input device.

The string pointed to will be valid as long as MirInputDevice is valid. The name may be empty but never NULL.

Parameters
[in]deviceThe input device
Returns
The name of the input device

◆ mir_input_device_get_pointer_config()

MirPointerConfig const* mir_input_device_get_pointer_config ( MirInputDevice const *  device)

Retrieve a structure containing the pointer related config options of the input device.

If the input device does not control the mouse cursor, there will be no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The pointer config

◆ mir_input_device_get_touchpad_config()

MirTouchpadConfig const* mir_input_device_get_touchpad_config ( MirInputDevice const *  device)

Retrieve a structure containing the touchpad related config options of the input device.

If the input device is not a touchpad this function will return null pointer.

Parameters
[in]deviceThe input device
Returns
The touchpad config

◆ mir_input_device_get_touchscreen_config()

MirTouchscreenConfig const* mir_input_device_get_touchscreen_config ( MirInputDevice const *  device)

Retrieve a structure containing the touchscreen related config options of the input device.

If the input device does not contain a touchscreen, there are no config options, and the function will return a null pointer.

Parameters
[in]deviceThe input device
Returns
The touchscreen config

◆ mir_input_device_get_unique_id()

char const* mir_input_device_get_unique_id ( MirInputDevice const *  device)

Retrieve the unique id of the input device.

The string pointed to will be valid as long as device is valid. The value of the unique id of a given device should be valid across mir connections session and servers of the same version.

Parameters
[in]deviceThe input device
Returns
The unique id of the input device

◆ mir_input_device_state_event_device_count()

uint32_t mir_input_device_state_event_device_count ( MirInputDeviceStateEvent const *  ev)

Retrieve the number of attached input devices.

Parameters
[in]evThe input device state event
Returns
The time in nanoseconds since epoch

◆ mir_input_device_state_event_device_id()

MirInputDeviceId mir_input_device_state_event_device_id ( MirInputDeviceStateEvent const *  ev,
uint32_t  index 
)

Retrieve the device id.

Parameters
[in]evThe input device state event
[in]indexThe index of the input device
Returns
The device id

◆ mir_input_device_state_event_device_pointer_buttons()

MirPointerButtons mir_input_device_state_event_device_pointer_buttons ( MirInputDeviceStateEvent const *  ev,
uint32_t  index 
)

Retrieve the pointer button state of the device identified by the index.

Parameters
[in]evThe input device state event
[in]indexThe index of the input device
Returns
The pointer button state of the device

◆ mir_input_device_state_event_device_pressed_keys_count()

uint32_t mir_input_device_state_event_device_pressed_keys_count ( MirInputDeviceStateEvent const *  ev,
uint32_t  index 
)

Retrieve the size of scan code array of the device identified by the index.

Parameters
[in]evThe input device state event
[in]indexThe index of the input device
Returns
Size of the pressed keys array

◆ mir_input_device_state_event_device_pressed_keys_for_index()

uint32_t mir_input_device_state_event_device_pressed_keys_for_index ( MirInputDeviceStateEvent const *  ev,
uint32_t  index,
uint32_t  pressed_index 
)

◆ mir_input_device_state_event_modifiers()

MirInputEventModifiers mir_input_device_state_event_modifiers ( MirInputDeviceStateEvent const *  ev)

Retrieve the modifier keys pressed on all input devices.

Parameters
[in]evThe input device state event
Returns
The modifier mask

◆ mir_input_device_state_event_pointer_axis()

float mir_input_device_state_event_pointer_axis ( MirInputDeviceStateEvent const *  ev,
MirPointerAxis  axis 
)

Retrieve the pointer position.

Parameters
[in]evThe input device state event
[in]axisThe pointer axis: mir_pointer_axis_x or mir_pointer_axis_y
Returns
The pointer position

◆ mir_input_device_state_event_pointer_buttons()

MirPointerButtons mir_input_device_state_event_pointer_buttons ( MirInputDeviceStateEvent const *  ev)

MirInputDeviceStateEvent informs clients about the current state of the input devices.

This is necessary when the client did not receive the most recent input events. The event is sent when the server was resumed after a pause, or when the client just received the input focus.

The event contains a single pointer button state and the current cursor position and the pressed modifier keys. Additionally for key and pointer devices the pressed keys and buttons are supplied individually. Retrieve the button state.

Parameters
[in]evThe input device state event
Returns
The combined pointer button state

◆ mir_input_device_state_event_time()

int64_t mir_input_device_state_event_time ( MirInputDeviceStateEvent const *  ev)

Retrieve the time associated with a MirInputDeviceStateEvent.

Parameters
[in]evThe input device state event
Returns
The time in nanoseconds since epoch

◆ mir_input_event_get_cookie()

MirCookie const* mir_input_event_get_cookie ( MirInputEvent const *  ev)

Returns the cookie associated with an input event.

Precondition
The input event must have a MirCookie
Parameters
[in]evAn input event
Returns
The cookie associated with the given input event The cookie must be released by calling mir_cookie_release

◆ mir_input_event_get_device_id()

MirInputDeviceId mir_input_event_get_device_id ( MirInputEvent const *  event)

Retrieves the device id responsible for generating an input event.

Parameters
[in]eventThe input event
Returns
The id of the generating device

◆ mir_input_event_get_event()

MirEvent const* mir_input_event_get_event ( MirInputEvent const *  event)

Retrieve the MirEvent associated with a given input event.

Parameters
[in]eventThe input event
Returns
The MirEvent

◆ mir_input_event_get_event_time()

int64_t mir_input_event_get_event_time ( MirInputEvent const *  event)

Retrieve the time at which an input event occurred.

Parameters
[in]eventThe input event
Returns
A timestamp in nanoseconds-since-epoch

◆ mir_input_event_get_keyboard_event()

MirKeyboardEvent const* mir_input_event_get_keyboard_event ( MirInputEvent const *  event)

Retrieve the MirKeyboardEvent associated with a given input event.

Parameters
[in]eventThe input event
Returns
The MirKeyboardEvent or NULL if event type is not mir_input_event_type_key

◆ mir_input_event_get_pointer_event()

MirPointerEvent const* mir_input_event_get_pointer_event ( MirInputEvent const *  event)

Retrieve the MirPointerEvent associated with a given input event.

Parameters
[in]eventThe input event
Returns
The MirPointerEvent or NULL if event type is not mir_input_event_type_pointer

◆ mir_input_event_get_touch_event()

MirTouchEvent const* mir_input_event_get_touch_event ( MirInputEvent const *  event)

Retrieve the MirTouchEvent associated with a given input event.

Parameters
[in]eventThe input event
Returns
The MirTouchEvent or NULL if event type is not mir_input_event_type_touch

◆ mir_input_event_get_type()

MirInputEventType mir_input_event_get_type ( MirInputEvent const *  event)

Retrieve the type of an input event.

E.g. key, touch...

Parameters
[in]eventThe input event
Returns
The input event type

◆ mir_input_event_has_cookie()

bool mir_input_event_has_cookie ( MirInputEvent const *  ev)

Query if an input event contains a cookie.

Parameters
[in]evThe input event
Returns
True if the input event contains a cookie

◆ mir_keyboard_config_get_keymap_layout()

char const* mir_keyboard_config_get_keymap_layout ( MirKeyboardConfig const *  conf)

Retrieve the layout of the keymap as a null terminated string.

Parameters
[in]confThe keyboard config
Returns
The keymap layout

◆ mir_keyboard_config_get_keymap_model()

char const* mir_keyboard_config_get_keymap_model ( MirKeyboardConfig const *  conf)

Retrieve the keyboard model of the keymap as a null terminated string.

Parameters
[in]confThe keyboard config
Returns
The keyboard model used for the keymap

◆ mir_keyboard_config_get_keymap_options()

char const* mir_keyboard_config_get_keymap_options ( MirKeyboardConfig const *  conf)

Retrieve the options of the keymap as a null terminated string.

The keymap options are an optional parameter of the keymap selection, this then indicated as an empty string.

Parameters
[in]confThe keyboard config
Returns
The keyboard model

◆ mir_keyboard_config_get_keymap_variant()

char const* mir_keyboard_config_get_keymap_variant ( MirKeyboardConfig const *  conf)

Retrieve the layout of the keymap as a null terminated string.

Parameters
[in]confThe keyboard config
Returns
The keymap layout

◆ mir_keyboard_config_set_keymap_layout()

void mir_keyboard_config_set_keymap_layout ( MirKeyboardConfig conf,