wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
libwlclient.h File Reference
#include <inttypes.h>
#include <stdbool.h>
#include <libbase/libbase.h>
#include "icon.h"
#include "xdg_toplevel.h"
Include dependency graph for libwlclient.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlclient_attributes_t
 

Typedefs

typedef struct _wlclient_t wlclient_t
 
typedef void(* wlclient_callback_t) (wlclient_t *wlclient_ptr, void *ud_ptr)
 

Functions

wlclient_twlclient_create (const char *app_id_ptr)
 
void wlclient_destroy (wlclient_t *wlclient_ptr)
 
const wlclient_attributes_twlclient_attributes (const wlclient_t *wlclient_ptr)
 
void wlclient_run (wlclient_t *wlclient_ptr)
 
bool wlclient_register_timer (wlclient_t *wlclient_ptr, uint64_t target_usec, wlclient_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

◆ wlclient_callback_t

typedef void(* wlclient_callback_t) (wlclient_t *wlclient_ptr, void *ud_ptr)

A client's callback, as used in wlclient_register_timer.

Parameters
wlclient_ptr
ud_ptr

◆ wlclient_t

typedef struct _wlclient_t wlclient_t

Forward declaration: Wayland client handle.

Function Documentation

◆ wlclient_attributes()

const wlclient_attributes_t * wlclient_attributes ( const wlclient_t * wlclient_ptr)

Gets the client attributes.

Parameters
wlclient_ptr
Returns
A pointer to the attributes.

◆ wlclient_create()

wlclient_t * wlclient_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 wlclient_destroy.

◆ wlclient_destroy()

void wlclient_destroy ( wlclient_t * wlclient_ptr)

Destroys the wayland client, as created by wlclient_create.

Parameters
wlclient_ptr

◆ wlclient_register_timer()

bool wlclient_register_timer ( wlclient_t * wlclient_ptr,
uint64_t target_usec,
wlclient_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
wlclient_ptr
target_usec
callback
callback_ud_ptr
Returns
true on success.

◆ wlclient_run()

void wlclient_run ( wlclient_t * wlclient_ptr)

Runs the client's mainloop.

Parameters
wlclient_ptr