wlmaker
Loading...
Searching...
No Matches
Typedefs | Functions | Variables
layer.h File Reference
#include "element.h"
#include "env.h"
#include "panel.h"
#include "workspace.h"
Include dependency graph for layer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _wlmtk_layer_t wlmtk_layer_t
 

Functions

wlmtk_layer_twlmtk_layer_create (wlmtk_env_t *env_ptr)
 
void wlmtk_layer_destroy (wlmtk_layer_t *layer_ptr)
 
wlmtk_element_twlmtk_layer_element (wlmtk_layer_t *layer_ptr)
 
void wlmtk_layer_add_panel (wlmtk_layer_t *layer_ptr, wlmtk_panel_t *panel_ptr)
 
void wlmtk_layer_remove_panel (wlmtk_layer_t *layer_ptr, wlmtk_panel_t *panel_ptr)
 
void wlmtk_layer_reconfigure (wlmtk_layer_t *layer_ptr)
 
void wlmtk_layer_set_workspace (wlmtk_layer_t *layer_ptr, wlmtk_workspace_t *workspace_ptr)
 

Variables

const bs_test_case_t wlmtk_layer_test_cases []
 

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.

Typedef Documentation

◆ wlmtk_layer_t

typedef struct _wlmtk_layer_t wlmtk_layer_t

Forward declaration: Layer state.

Function Documentation

◆ wlmtk_layer_add_panel()

void wlmtk_layer_add_panel ( wlmtk_layer_t * layer_ptr,
wlmtk_panel_t * panel_ptr )

Adds the panel to the layer. This will trigger an update to the layer's layout, and a call to request_size of each panel.

Parameters
layer_ptr
panel_ptr

◆ wlmtk_layer_create()

wlmtk_layer_t * wlmtk_layer_create ( wlmtk_env_t * env_ptr)

Creates a layer. Layers contain panels, such as layer shells.

Parameters
env_ptr
Returns
Pointer to the layer handle or NULL on error.

◆ wlmtk_layer_destroy()

void wlmtk_layer_destroy ( wlmtk_layer_t * layer_ptr)

Destroys the layer.

Parameters
layer_ptr

◆ wlmtk_layer_element()

wlmtk_element_t * wlmtk_layer_element ( wlmtk_layer_t * layer_ptr)
Returns
Pointer to super wlmtk_element_t of the layer.

◆ wlmtk_layer_reconfigure()

void wlmtk_layer_reconfigure ( wlmtk_layer_t * layer_ptr)

Calls wlmtk_panel_compute_dimensions for each contained panel.

The Wayland protocol spells it is 'undefined' how panels (layer shells) are stacked and configured within a layer. For wlmaker, we'll configure the panels in sequence as they were added (found in the container, back to front).

Parameters
layer_ptr

◆ wlmtk_layer_remove_panel()

void wlmtk_layer_remove_panel ( wlmtk_layer_t * layer_ptr,
wlmtk_panel_t * panel_ptr )

Removes the panel from the layer.

Parameters
layer_ptr
panel_ptr

◆ wlmtk_layer_set_workspace()

void wlmtk_layer_set_workspace ( wlmtk_layer_t * layer_ptr,
wlmtk_workspace_t * workspace_ptr )

Sets the parent workspace for the layer.

Should only be called from wlmtk_workspace_t methods.

Parameters
layer_ptr
workspace_ptrNULL to clear the workspace reference.

Variable Documentation

◆ wlmtk_layer_test_cases

const bs_test_case_t wlmtk_layer_test_cases[]
extern

Layer unit test.