wlmaker
Loading...
Searching...
No Matches
Typedefs | Functions
layer_surface.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include "wlclient.h"
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
Include dependency graph for layer_surface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _wlmcl_layer_surface_t wlmcl_layer_surface_t
 

Functions

bool wlmcl_layer_shell_supported (wlmcl_client_t *wlclient_ptr)
 
wlmcl_layer_surface_twlmcl_layer_surface_create (wlmcl_client_t *wlclient_ptr, uint32_t layer, const char *namespace_ptr, uint32_t anchor, uint32_t width, uint32_t height)
 
void wlmcl_layer_surface_destroy (wlmcl_layer_surface_t *layer_surface_ptr)
 
void wlmcl_layer_surface_request_size (wlmcl_layer_surface_t *layer_surface_ptr, uint32_t width, uint32_t height)
 
void wlmcl_layer_surface_set_margin (wlmcl_layer_surface_t *layer_surface_ptr, int32_t top, int32_t right, int32_t bottom, int32_t left)
 
void wlmcl_layer_surface_set_exclusive_zone (wlmcl_layer_surface_t *layer_surface_ptr, int32_t pixels)
 
struct wl_surface * wlmcl_layer_surface_wl_surface (wlmcl_layer_surface_t *layer_surface_ptr)
 
void wlmcl_layer_surface_register_configure_callback (wlmcl_layer_surface_t *layer_surface_ptr, void(*callback)(void *ud_ptr, uint32_t width, uint32_t height), void *ud_ptr)
 

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

◆ wlmcl_layer_surface_t

Forward declaration: State of the layer surface.

Function Documentation

◆ wlmcl_layer_shell_supported()

bool wlmcl_layer_shell_supported ( wlmcl_client_t wlclient_ptr)

Returns whether the layer shell protocol is supported on the client.

Parameters
wlclient_ptr

◆ wlmcl_layer_surface_create()

wlmcl_layer_surface_t * wlmcl_layer_surface_create ( wlmcl_client_t wlclient_ptr,
uint32_t  layer,
const char *  namespace_ptr,
uint32_t  anchor,
uint32_t  width,
uint32_t  height 
)

Creates a layer surface.

Parameters
wlclient_ptr
layerOne of zwlr_layer_shell_v1_layer.
namespace_ptrNamespace string.
anchorBitwise OR of zwlr_layer_surface_v1_anchor.
widthInitial requested width in pixels. 0 to let the compositor decide (requires opposite anchors).
heightInitial requested height in pixels. 0 to let the compositor decide (requires opposite anchors).
Returns
State of the layer surface or NULL on error.

◆ wlmcl_layer_surface_destroy()

void wlmcl_layer_surface_destroy ( wlmcl_layer_surface_t layer_surface_ptr)

Destroys the layer surface.

Parameters
layer_surface_ptr

◆ wlmcl_layer_surface_register_configure_callback()

void wlmcl_layer_surface_register_configure_callback ( wlmcl_layer_surface_t layer_surface_ptr,
void(*)(void *ud_ptr, uint32_t width, uint32_t height)  callback,
void *  ud_ptr 
)

Registers the callback to notify when the layer surface size/layout is determined or updated.

Parameters
layer_surface_ptr
callback
ud_ptr

◆ wlmcl_layer_surface_request_size()

void wlmcl_layer_surface_request_size ( wlmcl_layer_surface_t layer_surface_ptr,
uint32_t  width,
uint32_t  height 
)

Requests the specified size for the layer surface.

Parameters
layer_surface_ptr
widthRequested width in pixels. 0 to let the compositor decide.
heightRequested height in pixels. 0 to let the compositor decide.

◆ wlmcl_layer_surface_set_exclusive_zone()

void wlmcl_layer_surface_set_exclusive_zone ( wlmcl_layer_surface_t layer_surface_ptr,
int32_t  pixels 
)

Sets the exclusive zone of the layer surface.

Parameters
layer_surface_ptr
pixelsThe exclusive zone in pixels. Positive value reserves space to avoid occlusion by other (e.g. maximized) windows. 0 disables exclusive zone. -1 requests other windows be allowed to overlap.

◆ wlmcl_layer_surface_set_margin()

void wlmcl_layer_surface_set_margin ( wlmcl_layer_surface_t layer_surface_ptr,
int32_t  top,
int32_t  right,
int32_t  bottom,
int32_t  left 
)

Sets the margins of the layer surface from its anchor points.

Parameters
layer_surface_ptr
top
right
bottom
left

◆ wlmcl_layer_surface_wl_surface()

struct wl_surface * wlmcl_layer_surface_wl_surface ( wlmcl_layer_surface_t layer_surface_ptr)

Returns the underlying Wayland surface of the layer surface.

Parameters
layer_surface_ptr
Returns
The wl_surface pointer.