wlmaker
|
#include "action_item.h"
#include <libbase/libbase.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include "root_menu.h"
Classes | |
struct | _wlmaker_action_item_t |
Functions | |
static void | _wlmaker_action_item_handle_triggered (struct wl_listener *listener_ptr, void *data_ptr) |
static void | _wlmaker_action_item_handle_destroy (struct wl_listener *listener_ptr, void *data_ptr) |
wlmaker_action_item_t * | wlmaker_action_item_create (const char *text_ptr, const wlmtk_menu_item_style_t *style_ptr, wlmaker_action_t action, const char *action_arg_ptr, wlmaker_server_t *server_ptr) |
wlmaker_action_item_t * | wlmaker_action_item_create_from_desc (const wlmaker_action_item_desc_t *desc_ptr, void *dest_ptr, const wlmtk_menu_item_style_t *style_ptr, wlmaker_server_t *server_ptr) |
void | wlmaker_action_item_destroy (wlmaker_action_item_t *action_item_ptr) |
wlmtk_menu_item_t * | wlmaker_action_item_menu_item (wlmaker_action_item_t *action_item_ptr) |
static void | _wlmaker_action_item_test_create (bs_test_t *test_ptr) |
static void | _wlmaker_action_item_test_menu_dtor (bs_test_t *test_ptr) |
Variables | |
const bs_test_case_t | wlmaker_action_item_test_cases [] |
static const wlmtk_menu_style_t | _wlmaker_action_item_menu_style = {} |
static const wlmaker_action_item_desc_t | _wlmaker_action_item_desc |
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 |
Handles wlmtk_menu_item_events_t::destroy. Destroy the action item.
|
static |
Handles wlmtk_menu_item_events_t::triggered. Triggers the action
|
static |
Tests creation the menu item.
|
static |
Tests that dtors are called as deisred from the menu.
wlmaker_action_item_t * wlmaker_action_item_create | ( | const char * | text_ptr, |
const wlmtk_menu_item_style_t * | style_ptr, | ||
wlmaker_action_t | action, | ||
const char * | action_arg_ptr, | ||
wlmaker_server_t * | server_ptr | ||
) |
Creates a menu item that triggers a wlmaker_action_t.
text_ptr | |
style_ptr | |
action | |
action_arg_ptr | Extra argument. Will be duplicated. |
server_ptr |
wlmaker_action_item_t * wlmaker_action_item_create_from_desc | ( | const wlmaker_action_item_desc_t * | desc_ptr, |
void * | dest_ptr, | ||
const wlmtk_menu_item_style_t * | style_ptr, | ||
wlmaker_server_t * | server_ptr | ||
) |
Creates a menu item triggering an action item from a descriptor.
desc_ptr | |
dest_ptr | |
style_ptr | |
server_ptr |
void wlmaker_action_item_destroy | ( | wlmaker_action_item_t * | action_item_ptr | ) |
Destroys the action-triggering menu item.
action_item_ptr |
wlmtk_menu_item_t * wlmaker_action_item_menu_item | ( | wlmaker_action_item_t * | action_item_ptr | ) |
|
static |
Test data: Descriptor for the action item used in tests.
|
static |
Test data: style for the menu item.
const bs_test_case_t wlmaker_action_item_test_cases[] |
Test cases for action items.