wlmaker
|
#include "server.h"
#include "config.h"
#include "output.h"
#include "toolkit/toolkit.h"
#include <libbase/libbase.h>
#include <wlr/types/wlr_cursor.h>
Classes | |
struct | wlmaker_input_device_t |
struct | _wlmaker_server_key_binding_t |
Functions | |
static bool | register_input_device (wlmaker_server_t *server_ptr, struct wlr_input_device *wlr_input_device_ptr, void *handle_ptr) |
static void | handle_new_output (struct wl_listener *listener_ptr, void *data_ptr) |
static void | handle_new_input_device (struct wl_listener *listener_ptr, void *data_ptr) |
static void | handle_destroy_input_device (struct wl_listener *listener_ptr, void *data_ptr) |
static void | handle_output_layout_change (struct wl_listener *listener_ptr, void *data_ptr) |
static void | set_extents (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
static void | arrange_views (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
static void | wlmaker_server_switch_to_workspace (wlmaker_server_t *server_ptr, wlmaker_workspace_t *workspace_ptr) |
wlmaker_server_t * | wlmaker_server_create (void) |
void | wlmaker_server_destroy (wlmaker_server_t *server_ptr) |
void | wlmaker_server_output_add (wlmaker_server_t *server_ptr, wlmaker_output_t *output_ptr) |
void | wlmaker_server_output_remove (wlmaker_server_t *server_ptr, wlmaker_output_t *output_ptr) |
wlmaker_server_key_binding_t * | wlmaker_server_bind_key (wlmaker_server_t *server_ptr, xkb_keysym_t key_sym, uint32_t modifiers, wlmaker_server_bind_key_callback_t callback, void *callback_arg_ptr) |
void | wlmaker_server_unbind_key (wlmaker_server_t *server_ptr, wlmaker_server_key_binding_t *key_binding_ptr) |
bool | wlmaker_server_process_key (wlmaker_server_t *server_ptr, xkb_keysym_t key_sym, uint32_t modifiers) |
wlmaker_workspace_t * | wlmaker_server_get_current_workspace (wlmaker_server_t *server_ptr) |
void | wlmaker_server_switch_to_next_workspace (wlmaker_server_t *server_ptr) |
void | wlmaker_server_switch_to_previous_workspace (wlmaker_server_t *server_ptr) |
struct wlr_output * | wlmaker_server_get_output_at_cursor (wlmaker_server_t *server_ptr) |
Variables | |
static const char * | seat_name_ptr = "seat0" |
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 |
Callback for bs_dllist_for_each
to arrange views in a workspace.
dlnode_ptr | |
ud_ptr |
|
static |
Handler for the destroy
signal raised by wlr_input_device
.
listener_ptr | |
data_ptr |
|
static |
Handler for the new_input
signal raised by wlr_backend
.
listener_ptr | |
data_ptr |
|
static |
Handler for the new_output
signal raised by wlr_backend
.
listener_ptr | |
data_ptr |
|
static |
Signal handler for change
event of wlr_output_layout
.
Is emitted whenever the output layout changes. For us, this means each workspace should consider re-arranging views suitably.
listener_ptr | |
data_ptr | Points to a struct wlr_output_layout . |
|
static |
Registers the input device at |handle_ptr| with |server_ptr|.
server_ptr | |
wlr_input_device_ptr | |
handle_ptr |
|
static |
Callback for bs_dllist_for_each
to set extents of the workspace.
dlnode_ptr | |
ud_ptr |
wlmaker_server_key_binding_t * wlmaker_server_bind_key | ( | wlmaker_server_t * | server_ptr, |
xkb_keysym_t | key_sym, | ||
uint32_t | modifiers, | ||
wlmaker_server_bind_key_callback_t | callback, | ||
void * | callback_arg_ptr ) |
Binds the callback to the specified key and modifiers.
server_ptr | |
key_sym | The key to bind. Both upper- and lower-case will be bound! |
modifiers | Modifiers of the bound key. |
callback | Callback for when key is pressed. |
callback_arg_ptr | Argument to pass to |callback|. |
wlmaker_server_t * wlmaker_server_create | ( | void | ) |
Creates the server and initializes all needed sub-modules.
void wlmaker_server_destroy | ( | wlmaker_server_t * | server_ptr | ) |
Destroys the server handle, as created by wlmaker_server_create().
server_ptr |
wlmaker_workspace_t * wlmaker_server_get_current_workspace | ( | wlmaker_server_t * | server_ptr | ) |
Returns the currently active workspace.
server_ptr |
wlmaker_workspace_t
currently active. struct wlr_output * wlmaker_server_get_output_at_cursor | ( | wlmaker_server_t * | server_ptr | ) |
Looks up which output serves the current cursor coordinates and returns that.
server_ptr |
void wlmaker_server_output_add | ( | wlmaker_server_t * | server_ptr, |
wlmaker_output_t * | output_ptr ) |
Adds the output.
server_ptr | |
output_ptr |
void wlmaker_server_output_remove | ( | wlmaker_server_t * | server_ptr, |
wlmaker_output_t * | output_ptr ) |
Removes the output.
server_ptr | |
output_ptr |
bool wlmaker_server_process_key | ( | wlmaker_server_t * | server_ptr, |
xkb_keysym_t | key_sym, | ||
uint32_t | modifiers ) |
Processes a key press: Looks for matching bindings and runs the callback.
server_ptr | |
key_sym | |
modifiers |
void wlmaker_server_switch_to_next_workspace | ( | wlmaker_server_t * | server_ptr | ) |
Switches to the next workspace.
server_ptr |
void wlmaker_server_switch_to_previous_workspace | ( | wlmaker_server_t * | server_ptr | ) |
Switches to the previous workspace.
server_ptr |
|
static |
Switches the current workspace to workspace_ptr
.
Note: workspace_ptr
must be contained in workspaces
of server_ptr
.
server_ptr | |
workspace_ptr |
void wlmaker_server_unbind_key | ( | wlmaker_server_t * | server_ptr, |
wlmaker_server_key_binding_t * | key_binding_ptr ) |
Releases a previously-bound key binding.
server_ptr | |
key_binding_ptr |
|
static |
Name of the "seat".