wlmaker
Loading...
Searching...
No Matches
buffer.h File Reference
#include "libwlclient.h"
Include dependency graph for buffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _wlclient_buffer_t wlclient_buffer_t
 
typedef void(* wlclient_buffer_ready_callback_t) (void *ud_ptr)
 

Functions

wlclient_buffer_twlclient_buffer_create (const wlclient_t *wlclient_ptr, unsigned width, unsigned height, wlclient_buffer_ready_callback_t ready_callback, void *ready_callback_ud_ptr)
 
void wlclient_buffer_destroy (wlclient_buffer_t *buffer_ptr)
 
void wlclient_buffer_attach_to_surface_and_commit (wlclient_buffer_t *buffer_ptr, struct wl_surface *wl_surface_ptr)
 
bs_gfxbuf_t * bs_gfxbuf_from_wlclient_buffer (wlclient_buffer_t *buffer_ptr)
 

Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Typedef Documentation

◆ wlclient_buffer_ready_callback_t

typedef void(* wlclient_buffer_ready_callback_t) (void *ud_ptr)

Callback to report that a buffer is ready to draw into.

◆ wlclient_buffer_t

Forward declaration of the buffer state.

Function Documentation

◆ bs_gfxbuf_from_wlclient_buffer()

bs_gfxbuf_t * bs_gfxbuf_from_wlclient_buffer ( wlclient_buffer_t * buffer_ptr)

Returns thebs_gfxbuf_t corresponding to the client buffer.

Parameters
buffer_ptr
Returns
Pointer to the bs_gfxbuf_t. The bs_gfxbuf_t remains valid throughout the lifetime of buffer_ptr, and does not need to be released by the caller.

◆ wlclient_buffer_attach_to_surface_and_commit()

void wlclient_buffer_attach_to_surface_and_commit ( wlclient_buffer_t * buffer_ptr,
struct wl_surface * wl_surface_ptr )

Attaches the buffer to the surface and commits it.

Parameters
buffer_ptr
wl_surface_ptr

◆ wlclient_buffer_create()

wlclient_buffer_t * wlclient_buffer_create ( const wlclient_t * wlclient_ptr,
unsigned width,
unsigned height,
wlclient_buffer_ready_callback_t ready_callback,
void * ready_callback_ud_ptr )

Creates a wlclient wayland buffer with the given dimensions.

Parameters
wlclient_ptr
width
height
ready_callback
ready_callback_ud_ptr
Returns
A pointer to the created client buffer, or NULL on error. The buffer must be destroyed by calling wlclient_buffer_destroy.

◆ wlclient_buffer_destroy()

void wlclient_buffer_destroy ( wlclient_buffer_t * buffer_ptr)

Destroys the wlclient wayland buffer.

Parameters
buffer_ptr