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. | |
| IconNode * | LoadNamedIcon (const char *name) |
| Load an icon. | |
| void | DestroyIcon (IconNode *icon) |
| Destroy an icon. | |
| IconNode * | CreateIcon () |
| Create and initialize a new icon structure. | |
| void | InitializeIcons () |
| void | StartupIcons () |
| void | ShutdownIcons () |
| void | DestroyIcons () |
Variables | |
| IconNode | emptyIcon |
Detailed Description
Typedef Documentation
| typedef struct ScaledIconNode ScaledIconNode |
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:
-
path The 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:
-
icon The icon to destroy.
| void DestroyIcons | ( | ) |
| void InitializeIcons | ( | ) |
| void LoadIcon | ( | struct ClientNode * | np | ) |
Load an icon for a client.
- Parameters:
-
np The client.
| IconNode* LoadNamedIcon | ( | const char * | name | ) |
Load an icon.
- Parameters:
-
name The 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:
-
icon The icon to render. d The drawable on which to place the icon. x The x offset on the drawable to render the icon. y The y offset on the drawable to render the icon. width The width of the icon to display. height The height of the icon to display.
| void ShutdownIcons | ( | ) |
| void StartupIcons | ( | ) |