Mir
surface_creation_parameters.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013-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 MIR_SCENE_SURFACE_CREATION_PARAMETERS_H_
20 #define MIR_SCENE_SURFACE_CREATION_PARAMETERS_H_
21 
22 #include "mir_toolkit/common.h"
23 #include "mir/geometry/point.h"
24 #include "mir/geometry/size.h"
29 #include "mir/optional_value.h"
31 
32 #include <memory>
33 #include <string>
34 
35 namespace mir
36 {
37 namespace scene
38 {
39 class Surface;
40 
42 {
44 
46 
48 
50 
52 
54 
56 
58 
60 
62 
64 
66 
68 
70 
72 
74 
82 
95 
96  std::weak_ptr<Surface> parent;
97 
106 
111 };
112 
115 
117 }
118 }
119 
120 #endif /* MIR_SCENE_SURFACE_CREATION_PARAMETERS_H_ */
Definition: size.h:30
mir::optional_value< geometry::DeltaY > height_inc
Definition: surface_creation_parameters.h:103
Definition: as_render_target.h:27
SurfaceCreationParameters & with_input_mode(input::InputReceptionMode const &new_mode)
optional_value< int > aux_rect_placement_offset_y
Definition: surface_creation_parameters.h:94
SurfaceCreationParameters & of_position(geometry::Point const &top_left)
input::InputReceptionMode input_mode
Definition: surface_creation_parameters.h:80
mir::optional_value< MirOrientationMode > preferred_orientation
Definition: surface_creation_parameters.h:85
optional_value< MirPlacementGravity > aux_rect_placement_gravity
Definition: surface_creation_parameters.h:92
geometry::Size size
Definition: surface_creation_parameters.h:76
SurfaceCreationParameters & with_buffer_stream(frontend::BufferStreamId const &id)
std::string name
Definition: surface_creation_parameters.h:75
mir::optional_value< MirShellChrome > shell_chrome
Definition: surface_creation_parameters.h:108
mir::optional_value< MirEdgeAttachment > edge_attachment
Definition: surface_creation_parameters.h:89
Definition: point.h:30
mir::optional_value< std::vector< shell::StreamSpecification > > streams
Definition: surface_creation_parameters.h:109
SurfaceCreationParameters & with_aux_rect(geometry::Rectangle const &rect)
MirPixelFormat pixel_format
Definition: surface_creation_parameters.h:79
SurfaceCreationParameters & of_buffer_usage(graphics::BufferUsage new_buffer_usage)
SurfaceCreationParameters & with_edge_attachment(MirEdgeAttachment edge)
mir::optional_value< shell::SurfaceAspectRatio > max_aspect
Definition: surface_creation_parameters.h:105
bool operator==(const SurfaceCreationParameters &lhs, const SurfaceCreationParameters &rhs)
SurfaceCreationParameters & of_pixel_format(MirPixelFormat new_pixel_format)
mir::optional_value< geometry::Rectangle > aux_rect
Definition: surface_creation_parameters.h:88
SurfaceCreationParameters & of_name(std::string const &new_name)
geometry::Point top_left
Definition: surface_creation_parameters.h:77
mir::optional_value< MirPointerConfinementState > confine_pointer
Definition: surface_creation_parameters.h:110
optional_value< geometry::Height > min_height
Definition: surface_creation_parameters.h:99
unsigned int height
Definition: mir_image.h:27
SurfaceCreationParameters & with_parent_id(frontend::SurfaceId const &id)
optional_value< MirPlacementGravity > surface_placement_gravity
Definition: surface_creation_parameters.h:91
mir::optional_value< frontend::BufferStreamId > content_id
Definition: surface_creation_parameters.h:87
unsigned int width
Definition: mir_image.h:26
BufferUsage
How a buffer is going to be used.
Definition: buffer_properties.h:36
graphics::BufferUsage buffer_usage
Definition: surface_creation_parameters.h:78
MirWindowType
Definition: common.h:109
optional_value< geometry::Height > max_height
Definition: surface_creation_parameters.h:101
mir::optional_value< std::vector< geometry::Rectangle > > input_shape
Definition: surface_creation_parameters.h:107
graphics::DisplayConfigurationOutputId output_id
Definition: surface_creation_parameters.h:81
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:241
optional_value< MirPlacementHints > placement_hints
Definition: surface_creation_parameters.h:90
SurfaceCreationParameters a_surface()
bool operator!=(const SurfaceCreationParameters &lhs, const SurfaceCreationParameters &rhs)
SurfaceCreationParameters & of_size(geometry::Size new_size)
optional_value< int > aux_rect_placement_offset_x
Definition: surface_creation_parameters.h:93
SurfaceCreationParameters & with_preferred_orientation(MirOrientationMode mode)
SurfaceCreationParameters & with_state(MirWindowState state)
mir::optional_value< frontend::SurfaceId > parent_id
Definition: surface_creation_parameters.h:86
Definition: surface_creation_parameters.h:41
Definition: rectangle.h:33
std::weak_ptr< Surface > parent
Definition: surface_creation_parameters.h:96
mir::optional_value< geometry::DeltaX > width_inc
Definition: surface_creation_parameters.h:102
mir::optional_value< MirWindowState > state
Definition: surface_creation_parameters.h:83
optional_value< geometry::Width > min_width
Definition: surface_creation_parameters.h:98
MirOrientationMode
Definition: common.h:287
MirWindowState
Definition: common.h:139
InputReceptionMode
Definition: input_reception_mode.h:27
optional_value< geometry::Width > max_width
Definition: surface_creation_parameters.h:100
SurfaceCreationParameters & of_type(MirWindowType type)
SurfaceCreationParameters & with_output_id(graphics::DisplayConfigurationOutputId const &output_id)
mir::optional_value< MirWindowType > type
Definition: surface_creation_parameters.h:84
MirEdgeAttachment
Definition: common.h:301
mir::optional_value< shell::SurfaceAspectRatio > min_aspect
Definition: surface_creation_parameters.h:104

Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019