JWM Source Documentation
Functions
desktop.h File Reference

Header for the desktop management functions. More...

Go to the source code of this file.

Functions

unsigned int GetRightDesktop (unsigned int desktop)
 Get a relative desktop.
 
unsigned int GetLeftDesktop (unsigned int desktop)
 Get the left desktop.
 
unsigned int GetAboveDesktop (unsigned int desktop)
 Get the above desktop.
 
unsigned int GetBelowDesktop (unsigned int desktop)
 Get the below desktop.
 
char RightDesktop (void)
 Switch to a relative desktop.
 
char LeftDesktop (void)
 Change to the desktop to the left.
 
char AboveDesktop (void)
 Change to the desktop above.
 
char BelowDesktop (void)
 Change to the desktop below.
 
void ChangeDesktop (unsigned int desktop)
 Switch to a specific desktop.
 
void ShowDesktop (void)
 Toggle the "show desktop" state.
 
struct MenuCreateDesktopMenu (unsigned int mask, void *context)
 Create a menu containing a list of desktops.
 
struct MenuCreateSendtoMenu (unsigned char mask, void *context)
 Create a menu containing a list of desktops.
 
void SetDesktopName (unsigned int desktop, const char *str)
 Set the name of a desktop.
 
const char * GetDesktopName (unsigned int desktop)
 Get the name of a desktop.
 
#define InitializeDesktops()   (void)(0)
 
#define ShutdownDesktops()   (void)(0)
 
void StartupDesktops (void)
 Startup desktop support.
 
void DestroyDesktops (void)
 Release desktop data.
 

Detailed Description

Header for the desktop management functions.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file desktop.h.

Macro Definition Documentation

#define InitializeDesktops ( )    (void)(0)

Definition at line 16 of file desktop.h.

Referenced by Initialize().

#define ShutdownDesktops ( )    (void)(0)

Definition at line 18 of file desktop.h.

Referenced by Shutdown().

Function Documentation

char AboveDesktop ( void  )

Change to the desktop above.

Definition at line 129 of file desktop.c.

References ChangeDesktop(), currentDesktop, Settings::desktopHeight, GetAboveDesktop(), and settings.

Referenced by HandleKeyPress(), and UpdateDesktop().

char BelowDesktop ( void  )

Change to the desktop below.

Definition at line 141 of file desktop.c.

References ChangeDesktop(), currentDesktop, Settings::desktopHeight, GetBelowDesktop(), and settings.

Referenced by HandleKeyPress(), and UpdateDesktop().

void ChangeDesktop ( unsigned int  desktop)
struct Menu* CreateDesktopMenu ( unsigned int  mask,
void *  context 
)
read

Create a menu containing a list of desktops.

Parameters
maskA bit mask of desktops to highlight.
contextContext to pass the action handler.
Returns
A menu containing all the desktops.

Definition at line 208 of file desktop.c.

References MenuItem::action, Allocate, MenuAction::context, CreateMenu(), CreateMenuItem(), Settings::desktopCount, desktopNames, Menu::items, MA_DESKTOP, MENU_ITEM_NORMAL, MenuItem::name, MenuItem::next, settings, MenuAction::type, and MenuAction::value.

Referenced by CreateWindowSendToMenu(), and PatchMenu().

struct Menu* CreateSendtoMenu ( MenuActionType  mask,
void *  context 
)
read

Create a menu containing a list of desktops.

Parameters
maskMask to OR onto the action.
contextContext to pass the action handler.
Returns
A menu containing all the desktops.

Definition at line 237 of file desktop.c.

References MenuItem::action, Allocate, MenuAction::context, CreateMenu(), CreateMenuItem(), currentDesktop, Settings::desktopCount, desktopNames, Menu::items, MA_SENDTO, MENU_ITEM_NORMAL, MenuItem::name, MenuItem::next, settings, MenuAction::type, and MenuAction::value.

Referenced by PatchMenu().

void DestroyDesktops ( void  )

Release desktop data.

Definition at line 54 of file desktop.c.

References Settings::desktopCount, desktopNames, Release, settings, and showingDesktop.

Referenced by Destroy().

unsigned int GetAboveDesktop ( unsigned int  desktop)

Get the above desktop.

Definition at line 90 of file desktop.c.

References currentDesktop, Settings::desktopHeight, Settings::desktopWidth, and settings.

Referenced by AboveDesktop(), and HandleKeyPress().

unsigned int GetBelowDesktop ( unsigned int  desktop)

Get the below desktop.

Definition at line 99 of file desktop.c.

References currentDesktop, Settings::desktopCount, Settings::desktopWidth, and settings.

Referenced by BelowDesktop(), and HandleKeyPress().

const char* GetDesktopName ( unsigned int  desktop)

Get the name of a desktop.

Parameters
desktopThe desktop (0 based).
Returns
The name of the desktop.

Definition at line 355 of file desktop.c.

References Assert, Settings::desktopCount, desktopNames, and settings.

Referenced by DrawPager(), SignalPager(), and StartupHints().

unsigned int GetLeftDesktop ( unsigned int  desktop)

Get the left desktop.

Definition at line 81 of file desktop.c.

References currentDesktop, Settings::desktopWidth, and settings.

Referenced by HandleKeyPress(), and LeftDesktop().

unsigned int GetRightDesktop ( unsigned int  desktop)

Get a relative desktop.

Definition at line 73 of file desktop.c.

References Settings::desktopWidth, and settings.

Referenced by HandleKeyPress(), and RightDesktop().

char LeftDesktop ( void  )

Change to the desktop to the left.

Definition at line 117 of file desktop.c.

References ChangeDesktop(), currentDesktop, Settings::desktopWidth, GetLeftDesktop(), and settings.

Referenced by HandleButtonEvent(), HandleKeyPress(), ProcessPagerButtonEvent(), and UpdateDesktop().

char RightDesktop ( void  )

Switch to a relative desktop.

Definition at line 105 of file desktop.c.

References ChangeDesktop(), currentDesktop, Settings::desktopWidth, GetRightDesktop(), and settings.

Referenced by HandleButtonEvent(), HandleKeyPress(), ProcessPagerButtonEvent(), and UpdateDesktop().

void SetDesktopName ( unsigned int  desktop,
const char *  str 
)

Set the name of a desktop.

This is called before startup.

Parameters
desktopThe desktop to name (0 based).
strThe name to assign.

Definition at line 329 of file desktop.c.

References _, Allocate, Assert, CopyString(), Settings::desktopCount, Settings::desktopHeight, desktopNames, Settings::desktopWidth, JUNLIKELY, settings, and Warning().

Referenced by ParseDesktop().

void ShowDesktop ( void  )
void StartupDesktops ( void  )

Startup desktop support.

Definition at line 28 of file desktop.c.

References Allocate, Settings::desktopCount, desktopNames, settings, and showingDesktop.

Referenced by Startup().

joewing.net / Projects / JWM