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

Button tray component. More...

#include "jwm.h"
#include "traybutton.h"
#include "tray.h"
#include "icon.h"
#include "image.h"
#include "error.h"
#include "root.h"
#include "main.h"
#include "font.h"
#include "button.h"
#include "misc.h"
#include "screen.h"
#include "desktop.h"
#include "popup.h"
#include "timing.h"
#include "command.h"
#include "cursor.h"
#include "settings.h"
#include "event.h"
#include "action.h"

Go to the source code of this file.

Data Structures

struct  TrayButtonType
 

Typedefs

typedef struct TrayButtonType TrayButtonType
 

Functions

static void Create (TrayComponentType *cp)
 Initialize a button tray component.
 
static void Destroy (TrayComponentType *cp)
 Destroy a button tray component.
 
static void SetSize (TrayComponentType *cp, int width, int height)
 Set the size of a button tray component.
 
static void Resize (TrayComponentType *cp)
 Resize a button tray component.
 
static void Draw (TrayComponentType *cp)
 Draw a tray button.
 
static void ProcessButtonPress (TrayComponentType *cp, int x, int y, int button)
 Process a button press.
 
static void ProcessButtonRelease (TrayComponentType *cp, int x, int y, int button)
 Process a button release.
 
static void ProcessMotionEvent (TrayComponentType *cp, int x, int y, int mask)
 Process a motion event.
 
static void SignalTrayButton (const TimeType *now, int x, int y, Window w, void *data)
 Signal (needed for popups).
 
void StartupTrayButtons (void)
 Startup tray buttons.
 
void DestroyTrayButtons (void)
 Release tray button data.
 
TrayComponentTypeCreateTrayButton (const char *iconName, const char *label, const char *popup, unsigned int width, unsigned int height)
 Create a button tray component.
 
void AddTrayButtonAction (TrayComponentType *cp, const char *action, int mask)
 Add a action to a tray button.
 
void ValidateTrayButtons (void)
 Validate tray buttons.
 

Variables

static TrayButtonTypebuttons = NULL
 

Detailed Description

Button tray component.

Author
Joe Wingbermuehle
Date
2004-2006

Definition in file traybutton.c.

Typedef Documentation

Function Documentation

void AddTrayButtonAction ( TrayComponentType cp,
const char *  action,
int  mask 
)

Add a action to a tray button.

Add an action to a tray button.

Definition at line 172 of file traybutton.c.

References TrayButtonType::actions, AddAction(), and TrayComponentType::object.

Referenced by ParseTrayButton().

void Create ( TrayComponentType cp)
static

Initialize a button tray component.

Definition at line 248 of file traybutton.c.

References display, Draw(), TrayComponentType::height, JXCreatePixmap, TrayComponentType::pixmap, rootDepth, rootWindow, and TrayComponentType::width.

Referenced by CreateTrayButton(), and Resize().

TrayComponentType* CreateTrayButton ( const char *  iconName,
const char *  label,
const char *  popup,
unsigned int  width,
unsigned int  height 
)
read
void Destroy ( TrayComponentType cp)
static

Destroy a button tray component.

Definition at line 263 of file traybutton.c.

References display, JXFreePixmap, and TrayComponentType::pixmap.

Referenced by CreateTrayButton(), and Resize().

void DestroyTrayButtons ( void  )
void Draw ( TrayComponentType cp)
static
void ProcessButtonPress ( TrayComponentType cp,
int  x,
int  y,
int  button 
)
static

Process a button press.

Definition at line 299 of file traybutton.c.

References TrayButtonType::actions, TrayComponentType::object, and ProcessActionPress().

Referenced by CreateTrayButton().

void ProcessButtonRelease ( TrayComponentType cp,
int  x,
int  y,
int  button 
)
static

Process a button release.

Definition at line 306 of file traybutton.c.

References TrayButtonType::actions, TrayComponentType::object, and ProcessActionRelease().

Referenced by CreateTrayButton().

void ProcessMotionEvent ( TrayComponentType cp,
int  x,
int  y,
int  mask 
)
static
void Resize ( TrayComponentType cp)
static

Resize a button tray component.

Definition at line 256 of file traybutton.c.

References Create(), and Destroy().

Referenced by CreateTrayButton().

void SetSize ( TrayComponentType cp,
int  width,
int  height 
)
static
void SignalTrayButton ( const TimeType now,
int  x,
int  y,
Window  w,
void *  data 
)
static
void StartupTrayButtons ( void  )
void ValidateTrayButtons ( void  )

Validate tray buttons.

Validate the tray buttons and print a warning if something is wrong.

Definition at line 344 of file traybutton.c.

References TrayButtonType::actions, TrayButtonType::next, and ValidateActions().

Referenced by ParseConfig().

Variable Documentation

TrayButtonType* buttons = NULL
static

Definition at line 49 of file traybutton.c.

Referenced by CreateTrayButton().

joewing.net / Projects / JWM