JWM Source Documentation
menu.h File Reference
Header for the menu functions. More...
Go to the source code of this file.
Data Structures | |
| struct | MenuAction |
| Structure to represent a menu action for callbacks. More... | |
| struct | MenuItem |
| Structure to represent a menu item. More... | |
| struct | Menu |
| Structure to represent a menu or submenu. More... | |
Typedefs | |
| typedef struct MenuAction | MenuAction |
| Structure to represent a menu action for callbacks. | |
| typedef struct MenuItem | MenuItem |
| Structure to represent a menu item. | |
| typedef struct Menu | Menu |
| Structure to represent a menu or submenu. | |
| typedef void(* | RunMenuCommandType )(const MenuAction *action) |
Enumerations | |
| enum | MenuActionType { MA_NONE, MA_EXECUTE, MA_DESKTOP, MA_SENDTO, MA_LAYER, MA_STICK, MA_MAXIMIZE, MA_MAXIMIZE_H, MA_MAXIMIZE_V, MA_MINIMIZE, MA_RESTORE, MA_SHADE, MA_MOVE, MA_RESIZE, MA_KILL, MA_CLOSE, MA_EXIT, MA_RESTART } |
| Enumeration of menu action types. More... | |
| enum | MenuItemType { MENU_ITEM_NORMAL, MENU_ITEM_SUBMENU, MENU_ITEM_SEPARATOR } |
| Enumeration of possible menu elements. More... | |
Functions | |
| void | InitializeMenu (Menu *menu) |
| Initialize a menu structure to be shown. | |
| void | ShowMenu (Menu *menu, RunMenuCommandType runner, int x, int y) |
| Show a menu. | |
| void | DestroyMenu (Menu *menu) |
| Destroy a menu structure. | |
| void | SetMenuOpacity (const char *str) |
| Set the Menu opacity level. | |
Variables | |
| int | menuShown |
| The number of open menus. | |
Detailed Description
Typedef Documentation
| typedef struct MenuAction MenuAction |
Structure to represent a menu action for callbacks.
| typedef void(* RunMenuCommandType)(const MenuAction *action) |
Enumeration Type Documentation
| enum MenuActionType |
| enum MenuItemType |
Function Documentation
| void DestroyMenu | ( | Menu * | menu | ) |
Destroy a menu structure.
- Parameters:
-
menu The menu to destroy.
| void InitializeMenu | ( | Menu * | menu | ) |
Initialize a menu structure to be shown.
- Parameters:
-
menu The menu to initialize.
| void SetMenuOpacity | ( | const char * | str | ) |
Set the Menu opacity level.
- Parameters:
-
str The value (ASCII).
| void ShowMenu | ( | Menu * | menu, |
| RunMenuCommandType | runner, | ||
| int | x, | ||
| int | y | ||
| ) |
Show a menu.
- Parameters:
-
menu The menu to show. runner Callback executed when an item is selected. x The x-coordinate of the menu. y The y-coordinate of the menu.
Variable Documentation
| int menuShown |
The number of open menus.