Mir
mir_screencast.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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 #ifndef MIR_TOOLKIT_MIR_SCREENCAST_H_
18 #define MIR_TOOLKIT_MIR_SCREENCAST_H_
19 
22 
23 #ifdef __cplusplus
24 
28 extern "C" {
29 #endif
30 
31 typedef enum MirScreencastResult
32 {
37 
43 
45  MirScreencastResult status, MirBuffer* buffer, void* context);
46 
58 
66 void mir_screencast_spec_set_width(MirScreencastSpec* spec, unsigned int width);
67 
76 
85 
86 
96 
105 
113 void mir_screencast_spec_set_number_of_buffers(MirScreencastSpec* spec, unsigned int nbuffers);
114 
121 
129 
136 bool mir_screencast_is_valid(MirScreencast *screencast);
137 
148 char const *mir_screencast_get_error_message(MirScreencast *screencast);
149 
161  MirConnection* connection,
162  MirScreencastParameters* parameters)
163 MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead");
164 
170  MirScreencast* screencast);
171 
179 
188  MirScreencast* screencast,
189  MirBuffer* buffer,
190  MirScreencastBufferCallback available_callback, void* available_context);
191 
202 
203 #ifdef __cplusplus
204 }
206 #endif
207 
208 #endif /* MIR_TOOLKIT_MIR_SCREENCAST_H_ */
void mir_screencast_spec_set_capture_region(MirScreencastSpec *spec, MirRectangle const *region)
Set the rectangular region to capture.
struct MirBufferStream MirBufferStream
Definition: client_types.h:49
MirScreencastParameters is the structure of required information that you must provide to Mir in orde...
Definition: client_types.h:419
struct MirBuffer MirBuffer
Definition: client_types.h:56
MirScreencastResult mir_screencast_capture_to_buffer_sync(MirScreencast *screencast, MirBuffer *buffer)
Capture the contents of the screen to a particular buffer and wait for the capture to complete...
void mir_screencast_spec_set_number_of_buffers(MirScreencastSpec *spec, unsigned int nbuffers)
Set the requested number of buffers to use.
struct MirScreencast MirScreencast
Definition: client_types.h:46
#define MIR_FOR_REMOVAL_IN_VERSION_1(message)
Definition: deprecations.h:30
struct MirScreencastSpec MirScreencastSpec
Definition: client_types.h:47
MirScreencastResult
Definition: mir_screencast.h:31
int height
Definition: client_types.h:179
MirBufferStream * mir_screencast_get_buffer_stream(MirScreencast *screencast)
Retrieve the MirBufferStream associated with a screencast (to advance buffers, obtain EGLNativeWindow...
char const * mir_screencast_get_error_message(MirScreencast *screencast)
Retrieve a text description of the error.
void mir_screencast_release_sync(MirScreencast *screencast)
Release the specified screencast.
void mir_screencast_spec_set_height(MirScreencastSpec *spec, unsigned int height)
Set the requested height, in pixels.
MirScreencastSpec * mir_create_screencast_spec(MirConnection *connection)
Create a screencast specification.
void mir_screencast_spec_set_mirror_mode(MirScreencastSpec *spec, MirMirrorMode mode)
Set the requested mirror mode.
struct MirConnection MirConnection
Definition: client_types.h:41
MirMirrorMode
Mirroring axis relative to the "natural" orientation of the display.
Definition: common.h:280
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:241
MirScreencast * mir_connection_create_screencast_sync(MirConnection *connection, MirScreencastParameters *parameters) MIR_FOR_REMOVAL_IN_VERSION_1("use mir_screencast_create_sync instead")
Create a screencast on the supplied connection.
bool mir_screencast_is_valid(MirScreencast *screencast)
Test for a valid screencast.
void mir_screencast_spec_release(MirScreencastSpec *spec)
Release the resources held by a MirScreencastSpec.
MirScreencast * mir_screencast_create_sync(MirScreencastSpec *spec)
Create a screencast from a given specification.
Screencasting failed.
Definition: mir_screencast.h:41
void mir_screencast_capture_to_buffer(MirScreencast *screencast, MirBuffer *buffer, MirScreencastBufferCallback available_callback, void *available_context)
Capture the contents of the screen to a particular buffer.
void mir_screencast_spec_set_pixel_format(MirScreencastSpec *spec, MirPixelFormat format)
Set the requested pixel format.
void(* MirScreencastBufferCallback)(MirScreencastResult status, MirBuffer *buffer, void *context)
Definition: mir_screencast.h:44
Definition: client_types.h:398
void mir_screencast_spec_set_width(MirScreencastSpec *spec, unsigned int width)
Set the requested width, in pixels.
Screencasting to the MirBuffer succeeded.
Definition: mir_screencast.h:36
int width
Definition: client_types.h:178
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350

Copyright © 2012-2018 Canonical Ltd.
Generated on Sat Sep 29 01:47:23 UTC 2018
This documentation is licensed under the GPL version 2 or 3.