changes related to temperature and layout
[monky] / src / llua.h
1 /* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
2  *
3  * Conky, a system monitor, based on torsmo
4  *
5  * Copyright (c) 2009 Toni Spets
6  * Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
7  *      (see AUTHORS)
8  * All rights reserved.
9  *
10  * This program is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation, either version 3 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  * You should have received a copy of the GNU General Public License
20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef LUA_H_
25 #define LUA_H_
26
27 #include <lua.h>
28 #include <lauxlib.h>
29 #include <lualib.h>
30
31 #include "config.h"
32
33 #ifdef X11
34 #include "x11.h"
35 #endif /* X11 */
36
37 #define LUAPREFIX "conky_"
38
39 /* load a lua script */
40 void llua_load(const char *script);
41 /* close lua stuff */
42 void llua_close(void);
43 #ifdef HAVE_SYS_INOTIFY_H
44 /* check our lua inotify status */
45 void llua_inotify_query(int wd, int mask);
46 #endif /* HAVE_SYS_INOTIFY_H */
47
48 void llua_set_startup_hook(const char *args);
49 void llua_set_shutdown_hook(const char *args);
50
51 void llua_startup_hook(void);
52 void llua_shutdown_hook(void);
53
54 #ifdef X11
55 void llua_draw_pre_hook(void);
56 void llua_draw_post_hook(void);
57
58 void llua_set_draw_pre_hook(const char *args);
59 void llua_set_draw_post_hook(const char *args);
60
61 void llua_setup_window_table(int text_start_x, int text_start_y, int text_width, int text_height);
62 void llua_update_window_table(int text_start_x, int text_start_y, int text_width, int text_height);
63 #endif /* X11 */
64
65 void llua_setup_info(struct information *i, double u_interval);
66 void llua_update_info(struct information *i, double u_interval);
67
68 void print_lua(struct text_object *, char *, int);
69 void print_lua_parse(struct text_object *, char *, int);
70 void print_lua_bar(struct text_object *, char *, int);
71 #ifdef X11
72 void print_lua_graph(struct text_object *, char *, int);
73 #endif /* X11 */
74 void print_lua_gauge(struct text_object *, char *, int);
75
76 #endif /* LUA_H_*/