JWM Source Documentation
Data Fields
TrayComponentType Struct Reference

Structure to hold common tray component data. More...

#include <tray.h>

Data Fields

struct TrayTypetray
 The tray containing the component.
 
void * object
 Additional information needed for the component.
 
int x
 x-coordinate on the tray (valid only after Create).
 
int y
 y-coordinate on the tray (valid only after Create).
 
int screenx
 x-coordinate on the screen (valid only after Create).
 
int screeny
 y-coordinate on the screen (valid only after Create).
 
int requestedWidth
 Requested width.
 
int requestedHeight
 Requested height.
 
int width
 Actual width.
 
int height
 Actual height.
 
char grabbed
 1 if the mouse was grabbed by this component.
 
Window window
 Content (if a window, otherwise None).
 
Pixmap pixmap
 Content (if a pixmap, otherwise None).
 
void(* Create )(struct TrayComponentType *cp)
 Callback to create the component.
 
void(* Destroy )(struct TrayComponentType *cp)
 Callback to destroy the component.
 
void(* SetSize )(struct TrayComponentType *cp, int width, int height)
 Callback to set the size known so far.
 
void(* Resize )(struct TrayComponentType *cp)
 Callback to resize the component.
 
void(* ProcessButtonPress )(struct TrayComponentType *cp, int x, int y, int mask)
 Callback for mouse presses.
 
void(* ProcessButtonRelease )(struct TrayComponentType *cp, int x, int y, int mask)
 Callback for mouse releases.
 
void(* ProcessMotionEvent )(struct TrayComponentType *cp, int x, int y, int mask)
 Callback for mouse motion.
 
void(* Redraw )(struct TrayComponentType *cp)
 Callback to redraw the component contents.
 
struct TrayComponentTypenext
 The next component in the tray.
 

Detailed Description

Structure to hold common tray component data.

Sizing is handled as follows:

Definition at line 55 of file tray.h.

Field Documentation

void(* TrayComponentType::Create)(struct TrayComponentType *cp)

Callback to create the component.

Definition at line 85 of file tray.h.

Referenced by CreateClock(), CreateDock(), CreatePager(), CreateSpacer(), CreateTaskBar(), CreateTrayButton(), CreateTrayComponent(), and StartupTray().

void(* TrayComponentType::Destroy)(struct TrayComponentType *cp)

Callback to destroy the component.

Definition at line 88 of file tray.h.

Referenced by CreateClock(), CreateSpacer(), CreateSwallow(), CreateTrayButton(), CreateTrayComponent(), and ShutdownTray().

char TrayComponentType::grabbed

1 if the mouse was grabbed by this component.

Definition at line 79 of file tray.h.

Referenced by CreateTrayComponent(), Draw(), HandleTrayButtonRelease(), ProcessActionPress(), and ProcessActionRelease().

int TrayComponentType::height
struct TrayComponentType* TrayComponentType::next
void* TrayComponentType::object
Pixmap TrayComponentType::pixmap

Content (if a pixmap, otherwise None).

Definition at line 82 of file tray.h.

Referenced by ClearTrayDrawable(), Create(), CreateTrayComponent(), Destroy(), Draw(), DrawClock(), DrawPager(), DrawPagerClient(), Render(), Resize(), SetSize(), and UpdateSpecificTray().

void(* TrayComponentType::ProcessButtonPress)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse presses.

Definition at line 101 of file tray.h.

Referenced by CreateClock(), CreatePager(), CreateTaskBar(), CreateTrayButton(), CreateTrayComponent(), and HandleTrayButtonPress().

void(* TrayComponentType::ProcessButtonRelease)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse releases.

Definition at line 105 of file tray.h.

Referenced by CreateClock(), CreateTrayButton(), CreateTrayComponent(), and HandleTrayButtonRelease().

void(* TrayComponentType::ProcessMotionEvent)(struct TrayComponentType *cp, int x, int y, int mask)

Callback for mouse motion.

Definition at line 109 of file tray.h.

Referenced by CreateClock(), CreatePager(), CreateTaskBar(), CreateTrayButton(), CreateTrayComponent(), and HandleTrayMotionNotify().

void(* TrayComponentType::Redraw)(struct TrayComponentType *cp)

Callback to redraw the component contents.

This is only needed for components that use actions.

Definition at line 115 of file tray.h.

Referenced by CreateTrayButton(), CreateTrayComponent(), ProcessActionPress(), and ProcessActionRelease().

int TrayComponentType::requestedHeight
int TrayComponentType::requestedWidth
void(* TrayComponentType::Resize)(struct TrayComponentType *cp)

Callback to resize the component.

Definition at line 98 of file tray.h.

Referenced by CreateClock(), CreateDock(), CreateSpacer(), CreateSwallow(), CreateTaskBar(), CreateTrayButton(), CreateTrayComponent(), and ResizeTray().

int TrayComponentType::screenx
int TrayComponentType::screeny
void(* TrayComponentType::SetSize)(struct TrayComponentType *cp, int width, int height)

Callback to set the size known so far.

This is needed for items that maintain width/height ratios. Either width or height may be zero. This is called before Create.

Definition at line 95 of file tray.h.

Referenced by ComputeTraySize(), CreateDock(), CreatePager(), CreateSpacer(), CreateTaskBar(), CreateTrayButton(), and CreateTrayComponent().

struct TrayType* TrayComponentType::tray

The tray containing the component.

UpdateSpecificTray(TrayType*, TrayComponentType*) should be called when content changes.

Definition at line 61 of file tray.h.

Referenced by AddTrayComponent(), CheckSwallowMap(), CreateTrayComponent(), DockWindow(), DrawClock(), HandleDockDestroy(), ParseTray(), ProcessActionPress(), ProcessActionRelease(), ProcessSwallowEvent(), Render(), SignalClock(), SignalPager(), SignalTaskbar(), SignalTrayButton(), UpdatePager(), and UpdateTaskBar().

int TrayComponentType::width
Window TrayComponentType::window
int TrayComponentType::x
int TrayComponentType::y

y-coordinate on the tray (valid only after Create).

Definition at line 67 of file tray.h.

Referenced by CreateTrayComponent(), DrawMoveResizeWindow(), HandleTrayButtonPress(), HandleTrayButtonRelease(), HandleTrayMotionNotify(), ResizeTray(), StartupTray(), and UpdateSpecificTray().


The documentation for this struct was generated from the following file:

joewing.net / Projects / JWM