aboutsummaryrefslogtreecommitdiff
path: root/src/clock.h
blob: 25bd74d6d3c67c008e8649cedfc88d6aeb782aea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 * @file clock.h
 * @author Joe Wingbermuehle
 * @date 2005-2006
 *
 * @brief Clock tray component.
 *
 */

#ifndef CLOCK_H
#define CLOCK_H

struct TrayComponentType;
struct TimeType;

/*@{*/
void InitializeClock();
void StartupClock();
void ShutdownClock();
void DestroyClock();
/*@}*/

/** Create a clock component for the tray.
 * @param format The format of the clock.
 * @param command The command to execute when the clock is clicked.
 * @param width The width of the clock (0 for auto).
 * @param height The height of the clock (0 for auto).
 */
struct TrayComponentType *CreateClock(const char *format,
	const char *command, int width, int height);

/** Update clocks.
 * This is called on a regular basis to update the time.
 * @param now The current time.
 * @param x The x-coordinate of the mouse.
 * @param y The y-coordinate of the mouse.
 */
void SignalClock(const struct TimeType *now, int x, int y);

#endif