Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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. */
45  /* Must be last */
48 
49 typedef enum MirSurfaceType
50 {
60 
61 typedef enum MirSurfaceState
62 {
68  /* mir_surface_state_semimaximized,
69  Omitted for now, since it's functionally a subset of vertmaximized and
70  differs only in the X coordinate. */
74 
75 /* TODO: MirSurfaceFocusState MirSurfaceVisibility and MirLifecycleState use an inconsistent
76  naming convention. */
78 {
82 
84 {
88 
89 typedef enum MirLifecycleState
90 {
95 
96 typedef enum MirPowerMode
97 {
98  mir_power_mode_on, /* Display in use. */
99  mir_power_mode_standby, /* Blanked, low power. */
100  mir_power_mode_suspend, /* Blanked, lowest power. */
101  mir_power_mode_off /* Powered down. */
102 } MirPowerMode;
103 
105 {
109 
119 typedef enum MirPixelFormat
120 {
129 
130 /* This could be improved... https://bugs.launchpad.net/mir/+bug/1236254 */
131 #define MIR_BYTES_PER_PIXEL(f) (((f) == mir_pixel_format_bgr_888) ? 3 : 4)
132 
134 typedef enum MirOrientation
135 {
141 
144 #endif
Definition: common.h:57
Definition: common.h:40
Definition: common.h:55
Definition: common.h:85
Definition: common.h:66
Definition: common.h:46
Definition: common.h:44
MirPromptSessionState
Definition: common.h:104
Definition: common.h:42
Definition: common.h:93
Definition: common.h:53
Definition: common.h:39
Definition: common.h:92
Definition: common.h:71
Definition: common.h:91
Definition: common.h:86
Definition: common.h:101
Definition: common.h:106
Definition: common.h:79
Definition: common.h:121
Definition: common.h:136
Definition: common.h:125
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:134
Definition: common.h:123
Definition: common.h:138
Definition: common.h:67
Definition: common.h:107
Definition: common.h:139
Definition: common.h:100
MirSurfaceState
Definition: common.h:61
Definition: common.h:137
Definition: common.h:126
Definition: common.h:127
Definition: common.h:52
MirPowerMode
Definition: common.h:96
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:58
MirSurfaceType
Definition: common.h:49
Definition: common.h:54
Definition: common.h:124
Definition: common.h:99
MirPixelFormat
The order of components in a format enum matches the order of the components as they would be written...
Definition: common.h:119
Definition: common.h:72
MirLifecycleState
Definition: common.h:89
Definition: common.h:63
MirSurfaceFocusState
Definition: common.h:77
MirSurfaceVisibility
Definition: common.h:83
Definition: common.h:56
Definition: common.h:122
Definition: common.h:64
Definition: common.h:41
Definition: common.h:98
Definition: common.h:80
Definition: common.h:43
Definition: common.h:51
Definition: common.h:65

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014