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 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 
23 
24 #ifdef __cplusplus
25 
29 extern "C" {
30 #endif
31 
39 bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream);
40 
50 char const *mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream);
51 
74  int width, int height,
75  MirPixelFormat format,
77  MirBufferStreamCallback callback,
78  void* context);
79 
97  int width, int height,
98  MirPixelFormat format,
100 
114  MirBufferStream * buffer_stream,
115  MirBufferStreamCallback callback,
116  void *context);
117 
124 
143 __attribute__ ((deprecated))
147 
155  MirNativeBuffer **buffer_package);
156 
171  MirBufferStream *buffer_stream,
172  MirBufferStreamCallback callback,
173  void *context);
174 
181 
193  MirBufferStream *buffer_stream,
194  MirGraphicsRegion *graphics_region);
195 
202 
209 MirWaitHandle *mir_buffer_stream_set_scale(MirBufferStream* buffer_stream, float scale);
210 
217 void mir_buffer_stream_set_scale_sync(MirBufferStream* buffer_stream, float scale);
218 
229 
238 
251 
259 void mir_buffer_stream_get_size(MirBufferStream* stream, int* width, int* height);
260 
261 #ifdef __cplusplus
262 }
264 #endif
265 
266 #endif // MIR_TOOLKIT_MIR_BUFFER_STREAM_H_
char const * mir_buffer_stream_get_error_message(MirBufferStream *buffer_stream)
Retrieve a text description of the error.
struct MirBufferStream MirBufferStream
Definition: client_types.h:48
MirBufferStream * mir_connection_create_buffer_stream_sync(MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage)
Create a new buffer stream unattached to a surface and wait for the result.
MirPlatformType mir_buffer_stream_get_platform_type(MirBufferStream *stream)
Get the underlying platform type so the buffer obtained in "raw" representation in mir_buffer_stream_...
MirWaitHandle * mir_buffer_stream_set_swapinterval(MirBufferStream *stream, int interval)
Set the swapinterval for the stream.
void mir_buffer_stream_release_sync(MirBufferStream *buffer_stream)
Release the specified buffer stream like in mir,_buffer_stream_release(), but also wait for the opera...
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 mir_buffer_stream_swap_buffers_sync(MirBufferStream *buffer_stream)
Advance a buffer stream&#39;s buffer as in mir_buffer stream_swap_buffers(), but also wait for the operat...
MirWaitHandle * mir_buffer_stream_swap_buffers(MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context)
Advance a buffer stream&#39;s buffer.
Definition: mir_native_buffer.h:31
unsigned int height
Definition: mir_image.h:27
MirEGLNativeWindowType mir_buffer_stream_get_egl_native_window(MirBufferStream *buffer_stream)
Retrieve a window type which may be used by EGL.
unsigned int width
Definition: mir_image.h:26
struct MirWaitHandle MirWaitHandle
Returned by asynchronous functions.
Definition: client_types.h:72
void mir_buffer_stream_get_current_buffer(MirBufferStream *buffer_stream, MirNativeBuffer **buffer_package)
Retrieve the current buffer in "raw" representation.
struct MirConnection MirConnection
Definition: client_types.h:40
bool mir_buffer_stream_is_valid(MirBufferStream *buffer_stream)
Test for a valid buffer stream.
MirBufferUsage buffer_usage
Definition: client_types.h:174
MirBufferUsage
MirBufferUsage specifies how a surface can and will be used.
Definition: client_types.h:178
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:239
MirWaitHandle * mir_connection_create_buffer_stream(MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferUsage buffer_usage, MirBufferStreamCallback callback, void *context)
Create a new buffer stream.
void * MirEGLNativeWindowType
Definition: client_types.h:38
MirWaitHandle * mir_buffer_stream_set_scale(MirBufferStream *buffer_stream, float scale)
Set the scale associated with all buffers in the stream.
MirConnectedCallback mir_connected_callback __attribute__((deprecated("Use MirConnectedCallback instead")))
Release a platform message.
Definition: client_types.h:85
bool mir_buffer_stream_get_graphics_region(MirBufferStream *buffer_stream, MirGraphicsRegion *graphics_region)
Retrieve a buffer stream&#39;s graphics region.
Retrieved information about a MirWindow.
Definition: client_types.h:270
int mir_buffer_stream_get_swapinterval(MirBufferStream *stream)
Query the swapinterval that the stream is operating with.
void mir_buffer_stream_set_scale_sync(MirBufferStream *buffer_stream, float scale)
Set the scale as in mir_buffer_stream_set_scale(), but also wait for the operation to complete...
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.
MirWaitHandle * mir_buffer_stream_release(MirBufferStream *buffer_stream, MirBufferStreamCallback callback, void *context)
Release the supplied stream and any associated buffer.
MirPlatformType
The native buffer type for the system the client is connected on.
Definition: client_types.h:219
void(* MirBufferStreamCallback)(MirBufferStream *stream, void *client_context)
Callback to be passed when calling:
Definition: client_types.h:102

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Mar 27 12:06:55 UTC 2017