trunk: changeset 1856
[notion/jeffpc.git] / ext_statusbar / ion-statusd / extlrx.c
blob561ff08665c698b98b9f6bb74012cc1fe8320e08
1 /*
2 * ion/ext_statusbar/ion-statusd/extlrx.c
4 * Copyright (c) Tuomo Valkonen 2004.
6 * Ion is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation; either version 2.1 of the License, or
9 * (at your option) any later version.
13 #include <libtu/output.h>
14 #include <libtu/locale.h>
15 #include <libmainloop/signal.h>
18 /*{{{ libmainloop (timers) */
20 EXTL_CLASS(WTimer, Obj)
23 /*EXTL_DOC
24 * Create a new timer.
26 EXTL_EXPORT_AS(statusd, create_timer)
27 WTimer *create_timer_extl_owned();
30 /*EXTL_DOC
31 * Reset timer (clear handler and stop timing).
33 EXTL_EXPORT_MEMBER
34 void timer_reset(WTimer *timer);
37 /*EXTL_DOC
38 * Is timer active?
40 EXTL_EXPORT_MEMBER
41 bool timer_is_set(WTimer *timer);
44 /*EXTL_DOC
45 * Set timer handler and timeout in milliseconds, and start timing.
47 EXTL_EXPORT_AS(WTimer, set)
48 void timer_set_extl(WTimer *timer, uint msecs, ExtlFn fn);
51 /*}}}*/
54 /*{{{ libtu */
57 /*EXTL_DOC
58 * Issue a warning. How the message is displayed depends on the current
59 * warning handler.
61 EXTL_EXPORT
62 void statusd_warn(const char *str)
64 warn("%s", str);
68 EXTL_EXPORT
69 const char *statusd_gettext(const char *s)
71 if(s==NULL)
72 return NULL;
73 else
74 return TR(s);
78 /*}}}*/