wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
layer_surface.c File Reference
#include "layer_surface.h"
#include "toolkit/toolkit.h"
#include "view.h"
#include <libbase/libbase.h>
Include dependency graph for layer_surface.c:

Classes

struct  _wlmaker_layer_surface_t
 

Functions

static wlmaker_layer_surface_tlayer_surface_from_view (wlmaker_view_t *view_ptr)
 
static void layer_surface_get_size (wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
 
static void handle_destroy (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_map (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_unmap (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_new_popup (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_surface_commit (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_layer_surface_twlmaker_layer_surface_create (struct wlr_layer_surface_v1 *wlr_layer_surface_v1_ptr, wlmaker_server_t *server_ptr)
 
void wlmaker_layer_surface_destroy (wlmaker_layer_surface_t *layer_surface_ptr)
 
bool wlmaker_layer_surface_is_exclusive (wlmaker_layer_surface_t *layer_surface_ptr)
 
void wlmaker_layer_surface_configure (wlmaker_layer_surface_t *layer_surface_ptr, const struct wlr_box *full_area_ptr, struct wlr_box *usable_area_ptr)
 
bs_dllist_node_t * wlmaker_dlnode_from_layer_surface (wlmaker_layer_surface_t *layer_surface_ptr)
 
wlmaker_layer_surface_twlmaker_layer_surface_from_dlnode (bs_dllist_node_t *dlnode_ptr)
 

Variables

const wlmaker_view_impl_t layer_surface_view_impl
 

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

◆ handle_destroy()

void handle_destroy ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the destroy signal of the wlr_layer_surface_v1.

Parameters
listener_ptr
data_ptr

◆ handle_map()

void handle_map ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the map signal of the wlr_layer_surface_v1.

Parameters
listener_ptr
data_ptr

◆ handle_new_popup()

void handle_new_popup ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the new_popup signal of the wlr_layer_surface_v1.

Parameters
listener_ptr
data_ptrPoints to a wlr_xdg_popup.

◆ handle_surface_commit()

void handle_surface_commit ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the commit signal raised by wlr_surface.

Parameters
listener_ptr
data_ptrPoints to the wlr_surface raising the signla.

◆ handle_unmap()

void handle_unmap ( struct wl_listener * listener_ptr,
void * data_ptr )
static

Handler for the unmap signal of the wlr_layer_surface_v1.

Parameters
listener_ptr
data_ptr

◆ layer_surface_from_view()

wlmaker_layer_surface_t * layer_surface_from_view ( wlmaker_view_t * view_ptr)
static

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

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

◆ layer_surface_get_size()

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

Gets the size of the layer surface.

Parameters
view_ptr
width_ptr
height_ptr

◆ wlmaker_dlnode_from_layer_surface()

bs_dllist_node_t * wlmaker_dlnode_from_layer_surface ( wlmaker_layer_surface_t * layer_surface_ptr)

Accessor: Gets the double-linked-list node from the layer.

Parameters
layer_surface_ptr
Returns
Pointer to the |dlnode| element.

◆ wlmaker_layer_surface_configure()

void wlmaker_layer_surface_configure ( wlmaker_layer_surface_t * layer_surface_ptr,
const struct wlr_box * full_area_ptr,
struct wlr_box * usable_area_ptr )

Configures the layer surface, position its scene node in accordance to its current state, and update the remaining usable area.

Parameters
layer_surface_ptr
full_area_ptr
usable_area_ptr

◆ wlmaker_layer_surface_create()

wlmaker_layer_surface_t * wlmaker_layer_surface_create ( struct wlr_layer_surface_v1 * wlr_layer_surface_v1_ptr,
wlmaker_server_t * server_ptr )

Creates a handler for the layer surface.

Parameters
wlr_layer_surface_v1_ptr
server_ptr
Returns
The handler for the layer surface or NULL on error.

◆ wlmaker_layer_surface_destroy()

void wlmaker_layer_surface_destroy ( wlmaker_layer_surface_t * layer_surface_ptr)

Destroys the handler for the layer surface.

Parameters
layer_surface_ptr

◆ wlmaker_layer_surface_from_dlnode()

wlmaker_layer_surface_t * wlmaker_layer_surface_from_dlnode ( bs_dllist_node_t * dlnode_ptr)

Type cast: Gets the wlmaker_layer_surface_t holding |dlnode_ptr|.

Parameters
dlnode_ptr
Returns
Pointer to the wlmaker_layer_surface_t.

◆ wlmaker_layer_surface_is_exclusive()

bool wlmaker_layer_surface_is_exclusive ( wlmaker_layer_surface_t * layer_surface_ptr)
Parameters
layer_surface_ptr
Returns
Whether this layer surface is exclusive.

Variable Documentation

◆ layer_surface_view_impl

const wlmaker_view_impl_t layer_surface_view_impl
Initial value:
= {
.set_activated = NULL,
}
static void layer_surface_get_size(wlmaker_view_t *view_ptr, uint32_t *width_ptr, uint32_t *height_ptr)
Definition layer_surface.c:228

View implementor methods.