trunk: changeset 1855
[notion/jeffpc.git] / ioncore / extlrx.c
blob54af89b63b123799d14af79e3a7959b21591ede5
1 /*
2 * ion/ioncore/extlrx.c
4 * Copyright (c) Tuomo Valkonen 1999-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 <libmainloop/signal.h>
15 #include "common.h"
18 /*{{{ libmainloop (timers) */
20 EXTL_CLASS(WTimer, Obj);
23 /*EXTL_DOC
24 * Create a new timer.
26 EXTL_EXPORT_AS(ioncore, 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 ioncore_warn(const char *str)
64 warn("%s", str);
68 EXTL_EXPORT
69 const char *ioncore_gettext(const char *s)
71 if(s==NULL)
72 return NULL;
73 else
74 return TR(s);
78 /*}}}*/