Mir
mir_buffer.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 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_H_
19 #define MIR_TOOLKIT_MIR_BUFFER_H_
20 
21 #include <stdbool.h>
24 
25 #ifdef __cplusplus
26 
30 extern "C" {
31 #endif
32 
49  MirConnection* connection,
50  int width, int height,
52  MirBufferCallback available_callback, void* available_context);
53 
63  MirConnection* connection,
64  int width, int height,
66 
71 bool mir_buffer_is_valid(MirBuffer const* buffer);
72 
81 char const *mir_buffer_get_error_message(MirBuffer const* buffer);
82 
90 
101 
108 
114 unsigned int mir_buffer_get_width(MirBuffer const* buffer);
115 
121 unsigned int mir_buffer_get_height(MirBuffer const* buffer);
122 
129 
136 
137 #ifdef __cplusplus
138 }
140 #endif
141 
142 #endif // MIR_TOOLKIT_MIR_BUFFER_H_
format
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350
mir_buffer_get_buffer_package
MirBufferPackage * mir_buffer_get_buffer_package(MirBuffer *buffer)
Access the MirBufferPackage.
mir_buffer_get_pixel_format
MirPixelFormat mir_buffer_get_pixel_format(MirBuffer const *buffer)
Retrieve the pixel format of the buffer.
mir_buffer_get_error_message
char const * mir_buffer_get_error_message(MirBuffer const *buffer)
Retrieve a text description an error associated with a MirBuffer.
MirPixelFormat
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:245
mir_buffer_get_height
unsigned int mir_buffer_get_height(MirBuffer const *buffer)
Retrieve the height of the buffer in pixels.
MirBuffer
struct MirBuffer MirBuffer
Definition: client_types.h:56
mir_buffer_is_valid
bool mir_buffer_is_valid(MirBuffer const *buffer)
Test for a valid buffer.
MirConnection
struct MirConnection MirConnection
Definition: client_types.h:41
MirBufferLayout
MirBufferLayout
Definition: client_types.h:263
height
int height
Definition: client_types.h:2
MirBufferCallback
void(* MirBufferCallback)(MirBuffer *, void *context)
Definition: client_types.h:497
mir_connection_allocate_buffer
void mir_connection_allocate_buffer(MirConnection *connection, int width, int height, MirPixelFormat format, MirBufferCallback available_callback, void *available_context)
Allocate a MirBuffer and do not wait for the server to return it.
mir_buffer_unmap
void mir_buffer_unmap(MirBuffer *buffer)
Flush the CPU caches for the buffer.
client_types.h
MirGraphicsRegion
Retrieved information about a MirWindow.
Definition: client_types.h:282
mir_native_buffer.h
mir_connection_allocate_buffer_sync
MirBuffer * mir_connection_allocate_buffer_sync(MirConnection *connection, int width, int height, MirPixelFormat format)
Allocate a MirBuffer and wait for the server to return it.
MirBufferPackage
Definition: mir_native_buffer.h:32
mir_buffer_get_width
unsigned int mir_buffer_get_width(MirBuffer const *buffer)
Retrieve the width of the buffer in pixels.
mir_buffer_map
bool mir_buffer_map(MirBuffer *buffer, MirGraphicsRegion *region, MirBufferLayout *layout)
Access a CPU-mapped region associated with a given buffer.
mir_buffer_release
void mir_buffer_release(MirBuffer *buffer)
release a MirBuffer
width
int width
Definition: client_types.h:1

Copyright © 2012-2020 Canonical Ltd.
Generated on Sun Sep 27 19:03:53 UTC 2020
This documentation is licensed under the GPL version 2 or 3.