wlmaker
|
#include "view.h"
#include "button.h"
#include "config.h"
#include "decorations.h"
#include "menu.h"
#include "toolkit/toolkit.h"
#include <wlr/util/edges.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_xdg_shell.h>
Functions | |
static void | handle_button_release (struct wl_listener *listener_ptr, void *data_ptr) |
static void | update_pointer_focus (wlmaker_view_t *view_ptr, struct wlr_scene_node *wlr_scene_node_ptr) |
static void | window_menu_callback_maximize (void *ud_ptr) |
static void | window_menu_callback_fullscreen (void *ud_ptr) |
static void | window_menu_callback_minimize (void *ud_ptr) |
static void | window_menu_callback_shade (void *ud_ptr) |
static void | window_menu_callback_move_to_workspace1 (void *ud_ptr) |
static void | window_menu_callback_move_to_workspace2 (void *ud_ptr) |
static void | window_menu_callback_close (void *ud_ptr) |
void | wlmaker_view_init (wlmaker_view_t *view_ptr, const wlmaker_view_impl_t *view_impl_ptr, wlmaker_server_t *server_ptr, struct wlr_surface *wlr_surface_ptr, struct wlr_scene_tree *wlr_scene_tree_ptr, wlmaker_view_send_close_callback_t send_close_callback) |
void | wlmaker_view_fini (wlmaker_view_t *view_ptr) |
void | wlmaker_view_set_active (wlmaker_view_t *view_ptr, bool active) |
wlmaker_view_t * | wlmaker_view_from_dlnode (bs_dllist_node_t *node_ptr) |
bs_dllist_node_t * | wlmaker_dlnode_from_view (wlmaker_view_t *view_ptr) |
struct wlr_scene_node * | wlmaker_wlr_scene_node_from_view (wlmaker_view_t *view_ptr) |
struct wlr_surface * | wlmaker_view_get_wlr_surface (wlmaker_view_t *view_ptr) |
wlmaker_view_t * | wlmaker_view_at (wlmaker_server_t *server_ptr, double x, double y, struct wlr_surface **wlr_surface_ptr_ptr, double *rel_x_ptr, double *rel_y_ptr) |
void | wlmaker_view_handle_motion (wlmaker_view_t *view_ptr, double x, double y) |
void | wlmaker_view_handle_button (wlmaker_view_t *view_ptr, double x, double y, struct wlr_pointer_button_event *event_ptr) |
void | wlmaker_view_handle_axis (wlmaker_view_t *view_ptr, double x, double y, struct wlr_pointer_axis_event *event_ptr) |
void | wlmaker_view_window_menu_show (wlmaker_view_t *view_ptr) |
void | wlmaker_view_window_menu_hide (wlmaker_view_t *view_ptr) |
void | wlmaker_view_cursor_leave (wlmaker_view_t *view_ptr) |
void | wlmaker_view_shade (wlmaker_view_t *view_ptr) |
void | wlmaker_view_get_size (wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr) |
void | wlmaker_view_set_size (wlmaker_view_t *view_ptr, int width, int height) |
void | wlmaker_view_get_position (wlmaker_view_t *view_ptr, int *x_ptr, int *y_ptr) |
void | wlmaker_view_set_position (wlmaker_view_t *view_ptr, int x, int y) |
void | wlmaker_view_set_maximized (wlmaker_view_t *view_ptr, bool maximize) |
void | wlmaker_view_set_fullscreen (wlmaker_view_t *view_ptr, bool fullscreen) |
void | wlmaker_view_set_iconified (wlmaker_view_t *view_ptr, bool iconified) |
void | wlmaker_view_set_title (wlmaker_view_t *view_ptr, const char *title_ptr) |
const char * | wlmaker_view_get_title (wlmaker_view_t *view_ptr) |
void | wlmaker_view_set_app_id (wlmaker_view_t *view_ptr, const char *app_id_ptr) |
const char * | wlmaker_view_get_app_id (wlmaker_view_t *view_ptr) |
void | wlmaker_view_map (wlmaker_view_t *view_ptr, wlmaker_workspace_t *workspace_ptr, wlmaker_workspace_layer_t layer) |
void | wlmaker_view_unmap (wlmaker_view_t *view_ptr) |
uint32_t | wlmaker_view_get_anchor (wlmaker_view_t *view_ptr) |
struct wlr_output * | wlmaker_view_get_wlr_output (wlmaker_view_t *view_ptr) |
const wlmaker_client_t * | wlmaker_view_get_client (wlmaker_view_t *view_ptr) |
Variables | |
static const wlmaker_menu_item_descriptor_t | window_menu_descriptors [] |
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 |
Handler for the button_release
signal.
listener_ptr | |
data_ptr |
|
static |
Updates the node currently having "pointer focus".
view_ptr | |
wlr_scene_node_ptr | Node that is now below the cursor, ie. is going to have "pointer focus". |
|
static |
Window menu callback: Close the view.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: Toggle fullscreen mode.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: Toggle maximized view.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: .
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: Move the view to workspace 1.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: Move the view to workspace 2.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
|
static |
Window menu callback: Shade (roll up) the window.
ud_ptr | Non-typed pointer to the wlmaker_view_t. |
bs_dllist_node_t * wlmaker_dlnode_from_view | ( | wlmaker_view_t * | view_ptr | ) |
Type conversion: Gets the bs_dllist_node_t
from the given wlmaker_view_t.
view_ptr |
bs_dllist_node_t
. wlmaker_view_t * wlmaker_view_at | ( | wlmaker_server_t * | server_ptr, |
double | x, | ||
double | y, | ||
struct wlr_surface ** | wlr_surface_ptr_ptr, | ||
double * | rel_x_ptr, | ||
double * | rel_y_ptr ) |
Returns the view that has a surface at the given position. Updates wlr_surface_ptr_ptr to point to the surface.
server_ptr | |
x | |
y | |
wlr_surface_ptr_ptr | |
rel_x_ptr | |
rel_y_ptr |
void wlmaker_view_cursor_leave | ( | wlmaker_view_t * | view_ptr | ) |
Handles when the |view_ptr| loses pointer focus.
Used to update control surfaces of server side decoration. Will not be passed to the client: wlr_seat_pointer_notify_enter does that.
view_ptr |
void wlmaker_view_fini | ( | wlmaker_view_t * | view_ptr | ) |
Un-initializes the |view_ptr| state.
view_ptr |
wlmaker_view_t * wlmaker_view_from_dlnode | ( | bs_dllist_node_t * | node_ptr | ) |
Type conversion: Gets the wlmaker_view_t from the given bs_dllist_node_t
.
node_ptr |
wlmaker_view_t
holding that node. uint32_t wlmaker_view_get_anchor | ( | wlmaker_view_t * | view_ptr | ) |
Returns the anchoring edges for this view.
view_ptr |
wlmaker_view_anchor_t
. const char * wlmaker_view_get_app_id | ( | wlmaker_view_t * | view_ptr | ) |
Gets the application ID of the veiw.
Will point to a memory area that remains valid until either the view is destroyed, or wlmaker_view_set_app_id is called again.
view_ptr |
const wlmaker_client_t * wlmaker_view_get_client | ( | wlmaker_view_t * | view_ptr | ) |
Returns a pointer to details about the client, if available.
view_ptr |
view_ptr
. void wlmaker_view_get_position | ( | wlmaker_view_t * | view_ptr, |
int * | x_ptr, | ||
int * | y_ptr ) |
Retrieves the position of the view, including server-side decoration (if any).
view_ptr | |
x_ptr | |
y_ptr |
void wlmaker_view_get_size | ( | wlmaker_view_t * | view_ptr, |
uint32_t * | width_ptr, | ||
uint32_t * | height_ptr ) |
Retrieves the dimensions of the view, including server-side decoration (if any).
view_ptr | |
width_ptr | May be NULL. |
height_ptr | May be NULL. |
const char * wlmaker_view_get_title | ( | wlmaker_view_t * | view_ptr | ) |
Gets the title string.
Will point to a memory area that remains valid until either the view is destroyed, or wlmaker_view_set_title is called again.
view_ptr |
struct wlr_output * wlmaker_view_get_wlr_output | ( | wlmaker_view_t * | view_ptr | ) |
Returns the struct wlr_output
that the wlmaker_view_t
is on.
view_ptr |
struct wlr_output
. struct wlr_surface * wlmaker_view_get_wlr_surface | ( | wlmaker_view_t * | view_ptr | ) |
Gets the struct wlr_surface
associated with this view.
view_ptr |
void wlmaker_view_handle_axis | ( | wlmaker_view_t * | view_ptr, |
double | x, | ||
double | y, | ||
struct wlr_pointer_axis_event * | event_ptr ) |
Handles an axis event for the view.
Axis events are eg. scroll-wheel actions. Some of the wlmaker elements (eg. Clip) will take scroll-wheel events.
view_ptr | |
x | |
y | |
event_ptr |
void wlmaker_view_handle_button | ( | wlmaker_view_t * | view_ptr, |
double | x, | ||
double | y, | ||
struct wlr_pointer_button_event * | event_ptr ) |
Handles a button event for the view.
Any button press on the view will trigger "raise_to_top" and "activate". If server-side decorations are enabled: Button events on the decoration control surfaces may trigger respective events.
view_ptr | |
x | |
y | |
event_ptr |
void wlmaker_view_handle_motion | ( | wlmaker_view_t * | view_ptr, |
double | x, | ||
double | y ) |
Handles cursor motion for the view, ie. for the decoration elements.
view_ptr | |
x | |
y |
void wlmaker_view_init | ( | wlmaker_view_t * | view_ptr, |
const wlmaker_view_impl_t * | view_impl_ptr, | ||
wlmaker_server_t * | server_ptr, | ||
struct wlr_surface * | wlr_surface_ptr, | ||
struct wlr_scene_tree * | wlr_scene_tree_ptr, | ||
wlmaker_view_send_close_callback_t | send_close_callback ) |
Initializes the |view_ptr| state.
view_ptr | |
view_impl_ptr | |
server_ptr | |
wlr_surface_ptr | |
wlr_scene_tree_ptr | |
send_close_callback |
void wlmaker_view_map | ( | wlmaker_view_t * | view_ptr, |
wlmaker_workspace_t * | workspace_ptr, | ||
wlmaker_workspace_layer_t | layer ) |
Maps the view to the specified layer of the given workspace.
view_ptr | |
workspace_ptr | |
layer |
void wlmaker_view_set_active | ( | wlmaker_view_t * | view_ptr, |
bool | active ) |
Sets the state of the view. Active == focussed, inactive == blurred.
view_ptr | |
active |
void wlmaker_view_set_app_id | ( | wlmaker_view_t * | view_ptr, |
const char * | app_id_ptr ) |
Sets the application ID for the view.
view_ptr | |
app_id_ptr |
void wlmaker_view_set_fullscreen | ( | wlmaker_view_t * | view_ptr, |
bool | fullscreen ) |
Sets, respectively unsets this view as fullscreen.
view_ptr | |
fullscreen |
void wlmaker_view_set_iconified | ( | wlmaker_view_t * | view_ptr, |
bool | iconified ) |
Sets, respectively unsets this view as iconified.
view_ptr | |
iconified |
void wlmaker_view_set_maximized | ( | wlmaker_view_t * | view_ptr, |
bool | maximize ) |
Sets, respectively unsets this view as maximized.
view_ptr | |
maximize |
void wlmaker_view_set_position | ( | wlmaker_view_t * | view_ptr, |
int | x, | ||
int | y ) |
Sets the position of the view, including server-side decoration (if any).
view_ptr | |
x | |
y |
void wlmaker_view_set_size | ( | wlmaker_view_t * | view_ptr, |
int | width, | ||
int | height ) |
Sets the size of the view, including server-side decoration (if any).
view_ptr | |
width | |
height |
void wlmaker_view_set_title | ( | wlmaker_view_t * | view_ptr, |
const char * | title_ptr ) |
Sets the title string.
view_ptr | |
title_ptr |
void wlmaker_view_shade | ( | wlmaker_view_t * | view_ptr | ) |
Shades (rolls up) the view.
view_ptr |
void wlmaker_view_unmap | ( | wlmaker_view_t * | view_ptr | ) |
Unmaps the view.
view_ptr |
void wlmaker_view_window_menu_hide | ( | wlmaker_view_t * | view_ptr | ) |
Hides the "window menu" for this view.
Actually destroys the window menu interactive and scene buffer.
view_ptr |
void wlmaker_view_window_menu_show | ( | wlmaker_view_t * | view_ptr | ) |
Shows the "window menu" for this view.
Creates the struct wlr_scene_buffer
and wlmaker_menu_t
and wires it up for event-processing. Will not do anything in case a window menu already exists.
view_ptr |
struct wlr_scene_node * wlmaker_wlr_scene_node_from_view | ( | wlmaker_view_t * | view_ptr | ) |
Type conversion: Gets the struct wr_scene_node
for the view.
view_ptr |
|
static |
Descriptors for the menu entries of the view's "Window menu".