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
26 
30 extern "C" {
31 #endif
32 
40 bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream);
41 
51 char const *mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream);
52 
75 #pragma GCC diagnostic push
76 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
78  int width, int height,
81  MirBufferStreamCallback callback,
82  void* context)
83 MIR_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,
109 MIR_FOR_REMOVAL_IN_VERSION_1("Use mir_render_surface_get_buffer_stream instead");
110 #pragma GCC diagnostic pop
111 
126  MirBufferStream * buffer_stream,
127  MirBufferStreamCallback callback,
128  void *context)
129 MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
130 
138 MIR_FOR_REMOVAL_IN_VERSION_1("A stream obtained through mir_render_surface_get_buffer_stream() does not need to be released.");
139 
159 MIR_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)
171 MIR_FOR_REMOVAL_IN_VERSION_1("Use platform specific buffer extensions instead");
172 
187  MirBufferStream *buffer_stream,
188  MirBufferStreamCallback callback,
189  void *context)
190 MIR_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 
221 MIR_FOR_REMOVAL_IN_VERSION_1("Use MirRenderSurface *as the window type");
222 
230 MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale)
231 MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
232 
239 void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale)
240 MIR_FOR_REMOVAL_IN_VERSION_1("Functionality replaced by the introduction of MirRenderSurface");
241 
252 
261 
281 
294 
302 void mir_buffer_stream_get_size(MirBufferStream* stream, int* width, int* height);
303 
304 #ifdef __cplusplus
305 }
307 #endif
308 
309 #endif // MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
mir_buffer_stream_set_scale_sync
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.
format
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350
mir_buffer_stream_swap_buffers_sync
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...
mir_buffer_stream_get_egl_native_window
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.
mir_buffer_stream_get_size
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.
MirBufferStreamCallback
void(* MirBufferStreamCallback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:109
mir_buffer_stream_set_scale
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.
mir_buffer_stream_swap_buffers
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.
mir_buffer_stream_set_swapinterval
MirWaitHandle * mir_buffer_stream_set_swapinterval(MirBufferStream *stream, int interval)
Set the swapinterval for the stream.
MirPixelFormat
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:244
mir_buffer_stream_get_error_message
const char * mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream)
Retrieve a text description of the error.
MIR_FOR_REMOVAL_IN_VERSION_1
#define MIR_FOR_REMOVAL_IN_VERSION_1(message)
Definition: deprecations.h:30
MirConnection
struct MirConnection MirConnection
Definition: client_types.h:41
mir_buffer_stream_is_valid
bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream)
Test for a valid buffer stream.
height
int height
Definition: client_types.h:179
MirBufferUsage
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:185
mir_buffer_stream_get_graphics_region
bool mir_buffer_stream_get_graphics_region(MirBufferStream *buffer_stream, MirGraphicsRegion *graphics_region)
Retrieve a buffer stream's graphics region.
mir_buffer_stream_get_swapinterval
int mir_buffer_stream_get_swapinterval(MirBufferStream *stream)
Query the swapinterval that the stream is operating with.
mir_buffer_stream_release_sync
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...
mir_connection_create_buffer_stream_sync
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.
mir_buffer_stream_get_platform_type
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_...
deprecations.h
client_types.h
mir_buffer_stream_set_size
void mir_buffer_stream_set_size(MirBufferStream *stream, int width, int height)
Set the physical size of the buffers provided by the buffer stream.
MirGraphicsRegion
Retrieved information about a MirWindow.
Definition: client_types.h:281
buffer_usage
MirBufferUsage buffer_usage
Definition: client_types.h:183
mir_native_buffer.h
MirWaitHandle
struct MirWaitHandle MirWaitHandle
Returned by asynchronous functions.
Definition: client_types.h:79
MirBufferPackage
Definition: mir_native_buffer.h:31
mir_buffer_stream_get_current_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
MirPlatformType
The native buffer type for the system the client is connected on.
Definition: client_types.h:230
mir_buffer_stream_release
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.
mir_connection_create_buffer_stream
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.
MirBufferStream
struct MirBufferStream MirBufferStream
Definition: client_types.h:49
mir_buffer_stream_get_microseconds_till_vblank
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
void * MirEGLNativeWindowType
Definition: client_types.h:39
width
int width
Definition: client_types.h:178

Copyright © 2012-2020 Canonical Ltd.
Generated on Mon Jun 29 21:51:46 UTC 2020
This documentation is licensed under the GPL version 2 or 3.