wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
background.c File Reference
#include "background.h"
#include <libbase/libbase.h>
#include <stdbool.h>
#include <stdlib.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/util/edges.h>
Include dependency graph for background.c:

Classes

struct  wlmaker_background
 
struct  wlmaker_background_panel_t
 

Functions

static uint32_t _wlmaker_background_panel_request_size (wlmtk_panel_t *panel_ptr, int width, int height)
 
static void * _wlmaker_background_panel_create (struct wlr_output *wlr_output_ptr, void *ud_ptr)
 
static void _wlmaker_background_panel_destroy (struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr)
 
static void _wlmaker_background_panel_element_destroy (wlmtk_element_t *element_ptr)
 
static void _wlmaker_backgrund_panel_set_color (struct wlr_output *wlr_output_ptr, void *ud_ptr, void *output_ptr, void *arg_ptr)
 
bs_dllist_node_t * wlmaker_background_create (wlmtk_workspace_t *workspace_ptr, struct wlr_output_layout *wlr_output_layout_ptr, uint32_t color)
 
void wlmaker_background_dlnode_destroy (bs_dllist_node_t *dlnode_ptr, void *ud_ptr)
 
void wlmaker_background_dlnode_set_color (bs_dllist_node_t *dlnode_ptr, void *ud_ptr)
 

Variables

static const wlmtk_panel_vmt_t _wlmaker_background_panel_vmt
 
static const wlmtk_element_vmt_t _wlmaker_background_panel_element_vmt
 
static const wlmtk_panel_positioning_t _wlmaker_background_panel_position
 

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

◆ _wlmaker_background_panel_create()

void * _wlmaker_background_panel_create ( struct wlr_output *  wlr_output_ptr,
void *  ud_ptr 
)
static

Ctor.

◆ _wlmaker_background_panel_destroy()

void _wlmaker_background_panel_destroy ( struct wlr_output *  wlr_output_ptr,
void *  ud_ptr,
void *  output_ptr 
)
static

Dtor.

◆ _wlmaker_background_panel_element_destroy()

void _wlmaker_background_panel_element_destroy ( wlmtk_element_t element_ptr)
static

Dtor for the panel's element. Leaves the output handle intact.

◆ _wlmaker_background_panel_request_size()

uint32_t _wlmaker_background_panel_request_size ( wlmtk_panel_t panel_ptr,
int  width,
int  height 
)
static

Implements wlmtk_panel_vmt_t::request_size. Updates the panel size.

◆ _wlmaker_backgrund_panel_set_color()

void _wlmaker_backgrund_panel_set_color ( struct wlr_output *  wlr_output_ptr,
void *  ud_ptr,
void *  output_ptr,
void *  arg_ptr 
)
static

Sets the background color for the panel on this output.

◆ wlmaker_background_create()

bs_dllist_node_t * wlmaker_background_create ( wlmtk_workspace_t workspace_ptr,
struct wlr_output_layout *  wlr_output_layout_ptr,
uint32_t  color 
)

Creates a background, derived from a wlmtk_panel_t.

Parameters
workspace_ptr
wlr_output_layout_ptr
color
Returns
A list node acting as handle for the background, or NULL on error.

◆ wlmaker_background_dlnode_destroy()

void wlmaker_background_dlnode_destroy ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)

Destroys the background.

Parameters
dlnode_ptr
ud_ptr

◆ wlmaker_background_dlnode_set_color()

void wlmaker_background_dlnode_set_color ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)

Sets the color for this workspace's background on each output.

Parameters
dlnode_ptr
ud_ptr

Variable Documentation

◆ _wlmaker_background_panel_element_vmt

const wlmtk_element_vmt_t _wlmaker_background_panel_element_vmt
static
Initial value:
= {
}
static void _wlmaker_background_panel_element_destroy(wlmtk_element_t *element_ptr)
Definition background.c:234

The panel's superclass element virtual method table.

◆ _wlmaker_background_panel_position

const wlmtk_panel_positioning_t _wlmaker_background_panel_position
static
Initial value:
= {
.desired_width = 0,
.desired_height = 0,
.anchor = WLR_EDGE_LEFT | WLR_EDGE_TOP | WLR_EDGE_RIGHT | WLR_EDGE_BOTTOM,
}

Panel's position: Anchored to all 4 edges, and auto-sized.

◆ _wlmaker_background_panel_vmt

const wlmtk_panel_vmt_t _wlmaker_background_panel_vmt
static
Initial value:
= {
}
static uint32_t _wlmaker_background_panel_request_size(wlmtk_panel_t *panel_ptr, int width, int height)
Definition background.c:152

The background panels' virtual method table.