GNT API.
More...
#include <glib.h>
#include "gntwidget.h"
#include "gntclipboard.h"
#include "gntcolors.h"
#include "gntkeys.h"
Go to the source code of this file.
Macros |
|
#define | G_PARAM_STATIC_NAME G_PARAM_PRIVATE |
| | Get things to compile in Glib < 2.8.
|
|
#define | G_PARAM_STATIC_NICK G_PARAM_PRIVATE |
|
#define | G_PARAM_STATIC_BLURB G_PARAM_PRIVATE |
|
#define | g_timeout_add_seconds(time, callback, data) g_timeout_add(time * 1000, callback, data) |
Functions |
|
void | gnt_init (void) |
| | Initialize GNT.
|
|
void | gnt_main (void) |
| | Start running the mainloop for gnt.
|
| gboolean | gnt_ascii_only (void) |
| | Check whether the terminal is capable of UTF8 display.
|
| void | gnt_window_present (GntWidget *window) |
| | Present a 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) |
| | Resize a widget.
|
| void | gnt_screen_move_widget (GntWidget *widget, int x, int y) |
| | Move a widget.
|
| void | gnt_screen_rename_widget (GntWidget *widget, const char *text) |
| | Rename a widget.
|
| gboolean | gnt_widget_has_focus (GntWidget *widget) |
| | Check whether a widget has focus.
|
| void | gnt_widget_set_urgent (GntWidget *widget) |
| | Set the URGENT hint for a widget.
|
| void | gnt_register_action (const char *label, void(*callback)(void)) |
| | Register a global action.
|
| gboolean | gnt_screen_menu_show (gpointer menu) |
| | Show a menu.
|
|
void | gnt_quit (void) |
| | Terminate the mainloop of gnt.
|
| GntClipboard * | gnt_get_clipboard (void) |
| | Get the global clipboard.
|
| gchar * | gnt_get_clipboard_string (void) |
| | Get the string in the clipboard.
|
| void | gnt_set_clipboard_string (const gchar *string) |
| | Set the contents of the global clipboard.
|
| 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.
|
| gboolean | gnt_is_refugee (void) |
| | Check whether a child process is in control of the current terminal.
|
Detailed Description
GNT API.
Definition in file gnt.h.
Function Documentation
| gboolean gnt_ascii_only |
( |
void |
| ) |
|
Check whether the terminal is capable of UTF8 display.
- Returns
FALSE if the terminal is capable of drawing UTF-8, TRUE otherwise.
Get the global clipboard.
- Returns
- The clipboard.
| gchar* gnt_get_clipboard_string |
( |
void |
| ) |
|
Get the string in the clipboard.
- Returns
- A copy of the string in the clipboard. The caller must
g_free the string.
| gboolean gnt_giveup_console |
( |
const char * |
wd, |
|
|
char ** |
argv, |
|
|
char ** |
envp, |
|
|
gint * |
stin, |
|
|
gint * |
stout, |
|
|
gint * |
sterr, |
|
|
void(*)(int status, gpointer data) |
callback, |
|
|
gpointer |
data |
|
) |
| |
Spawn a different application that will consume the console.
- Parameters
-
| wd | The working directory for the new application. |
| argv | The argument vector. |
| envp | The environment, or NULL. |
| stin | Location to store the child's stdin, or NULL. |
| stout | Location to store the child's stdout, or NULL. |
| sterr | Location to store the child's stderr, or NULL. |
| callback | The callback to call after the child exits. |
| data | The data to pass to the callback. |
- Returns
TRUE if the child was successfully spawned, FALSE otherwise.
| gboolean gnt_is_refugee |
( |
void |
| ) |
|
Check whether a child process is in control of the current terminal.
- Returns
TRUE if a child process (eg., PAGER) is occupying the current terminal, FALSE otherwise.
| void gnt_register_action |
( |
const char * |
label, |
|
|
void(*)(void) |
callback |
|
) |
| |
Register a global action.
- Parameters
-
| label | The user-visible label for the action. |
| callback | The callback function for the action. |
| gboolean gnt_screen_menu_show |
( |
gpointer |
menu | ) |
|
Show a menu.
- Parameters
-
- Returns
TRUE if the menu is displayed, FALSE otherwise (e.g., if another menu is currently displayed).
| void gnt_screen_move_widget |
( |
GntWidget * |
widget, |
|
|
int |
x, |
|
|
int |
y |
|
) |
| |
Move a widget.
- Parameters
-
| widget | The widget to move. |
| x | The desired x-coordinate. |
| y | The desired y-coordinate. |
| void gnt_screen_rename_widget |
( |
GntWidget * |
widget, |
|
|
const char * |
text |
|
) |
| |
Rename a widget.
- Parameters
-
| widget | The widget to rename. |
| text | The new name for the widget. |
| void gnt_screen_resize_widget |
( |
GntWidget * |
widget, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Resize a widget.
- Parameters
-
| widget | The widget to resize. |
| width | The desired width. |
| height | The desired height. |
| void gnt_set_clipboard_string |
( |
const gchar * |
string | ) |
|
Set the contents of the global clipboard.
- Parameters
-
| string | The new content of the new clipboard. |
| gboolean gnt_widget_has_focus |
( |
GntWidget * |
widget | ) |
|
Check whether a widget has focus.
- Parameters
-
- Returns
TRUE if the widget has the current focus, FALSE otherwise.
| void gnt_widget_set_urgent |
( |
GntWidget * |
widget | ) |
|
Set the URGENT hint for a widget.
- Parameters
-
| widget | The widget to set the URGENT hint for. |
| void gnt_window_present |
( |
GntWidget * |
window | ) |
|
Present a window.
If the event was triggered because of user interaction, the window is moved to the foreground. Otherwise, the Urgent hint is set.
- Parameters
-
| window | The window the present. |
- Since
- 2.0.0 (gnt), 2.1.0 (pidgin)