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
30extern "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
71bool mir_buffer_is_valid(MirBuffer const* buffer);
72
81char const *mir_buffer_get_error_message(MirBuffer const* buffer);
82
90
101
108
114unsigned int mir_buffer_get_width(MirBuffer const* buffer);
115
121unsigned 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_
int width
Definition: client_types.h:1
int height
Definition: client_types.h:2
bool mir_buffer_map(MirBuffer *buffer, MirGraphicsRegion *region, MirBufferLayout *layout)
Access a CPU-mapped region associated with a given buffer.
MirPixelFormat mir_buffer_get_pixel_format(MirBuffer const *buffer)
Retrieve the pixel format of the buffer.
void mir_buffer_unmap(MirBuffer *buffer)
Flush the CPU caches for the 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.
MirPixelFormat the EGL implementation will now set correct pixel format
Definition: mir_connection.h:350
unsigned int mir_buffer_get_height(MirBuffer const *buffer)
Retrieve the height of the buffer in pixels.
MirBufferPackage * mir_buffer_get_buffer_package(MirBuffer *buffer)
Access the MirBufferPackage.
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.
struct MirBuffer MirBuffer
Definition: client_types.h:56
MirPixelFormat
32-bit pixel formats (8888): The order of components in the enum matches the order of the components ...
Definition: common.h:245
MirBufferLayout
Definition: client_types.h:263
struct MirConnection MirConnection
Definition: client_types.h:41
char const * mir_buffer_get_error_message(MirBuffer const *buffer)
Retrieve a text description an error associated with a MirBuffer.
bool mir_buffer_is_valid(MirBuffer const *buffer)
Test for a valid buffer.
void(* MirBufferCallback)(MirBuffer *, void *context)
Definition: client_types.h:497
unsigned int mir_buffer_get_width(MirBuffer const *buffer)
Retrieve the width of the buffer in pixels.
void mir_buffer_release(MirBuffer *buffer)
release a MirBuffer
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.