Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
server
mir
shell
surface_creation_parameters.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2013 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_SHELL_SURFACE_CREATION_PARAMETERS_H_
20
#define MIR_SHELL_SURFACE_CREATION_PARAMETERS_H_
21
22
#include "
mir/geometry/pixel_format.h
"
23
#include "
mir/geometry/point.h
"
24
#include "
mir/geometry/size.h
"
25
#include "
mir/graphics/buffer_properties.h
"
26
#include "
mir/graphics/display_configuration.h
"
27
#include "
mir/surfaces/depth_id.h
"
28
#include "
mir/input/input_reception_mode.h
"
29
30
#include <memory>
31
#include <string>
32
33
namespace
mir
34
{
35
namespace
shell
36
{
37
38
struct
SurfaceCreationParameters
39
{
40
SurfaceCreationParameters
();
41
42
SurfaceCreationParameters
&
of_name
(std::string
const
& new_name);
43
44
SurfaceCreationParameters
&
of_size
(
geometry::Size
new_size);
45
46
SurfaceCreationParameters
&
of_size
(
geometry::Width::ValueType
width
,
geometry::Height::ValueType
height
);
47
48
SurfaceCreationParameters
&
of_position
(
geometry::Point
const
&
top_left
);
49
50
SurfaceCreationParameters
&
of_buffer_usage
(
graphics::BufferUsage
new_buffer_usage);
51
52
SurfaceCreationParameters
&
of_pixel_format
(
geometry::PixelFormat
new_pixel_format);
53
54
SurfaceCreationParameters
&
of_depth
(
surfaces::DepthId
const
& new_depth);
55
56
SurfaceCreationParameters
&
with_input_mode
(
input::InputReceptionMode
const
& new_mode);
57
58
SurfaceCreationParameters
&
with_output_id
(
graphics::DisplayConfigurationOutputId
const
&
output_id
);
59
60
std::string
name
;
61
geometry::Size
size
;
62
geometry::Point
top_left
;
63
graphics::BufferUsage
buffer_usage
;
64
geometry::PixelFormat
pixel_format
;
65
surfaces::DepthId
depth
;
66
input::InputReceptionMode
input_mode
;
67
graphics::DisplayConfigurationOutputId
output_id
;
68
};
69
70
bool
operator==
(
const
SurfaceCreationParameters
& lhs,
const
SurfaceCreationParameters
& rhs);
71
bool
operator!=
(
const
SurfaceCreationParameters
& lhs,
const
SurfaceCreationParameters
& rhs);
72
73
SurfaceCreationParameters
a_surface
();
74
}
75
}
76
77
#endif
/* MIR_SHELL_SURFACE_CREATION_PARAMETERS_H_ */
Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Oct 15 00:23:28 UTC 2013