JWM Source Documentation
Data Structures | Typedefs | Functions | Variables
pager.c File Reference

Pager tray component. More...

#include "jwm.h"
#include "pager.h"
#include "client.h"
#include "clientlist.h"
#include "color.h"
#include "cursor.h"
#include "desktop.h"
#include "event.h"
#include "tray.h"
#include "timing.h"
#include "popup.h"
#include "font.h"
#include "settings.h"

Go to the source code of this file.

Data Structures

struct  PagerType
 Structure to represent a pager tray component. More...
 

Typedefs

typedef struct PagerType PagerType
 Structure to represent a pager tray component.
 

Functions

static void Create (TrayComponentType *cp)
 Initialize a pager tray component.
 
static void SetSize (TrayComponentType *cp, int width, int height)
 Set the size of a pager tray component.
 
static int GetPagerDesktop (PagerType *pp, int x, int y)
 Get the desktop for a pager given a set of coordinates.
 
static void ProcessPagerButtonEvent (TrayComponentType *cp, int x, int y, int mask)
 Process a button event on a pager tray component.
 
static void ProcessPagerMotionEvent (TrayComponentType *cp, int x, int y, int mask)
 Process a motion event on a pager tray component.
 
static void StartPagerMove (TrayComponentType *cp, int x, int y)
 Start a pager move operation.
 
static void StopPagerMove (ClientNode *np, int x, int y, int desktop, MaxFlags maxFlags)
 Stop an active pager move.
 
static void PagerMoveController (int wasDestroyed)
 Client-terminated pager move.
 
static void DrawPager (const PagerType *pp)
 Draw a pager.
 
static void DrawPagerClient (const PagerType *pp, const ClientNode *np)
 Draw a client on the pager.
 
static void SignalPager (const TimeType *now, int x, int y, Window w, void *data)
 Signal pagers (for popups).
 
void ShutdownPager (void)
 Shutdown the pager.
 
void DestroyPager (void)
 Release pager data.
 
TrayComponentTypeCreatePager (char labeled)
 Create a new pager tray component.
 
void UpdatePager (void)
 Update the pager.
 

Variables

static PagerTypepagers = NULL
 
static char shouldStopMove
 

Detailed Description

Pager tray component.

Author
Joe Wingbermuehle
Date
2004-2007

Definition in file pager.c.

Typedef Documentation

typedef struct PagerType PagerType

Structure to represent a pager tray component.

Function Documentation

void Create ( TrayComponentType cp)
static
TrayComponentType* CreatePager ( char  labeled)
read
void DestroyPager ( void  )

Release pager data.

Definition at line 86 of file pager.c.

References PagerType::next, Release, SignalPager(), and UnregisterCallback().

Referenced by Destroy().

void DrawPager ( const PagerType pp)
static
void DrawPagerClient ( const PagerType pp,
const ClientNode np 
)
static
int GetPagerDesktop ( PagerType pp,
int  x,
int  y 
)
static

Get the desktop for a pager given a set of coordinates.

Definition at line 194 of file pager.c.

References PagerType::deskHeight, Settings::desktopWidth, PagerType::deskWidth, and settings.

Referenced by ProcessPagerButtonEvent(), SignalPager(), and StartPagerMove().

void PagerMoveController ( int  wasDestroyed)
static

Client-terminated pager move.

Definition at line 491 of file pager.c.

References display, JXUngrabKeyboard, JXUngrabPointer, and shouldStopMove.

Referenced by StartPagerMove().

void ProcessPagerButtonEvent ( TrayComponentType cp,
int  x,
int  y,
int  mask 
)
static

Process a button event on a pager tray component.

Definition at line 207 of file pager.c.

References ChangeDesktop(), GetPagerDesktop(), LeftDesktop(), TrayComponentType::object, RightDesktop(), and StartPagerMove().

Referenced by CreatePager().

void ProcessPagerMotionEvent ( TrayComponentType cp,
int  x,
int  y,
int  mask 
)
static

Process a motion event on a pager tray component.

Definition at line 245 of file pager.c.

References GetCurrentTime(), PagerType::mouseTime, PagerType::mousex, PagerType::mousey, TrayComponentType::object, TrayComponentType::screenx, and TrayComponentType::screeny.

Referenced by CreatePager().

void SetSize ( TrayComponentType cp,
int  width,
int  height 
)
static
void ShutdownPager ( void  )

Shutdown the pager.

Definition at line 77 of file pager.c.

References PagerType::buffer, display, JXFreePixmap, and PagerType::next.

Referenced by Shutdown().

void SignalPager ( const TimeType now,
int  x,
int  y,
Window  w,
void *  data 
)
static
void StartPagerMove ( TrayComponentType cp,
int  x,
int  y 
)
static
void StopPagerMove ( ClientNode np,
int  x,
int  y,
int  desktop,
MaxFlags  maxFlags 
)
static
void UpdatePager ( void  )

Update the pager.

Update pagers.

Definition at line 573 of file pager.c.

References PagerType::cp, DrawPager(), JUNLIKELY, PagerType::next, shouldExit, TrayComponentType::tray, and UpdateSpecificTray().

Referenced by Signal().

Variable Documentation

PagerType* pagers = NULL
static

Definition at line 45 of file pager.c.

Referenced by CreatePager().

char shouldStopMove
static

Definition at line 47 of file pager.c.

Referenced by PagerMoveController(), and StartPagerMove().

joewing.net / Projects / JWM