wlmaker
|
#include "libwlclient.h"
#include <errno.h>
#include <poll.h>
#include <signal.h>
#include <stdarg.h>
#include <sys/signalfd.h>
#include <wayland-client.h>
#include "wlmaker-icon-unstable-v1-client-protocol.h"
#include "xdg-shell-client-protocol.h"
Classes | |
struct | _wlclient_t |
struct | wlclient_timer_t |
struct | object_t |
Functions | |
static void | wl_to_bs_log (const char *fmt, va_list args) |
static void | handle_global_announce (void *data_ptr, struct wl_registry *wl_registry_ptr, uint32_t name, const char *interface_ptr, uint32_t version) |
static void | handle_global_remove (void *data_ptr, struct wl_registry *registry, uint32_t name) |
static wlclient_timer_t * | wlc_timer_create (wlclient_t *client_ptr, uint64_t target_usec, wlclient_callback_t callback, void *callback_ud_ptr) |
static void | wlc_timer_destroy (wlclient_timer_t *timer_ptr) |
static void | wlc_seat_setup (wlclient_t *client_ptr) |
static void | wlc_seat_handle_capabilities (void *data_ptr, struct wl_seat *wl_seat_ptr, uint32_t capabilities) |
static void | wlc_seat_handle_name (void *data_ptr, struct wl_seat *wl_seat_ptr, const char *name_ptr) |
static void | wlc_pointer_handle_enter (void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface, wl_fixed_t surface_x, wl_fixed_t surface_y) |
static void | wlc_pointer_handle_leave (void *data, struct wl_pointer *wl_pointer, uint32_t serial, struct wl_surface *surface) |
static void | wlc_pointer_handle_motion (void *data, struct wl_pointer *wl_pointer, uint32_t time, wl_fixed_t surface_x, wl_fixed_t surface_y) |
static void | wlc_pointer_handle_button (void *data, struct wl_pointer *wl_pointer, uint32_t serial, uint32_t time, uint32_t button, uint32_t state) |
static void | wlc_pointer_handle_axis (void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis, wl_fixed_t value) |
static void | wlc_pointer_handle_frame (void *data, struct wl_pointer *wl_pointer) |
static void | wlc_pointer_handle_axis_source (void *data, struct wl_pointer *wl_pointer, uint32_t axis_source) |
static void | wlc_pointer_handle_axis_stop (void *data, struct wl_pointer *wl_pointer, uint32_t time, uint32_t axis) |
static void | wlc_pointer_handle_axis_discrete (void *data, struct wl_pointer *wl_pointer, uint32_t axis, int32_t discrete) |
wlclient_t * | wlclient_create (const char *app_id_ptr) |
void | wlclient_destroy (wlclient_t *wlclient_ptr) |
const wlclient_attributes_t * | wlclient_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) |
Variables | |
static const struct wl_registry_listener | registry_listener |
static const struct wl_seat_listener | wlc_seat_listener |
static const struct wl_pointer_listener | wlc_pointer_listener |
static const object_t | objects [] |
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.
|
static |
Handles the announcement of a global object.
Called by struct wl_registry_listener
global
callback, invoked to notify clients of global objects.
data_ptr | Points to a wlclient_t. |
wl_registry_ptr | The struct wl_registry this is invoked for. |
name | Numeric name of the global object. |
interface_name_ptr | Name of the interface implemented by the object. |
version | Interface version. |
|
static |
Handles the removal of a wayland global object.
Called by struct wl_registry_listener
global_remove
, invoked to notify clients of removed global objects.
data_ptr | Points to a wlclient_t. |
wl_registry_ptr | The struct wl_registry this is invoked for. |
name | Numeric name of the global object. |
|
static |
Redirects a wayland log call into s_log.
fmt_ptr | |
args |
|
static |
Called upon axis events.
|
static |
Called upon axis click events.
|
static |
Called upon axis source events.
|
static |
Axis stop events.
|
static |
Called upon pointer button events.
|
static |
Called when the client obtains pointer focus.
|
static |
Called upon frame events.
|
static |
Called when the client looses pointer focus.
|
static |
Called upon pointer motion.
|
static |
Handles the seat's capability updates.
Un-/Registers listeners for the pointer, if the capability is available.
data_ptr | |
wl_seat_ptr | |
capabilities |
|
static |
Handles the unique identifier callback.
|
static |
Set up the seat: Registers the client's seat listeners.
|
static |
Creates a timer and registers it with the client.
client_ptr | |
target_usec | |
callback | |
callback_ud_ptr |
|
static |
Destroys the timer. Note: The timer will NOT be unregistered first.
timer_ptr |
const wlclient_attributes_t * wlclient_attributes | ( | const wlclient_t * | wlclient_ptr | ) |
Gets the client attributes.
wlclient_ptr |
wlclient_t * wlclient_create | ( | const char * | app_id_ptr | ) |
Creates a wayland client for simple buffer interactions.
app_id_ptr | Application ID or NULL if not set. |
void wlclient_destroy | ( | wlclient_t * | wlclient_ptr | ) |
Destroys the wayland client, as created by wlclient_create.
wlclient_ptr |
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.
wlclient_ptr | |
target_usec | |
callback | |
callback_ud_ptr |
void wlclient_run | ( | wlclient_t * | wlclient_ptr | ) |
Runs the client's mainloop.
wlclient_ptr |
|
static |
List of wayland objects we want to bind to.
|
static |
Listener for the registry, taking note of registry updates.
|
static |
Listeners for the pointer.
|
static |
Listeners for the seat.