wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
wlclient.h File Reference
#include <inttypes.h>
#include <stdbool.h>
#include <wayland-server-core.h>
#include <xkbcommon/xkbcommon.h>
Include dependency graph for wlclient.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmcl_client_attributes
 
struct  wlmcl_client_events
 
struct  wlmcl_client_key_event
 

Typedefs

typedef struct _wlmcl_client_t wlmcl_client_t
 
typedef void(* wlmcl_client_callback_t) (wlmcl_client_t *wlmcl_client_ptr, void *ud_ptr)
 

Functions

wlmcl_client_twlmcl_client_create (const char *app_id_ptr)
 
void wlmcl_client_destroy (wlmcl_client_t *wlmcl_client_ptr)
 
const struct wlmcl_client_attributeswlmcl_client_attributes (const wlmcl_client_t *wlmcl_client_ptr)
 
struct wlmcl_client_eventswlmcl_client_events (wlmcl_client_t *wlmcl_client_ptr)
 
void wlmcl_client_run (wlmcl_client_t *wlmcl_client_ptr)
 
void wlmcl_client_request_terminate (wlmcl_client_t *wlmcl_client_ptr)
 
bool wlmcl_client_register_timer (wlmcl_client_t *wlmcl_client_ptr, uint64_t target_usec, wlmcl_client_callback_t callback, void *callback_ud_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

◆ wlmcl_client_callback_t

typedef void(* wlmcl_client_callback_t) (wlmcl_client_t *wlmcl_client_ptr, void *ud_ptr)

A client's callback, as used in wlmcl_client_register_timer.

Parameters
wlmcl_client_ptr
ud_ptr

◆ wlmcl_client_t

Forward declaration: Wayland client handle.

Function Documentation

◆ wlmcl_client_attributes()

const struct wlmcl_client_attributes * wlmcl_client_attributes ( const wlmcl_client_t wlmcl_client_ptr)

Gets the client attributes.

Parameters
wlmcl_client_ptr
Returns
A pointer to the attributes.

◆ wlmcl_client_create()

wlmcl_client_t * wlmcl_client_create ( const char *  app_id_ptr)

Creates a wayland client for simple buffer interactions.

Parameters
app_id_ptrApplication ID or NULL if not set.
Returns
The client state, or NULL on error. The state needs to be free'd via wlmcl_client_destroy.

◆ wlmcl_client_destroy()

void wlmcl_client_destroy ( wlmcl_client_t wlmcl_client_ptr)

Destroys the wayland client, as created by wlmcl_client_create.

Parameters
wlmcl_client_ptr

◆ wlmcl_client_events()

struct wlmcl_client_events * wlmcl_client_events ( wlmcl_client_t wlmcl_client_ptr)
Returns
A pointer to wlmcl_client_t::events.

◆ wlmcl_client_register_timer()

bool wlmcl_client_register_timer ( wlmcl_client_t wlmcl_client_ptr,
uint64_t  target_usec,
wlmcl_client_callback_t  callback,
void *  callback_ud_ptr 
)

Registers a timer with the client.

Once the system clock reaches (or has passed) target_usec, callback will be called with the provided arguments. This is a one-time registration. For repeated calls, clients need to re-register.

Parameters
wlmcl_client_ptr
target_usec
callback
callback_ud_ptr
Returns
true on success.

◆ wlmcl_client_request_terminate()

void wlmcl_client_request_terminate ( wlmcl_client_t wlmcl_client_ptr)

Requests termination of the client-s mainloop. This takes effect only once the mainloop wraps up an iteration.

Parameters
wlmcl_client_ptr

◆ wlmcl_client_run()

void wlmcl_client_run ( wlmcl_client_t wlmcl_client_ptr)

Runs the client's mainloop.

Parameters
wlmcl_client_ptr