2008-10-02 18:47:02 +00:00
|
|
|
/**************************************************************************
|
2009-01-20 21:16:54 +00:00
|
|
|
* Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
|
|
|
|
*
|
2009-02-03 20:40:46 +00:00
|
|
|
* Clock with fonctionnal data (timeval, precision) and drawing data (area, font, ...).
|
|
|
|
* Each panel use his own drawing data.
|
2009-02-07 23:28:13 +00:00
|
|
|
*
|
2008-10-02 18:47:02 +00:00
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
#ifndef CLOCK_H
|
|
|
|
#define CLOCK_H
|
|
|
|
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include "common.h"
|
|
|
|
#include "area.h"
|
|
|
|
|
|
|
|
typedef struct Clock {
|
2017-04-13 12:07:23 +00:00
|
|
|
// always start with area
|
|
|
|
Area area;
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2017-04-13 12:07:23 +00:00
|
|
|
Color font;
|
|
|
|
int time1_posy;
|
|
|
|
int time2_posy;
|
2008-10-02 18:47:02 +00:00
|
|
|
} Clock;
|
|
|
|
|
2009-02-03 20:40:46 +00:00
|
|
|
extern char *time1_format;
|
2009-12-30 11:27:29 +00:00
|
|
|
extern char *time1_timezone;
|
2009-02-03 20:40:46 +00:00
|
|
|
extern char *time2_format;
|
2009-12-30 11:27:29 +00:00
|
|
|
extern char *time2_timezone;
|
2009-11-16 17:54:46 +00:00
|
|
|
extern char *time_tooltip_format;
|
2009-12-30 11:27:29 +00:00
|
|
|
extern char *time_tooltip_timezone;
|
2015-12-12 14:13:32 +00:00
|
|
|
extern gboolean time1_has_font;
|
2009-02-07 23:28:13 +00:00
|
|
|
extern PangoFontDescription *time1_font_desc;
|
2015-12-12 14:13:32 +00:00
|
|
|
extern gboolean time2_has_font;
|
2009-02-07 23:28:13 +00:00
|
|
|
extern PangoFontDescription *time2_font_desc;
|
2009-06-04 18:41:14 +00:00
|
|
|
extern char *clock_lclick_command;
|
2015-07-13 02:39:14 +00:00
|
|
|
extern char *clock_mclick_command;
|
2009-06-04 18:41:14 +00:00
|
|
|
extern char *clock_rclick_command;
|
2015-07-13 02:39:14 +00:00
|
|
|
extern char *clock_uwheel_command;
|
|
|
|
extern char *clock_dwheel_command;
|
2015-12-27 14:39:39 +00:00
|
|
|
extern gboolean clock_enabled;
|
2009-02-03 20:40:46 +00:00
|
|
|
|
2010-04-18 14:28:45 +00:00
|
|
|
// default global data
|
2010-04-18 12:07:36 +00:00
|
|
|
void default_clock();
|
2010-04-18 14:28:45 +00:00
|
|
|
|
2010-04-18 12:07:36 +00:00
|
|
|
// freed memory
|
|
|
|
void cleanup_clock();
|
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
// initialize clock : y position, precision, ...
|
2009-02-15 17:22:48 +00:00
|
|
|
void init_clock();
|
2009-10-18 17:54:09 +00:00
|
|
|
void init_clock_panel(void *panel);
|
2015-12-12 14:13:32 +00:00
|
|
|
void clock_default_font_changed();
|
2010-04-16 18:50:03 +00:00
|
|
|
|
2015-11-20 22:28:37 +00:00
|
|
|
void draw_clock(void *obj, cairo_t *c);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2015-11-20 22:28:37 +00:00
|
|
|
gboolean resize_clock(void *obj);
|
2008-10-02 18:47:02 +00:00
|
|
|
|
2017-04-29 11:42:37 +00:00
|
|
|
void clock_action(void *obj, int button, int x, int y, Time time);
|
2009-06-04 18:41:14 +00:00
|
|
|
|
2008-10-02 18:47:02 +00:00
|
|
|
#endif
|