Mir
common.h
Go to the documentation of this file.
1 /*
2  * Simple definitions common to client and server.
3  *
4  * Copyright © 2013-2014 Canonical Ltd.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License version 3 as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Author: Daniel van Vugt <daniel.van.vugt@canonical.com>
19  */
20 
21 #ifndef MIR_COMMON_H_
22 #define MIR_COMMON_H_
23 
24 #include <mir_toolkit/cursors.h>
25 
30 /* This is C code. Not C++. */
31 
36 typedef enum MirSurfaceAttrib
37 {
38  /* Do not specify values...code relies on 0...N ordering. */
46  /* Must be last */
49 
50 typedef enum MirSurfaceType
51 {
65 
66 typedef enum MirSurfaceState
67 {
73  /* mir_surface_state_semimaximized,
74  Omitted for now, since it's functionally a subset of vertmaximized and
75  differs only in the X coordinate. */
81 
82 /* TODO: MirSurfaceFocusState MirSurfaceVisibility and MirLifecycleState use an inconsistent
83  naming convention. */
85 {
89 
91 {
95 
96 typedef enum MirLifecycleState
97 {
102 
103 typedef enum MirPowerMode
104 {
105  mir_power_mode_on, /* Display in use. */
106  mir_power_mode_standby, /* Blanked, low power. */
107  mir_power_mode_suspend, /* Blanked, lowest power. */
108  mir_power_mode_off /* Powered down. */
109 } MirPowerMode;
110 
112 {
117 
127 typedef enum MirPixelFormat
128 {
137 
138 /* This could be improved... https://bugs.launchpad.net/mir/+bug/1236254 */
139 #define MIR_BYTES_PER_PIXEL(f) (((f) == mir_pixel_format_bgr_888) ? 3 : 4)
140 
142 typedef enum MirOrientation
143 {
149 
150 typedef enum MirOrientationMode
151 {
163 
164 typedef enum MirEdgeAttachment
165 {
173 #endif
AKA "OSK" or handwriting etc.
Definition: common.h:60
Definition: common.h:40
Definition: common.h:57
Definition: common.h:92
Definition: common.h:71
Definition: common.h:47
Definition: common.h:44
MirPromptSessionState
Definition: common.h:111
Definition: common.h:115
Definition: common.h:42
Definition: common.h:100
Definition: common.h:54
Definition: common.h:39
Definition: common.h:99
Definition: common.h:76
Definition: common.h:98
Definition: common.h:93
Definition: common.h:108
Definition: common.h:113
Definition: common.h:86
Definition: common.h:129
Definition: common.h:166
Definition: common.h:144
Definition: common.h:133
Definition: common.h:153
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:142
Definition: common.h:156
Definition: common.h:131
Definition: common.h:146
Definition: common.h:59
Definition: common.h:72
Definition: common.h:77
Definition: common.h:152
Definition: common.h:114
Definition: common.h:147
Definition: common.h:107
MirSurfaceState
Definition: common.h:66
Definition: common.h:145
AKA "tooltip".
Definition: common.h:62
Definition: common.h:134
Definition: common.h:56
Definition: common.h:135
AKA "floating".
Definition: common.h:53
MirPowerMode
Definition: common.h:103
MirSurfaceAttrib
Attributes of a surface that the client and server/shell may wish to get or set over the wire...
Definition: common.h:36
Definition: common.h:63
MirSurfaceType
Definition: common.h:50
Definition: common.h:55
Definition: common.h:132
Definition: common.h:106
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:127
Definition: common.h:79
MirLifecycleState
Definition: common.h:96
Definition: common.h:68
MirSurfaceFocusState
Definition: common.h:84
MirSurfaceVisibility
Definition: common.h:90
Definition: common.h:58
Definition: common.h:130
Definition: common.h:158
Definition: common.h:69
Definition: common.h:167
Definition: common.h:78
Definition: common.h:41
Definition: common.h:160
MirOrientationMode
Definition: common.h:150
Definition: common.h:105
Definition: common.h:87
Definition: common.h:43
AKA "regular".
Definition: common.h:52
AKA "toolbox"/"toolbar".
Definition: common.h:61
Definition: common.h:168
MirEdgeAttachment
Definition: common.h:164
Definition: common.h:70

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015