wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
button.h File Reference
#include <libbase/libbase.h>
#include <stdbool.h>
#include <wayland-server-core.h>
#include "buffer.h"
#include "element.h"
Include dependency graph for button.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmtk_button_vmt_t
 
struct  _wlmtk_button_t
 

Typedefs

typedef struct _wlmtk_button_t wlmtk_button_t
 

Functions

bool wlmtk_button_init (wlmtk_button_t *button_ptr)
 
wlmtk_button_vmt_t wlmtk_button_extend (wlmtk_button_t *button_ptr, const wlmtk_button_vmt_t *button_vmt_ptr)
 
void wlmtk_button_fini (wlmtk_button_t *button_ptr)
 
void wlmtk_button_set (wlmtk_button_t *button_ptr, struct wlr_buffer *released_wlr_buffer_ptr, struct wlr_buffer *pressed_wlr_buffer_ptr)
 

Variables

const bs_test_case_t wlmtk_button_test_cases []
 

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

◆ wlmtk_button_t

Forward declaration: State of a button.

Function Documentation

◆ wlmtk_button_extend()

wlmtk_button_vmt_t wlmtk_button_extend ( wlmtk_button_t button_ptr,
const wlmtk_button_vmt_t button_vmt_ptr 
)

Extends the button's virtual methods.

Parameters
button_ptr
button_vmt_ptr
Returns
The original virtual method table.

◆ wlmtk_button_fini()

void wlmtk_button_fini ( wlmtk_button_t button_ptr)

Cleans up the button.

Parameters
button_ptr

◆ wlmtk_button_init()

bool wlmtk_button_init ( wlmtk_button_t button_ptr)

Initializes the button.

Parameters
button_ptr
Returns
true on success.

◆ wlmtk_button_set()

void wlmtk_button_set ( wlmtk_button_t button_ptr,
struct wlr_buffer *  released_wlr_buffer_ptr,
struct wlr_buffer *  pressed_wlr_buffer_ptr 
)

Sets (or updates) the button textures.

Parameters
button_ptr
released_wlr_buffer_ptr
pressed_wlr_buffer_ptr

Variable Documentation

◆ wlmtk_button_test_cases

const bs_test_case_t wlmtk_button_test_cases[]
extern

Unit test cases.

Test case definition.