JWM Source Documentation
Macros | Functions | Variables
root.c File Reference

Root menu functions. More...

#include "jwm.h"
#include "root.h"
#include "menu.h"
#include "client.h"
#include "error.h"
#include "confirm.h"
#include "misc.h"
#include "winmenu.h"
#include "command.h"
#include "parse.h"
#include "settings.h"
#include "desktop.h"

Go to the source code of this file.

Macros

#define ROOT_MENU_COUNT   36
 Number of root menus to support.
 

Functions

static void ExitHandler (ClientNode *np)
 Exit callback for the exit menu item.
 
static void RunRootCommand (MenuAction *action, unsigned button)
 Root menu callback.
 
void InitializeRootMenu (void)
 Initialize root menu data.
 
void StartupRootMenu (void)
 Startup root menus.
 
void DestroyRootMenu (void)
 Destroy root menu data.
 
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.
 
void SetRootMenu (const char *indexes, Menu *m)
 Set a root menu.
 
char IsRootMenuDefined (int index)
 Determine if the specified root menu is defined.
 
void GetRootMenuSize (int index, int *width, int *height)
 Determine the size of a root menu.
 
char ShowRootMenu (int index, int x, int y, char keyboard)
 Show a root menu.
 
void Restart (void)
 Restart callback for the restart menu item.
 
void Exit (char confirm)
 Exit with optional confirmation.
 
void ReloadMenu (void)
 Reload the menu.
 

Variables

static MenurootMenu [ROOT_MENU_COUNT]
 

Detailed Description

Root menu functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file root.c.

Macro Definition Documentation

#define ROOT_MENU_COUNT   36

Number of root menus to support.

Definition at line 24 of file root.c.

Referenced by DestroyRootMenu(), InitializeRootMenu(), IsRootMenuDefined(), SetRootMenu(), and StartupRootMenu().

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 with optional confirmation.

Exit the window manager.

Definition at line 219 of file root.c.

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

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

void ExitHandler ( ClientNode np)
static

Exit callback for the exit menu item.

Definition at line 206 of file root.c.

References shouldExit.

Referenced by Exit().

int GetRootMenuIndex ( char  ch)

Get the index for a root menu character.

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.

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 
)

Determine the size of a root menu.

Get the size of a root menu.

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 the specified root menu is defined.

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

Definition at line 160 of file root.c.

References ROOT_MENU_COUNT.

Referenced by ValidateActions(), and ValidateKeys().

void ReloadMenu ( void  )
void Restart ( void  )

Restart callback for the restart menu item.

Restart the window manager.

Definition at line 212 of file root.c.

References shouldExit, and shouldRestart.

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

void RunRootCommand ( MenuAction action,
unsigned  button 
)
static
void SetRootMenu ( const char *  indexes,
Menu m 
)

Set a root menu.

Set the root menu to be used 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.

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().

Variable Documentation

Menu* rootMenu[ROOT_MENU_COUNT]
static

Definition at line 26 of file root.c.

joewing.net / Projects / JWM