MirAL
mir_forward_compatibility.h
Go to the documentation of this file.
1 /*
2  * Copyright © 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 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 General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIRAL_MIR_FORWARD_COMPATIBILITY_H
20 #define MIRAL_MIR_FORWARD_COMPATIBILITY_H
21 
22 #include <mir_toolkit/version.h>
24 
25 // Types that don't exist in earlier versions of Mir's toolkit
26 #if MIR_CLIENT_VERSION < MIR_VERSION_NUMBER(3, 4, 0)
27 
28 // Inspired by GdkGravity
33 typedef enum MirPlacementGravity
34 {
36  mir_placement_gravity_center = 0,
37 
39  mir_placement_gravity_west = 1 << 0,
40 
42  mir_placement_gravity_east = 1 << 1,
43 
45  mir_placement_gravity_north = 1 << 2,
46 
48  mir_placement_gravity_south = 1 << 3,
49 
51  mir_placement_gravity_northwest = mir_placement_gravity_north | mir_placement_gravity_west,
52 
54  mir_placement_gravity_northeast = mir_placement_gravity_north | mir_placement_gravity_east,
55 
57  mir_placement_gravity_southwest = mir_placement_gravity_south | mir_placement_gravity_west,
58 
60  mir_placement_gravity_southeast = mir_placement_gravity_south | mir_placement_gravity_east
61 } MirPlacementGravity;
62 
63 // Inspired by GdkAnchorHints
88 typedef enum MirPlacementHints
89 {
91  mir_placement_hints_flip_x = 1 << 0,
92 
94  mir_placement_hints_flip_y = 1 << 1,
95 
97  mir_placement_hints_slide_x = 1 << 2,
98 
100  mir_placement_hints_slide_y = 1 << 3,
101 
103  mir_placement_hints_resize_x = 1 << 4,
104 
106  mir_placement_hints_resize_y = 1 << 5,
107 
109  mir_placement_hints_antipodes= 1 << 6,
110 
112  mir_placement_hints_flip_any = mir_placement_hints_flip_x|mir_placement_hints_flip_y,
113 
115  mir_placement_hints_slide_any = mir_placement_hints_slide_x|mir_placement_hints_slide_y,
116 
118  mir_placement_hints_resize_any = mir_placement_hints_resize_x|mir_placement_hints_resize_y,
119 } MirPlacementHints;
120 #endif
121 
122 #if !MIRAL_MIR_DEFINES_POINTER_CONFINEMENT
124 {
128 #endif
129 
130 #endif //MIRAL_MIR_FORWARD_COMPATIBILITY_H
Definition: mir_forward_compatibility.h:126
MirPointerConfinementState
Definition: mir_forward_compatibility.h:123
Definition: mir_forward_compatibility.h:125

Copyright © 2016 Canonical Ltd.
Generated on Wed Nov 30 08:45:30 UTC 2016