wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
action_item.h File Reference
#include <stddef.h>
#include <libbase/libbase.h>
#include "action.h"
#include "server.h"
#include "toolkit/toolkit.h"
Include dependency graph for action_item.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmaker_action_item_desc_t
 

Typedefs

typedef struct _wlmaker_action_item_t wlmaker_action_item_t
 

Functions

wlmaker_action_item_twlmaker_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_twlmaker_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_twlmaker_action_item_menu_item (wlmaker_action_item_t *action_item_ptr)
 

Variables

const bs_test_case_t wlmaker_action_item_test_cases []
 

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

◆ wlmaker_action_item_t

Forward declaration: An action-triggering menu item.

Function Documentation

◆ wlmaker_action_item_create()

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.

Parameters
text_ptr
style_ptr
action
action_arg_ptrExtra argument. Will be duplicated.
server_ptr
Returns
Poitner to the menu item's handle or NULL on error.

◆ wlmaker_action_item_create_from_desc()

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.

Parameters
desc_ptr
dest_ptr
style_ptr
server_ptr
Returns
Pointer to the item's handle or NULL on error.

◆ wlmaker_action_item_destroy()

void wlmaker_action_item_destroy ( wlmaker_action_item_t action_item_ptr)

Destroys the action-triggering menu item.

Parameters
action_item_ptr

◆ wlmaker_action_item_menu_item()

wlmtk_menu_item_t * wlmaker_action_item_menu_item ( wlmaker_action_item_t action_item_ptr)
Returns
pointer to the superclass wlmtk_menu_item_t.

Variable Documentation

◆ wlmaker_action_item_test_cases

const bs_test_case_t wlmaker_action_item_test_cases[]
extern

Unit test cases.

Test cases for action items.