wlmaker
|
#include "input_observation.h"
#include <libbase/libbase.h>
#include <inttypes.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wayland-server-protocol.h>
#include <wlr/types/wlr_buffer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_seat.h>
#include "server.h"
#include "toolkit/toolkit.h"
#include "ext-input-observation-v1-server-protocol.h"
Classes | |
struct | _wlmaker_input_observation_manager_t |
struct | _wlmaker_input_position_observer_t |
Functions | |
static wlmaker_input_observation_manager_t * | input_observation_manager_from_resource (struct wl_resource *wl_resource_ptr) |
static void | bind_input_observation (struct wl_client *wl_client_ptr, void *data_ptr, uint32_t version, uint32_t id) |
static void | handle_resource_destroy (struct wl_client *wl_client_ptr, struct wl_resource *wl_resource_ptr) |
static void | input_observation_manager_handle_create_pointer_observer (struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *pointer_wl_resource_ptr, struct wl_resource *surface) |
static wlmaker_input_position_observer_t * | wlmaker_input_position_observer_from_resource (struct wl_resource *wl_resource_ptr) |
static wlmaker_input_position_observer_t * | wlmaker_input_position_observer_create (struct wl_client *wl_client_ptr, wlmaker_input_observation_manager_t *manager_ptr, uint32_t id, int version, struct wl_resource *pointer_wl_resource_ptr, struct wlr_surface *wlr_surface_ptr) |
static void | wlmaker_input_position_observer_resource_destroy (struct wl_resource *wl_resource_ptr) |
static void | wlmaker_input_position_observer_destroy (wlmaker_input_position_observer_t *position_observer_ptr) |
static void | _wlmaker_input_position_observer_handle_surface_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
static void | _wlmaker_input_position_observer_handle_cursor_frame (struct wl_listener *listener_ptr, void *data_ptr) |
wlmaker_input_observation_manager_t * | wlmaker_input_observation_manager_create (struct wl_display *wl_display_ptr, struct wlr_seat *wlr_seat_ptr, struct wlr_cursor *wlr_cursor_ptr) |
void | wlmaker_input_observation_manager_destroy (wlmaker_input_observation_manager_t *manager_ptr) |
Variables | |
static const struct ext_input_observation_manager_v1_interface | input_observation_manager_v1_implementation |
static const struct ext_input_position_observer_v1_interface | input_position_observer_v1_implementation |
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 cursor frame events: Sends the current pointer position.
|
static |
Handles surface destruction: Destroy the position observer.
|
static |
Binds the position observation manager for the client.
wl_client_ptr | |
data_ptr | |
version | |
id |
|
static |
Handler for the 'destroy' method: Destroys the resource.
wl_client_ptr | |
wl_resource_ptr |
|
static |
Returns the toplevel position observer from the resource, with type check.
wl_resource_ptr |
|
static |
Creates an observer, associated with the surface.
Requires that wlmaker_input_observation_manager_t::wlr_seat_ptr is set and has the WL_SEAT_CAPABILITY_POINTER
capability.
wl_client_ptr | |
wl_resource_ptr | |
id | |
pointer_wl_resource_ptr | Resource handle of the pointer. |
surface_wl_resource_ptr | Resource handle of the surface. |
wlmaker_input_observation_manager_t * wlmaker_input_observation_manager_create | ( | struct wl_display * | wl_display_ptr, |
struct wlr_seat * | wlr_seat_ptr, | ||
struct wlr_cursor * | wlr_cursor_ptr | ||
) |
Creates an input observation manager.
wl_display_ptr | |
wlr_seat_ptr | |
wlr_cursor_ptr |
void wlmaker_input_observation_manager_destroy | ( | wlmaker_input_observation_manager_t * | manager_ptr | ) |
Destroys the input observation manager.
manager_ptr |
|
static |
Ctor for the position observer.
|
static |
Dtor.
|
static |
Type-safe conversion from resource to position observer.
|
static |
Dtor, from the resource.
|
static |
Implementation of the position observation manager.
|
static |
Implementation of the position (position) observer.