gnt.h
Go to the documentation of this file.
/*
* GNT - The GLib Ncurses Toolkit
*
* GNT is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
* source distribution.
*
* This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#ifndef GNT_H
#define GNT_H
#include <glib.h>
#include "gntwidget.h"
#include "gntclipboard.h"
#include "gntcolors.h"
#include "gntkeys.h"
#if !GLIB_CHECK_VERSION(2,8,0)
#define G_PARAM_STATIC_NAME G_PARAM_PRIVATE
#define G_PARAM_STATIC_NICK G_PARAM_PRIVATE
#define G_PARAM_STATIC_BLURB G_PARAM_PRIVATE
#endif
#if !GLIB_CHECK_VERSION(2,14,0)
#define g_timeout_add_seconds(time, callback, data) g_timeout_add(time * 1000, callback, data)
#endif
void gnt_init(void);
void gnt_main(void);
gboolean gnt_ascii_only(void);
void gnt_window_present(GntWidget *window);
void gnt_screen_occupy(GntWidget *widget);
void gnt_screen_release(GntWidget *widget);
void gnt_screen_update(GntWidget *widget);
void gnt_screen_resize_widget(GntWidget *widget, int width, int height);
void gnt_screen_move_widget(GntWidget *widget, int x, int y);
void gnt_screen_rename_widget(GntWidget *widget, const char *text);
gboolean gnt_widget_has_focus(GntWidget *widget);
void gnt_widget_set_urgent(GntWidget *widget);
void gnt_register_action(const char *label, void (*callback)(void));
gboolean gnt_screen_menu_show(gpointer menu);
void gnt_quit(void);
GntClipboard * gnt_get_clipboard(void);
gchar * gnt_get_clipboard_string(void);
void gnt_set_clipboard_string(const gchar *string);
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);
gboolean gnt_is_refugee(void);
#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.