JWM Source Documentation
Functions
root.h File Reference

Root menu functions. More...

Go to the source code of this file.

Functions

void SetRootMenu (const char *indexes, struct Menu *m)
 Set the root menu to be used for the specified indexes.
 
int GetRootMenuIndex (char ch)
 Get the index for a root menu character.
 
int GetRootMenuIndexFromString (const char *str)
 Get the index for a root menu string.
 
char IsRootMenuDefined (int index)
 Determine if a root menu is defined for the specified index.
 
void GetRootMenuSize (int index, int *width, int *height)
 Get the size of a root menu.
 
char ShowRootMenu (int index, int x, int y, char keyboard)
 Show a root menu.
 
void Restart (void)
 Restart the window manager.
 
void Exit (char confirm)
 Exit the window manager.
 
void ReloadMenu (void)
 Reload the menu.
 
#define ShutdownRootMenu()   (void)(0)
 
void InitializeRootMenu (void)
 Initialize root menu data.
 
void StartupRootMenu (void)
 Startup root menus.
 
void DestroyRootMenu (void)
 Destroy root menu data.
 

Detailed Description

Root menu functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file root.h.

Macro Definition Documentation

#define ShutdownRootMenu ( )    (void)(0)

Definition at line 18 of file root.h.

Referenced by ReloadMenu(), and Shutdown().

Function Documentation

void DestroyRootMenu ( void  )

Destroy root menu data.

Definition at line 66 of file root.c.

References DestroyMenu(), ROOT_MENU_COUNT, ClientNode::x, and ClientNode::y.

Referenced by Destroy(), and ReloadMenu().

void Exit ( char  confirm)

Exit the window manager.

Parameters
confirm1 to confirm exit, 0 for immediate exit.

Definition at line 219 of file root.c.

References _, ExitHandler(), and ShowConfirmDialog().

Referenced by HandleClientMessage(), HandleKeyPress(), and RunRootCommand().

int GetRootMenuIndex ( char  ch)

Get the index for a root menu character.

Returns
The menu index, -1 if not found.

Definition at line 86 of file root.c.

Referenced by GetRootMenuIndexFromString(), and SetRootMenu().

int GetRootMenuIndexFromString ( const char *  str)

Get the index for a root menu string.

Returns
The menu index, -1 if not found.

Definition at line 100 of file root.c.

References GetRootMenuIndex(), IsSpace(), and JUNLIKELY.

Referenced by ProcessActionPress(), ShowKeyMenu(), ValidateActions(), and ValidateKeys().

void GetRootMenuSize ( int  index,
int *  width,
int *  height 
)

Get the size of a root menu.

Parameters
indexThe root menu index.
widthThe width output.
heightThe height output.

Definition at line 170 of file root.c.

References Menu::height, and Menu::width.

Referenced by ProcessActionPress().

void InitializeRootMenu ( void  )

Initialize root menu data.

Definition at line 33 of file root.c.

References ROOT_MENU_COUNT, and ClientNode::x.

Referenced by Initialize(), and ReloadMenu().

char IsRootMenuDefined ( int  index)

Determine if a root menu is defined for the specified index.

Returns
1 if it is defined, 0 if not.

Definition at line 160 of file root.c.

References ROOT_MENU_COUNT.

Referenced by ValidateActions(), and ValidateKeys().

void ReloadMenu ( void  )
void Restart ( void  )

Restart the window manager.

Definition at line 212 of file root.c.

References shouldExit, and shouldRestart.

Referenced by HandleClientMessage(), HandleKeyPress(), and RunRootCommand().

void SetRootMenu ( const char *  indexes,
Menu m 
)

Set the root menu to be used for the specified indexes.

Parameters
indexesThe indexes (ASCII string of '0' to '9').
mThe menu to use for the specified indexes.

Definition at line 118 of file root.c.

References _, DestroyMenu(), GetRootMenuIndex(), JUNLIKELY, ROOT_MENU_COUNT, Warning(), ClientNode::x, and ClientNode::y.

Referenced by ParseRootMenu().

char ShowRootMenu ( int  index,
int  x,
int  y,
char  keyboard 
)

Show a root menu.

Parameters
indexThe root menu index.
xThe x-coordinate.
yThe y-coordinate.
keyboardSet if this request came from a key binding.
Returns
1 if a menu was displayed, 0 if not.

Definition at line 184 of file root.c.

References DestroyMenu(), InitializeMenu(), menuShown, ParseDynamicMenu(), RunRootCommand(), and ShowMenu().

Referenced by HandleButtonEvent(), ProcessActionPress(), and ShowKeyMenu().

void StartupRootMenu ( void  )

Startup root menus.

Definition at line 42 of file root.c.

References InitializeMenu(), ROOT_MENU_COUNT, ClientNode::x, and ClientNode::y.

Referenced by ReloadMenu(), and Startup().

joewing.net / Projects / JWM