JWM Source Documentation
Functions | Variables
desktop.c File Reference
#include "jwm.h"
#include "desktop.h"
#include "main.h"
#include "client.h"
#include "clientlist.h"
#include "taskbar.h"
#include "error.h"
#include "menu.h"
#include "misc.h"
#include "background.h"
#include "settings.h"
#include "grab.h"
#include "event.h"

Go to the source code of this file.

Functions

void StartupDesktops (void)
 Startup desktop support.
 
void DestroyDesktops (void)
 Release desktop data.
 
unsigned int GetRightDesktop (unsigned int desktop)
 Get the right 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)
 Change to the desktop to the right.
 
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)
 Change to the specified desktop.
 
MenuCreateDesktopMenu (unsigned int mask, void *context)
 Create a desktop menu.
 
MenuCreateSendtoMenu (MenuActionType mask, void *context)
 Create a sendto menu.
 
void ShowDesktop (void)
 Toggle the "show desktop" state.
 
void SetDesktopName (unsigned int desktop, const char *str)
 Set the name for a desktop.
 
const char * GetDesktopName (unsigned int desktop)
 Get the name of a desktop.
 

Variables

static char ** desktopNames = NULL
 
static char * showingDesktop = NULL
 

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)
Menu* CreateDesktopMenu ( unsigned int  mask,
void *  context 
)
read
Menu* CreateSendtoMenu ( MenuActionType  mask,
void *  context 
)
read
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.

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 the right 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  )

Change to the desktop to the right.

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 for a desktop.

Set the name of a desktop.

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

Variable Documentation

char** desktopNames = NULL
static
char* showingDesktop = NULL
static

Definition at line 25 of file desktop.c.

Referenced by ChangeDesktop(), DestroyDesktops(), ShowDesktop(), and StartupDesktops().

joewing.net / Projects / JWM