wlmaker
|
#include "clip.h"
#include <cairo.h>
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <limits.h>
#include <linux/input-event-codes.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wayland-util.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/edges.h>
#include "backend/backend.h"
#include "backend/output_config.h"
#include "toolkit/toolkit.h"
Classes | |
struct | _wlmaker_clip_t |
struct | parse_args |
Functions | |
static bool | _wlmaker_clip_pointer_axis (wlmtk_element_t *element_ptr, struct wlr_pointer_axis_event *wlr_pointer_axis_event_ptr) |
static bool | _wlmaker_clip_pointer_button (wlmtk_element_t *element_ptr, const wlmtk_button_event_t *button_event_ptr) |
static bool | _wlmaker_clip_pointer_motion (wlmtk_element_t *element_ptr, wlmtk_pointer_motion_event_t *motion_event_ptr) |
static void | _wlmaker_clip_update_buttons (wlmaker_clip_t *clip_ptr) |
static void | _wlmaker_clip_update_overlay (wlmaker_clip_t *clip_ptr) |
static struct wlr_buffer * | _wlmaker_clip_create_tile (const wlmtk_tile_style_t *style_ptr, bool prev_pressed, bool next_pressed) |
static void | _wlmaker_clip_handle_workspace_changed (struct wl_listener *listener_ptr, void *data_ptr) |
static void | _wlmaker_clip_handle_output_layout_change (struct wl_listener *listener_ptr, void *data_ptr) |
static void | _wlmaker_clip_handle_pointer_leave (struct wl_listener *listener_ptr, void *data_ptr) |
wlmaker_clip_t * | wlmaker_clip_create (wlmaker_server_t *server_ptr, bspl_dict_t *state_dict_ptr, const wlmaker_config_style_t *style_ptr) |
void | wlmaker_clip_destroy (wlmaker_clip_t *clip_ptr) |
static void | test_draw_tile (bs_test_t *test_ptr) |
Variables | |
static const wlmtk_element_vmt_t | _wlmaker_clip_element_vmt |
static const bspl_enum_desc_t | _wlmaker_clip_edges [] |
const bspl_desc_t | _wlmaker_clip_desc [] |
static const char * | lookup_paths [] |
const bs_test_case_t | wlmaker_clip_test_cases [] |
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 |
Creates a wlr_buffer with texture suitable to show the 'next' and 'prev' buttons in each raised or pressed state.
style_ptr | |
prev_pressed | |
next_pressed |
|
static |
Handles when output layout changes; Re-computes the output to attach.
|
static |
Handles wlmtk_element_events_t::pointer_leave. Resets buttons.
|
static |
Handler for the workspace_changed
signal of wlmaker_server_t
.
Will redraw the clip contents with the current workspace, and re-map the clip to the new workspace.
listener_ptr | |
data_ptr | Points to the new wlmtk_workspace_t . |
|
static |
Implements wlmtk_element_vmt_t::pointer_axis.
Moves to the next or previous workspace, depending on the axis (scroll- wheel) direction.
element_ptr | |
wlr_pointer_axis_event_ptr |
|
static |
Implements wlmtk_element_vmt_t::pointer_button.
Checks if the button press is on either 'next' or 'prev' button area, updates visualization if pressed, and switches workspace if needed.
element_ptr | |
button_event_ptr |
|
static |
Implements wlmtk_element_vmt_t::pointer_motion.
Tracks whether the pointer is within any of the 'Next' or 'Previous' button areas, and triggers an update to the tile's texture.
element_ptr | |
motion_event_ptr |
|
static |
Updates the button textures, based on current state what's pressed.
|
static |
Updates the overlay buffer's content with workspace name and index.
|
static |
Tests that the clip tile is drawn correctly.
wlmaker_clip_t * wlmaker_clip_create | ( | wlmaker_server_t * | server_ptr, |
bspl_dict_t * | state_dict_ptr, | ||
const wlmaker_config_style_t * | style_ptr | ||
) |
Creates the Clip. Needs the server to be up with workspaces running.
server_ptr | |
state_dict_ptr | |
style_ptr |
void wlmaker_clip_destroy | ( | wlmaker_clip_t * | clip_ptr | ) |
Destroys the Clip.
clip_ptr |
const bspl_desc_t _wlmaker_clip_desc[] |
Descriptor for the clip's plist.
|
static |
Enum descriptor for enum wlr_edges
.
|
static |
The clip's extension to wlmtk_element_t virtual method table.
|
static |
Lookup paths for icons – FIXME: de-duplicate this!
const bs_test_case_t wlmaker_clip_test_cases[] |
Unit test cases.