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 2 or 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)
119 
130  MirRenderSurface* render_surface)
132 
139  MirRenderSurface* render_surface)
141 
157  MirRenderSurface* render_surface,
158  int width, int height,
161 
172  MirRenderSurface* render_surface)
174 
182  MirConnection* connection, MirPresentMode mode);
183 
193  MirPresentationChain* chain, MirPresentMode mode);
194 
204  MirWindowSpec* spec,
205  MirRenderSurface* render_surface,
206  int hotspot_x, int hotspot_y)
208 
219 MirCursorConfiguration* mir_cursor_configuration_from_render_surface(
220  MirRenderSurface* surface,
221  int hotspot_x, int hotspot_y)
223 
224 
242  MirRenderSurface* render_surface,
243  int logical_width, int logical_height,
244  int displacement_x, int displacement_y)
246 
247 #pragma GCC diagnostic pop
248 
249 #ifdef __cplusplus
250 }
252 #endif
253 
254 #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:268
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.
bool mir_render_surface_is_valid(MirRenderSurface *render_surface) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Test for a valid render surface.
int height
Definition: client_types.h:179
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.
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:242
struct MirPresentationChain MirPresentationChain
Definition: client_types.h:55
struct MirSurfaceSpec MirWindowSpec
Definition: client_types.h:45
MirCursorConfiguration * mir_cursor_configuration_from_render_surface(MirRenderSurface *surface, int hotspot_x, int hotspot_y) MIR_DEPRECATE_RENDERSURFACES_FOR_RENAME
Returns a new cursor configuration tied to a given render surface.
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_DEPRECATE_RENDERSURFACES_FOR_RENAME
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.
int width
Definition: client_types.h:178
struct MirRenderSurface MirRenderSurface
Definition: client_types.h:57
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350

Copyright © 2012-2019 Canonical Ltd.
Generated on Thu Feb 28 09:03:56 UTC 2019
This documentation is licensed under the GPL version 2 or 3.