JWM Source Documentation

icon.h File Reference

Header file for icon functions. More...

Go to the source code of this file.

Data Structures

struct  ScaledIconNode
 Structure to hold a scaled icon. More...
struct  IconNode
 Structure to hold an icon. More...

Typedefs

typedef struct ScaledIconNode ScaledIconNode
 Structure to hold a scaled icon.
typedef struct IconNode IconNode
 Structure to hold an icon.

Functions

void AddIconPath (char *path)
 Add an icon path.
void PutIcon (IconNode *icon, Drawable d, int x, int y, int width, int height)
 Render an icon.
void LoadIcon (struct ClientNode *np)
 Load an icon for a client.
IconNodeLoadNamedIcon (const char *name)
 Load an icon.
void DestroyIcon (IconNode *icon)
 Destroy an icon.
IconNodeCreateIcon ()
 Create and initialize a new icon structure.
void InitializeIcons ()
void StartupIcons ()
void ShutdownIcons ()
void DestroyIcons ()

Variables

IconNode emptyIcon

Detailed Description

Header file for icon functions.

Author:
Joe Wingbermuehle
Date:
2004-2006

Definition in file icon.h.


Typedef Documentation

typedef struct IconNode IconNode

Structure to hold an icon.

Structure to hold a scaled icon.


Function Documentation

void AddIconPath ( char *  path)

Add an icon path.

This adds a path to the list of icon search paths.

Parameters:
pathThe icon path to add.
IconNode* CreateIcon ( )

Create and initialize a new icon structure.

Returns:
The new icon structure.
void DestroyIcon ( IconNode icon)

Destroy an icon.

Parameters:
iconThe icon to destroy.
void DestroyIcons ( )
void InitializeIcons ( )
void LoadIcon ( struct ClientNode np)

Load an icon for a client.

Parameters:
npThe client.
IconNode* LoadNamedIcon ( const char *  name)

Load an icon.

Parameters:
nameThe name of the icon to load.
Returns:
A pointer to the icon (NULL if not found).
void PutIcon ( IconNode icon,
Drawable  d,
int  x,
int  y,
int  width,
int  height 
)

Render an icon.

This will scale an icon if necessary to fit the requested size. The aspect ratio of the icon is preserved.

Parameters:
iconThe icon to render.
dThe drawable on which to place the icon.
xThe x offset on the drawable to render the icon.
yThe y offset on the drawable to render the icon.
widthThe width of the icon to display.
heightThe height of the icon to display.
void ShutdownIcons ( )
void StartupIcons ( )

Variable Documentation