2
* Copyright (C) 2013 Andrzej <ndrwrdck@gmail.com>
4
* This library is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the Free
6
* Software Foundation; either version 2 of the License, or (at your option)
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with this library; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
#ifndef __CLOCK_TIME_H__
20
#define __CLOCK_TIME_H__
23
#include <libxfce4util/libxfce4util.h>
24
#include <libxfce4panel/libxfce4panel.h>
28
#define CLOCK_INTERVAL_SECOND (1)
29
#define CLOCK_INTERVAL_MINUTE (60)
31
typedef struct _ClockTime ClockTime;
32
typedef struct _ClockTimeClass ClockTimeClass;
33
typedef struct _ClockTimeTimeout ClockTimeTimeout;
35
#define XFCE_TYPE_CLOCK_TIME (clock_time_get_type ())
36
#define XFCE_CLOCK_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_CLOCK_TIME, ClockTime))
37
#define XFCE_CLOCK_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_CLOCK_TIME, ClockTimeClass))
38
#define XFCE_IS_CLOCK_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_CLOCK_TIME))
39
#define XFCE_IS_CLOCK_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_CLOCK_TIME))
40
#define XFCE_CLOCK_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_CLOCK_TIME, ClockTimeClass))
44
GType clock_time_get_type (void) G_GNUC_CONST;
46
void clock_time_register_type (XfcePanelTypeModule *type_module);
48
ClockTime *clock_time_new (void);
50
ClockTimeTimeout *clock_time_timeout_new (guint interval,
55
void clock_time_timeout_set_interval (ClockTimeTimeout *timeout,
58
void clock_time_timeout_free (ClockTimeTimeout *timeout);
60
GDateTime *clock_time_get_time (ClockTime *time);
62
gchar *clock_time_strdup_strftime (ClockTime *time,
65
guint clock_time_interval_from_format (const gchar *format);
69
#endif /* !__CLOCK_TIME_H__ */