wlmaker
|
#include "button.h"
#include <linux/input-event-codes.h>
#include <math.h>
#include <string.h>
#include <wlr/types/wlr_scene.h>
#include "gfxbuf.h"
#include "input.h"
#include "util.h"
#include "libbase/libbase.h"
Functions | |
static void | _wlmtk_button_clicked (wlmtk_button_t *button_ptr) |
static bool | _wlmtk_button_element_pointer_button (wlmtk_element_t *element_ptr, const wlmtk_button_event_t *button_event_ptr) |
static void | _wlmtk_button_handle_pointer_enter (struct wl_listener *listener_ptr, void *data_ptr) |
static void | _wlmtk_button_handle_pointer_leave (struct wl_listener *listener_ptr, void *data_ptr) |
static void | apply_state (wlmtk_button_t *button_ptr) |
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) |
static void | test_create_destroy (bs_test_t *test_ptr) |
static void | test_press_release (bs_test_t *test_ptr) |
static void | test_press_release_outside (bs_test_t *test_ptr) |
static void | test_press_right (bs_test_t *test_ptr) |
static void | fake_button_clicked (wlmtk_button_t *button_ptr) |
Variables | |
static const wlmtk_element_vmt_t | button_element_vmt |
static const wlmtk_button_vmt_t | button_vmt |
const bs_test_case_t | wlmtk_button_test_cases [] |
static bool | fake_button_got_clicked = false |
static const wlmtk_button_vmt_t | fake_button_vmt |
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 |
Default implementation of wlmtk_button_vmt_t::clicked. Nothing.
|
static |
|
static |
Pointer enters the area: We may need to update visualization.
|
static |
Pointer leaves the area: We may need to update visualization.
|
static |
Sets the appropriate texture for the button.
|
static |
Fake 'clicked' handler.
|
static |
Exercises wlmtk_button_init and wlmtk_button_fini.
|
static |
Tests button pressing & releasing.
|
static |
Tests button when releasing outside the pointer focus.
|
static |
Tests button when releasing outside the pointer focus.
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.
button_ptr | |
button_vmt_ptr |
void wlmtk_button_fini | ( | wlmtk_button_t * | button_ptr | ) |
Cleans up the button.
button_ptr |
bool wlmtk_button_init | ( | wlmtk_button_t * | button_ptr | ) |
Initializes the button.
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 | ||
) |
Sets (or updates) the button textures.
button_ptr | |
released_wlr_buffer_ptr | |
pressed_wlr_buffer_ptr |
|
static |
Virtual method table for the button's element super class.
|
static |
Virtual method table for the button.
|
static |
Test outcome: Whether 'clicked' was called.
|
static |
Virtual method table of fake button.
const bs_test_case_t wlmtk_button_test_cases[] |
Test case definition.