|
wlmaker
|
#include "layer_surface.h"#include <inttypes.h>#include <libbase/libbase.h>#include <stdlib.h>#include <wayland-client-protocol.h>#include "wlclient.h"#include "wlr-layer-shell-unstable-v1-client-protocol.h"
Classes | |
| struct | _wlmcl_layer_surface_t |
Functions | |
| static void | _wlmcl_layer_surface_handle_configure (void *data_ptr, struct zwlr_layer_surface_v1 *layer_surface_ptr, uint32_t serial, uint32_t width, uint32_t height) |
| static void | _wlmcl_layer_surface_handle_closed (void *data_ptr, struct zwlr_layer_surface_v1 *layer_surface_ptr) |
| bool | wlmcl_layer_shell_supported (wlmcl_client_t *wlclient_ptr) |
| 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) |
| 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) |
Variables | |
| static const struct zwlr_layer_surface_v1_listener | _wlmcl_layer_surface_listener |
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 |
Handler for the closed event of the layer surface.
| data_ptr | Untyped pointer to wlmcl_layer_surface_t. |
| layer_surface_ptr |
|
static |
Handler for the configure event of the layer surface.
| data_ptr | Untyped pointer to wlmcl_layer_surface_t. |
| layer_surface_ptr | |
| serial | |
| width | |
| height |
| bool wlmcl_layer_shell_supported | ( | wlmcl_client_t * | wlclient_ptr | ) |
Returns whether the layer shell protocol is supported on the client.
| wlclient_ptr |
| 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.
| wlclient_ptr | |
| layer | One of zwlr_layer_shell_v1_layer. |
| namespace_ptr | Namespace string. |
| anchor | Bitwise OR of zwlr_layer_surface_v1_anchor. |
| width | Initial requested width in pixels. 0 to let the compositor decide (requires opposite anchors). |
| height | Initial requested height in pixels. 0 to let the compositor decide (requires opposite anchors). |
| void wlmcl_layer_surface_destroy | ( | wlmcl_layer_surface_t * | layer_surface_ptr | ) |
Destroys the layer surface.
| layer_surface_ptr |
| 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.
| layer_surface_ptr | |
| callback | |
| ud_ptr |
| 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.
| layer_surface_ptr | |
| width | Requested width in pixels. 0 to let the compositor decide. |
| height | Requested height in pixels. 0 to let the compositor decide. |
| 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.
| layer_surface_ptr | |
| pixels | The 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. |
| 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.
| layer_surface_ptr | |
| top | |
| right | |
| bottom | |
| left |
| struct wl_surface * wlmcl_layer_surface_wl_surface | ( | wlmcl_layer_surface_t * | layer_surface_ptr | ) |
Returns the underlying Wayland surface of the layer surface.
| layer_surface_ptr |
|
static |
Listeners for the layer surface.