wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
tl_menu.c File Reference
#include "tl_menu.h"
#include <libbase/libbase.h>
#include <stddef.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include "action.h"
#include "action_item.h"
#include "config.h"
Include dependency graph for tl_menu.c:

Classes

struct  _wlmaker_tl_menu_t
 
struct  wlmaker_tl_menu_ws_item_t
 

Functions

static void _wlmaker_tl_menu_workspace_iterator_create_item (bs_dllist_node_t *dlnode_ptr, void *ud_ptr)
 
static void _wlmaker_tl_menu_ws_items_iterator_enable_workspace (bs_dllist_node_t *dlnode_ptr, void *ud_ptr)
 
static void _wlmaker_tl_menu_handle_window_state_changed (struct wl_listener *listener_ptr, void *data_ptr)
 
static void _destroy (wlmaker_tl_menu_ws_item_t *ws_item_ptr)
 
static void _item_handle_triggered (struct wl_listener *listener_ptr, void *data_ptr)
 
static void _item_handle_destroy (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_tl_menu_twlmaker_tl_menu_create (wlmtk_window_t *window_ptr, wlmaker_server_t *server_ptr)
 
void wlmaker_tl_menu_destroy (wlmaker_tl_menu_t *tl_menu_ptr)
 

Variables

static const wlmaker_action_item_desc_t _tl_menu_items []
 

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

◆ _destroy()

void _destroy ( wlmaker_tl_menu_ws_item_t ws_item_ptr)
static

Destroys the item holder.

◆ _item_handle_destroy()

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

Handler for wlmtk_menu_item_events_t::destroy. Destroy.

◆ _item_handle_triggered()

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

Handler for wlmtk_menu_item_events_t::triggered. Moves the window.

◆ _wlmaker_tl_menu_handle_window_state_changed()

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

Handles state changes: Updates the menu items accordingly.

◆ _wlmaker_tl_menu_workspace_iterator_create_item()

void _wlmaker_tl_menu_workspace_iterator_create_item ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)
static

Creates a menu item for each workspace.

◆ _wlmaker_tl_menu_ws_items_iterator_enable_workspace()

void _wlmaker_tl_menu_ws_items_iterator_enable_workspace ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)
static

Enables workspace items, except the one the window is currently on.

◆ wlmaker_tl_menu_create()

wlmaker_tl_menu_t * wlmaker_tl_menu_create ( wlmtk_window_t window_ptr,
wlmaker_server_t server_ptr 
)

Creates a (window) menu for a toplevel (window).

Parameters
window_ptr
server_ptr
Returns
pointer to the toplevel's menu state or NULL on error.

◆ wlmaker_tl_menu_destroy()

void wlmaker_tl_menu_destroy ( wlmaker_tl_menu_t tl_menu_ptr)

Destroys the toplevel's menu.

Parameters
tl_menu_ptr

Variable Documentation

◆ _tl_menu_items

const wlmaker_action_item_desc_t _tl_menu_items[]
static

Menu items for the XDG toplevel's window menu.