diff options
author | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-29 12:54:47 +0200 |
---|---|---|
committer | John Ankarstr\xf6m <john@ankarstrom.se> | 2021-05-29 13:18:40 +0200 |
commit | a041d9898e6d699bd8c0c25482ec574feb03c547 (patch) | |
tree | 7f094e33fb530152c3ab6238ce7300750b47addb /src/traybutton.h | |
download | jwm-a041d9898e6d699bd8c0c25482ec574feb03c547.tar.gz |
First commit
This is the original state of the released tarball for JWM 1.8,
which will serve as my starting point for further modifications.
Diffstat (limited to 'src/traybutton.h')
-rw-r--r-- | src/traybutton.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/traybutton.h b/src/traybutton.h new file mode 100644 index 0000000..bd22494 --- /dev/null +++ b/src/traybutton.h @@ -0,0 +1,51 @@ +/** + * @file traybutton.h + * @author Joe Wingbermuehle + * @date 2004-2006 + * + * @brief Tray button tray component. + * + */ + +#ifndef TRAY_BUTTON_H +#define TRAY_BUTTON_H + +struct TrayComponentType; +struct TimeType; + +/*@{*/ +void InitializeTrayButtons(); +void StartupTrayButtons(); +void ShutdownTrayButtons(); +void DestroyTrayButtons(); +/*@}*/ + +/** Create a tray button component. + * @param iconName The name of the icon to use for the button. + * @param label The label to use for the button. + * @param action The action to take when the button is clicked. + * @param popup Text to display in a popup window. + * @param width The width to use for the button (0 for default). + * @param height The height to use for the button (0 for default). + * @return A new tray button component. + */ +struct TrayComponentType *CreateTrayButton( + const char *iconName, const char *label, const char *action, + const char *popup, int width, int height); + +/** Signal a tray button. + * @param now The current time. + * @param x The x-coordinate of the mouse (root relative). + * @param y The y-coordinate of the mouse (root relative). + */ +void SignalTrayButton(const struct TimeType *now, int x, int y); + +/** Validate the tray buttons and print a warning if something is wrong. + * This is called after parsing the configuration file(s) to determine + * if a root menu is defined for each each tray button that specifies + * a root menu. + */ +void ValidateTrayButtons(); + +#endif + |