Mir
mir_render_surface.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 Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by:
17  * Cemil Azizoglu <cemil.azizoglu@canonical.com>
18  */
19 
20 #ifndef MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
21 #define MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
22 
25 
26 #ifndef MIR_DEPRECATE_RENDERSURFACES
27  #define MIR_DEPRECATE_RENDERSURFACES 0
28 #endif
29 
30 #if MIR_ENABLE_DEPRECATIONS > 0 && MIR_DEPRECATE_RENDERSURFACES > 0
31  #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME\
32  __attribute__((deprecated("This function is slated for rename due to MirRenderSurface-->MirSurface transition")))
33 #else
34  #define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
35 #endif
36 
37 #ifdef __cplusplus
38 
42 extern "C" {
43 #endif
44 
45 typedef void (*MirRenderSurfaceCallback)(MirRenderSurface*, void* context)
47 
48 #pragma GCC diagnostic push
49 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
50 
63  MirConnection* connection,
64  int width, int height,
65  MirRenderSurfaceCallback callback,
66  void* context)
68 
80  MirConnection* connection,
81  int width, int height)
83 
92  MirRenderSurface* render_surface,
93  int* width, int* height)
95 
104  MirRenderSurface* render_surface,
105  int width, int height)
107 
117  MirRenderSurface* render_surface)
129  MirRenderSurface* render_surface)
131 
138  MirRenderSurface* render_surface)
140 
156  MirRenderSurface* render_surface,
157  int width, int height,
158  MirPixelFormat format)
160 
171  MirRenderSurface* render_surface)
173 
181  MirConnection* connection, MirPresentMode mode);
182 
192  MirPresentationChain* chain, MirPresentMode mode);
193 
203  MirWindowSpec* spec,
204  MirRenderSurface* render_surface,
205  int hotspot_x, int hotspot_y)
207 
225  MirRenderSurface* render_surface,
226  int logical_width, int logical_height,
227  int displacement_x, int displacement_y)
229 
230 #pragma GCC diagnostic pop
231 
232 #ifdef __cplusplus
233 }
235 #endif
236 
237 #endif // MIR_TOOLKIT_MIR_RENDER_SURFACE_H_
void mir_render_surface_get_size(MirRenderSurface *render_surface, int *width, int *height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Get the size of the MirRenderSurface.
struct MirBufferStream MirBufferStream
Definition: client_types.h:49
MirPresentMode
Definition: client_types.h:257
void mir_render_surface_set_size(MirRenderSurface *render_surface, int width, int height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Set the size of the MirRenderSurface.
MirPresentationChain * mir_render_surface_get_presentation_chain(MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Obtain the presentation chain backing a given render surface.
void mir_render_surface_release(MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Release the specified render surface.
MirBufferStream * mir_render_surface_get_buffer_stream(MirRenderSurface *render_surface, int width, int height, MirPixelFormat format) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Obtain the buffer stream backing a given render surface.
unsigned int height
Definition: mir_image.h:27
bool mir_render_surface_is_valid(MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Test for a valid render surface.
void(* MirRenderSurfaceCallback)(MirRenderSurface *, void *context) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Definition: mir_render_surface.h:45
void mir_presentation_chain_set_mode(MirPresentationChain *chain, MirPresentMode mode)
Respecify the submission mode that the MirPresentationChain is operating with.
unsigned int width
Definition: mir_image.h:26
char const * mir_render_surface_get_error_message(MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Retrieve a text description of the error.
#define MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Definition: mir_render_surface.h:34
struct MirConnection MirConnection
Definition: client_types.h:41
MirRenderSurface * mir_connection_create_render_surface_sync(MirConnection *connection, int width, int height) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Create a render surface and wait for the result.
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:241
struct MirPresentationChain MirPresentationChain
Definition: client_types.h:55
struct MirSurfaceSpec MirWindowSpec
Definition: client_types.h:45
void mir_window_spec_set_cursor_render_surface(MirWindowSpec *spec, MirRenderSurface *render_surface, int hotspot_x, int hotspot_y) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Set the MirWindowSpec to contain a specific cursor.
void mir_connection_create_render_surface(MirConnection *connection, int width, int height, MirRenderSurfaceCallback callback, void *context) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Create a render surface.
void mir_window_spec_add_render_surface(MirWindowSpec *spec, MirRenderSurface *render_surface, int logical_width, int logical_height, int displacement_x, int displacement_y) MIR_FOR_REMOVAL_IN_VERSION_1("This function is slated for rename due to MirRenderSurface- -> MirSurface transition")
Set the MirWindowSpec to display content contained in a render surface.
bool mir_connection_present_mode_supported(MirConnection *connection, MirPresentMode mode)
Query whether the server supports a given presentation mode.
struct MirRenderSurface MirRenderSurface
Definition: client_types.h:57

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:05:03 UTC 2017