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
30extern "C" {
31#endif
32
41
52
75#pragma GCC diagnostic push
76#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
78 int width, int height,
82 void* context)
83MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
84#pragma GCC diagnostic pop
85
103#pragma GCC diagnostic push
104#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
106 int width, int height,
109MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
110#pragma GCC diagnostic pop
126 MirBufferStream * buffer_stream,
128 void *context)
129MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
130
138MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
139
159MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n"
160 "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()");
161
170 MirNativeBuffer **buffer_package)
171MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead");
172
187 MirBufferStream *buffer_stream,
189 void *context)
190MIR_FOR_REMOVAL_IN_VERSION_1("For non-blocking swaps use mir_buffer_stream_swap_buffers_sync with an interval of zero."
191 " And a client API for manual vsync will soon be available.");
192
199
211 MirBufferStream *buffer_stream,
212 MirGraphicsRegion *graphics_region);
213
221MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type");
222
231MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
232
239void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale)
240MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
241
252
261
281
294
303
304#ifdef __cplusplus
305}
307#endif
308
309#endif // MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
int width
Definition: client_types.h:1
MirBufferUsage buffer_usage
Definition: client_types.h:6
int height
Definition: client_types.h:2
#define MIR_FOR_REMOVAL_IN_VERSION_1(message)
Definition: deprecations.h:30
bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream)
Test for a valid buffer stream.
MirWaitHandle * mir_buffer_stream_set_swapinterval(MirBufferStream *stream, int interval)
Set the swapinterval for the stream.
void mir_buffer_stream_set_scale_sync(MirBufferStream *buffer_stream, float scale) MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface")
Set the scale as in mir_buffer_stream_set_scale(), but also wait for the operation to complete.
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...
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350
MirWaitHandle * mir_connection_create_buffer_stream(MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage, MirBufferStreamCallback callback, void *context) MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead")
Create a new buffer stream.
void mir_buffer_stream_set_size(MirBufferStream *stream, int width, int height)
Set the physical size of the buffers provided by the buffer stream.
char const * mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream)
Retrieve a text description of the error.
void(* MirBufferStreamCallback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:109
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:79
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:245
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.
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.
MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream) MIR_FOR_REMOVAL_IN_VERSION_1("To identify the graphics platform use mir_connection_get_graphics_module(). \n" "To safely interpret the buffer contents use mir_buffer_stream_get_graphics_region()")
Get the underlying platform type so the buffer obtained in "raw" representation in mir_buffer_stream_...
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:186
struct MirBufferStream MirBufferStream
Definition: client_types.h:49
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.
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.
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...
MirPlatformType
The native buffer type for the system the client is connected on.
Definition: client_types.h:231
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.
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:282

Copyright © 2012-2022 Canonical Ltd.
Generated on Wed Dec 28 21:01:08 UTC 2022
This documentation is licensed under the GPL version 2 or 3.