JWM Source Documentation
Header for the tray functions. More...
#include "hint.h"Go to the source code of this file.
Data Structures | |
| struct | TrayComponentType |
| Structure to hold common tray component data. More... | |
| struct | TrayType |
| Structure to represent a tray. More... | |
Typedefs | |
| typedef struct TrayComponentType | TrayComponentType |
| Structure to hold common tray component data. | |
| typedef struct TrayType | TrayType |
| Structure to represent a tray. | |
Enumerations | |
| enum | LayoutType { LAYOUT_HORIZONTAL, LAYOUT_VERTICAL } |
| Enumeration of tray layouts. More... | |
| enum | TrayAlignmentType { TALIGN_FIXED, TALIGN_LEFT, TALIGN_TOP, TALIGN_CENTER, TALIGN_RIGHT, TALIGN_BOTTOM } |
| Enumeration of tray alignments. More... | |
Functions | |
| void | InitializeTray () |
| void | StartupTray () |
| void | ShutdownTray () |
| void | DestroyTray () |
| TrayType * | CreateTray () |
| Create a new tray. | |
| TrayComponentType * | CreateTrayComponent () |
| Create a tray component. | |
| void | AddTrayComponent (TrayType *tp, TrayComponentType *cp) |
| Add a tray component to a tray. | |
| void | ShowTray (TrayType *tp) |
| Show a tray. | |
| void | ShowAllTrays () |
| Show all trays. | |
| void | HideTray (TrayType *tp) |
| Hide a tray. | |
| void | DrawTray () |
| Draw all trays. | |
| void | DrawSpecificTray (const TrayType *tp) |
| Draw a specific tray. | |
| void | UpdateSpecificTray (const TrayType *tp, const TrayComponentType *cp) |
| Update a component on a tray. | |
| void | ResizeTray (TrayType *tp) |
| Resize a tray. | |
| TrayType * | GetTrays () |
| Get a linked list of trays. | |
| int | GetTrayCount () |
| Get the number of trays. | |
| Window | GetSupportingWindow () |
| Get a window to use as the supporting window. | |
| int | ProcessTrayEvent (const XEvent *event) |
| Process an event that may be for a tray. | |
| void | SignalTray (const struct TimeType *now, int x, int y) |
| Signal the trays. | |
| void | SetAutoHideTray (TrayType *tp, int v) |
| Set whether auto hide is enabled for a tray. | |
| void | SetTrayX (TrayType *tp, const char *str) |
| Set the tray x-coordinate. | |
| void | SetTrayY (TrayType *tp, const char *str) |
| Set the tray y-coordinate. | |
| void | SetTrayWidth (TrayType *tp, const char *str) |
| Set the tray width. | |
| void | SetTrayHeight (TrayType *tp, const char *str) |
| Set the tray height. | |
| void | SetTrayLayout (TrayType *tp, const char *str) |
| Set the tray layout. | |
| void | SetTrayLayer (TrayType *tp, const char *str) |
| Set the tray layer. | |
| void | SetTrayBorder (TrayType *tp, const char *str) |
| Set the tray border size. | |
| void | SetTrayHorizontalAlignment (TrayType *tp, const char *str) |
| Set the tray horizontal alignment. | |
| void | SetTrayVerticalAlignment (TrayType *tp, const char *str) |
| Set the tray vertical alignment. | |
| void | SetTrayOpacity (const char *str) |
| Set the tray transparency level. | |
Detailed Description
Typedef Documentation
| typedef struct TrayComponentType TrayComponentType |
Structure to hold common tray component data.
Sizing is handled as follows:
- The component is created via a factory method. It sets its requested size (0 for no preference).
- The SetSize callback is issued with size constraints (0 for no constraint). The component should update width and height in SetSize.
- The Create callback is issued with finalized size information. Resizing is handled as follows:
- A component determines that it needs to change size. It updates its requested size (0 for no preference).
- The component calls ResizeTray.
- The SetSize callback is issued with size constraints (0 for no constraint). The component should update width and height in SetSize.
- The Resize callback is issued with finalized size information.
Enumeration Type Documentation
| enum LayoutType |
| enum TrayAlignmentType |
Function Documentation
| void AddTrayComponent | ( | TrayType * | tp, |
| TrayComponentType * | cp | ||
| ) |
Add a tray component to a tray.
- Parameters:
-
tp The tray to update. cp The tray component to add.
| TrayType* CreateTray | ( | ) |
Create a new tray.
- Returns:
- A new, empty tray.
| TrayComponentType* CreateTrayComponent | ( | ) |
Create a tray component.
- Returns:
- A new tray component structure.
| void DestroyTray | ( | ) |
| void DrawSpecificTray | ( | const TrayType * | tp | ) |
Draw a specific tray.
- Parameters:
-
tp The tray to draw.
| void DrawTray | ( | ) |
Draw all trays.
| Window GetSupportingWindow | ( | ) |
Get a window to use as the supporting window.
This is used by clients to validate that compliant window manager is running.
- Returns:
- The supporting window.
| int GetTrayCount | ( | ) |
Get the number of trays.
- Returns:
- The number of trays.
| TrayType* GetTrays | ( | ) |
Get a linked list of trays.
- Returns:
- The trays.
| void HideTray | ( | TrayType * | tp | ) |
Hide a tray.
- Parameters:
-
tp The tray to hide.
| void InitializeTray | ( | ) |
| int ProcessTrayEvent | ( | const XEvent * | event | ) |
Process an event that may be for a tray.
- Parameters:
-
event The event to process.
- Returns:
- 1 if this event was for a tray, 0 otherwise.
| void ResizeTray | ( | TrayType * | tp | ) |
Resize a tray.
- Parameters:
-
tp The tray to resize containing the new requested size information.
| void SetAutoHideTray | ( | TrayType * | tp, |
| int | v | ||
| ) |
Set whether auto hide is enabled for a tray.
- Parameters:
-
tp The tray. v 1 to enable, 0 to disable.
| void SetTrayBorder | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray border size.
- Parameters:
-
tp The tray. str The border size (ASCII, pixels).
| void SetTrayHeight | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray height.
- Parameters:
-
tp The tray. str The height (ASCII, pixels).
| void SetTrayHorizontalAlignment | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray horizontal alignment.
- Parameters:
-
tp The tray. str The alignment(ASCII).
| void SetTrayLayer | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray layer.
- Parameters:
-
tp The tray. str The layer (ASCII).
| void SetTrayLayout | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray layout.
- Parameters:
-
tp The tray. str A string representation of the layout to use.
| void SetTrayOpacity | ( | const char * | str | ) |
Set the tray transparency level.
- Parameters:
-
str The value (ASCII).
| void SetTrayVerticalAlignment | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray vertical alignment.
- Parameters:
-
tp The tray. str The alignment(ASCII).
| void SetTrayWidth | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray width.
- Parameters:
-
tp The tray. str The width (ASCII, pixels).
| void SetTrayX | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray x-coordinate.
- Parameters:
-
tp The tray. str The x-coordinate (ASCII, pixels, negative ok).
| void SetTrayY | ( | TrayType * | tp, |
| const char * | str | ||
| ) |
Set the tray y-coordinate.
- Parameters:
-
tp The tray. str The y-coordinate (ASCII, pixels, negative ok).
| void ShowAllTrays | ( | ) |
Show all trays.
| void ShowTray | ( | TrayType * | tp | ) |
Show a tray.
- Parameters:
-
tp The tray to show.
| void ShutdownTray | ( | ) |
| void SignalTray | ( | const struct TimeType * | now, |
| int | x, | ||
| int | y | ||
| ) |
Signal the trays.
This function is called regularly so that autohide, etc. can take place.
- Parameters:
-
now The current time. x The mouse x-coordinate (root relative). y The mouse y-coordinate (root relative).
| void StartupTray | ( | ) |
| void UpdateSpecificTray | ( | const TrayType * | tp, |
| const TrayComponentType * | cp | ||
| ) |
Update a component on a tray.
- Parameters:
-
tp The tray containing the component. cp The component that needs updating.