|
wlmaker
|
#include <libbase/libbase.h>#include <stdbool.h>#include <stdint.h>#include <wayland-server-core.h>#include <wlr/types/wlr_pointer.h>#include "element.h"#include "input.h"

Go to the source code of this file.
Classes | |
| struct | wlmtk_root_events_t |
Typedefs | |
| typedef struct _wlmtk_root_t | wlmtk_root_t |
Functions | |
| wlmtk_root_t * | wlmtk_root_create (wlmtk_element_t *element_ptr, struct wlr_output_layout *wlr_output_layout_ptr) |
| void | wlmtk_root_destroy (wlmtk_root_t *root_ptr) |
| wlmtk_root_events_t * | wlmtk_root_events (wlmtk_root_t *root_ptr) |
| wlmtk_element_t * | wlmtk_root_element (wlmtk_root_t *root_ptr) |
| bool | wlmtk_root_pointer_motion (wlmtk_root_t *root_ptr, double x, double y, uint32_t time_msec, wlmtk_pointer_t *pointer_ptr) |
| bool | wlmtk_root_pointer_button (wlmtk_root_t *root_ptr, const struct wlr_pointer_button_event *event_ptr, uint32_t modifiers) |
| bool | wlmtk_root_pointer_axis (wlmtk_root_t *root_ptr, struct wlr_pointer_axis_event *wlr_pointer_axis_event_ptr) |
Variables | |
| const bs_test_set_t | wlmtk_root_test_set |
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 struct _wlmtk_root_t wlmtk_root_t |
Forward declaration: Root element wrapper.
| wlmtk_root_t * wlmtk_root_create | ( | wlmtk_element_t * | element_ptr, |
| struct wlr_output_layout * | wlr_output_layout_ptr | ||
| ) |
Creates the root element wrapper.
| element_ptr | The wrapped element. |
| wlr_output_layout_ptr | wlroots output layout to track output frames on. |
| void wlmtk_root_destroy | ( | wlmtk_root_t * | root_ptr | ) |
Destroys the root wrapper.
| root_ptr | Root wrapper handle. |
| wlmtk_element_t * wlmtk_root_element | ( | wlmtk_root_t * | root_ptr | ) |
Gets the wrapped element.
| root_ptr | Root wrapper handle. |
| wlmtk_root_events_t * wlmtk_root_events | ( | wlmtk_root_t * | root_ptr | ) |
Gets the set of events available in root.
| root_ptr | Root wrapper handle. |
| bool wlmtk_root_pointer_axis | ( | wlmtk_root_t * | root_ptr, |
| struct wlr_pointer_axis_event * | wlr_pointer_axis_event_ptr | ||
| ) |
Handles a pointer axis event.
| root_ptr | Root wrapper handle. |
| wlr_pointer_axis_event_ptr | wlroots axis event pointer. |
| bool wlmtk_root_pointer_button | ( | wlmtk_root_t * | root_ptr, |
| const struct wlr_pointer_button_event * | event_ptr, | ||
| uint32_t | modifiers | ||
| ) |
Handles a button event: Translates to button down/up/click/dblclick events.
Each button activity (button pressed or released) will directly trigger a corresponding BUTTON_DOWN or BUTTON_UP event. Depending on timing and motion, a "released" event may also triccer a CLICK, DOUBLE_CLICK or DRAG event. These events will be forwarded to the event currently having pointer focus.
TODO(kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h): Implement DOUBLE_CLICK and DRAG events, and make it well tested.
| root_ptr | Root wrapper handle. |
| event_ptr | Wayland button event pointer. |
| modifiers | Keyboard modifiers state. |
| bool wlmtk_root_pointer_motion | ( | wlmtk_root_t * | root_ptr, |
| double | x, | ||
| double | y, | ||
| uint32_t | time_msec, | ||
| wlmtk_pointer_t * | pointer_ptr | ||
| ) |
Handles a pointer motion event.
| root_ptr | Root wrapper handle. |
| x | X coordinate of the motion event. |
| y | Y coordinate of the motion event. |
| time_msec | Timestamp of the motion event. |
| pointer_ptr | Pointer state reference. |
|
extern |
Unit test cases.