wlmaker
Loading...
Searching...
No Matches
interactive.c File Reference
#include "interactive.h"
#include <wlr/types/wlr_scene.h>
Include dependency graph for interactive.c:

Functions

void wlmaker_interactive_init (wlmaker_interactive_t *interactive_ptr, const wlmaker_interactive_impl_t *impl_ptr, struct wlr_scene_buffer *wlr_scene_buffer_ptr, wlmaker_cursor_t *cursor_ptr, struct wlr_buffer *initial_wlr_buffer_ptr)
 
void wlmaker_interactive_set_texture (wlmaker_interactive_t *interactive_ptr, struct wlr_buffer *wlr_buffer_ptr)
 
int wlmaker_interactive_node_cmp (const bs_avltree_node_t *node_ptr, const void *key_ptr)
 
void wlmaker_interactive_node_destroy (bs_avltree_node_t *node_ptr)
 
wlmaker_interactive_twlmaker_interactive_from_avlnode (bs_avltree_node_t *node_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.

Function Documentation

◆ wlmaker_interactive_from_avlnode()

wlmaker_interactive_t * wlmaker_interactive_from_avlnode ( bs_avltree_node_t * node_ptr)

Cast the AVL tree node to the wlmaker_interactive_t.

Parameters
node_ptr
Returns
The interactive of this node.

◆ wlmaker_interactive_init()

void wlmaker_interactive_init ( wlmaker_interactive_t * interactive_ptr,
const wlmaker_interactive_impl_t * impl_ptr,
struct wlr_scene_buffer * wlr_scene_buffer_ptr,
wlmaker_cursor_t * cursor_ptr,
struct wlr_buffer * initial_wlr_buffer_ptr )

Initializes the interactive.

Parameters
interactive_ptr
impl_ptr
wlr_scene_buffer_ptrBuffer scene node to contain the button. Must outlive the interactive, not taking ownership.
cursor_ptr
initial_wlr_buffer_ptrTexture WLR buffer to initialize |wlr_scene_buffer_ptr| from.

◆ wlmaker_interactive_node_cmp()

int wlmaker_interactive_node_cmp ( const bs_avltree_node_t * node_ptr,
const void * key_ptr )

AVL tree comparator: Compares the wlr_scene_buffer.node pointers.

Parameters
node_ptr
key_ptr
Returns
-1 if less, 0 if equal, 1 if larger.

◆ wlmaker_interactive_node_destroy()

void wlmaker_interactive_node_destroy ( bs_avltree_node_t * node_ptr)

Destroy the avl tree node, ie. the interactive at this node.

Parameters
node_ptr

◆ wlmaker_interactive_set_texture()

void wlmaker_interactive_set_texture ( wlmaker_interactive_t * interactive_ptr,
struct wlr_buffer * wlr_buffer_ptr )

Sets this interactive's texture. Also updates dimensions accordingly.

Parameters
interactive_ptr
wlr_buffer_ptr