Fix strange effects on desktop caused by 4a14668772a37b18a9aceb8951ece260084bc96e
[monky] / src / llua.h
1 /* Conky, a system monitor, based on torsmo
2  *
3  * Copyright (c) 2009 Toni Spets
4  * Copyright (c) 2005-2009 Brenden Matthews, Philip Kovacs, et. al.
5  *      (see AUTHORS)
6  * All rights reserved.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  * You should have received a copy of the GNU General Public License
18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21
22 #ifndef LUA_H_
23 #define LUA_H_
24
25 #include <lua.h>
26 #include <lauxlib.h>
27 #include <lualib.h>
28
29 #include "config.h"
30
31 #ifdef X11
32 #include "x11.h"
33 #endif /* X11 */
34
35 /* load a lua script */
36 void llua_load(const char *script);
37 /* call a function with args, and return a string from it (must be free'd) */
38 char *llua_getstring(const char *args);
39 /* call a function with args, and return a string from it (must be free'd) */
40 char *llua_getstring_read(const char *function, const char *arg);
41 /* call a function with args, and put the result in ret */
42 int llua_getnumber(const char *args, double *ret);
43 /* close lua stuff */
44 void llua_close(void);
45 #ifdef HAVE_SYS_INOTIFY_H
46 /* check our lua inotify status */
47 void llua_inotify_query(int wd, int mask);
48 #endif /* HAVE_SYS_INOTIFY_H */
49
50 #ifdef X11
51 void llua_draw_pre_hook(void);
52 void llua_draw_post_hook(void);
53 void llua_set_draw_pre_hook(const char *args);
54 void llua_set_draw_post_hook(const char *args);
55
56 void llua_setup_window_table(int text_start_x, int text_start_y, int text_width, int text_height);
57 void llua_update_window_table(int text_start_x, int text_start_y, int text_width, int text_height);
58 #endif /* X11 */
59
60 #endif /* LUA_H_*/