Mir
include
client
mir_toolkit
events
event.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014-2016 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Robert Carr <robert.carr@canonical.com>
17
*/
18
19
#ifndef MIR_TOOLKIT_EVENT_H_
20
#define MIR_TOOLKIT_EVENT_H_
21
22
#include <stddef.h>
23
#include <stdint.h>
24
#include "
mir_toolkit/common.h
"
25
26
#ifdef __cplusplus
27
31
extern
"C"
{
32
#endif
33
34
typedef
enum
35
{
36
mir_event_type_key
,
37
mir_event_type_motion
,
38
mir_event_type_surface
,
39
mir_event_type_resize
,
40
mir_event_type_prompt_session_state_change
,
41
mir_event_type_orientation
,
42
mir_event_type_close_surface
,
43
/* Type for new style input event will be returned from mir_event_get_type
44
when old style event type was mir_event_type_key or mir_event_type_motion */
45
mir_event_type_input
,
46
mir_event_type_keymap
,
47
mir_event_type_input_configuration
,
48
mir_event_type_surface_output
,
49
mir_event_type_input_device_state
,
50
mir_event_type_surface_placement
,
51
}
MirEventType
;
52
53
typedef
struct
MirSurfaceEvent
MirSurfaceEvent
;
54
typedef
struct
MirResizeEvent
MirResizeEvent
;
55
typedef
struct
MirPromptSessionEvent
MirPromptSessionEvent
;
56
typedef
struct
MirOrientationEvent
MirOrientationEvent
;
57
typedef
struct
MirCloseSurfaceEvent
MirCloseSurfaceEvent
;
58
typedef
struct
MirInputEvent
MirInputEvent
;
59
typedef
struct
MirKeymapEvent
MirKeymapEvent
;
60
typedef
struct
MirInputConfigurationEvent
MirInputConfigurationEvent
;
61
typedef
struct
MirSurfaceOutputEvent
MirSurfaceOutputEvent
;
62
typedef
struct
MirInputDeviceStateEvent
MirInputDeviceStateEvent
;
63
typedef
struct
MirSurfacePlacementEvent
MirSurfacePlacementEvent
;
64
65
typedef
struct
MirCookie
MirCookie
;
66
67
typedef
struct
MirEvent
MirEvent
;
68
69
#ifdef __cplusplus
70
}
72
#endif
73
74
#include "
mir_toolkit/events/input/input_event.h
"
75
#include "
mir_toolkit/events/resize_event.h
"
76
#include "
mir_toolkit/events/surface_event.h
"
77
#include "
mir_toolkit/events/orientation_event.h
"
78
#include "
mir_toolkit/events/prompt_session_event.h
"
79
#include "
mir_toolkit/events/keymap_event.h
"
80
#include "
mir_toolkit/events/input_configuration_event.h
"
81
#include "
mir_toolkit/events/surface_output_event.h
"
82
#include "
mir_toolkit/events/input_device_state_event.h
"
83
84
#ifdef __cplusplus
85
89
extern
"C"
{
90
#endif
91
100
MirEventType
mir_event_get_type
(
MirEvent
const
* event);
101
110
MirInputEvent
const
*
mir_event_get_input_event
(
MirEvent
const
* event);
111
120
MirSurfaceEvent
const
*
mir_event_get_surface_event
(
MirEvent
const
* event);
121
130
MirResizeEvent
const
*
mir_event_get_resize_event
(
MirEvent
const
* event);
131
140
MirPromptSessionEvent
const
*
mir_event_get_prompt_session_event
(
MirEvent
const
* event);
141
150
MirOrientationEvent
const
*
mir_event_get_orientation_event
(
MirEvent
const
* event);
151
165
__attribute__ ((deprecated))
168
MirCloseSurfaceEvent
const*
mir_event_get_close_surface_event
(
MirEvent
const* event);
169
178
MirKeymapEvent
const*
mir_event_get_keymap_event
(
MirEvent
const* event);
179
190
__attribute__((deprecated))
193
MirInputConfigurationEvent
const*
mir_event_get_input_configuration_event
(
MirEvent
const* event);
194
208
MirSurfaceOutputEvent
const*
mir_event_get_surface_output_event
(
MirEvent
const* event);
209
219
MirInputDeviceStateEvent
const*
mir_event_get_input_device_state_event
(
MirEvent
const* event);
220
229
MirSurfacePlacementEvent
const*
mir_event_get_surface_placement_event
(
MirEvent
const* event);
230
231
/*
232
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
233
* _________________________
234
*< Don't use mir_event_ref >
235
* -------------------------
236
* \ ^__^
237
* \ (oo)\_______
238
* (__)\ )\/\
239
* ||----w |
240
* || ||
241
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
242
* NOTICE: mir_event_ref and mir_event_unref are implemented in terms of copy
243
* until such time that direct MirEvent access is deprecated. This means you
244
* must use the return value as your new reference.
245
*/
246
254
MirEvent
const*
mir_event_ref
(
MirEvent
const* event) __attribute__((warn_unused_result));
255
261
void
mir_event_unref
(
MirEvent
const* event);
262
263
#ifdef __cplusplus
264
}
266
#endif
267
268
#endif
/* MIR_TOOLKIT_EVENT_H_ */
mir_event_type_resize
Definition:
event.h:39
mir_event_type_key
Definition:
event.h:36
mir_event_type_motion
Definition:
event.h:37
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.
mir_event_get_type
MirEventType mir_event_get_type(MirEvent const *event)
Retrieves the type of a MirEvent.
resize_event.h
MirInputDeviceStateEvent
struct MirInputDeviceStateEvent MirInputDeviceStateEvent
Definition:
event.h:62
mir_event_type_prompt_session_state_change
Definition:
event.h:40
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_...
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.
mir_event_type_orientation
Definition:
event.h:41
orientation_event.h
input_configuration_event.h
MirSurfacePlacementEvent
struct MirSurfacePlacementEvent MirSurfacePlacementEvent
Definition:
event.h:63
mir_event_type_input_device_state
Definition:
event.h:49
MirInputConfigurationEvent
struct MirInputConfigurationEvent MirInputConfigurationEvent
Definition:
event.h:60
mir_event_get_input_configuration_event
MirInputConfigurationEvent const * mir_event_get_input_configuration_event(MirEvent const *event)
Retrieve the MirInputConfiguration associated with a MirEvent of type mir_event_type_input_configurat...
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_s...
mir_event_type_input_configuration
Definition:
event.h:47
MirSurfaceOutputEvent
struct MirSurfaceOutputEvent MirSurfaceOutputEvent
Definition:
event.h:61
mir_event_type_surface_placement
Definition:
event.h:50
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.
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.
mir_event_type_input
Definition:
event.h:45
keymap_event.h
MirEventType
MirEventType
Definition:
event.h:34
MirOrientationEvent
struct MirOrientationEvent MirOrientationEvent
Definition:
event.h:56
MirEvent
struct MirEvent MirEvent
Definition:
event.h:67
MirCookie
struct MirCookie MirCookie
Definition:
event.h:65
MirResizeEvent
struct MirResizeEvent MirResizeEvent
Definition:
event.h:54
mir_event_unref
void mir_event_unref(MirEvent const *event)
Release a reference to a MirEvent.
mir_event_type_keymap
Definition:
event.h:46
input_event.h
MirCloseSurfaceEvent
struct MirCloseSurfaceEvent MirCloseSurfaceEvent
Definition:
event.h:57
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.
mir_event_ref
MirEvent const * mir_event_ref(MirEvent const *event) __attribute__((warn_unused_result))
Reference this MirEvent and return a pointer to the newly referenced instance.
MirKeymapEvent
struct MirKeymapEvent MirKeymapEvent
Definition:
event.h:59
surface_event.h
mir_event_type_surface
Definition:
event.h:38
prompt_session_event.h
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_place...
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.
MirPromptSessionEvent
struct MirPromptSessionEvent MirPromptSessionEvent
Definition:
event.h:55
MirInputEvent
struct MirInputEvent MirInputEvent
Definition:
event.h:58
mir_event_type_surface_output
Definition:
event.h:48
surface_output_event.h
common.h
MirSurfaceEvent
struct MirSurfaceEvent MirSurfaceEvent
Definition:
event.h:53
input_device_state_event.h
mir_event_type_close_surface
Definition:
event.h:42
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.
Copyright © 2012-2016 Canonical Ltd.
Generated on Sat Dec 3 12:48:59 UTC 2016