Mir
mir_buffer_stream.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 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  */
17 
18 #ifndef MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
19 #define MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
20 
24 
25 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
41 
52 
70 #pragma GCC diagnostic push
71 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
73  int width, int height,
74  MirPixelFormat format,
75  MirBufferUsage buffer_usage)
76 MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
77 #pragma GCC diagnostic pop
93  MirBufferStream * buffer_stream,
94  MirBufferStreamCallback callback,
95  void *context)
96 MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
97 
105 MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
106 
115  MirNativeBuffer **buffer_package)
116 MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead");
117 
132  MirBufferStream *buffer_stream,
133  MirBufferStreamCallback callback,
134  void *context)
135 MIR_FOR_REMOVAL_IN_VERSION_1("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero."
136  " And a client API for manual vsync will soon be available.");
137 
144 
156  MirBufferStream *buffer_stream,
157  MirGraphicsRegion *graphics_region);
158 
166 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type");
167 
176 MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
177 
188 
197 
217 
229 void mir_buffer_stream_set_size(MirBufferStream* stream, int width, int height);
230 
238 void mir_buffer_stream_get_size(MirBufferStream* stream, int* width, int* height);
239 
240 #ifdef __cplusplus
241 }
243 #endif
244 
245 #endif // MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
#define MIR_FOR_REMOVAL_IN_VERSION_1(message)
Definition: deprecations.h:25
bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream)
Test for a valid buffer stream.
MirBufferStream * mir_connection_create_buffer_stream_sync(MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead")
Create a new buffer stream unattached to a surface and wait for the result.
unsigned long mir_buffer_stream_get_microseconds_till_vblank(MirBufferStream const *stream)
Query the approximate time interval in microseconds until the next vblank for a given buffer stream (...
MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream) MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type")
Retrieve a window type which may be used by EGL.
void * MirEGLNativeWindowType
Definition: client_types.h:39
int mir_buffer_stream_get_swapinterval(MirBufferStream *stream)
Query the swapinterval that the stream is operating with.
void mir_buffer_stream_swap_buffers_sync(MirBufferStream *buffer_stream)
Advance a buffer stream's buffer as in mir_buffer stream_swap_buffers(), but also wait for the operat...
char const * mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream)
Retrieve a text description of the error.
void mir_buffer_stream_set_size(MirBufferStream *stream, int width, int height)
Set the physical size of the buffers provided by the buffer stream.
void(* MirBufferStreamCallback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:104
bool mir_buffer_stream_get_graphics_region(MirBufferStream *buffer_stream, MirGraphicsRegion *graphics_region)
Retrieve a buffer stream's graphics region.
struct MirWaitHandle MirWaitHandle
Returned by asynchronous functions.
Definition: client_types.h:76
MirWaitHandle * mir_buffer_stream_set_scale(MirBufferStream *buffer_stream, float scale) MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface")
Set the scale associated with all buffers in the stream.
MirWaitHandle * mir_buffer_stream_swap_buffers(MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero." " And a client API for manual vsync will soon be available.")
Advance a buffer stream's buffer.
MirWaitHandle * mir_buffer_stream_set_swapinterval(MirBufferStream *stream, int interval)
Set the swapinterval for the stream.
MirWaitHandle * mir_buffer_stream_release(MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.")
Release the supplied stream and any associated buffer.
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:179
void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream, MirNativeBuffer **buffer_package) MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead")
Retrieve the current buffer in "raw" representation.
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:171
struct MirBufferStream MirBufferStream
Definition: client_types.h:47
struct MirConnection MirConnection
Definition: client_types.h:41
void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream) MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.")
Release the specified buffer stream like in mir,_buffer_stream_release(), but also wait for the opera...
void mir_buffer_stream_get_size(MirBufferStream *stream, int *width, int *height)
Get the physical size of the next buffer that will be provided by the stream.
Definition: mir_native_buffer.h:32
Retrieved information about a MirWindow.
Definition: client_types.h:241

Copyright © 2012-2021 Canonical Ltd.
Generated on Fri Feb 26 05:03:10 UTC 2021
This documentation is licensed under the GPL version 2 or 3.