Mir
event.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014-2020 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 2 or 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 
23 
24 #include <stddef.h>
25 #include <stdint.h>
26 #include "mir_toolkit/common.h"
28 
29 #ifdef __cplusplus
30 
34 extern "C" {
35 #endif
36 
37 typedef struct MirSurfaceEvent MirWindowEvent;
38 typedef struct MirResizeEvent MirResizeEvent;
41 typedef struct MirCloseSurfaceEvent MirCloseWindowEvent;
42 typedef struct MirInputEvent MirInputEvent;
43 typedef struct MirKeymapEvent MirKeymapEvent;
44 typedef struct MirSurfaceOutputEvent MirWindowOutputEvent;
46 typedef struct MirSurfacePlacementEvent MirWindowPlacementEvent;
47 
48 typedef struct MirCookie MirCookie;
49 
50 typedef struct MirEvent MirEvent;
51 
52 #ifdef __cplusplus
53 }
55 #endif
56 
65 
66 #ifdef __cplusplus
67 
71 extern "C" {
72 #endif
73 
83 
93 
103 
113 
123 
133 
143 
158 
169 
179 
180 /*
181  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
182  * _________________________
183  *< Don't use mir_event_ref >
184  * -------------------------
185  * \ ^__^
186  * \ (oo)\_______
187  * (__)\ )\/\
188  * ||----w |
189  * || ||
190  * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
191  * NOTICE: mir_event_ref and mir_event_unref are implemented in terms of copy
192  * until such time that direct MirEvent access is deprecated. This means you
193  * must use the return value as your new reference.
194  */
195 
203 MirEvent const* mir_event_ref(MirEvent const* event) __attribute__((warn_unused_result));
204 
210 void mir_event_unref(MirEvent const* event);
211 
212 #ifdef __cplusplus
213 }
215 #endif
216 
217 #endif /* MIR_TOOLKIT_EVENT_H_ */
MirWindowPlacementEvent
struct MirSurfacePlacementEvent MirWindowPlacementEvent
Definition: event.h:46
MirWindowOutputEvent
struct MirSurfaceOutputEvent MirWindowOutputEvent
Definition: event.h:44
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_get_type
MirEventType mir_event_get_type(MirEvent const *event)
Retrieves the type of a MirEvent.
window_event.h
MirEvent
struct MirEvent MirEvent
Definition: event.h:50
MirInputDeviceStateEvent
struct MirInputDeviceStateEvent MirInputDeviceStateEvent
Definition: event.h:45
orientation_event.h
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.
resize_event.h
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_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_placeme...
prompt_session_event.h
MirPromptSessionEvent
struct MirPromptSessionEvent MirPromptSessionEvent
Definition: event.h:39
MirResizeEvent
struct MirResizeEvent MirResizeEvent
Definition: event.h:38
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.
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.
deprecations.h
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...
input_device_state_event.h
keymap_event.h
MirInputEvent
struct MirInputEvent MirInputEvent
Definition: event.h:42
MirWindowEvent
struct MirSurfaceEvent MirWindowEvent
Definition: event.h:37
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.
common.h
MirKeymapEvent
struct MirKeymapEvent MirKeymapEvent
Definition: event.h:43
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.
enums.h
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.
window_output_event.h
MirCloseWindowEvent
struct MirCloseSurfaceEvent MirCloseWindowEvent
Definition: event.h:41
MirEventType
MirEventType
Definition: enums.h:34
MirOrientationEvent
struct MirOrientationEvent MirOrientationEvent
Definition: event.h:40
MirCookie
struct MirCookie MirCookie
Definition: event.h:48
mir_event_unref
void mir_event_unref(MirEvent const *event)
Release a reference to a MirEvent.
input_event.h

Copyright © 2012-2021 Canonical Ltd.
Generated on Thu Jun 24 19:55:23 UTC 2021
This documentation is licensed under the GPL version 2 or 3.