gnt.h
Go to the documentation of this file.
1
11 /*
12 * GNT - The GLib Ncurses Toolkit
13 *
14 * GNT is the legal property of its developers, whose names are too numerous
15 * to list here. Please refer to the COPYRIGHT file distributed with this
16 * source distribution.
17 *
18 * This library is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
31 */
32
33 #ifndef GNT_H
34 #define GNT_H
35
36 #include <glib.h>
37 #include "gntwidget.h"
38 #include "gntclipboard.h"
39 #include "gntcolors.h"
40 #include "gntkeys.h"
41
45 #if !GLIB_CHECK_VERSION(2,8,0)
46 #define G_PARAM_STATIC_NAME G_PARAM_PRIVATE
47 #define G_PARAM_STATIC_NICK G_PARAM_PRIVATE
48 #define G_PARAM_STATIC_BLURB G_PARAM_PRIVATE
49 #endif
50
51 #if !GLIB_CHECK_VERSION(2,14,0)
52 #define g_timeout_add_seconds(time, callback, data) g_timeout_add(time * 1000, callback, data)
53 #endif
54
58 void gnt_init(void);
59
63 void gnt_main(void);
64
70 gboolean gnt_ascii_only(void);
71
80 void gnt_window_present(GntWidget *window);
81
86 void gnt_screen_occupy(GntWidget *widget);
87
92 void gnt_screen_release(GntWidget *widget);
93
98 void gnt_screen_update(GntWidget *widget);
99
107 void gnt_screen_resize_widget(GntWidget *widget, int width, int height);
108
116 void gnt_screen_move_widget(GntWidget *widget, int x, int y);
117
124 void gnt_screen_rename_widget(GntWidget *widget, const char *text);
125
133 gboolean gnt_widget_has_focus(GntWidget *widget);
134
140 void gnt_widget_set_urgent(GntWidget *widget);
141
148 void gnt_register_action(const char *label, void (*callback)(void));
149
157 gboolean gnt_screen_menu_show(gpointer menu);
158
162 void gnt_quit(void);
163
169 GntClipboard * gnt_get_clipboard(void);
170
176 gchar * gnt_get_clipboard_string(void);
177
183 void gnt_set_clipboard_string(const gchar *string);
184
199 gboolean gnt_giveup_console(const char *wd, char **argv, char **envp,
200 gint *stin, gint *stout, gint *sterr,
201 void (*callback)(int status, gpointer data), gpointer data);
202
209 gboolean gnt_is_refugee(void);
210
211 #endif /* GNT_H */
gntcolors.h
Colors API.
gnt_main
void gnt_main(void)
Start running the mainloop for gnt.
gnt_is_refugee
gboolean gnt_is_refugee(void)
Check whether a child process is in control of the current terminal.
gnt_set_clipboard_string
void gnt_set_clipboard_string(const gchar *string)
Set the contents of the global clipboard.
gntwidget.h
Widget API.
gnt_get_clipboard
GntClipboard * gnt_get_clipboard(void)
Get the global clipboard.
gntkeys.h
Keys API.
gnt_get_clipboard_string
gchar * gnt_get_clipboard_string(void)
Get the string in the clipboard.
gnt_widget_set_urgent
void gnt_widget_set_urgent(GntWidget *widget)
Set the URGENT hint for a widget.
gnt_screen_rename_widget
void gnt_screen_rename_widget(GntWidget *widget, const char *text)
Rename a widget.
gnt_ascii_only
gboolean gnt_ascii_only(void)
Check whether the terminal is capable of UTF8 display.
gnt_screen_menu_show
gboolean gnt_screen_menu_show(gpointer menu)
Show a menu.
gnt_window_present
void gnt_window_present(GntWidget *window)
Present a window.
gnt_screen_resize_widget
void gnt_screen_resize_widget(GntWidget *widget, int width, int height)
Resize a widget.
gntclipboard.h
Clipboard API.
gnt_widget_has_focus
gboolean gnt_widget_has_focus(GntWidget *widget)
Check whether a widget has focus.
gnt_screen_move_widget
void gnt_screen_move_widget(GntWidget *widget, int x, int y)
Move a widget.
_GntClipboard
Definition: gntclipboard.h:44
gnt_quit
void gnt_quit(void)
Terminate the mainloop of gnt.
gnt_giveup_console
gboolean gnt_giveup_console(const char *wd, char **argv, char **envp, gint *stin, gint *stout, gint *sterr, void(*callback)(int status, gpointer data), gpointer data)
Spawn a different application that will consume the console.
gnt_init
void gnt_init(void)
Initialize GNT.
_GntWidget
Definition: gntwidget.h:98
gnt_register_action
void gnt_register_action(const char *label, void(*callback)(void))
Register a global action.