wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
dock.c File Reference
#include "dock.h"
#include "config.h"
#include "dock_app.h"
#include "toolkit/toolkit.h"
#include "view.h"
Include dependency graph for dock.c:

Classes

struct  _wlmaker_dock_t
 

Functions

static wlmaker_dock_tdock_from_view (wlmaker_view_t *view_ptr)
 
static void dock_get_size (wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
 
static void handle_workspace_changed (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_dock_twlmaker_dock_create (wlmaker_server_t *server_ptr)
 
void wlmaker_dock_destroy (wlmaker_dock_t *dock_ptr)
 

Variables

const wlmaker_view_impl_t dock_view_impl
 
wlmaker_dock_app_config_t app_configs []
 

Detailed Description

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.

Function Documentation

◆ dock_from_view()

wlmaker_dock_t * dock_from_view ( wlmaker_view_t * view_ptr)
static

Typecast: Retrieves the wlmaker_dock_t for the given |view_ptr|.

Parameters
view_ptr
Returns
A pointer to the wlmaker_dock_t holding |view_ptr|.

◆ dock_get_size()

void dock_get_size ( wlmaker_view_t * view_ptr,
uint32_t * width_ptr,
uint32_t * height_ptr )
static

Gets the size of the dock in pixels.

Parameters
view_ptr
width_ptr
height_ptr

◆ handle_workspace_changed()

void handle_workspace_changed ( struct wl_listener * listener_ptr,
void * data_ptr )
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.

Parameters
listener_ptr
data_ptrPoints to the new wlmaker_workspace_t.

◆ wlmaker_dock_create()

wlmaker_dock_t * wlmaker_dock_create ( wlmaker_server_t * server_ptr)

Creates the Dock handle. Needs the server to be up with workspaces running.

Parameters
server_ptr
Returns
Pointer to the Dock handle, or NULL on error.

◆ wlmaker_dock_destroy()

void wlmaker_dock_destroy ( wlmaker_dock_t * dock_ptr)

Destroys the Dock handle.

Parameters
dock_ptr

Variable Documentation

◆ app_configs

Initial value:
= {
{
.app_id_ptr = "chrome",
.cmdline_ptr = "/usr/bin/chromium-browser --enable-features=UseOzonePlatform --ozone-platform=wayland --user-data-dir=/tmp/chrome-wayland",
.icon_path_ptr = "chrome-48x48.png"
}, {
.app_id_ptr = "foot",
.cmdline_ptr = "/usr/bin/foot",
.icon_path_ptr = "terminal-48x48.png"
}, {
.app_id_ptr = "firefox",
.cmdline_ptr = "MOZ_ENABLE_WAYLAND=1 /usr/bin/firefox",
.icon_path_ptr = "firefox-48x48.png"
}, {
.app_id_ptr = NULL,
.cmdline_ptr = NULL,
.icon_path_ptr = NULL
}
}

Hard-coded: Applications attached to the dock.

◆ dock_view_impl

const wlmaker_view_impl_t dock_view_impl
Initial value:
= {
.set_activated = NULL,
.get_size = dock_get_size
}
static void dock_get_size(wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
Definition dock.c:186

View implementor methods.