wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
tile.c File Reference
#include "tile.h"
#include <libbase/libbase.h>
#include <linux/input-event-codes.h>
Include dependency graph for tile.c:

Classes

struct  wlmaker_tile_t
 

Functions

static wlmaker_tile_ttile_from_interactive (wlmaker_interactive_t *interactive_ptr)
 
static void _tile_enter (wlmaker_interactive_t *interactive_ptr)
 
static void _tile_leave (wlmaker_interactive_t *interactive_ptr)
 
static void _tile_motion (wlmaker_interactive_t *interactive_ptr, double x, double y)
 
static void _tile_focus (wlmaker_interactive_t *interactive_ptr)
 
static void _tile_button (wlmaker_interactive_t *interactive_ptr, double x, double y, struct wlr_pointer_button_event *wlr_pointer_button_event_ptr)
 
static void _tile_destroy (wlmaker_interactive_t *interactive_ptr)
 
wlmaker_interactive_twlmaker_tile_create (struct wlr_scene_buffer *wlr_scene_buffer_ptr, wlmaker_cursor_t *cursor_ptr, wlmaker_interactive_callback_t tile_callback, void *tile_callback_arg, struct wlr_buffer *tile_released_ptr)
 
void wlmaker_tile_set_texture (wlmaker_interactive_t *interactive_ptr, struct wlr_buffer *tile_buffer_ptr)
 

Variables

static const wlmaker_interactive_impl_t wlmaker_interactive_tile_impl
 

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.

Function Documentation

◆ _tile_button()

void _tile_button ( wlmaker_interactive_t * interactive_ptr,
double x,
double y,
struct wlr_pointer_button_event * wlr_pointer_button_event_ptr )
static

Interactive callback: Button press.

Parameters
interactive_ptr
x
y
wlr_pointer_button_event_ptr

◆ _tile_destroy()

void _tile_destroy ( wlmaker_interactive_t * interactive_ptr)
static

Destroys the tile interactive.

Parameters
interactive_ptr

◆ _tile_enter()

void _tile_enter ( wlmaker_interactive_t * interactive_ptr)
static

Interactive callback: Cursor enters the tile area.

Parameters
interactive_ptr

◆ _tile_focus()

void _tile_focus ( wlmaker_interactive_t * interactive_ptr)
static

Interactive callback: Focus state change.

Parameters
interactive_ptr

◆ _tile_leave()

void _tile_leave ( wlmaker_interactive_t * interactive_ptr)
static

Interactive callback: Cursor leaves the tile area.

Parameters
interactive_ptr

◆ _tile_motion()

void _tile_motion ( wlmaker_interactive_t * interactive_ptr,
double x,
double y )
static

Interactive callback: Cursor motion.

Parameters
interactive_ptr
x
y

◆ tile_from_interactive()

wlmaker_tile_t * tile_from_interactive ( wlmaker_interactive_t * interactive_ptr)
static

Cast (with assertion) |interactive_ptr| to the |wlmaker_tile_t|.

Parameters
interactive_ptr

◆ wlmaker_tile_create()

wlmaker_interactive_t * wlmaker_tile_create ( struct wlr_scene_buffer * wlr_scene_buffer_ptr,
wlmaker_cursor_t * cursor_ptr,
wlmaker_interactive_callback_t tile_callback,
void * tile_callback_arg,
struct wlr_buffer * tile_released_ptr )

Creates a tile interactive.

Parameters
wlr_scene_buffer_ptrBuffer scene node to contain the tile.
cursor_ptr
tile_callbackWill be called back when the tile is clicked.
tile_callback_argArgument to provide to |tile_callback|
tile_released_ptrWLR buffer, texture in nominal state.
Returns
A pointer to the interactive.

◆ wlmaker_tile_set_texture()

void wlmaker_tile_set_texture ( wlmaker_interactive_t * interactive_ptr,
struct wlr_buffer * tile_buffer_ptr )

Updates the texture for the tile. This will replace and release any earlier texture.

Parameters
interactive_ptr
tile_buffer_ptrWLR buffer, new texture to use.

Variable Documentation

◆ wlmaker_interactive_tile_impl

const wlmaker_interactive_impl_t wlmaker_interactive_tile_impl
static
Initial value:
= {
.enter = _tile_enter,
.leave = _tile_leave,
.motion = _tile_motion,
.focus = _tile_focus,
.button = _tile_button,
.destroy = _tile_destroy
}
static void _tile_focus(wlmaker_interactive_t *interactive_ptr)
Definition tile.c:181
static void _tile_enter(wlmaker_interactive_t *interactive_ptr)
Definition tile.c:142
static void _tile_button(wlmaker_interactive_t *interactive_ptr, double x, double y, struct wlr_pointer_button_event *wlr_pointer_button_event_ptr)
Definition tile.c:196
static void _tile_leave(wlmaker_interactive_t *interactive_ptr)
Definition tile.c:154
static void _tile_motion(wlmaker_interactive_t *interactive_ptr, double x, double y)
Definition tile.c:168
static void _tile_destroy(wlmaker_interactive_t *interactive_ptr)
Definition tile.c:219

Implementation: callbacks for the interactive.