| 50 void gnt_main(void); |
50 void gnt_main(void); |
| 51 |
51 |
| 52 /** |
52 /** |
| 53 * Check whether the terminal is capable of UTF8 display. |
53 * Check whether the terminal is capable of UTF8 display. |
| 54 * |
54 * |
| 55 * @return @c FALSE if the terminal is capable of drawing UTF-8, @c TRUE otherwise. |
55 * Returns: @c FALSE if the terminal is capable of drawing UTF-8, @c TRUE otherwise. |
| 56 */ |
56 */ |
| 57 gboolean gnt_ascii_only(void); |
57 gboolean gnt_ascii_only(void); |
| 58 |
58 |
| 59 /** |
59 /** |
| 60 * Present a window. If the event was triggered because of user interaction, |
60 * Present a window. If the event was triggered because of user interaction, |
| 61 * the window is moved to the foreground. Otherwise, the Urgent hint is set. |
61 * the window is moved to the foreground. Otherwise, the Urgent hint is set. |
| 62 * |
62 * |
| 63 * @param window The window the present. |
63 * @window: The window the present. |
| 64 * |
64 * |
| 65 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
65 * @since 2.0.0 (gnt), 2.1.0 (pidgin) |
| 66 */ |
66 */ |
| 67 void gnt_window_present(GntWidget *window); |
67 void gnt_window_present(GntWidget *window); |
| 68 |
68 |
| 85 void gnt_screen_update(GntWidget *widget); |
85 void gnt_screen_update(GntWidget *widget); |
| 86 |
86 |
| 87 /** |
87 /** |
| 88 * Resize a widget. |
88 * Resize a widget. |
| 89 * |
89 * |
| 90 * @param widget The widget to resize. |
90 * @widget: The widget to resize. |
| 91 * @param width The desired width. |
91 * @width: The desired width. |
| 92 * @param height The desired height. |
92 * @height: The desired height. |
| 93 */ |
93 */ |
| 94 void gnt_screen_resize_widget(GntWidget *widget, int width, int height); |
94 void gnt_screen_resize_widget(GntWidget *widget, int width, int height); |
| 95 |
95 |
| 96 /** |
96 /** |
| 97 * Move a widget. |
97 * Move a widget. |
| 98 * |
98 * |
| 99 * @param widget The widget to move. |
99 * @widget: The widget to move. |
| 100 * @param x The desired x-coordinate. |
100 * @param x The desired x-coordinate. |
| 101 * @param y The desired y-coordinate. |
101 * @param y The desired y-coordinate. |
| 102 */ |
102 */ |
| 103 void gnt_screen_move_widget(GntWidget *widget, int x, int y); |
103 void gnt_screen_move_widget(GntWidget *widget, int x, int y); |
| 104 |
104 |
| 105 /** |
105 /** |
| 106 * Rename a widget. |
106 * Rename a widget. |
| 107 * |
107 * |
| 108 * @param widget The widget to rename. |
108 * @widget: The widget to rename. |
| 109 * @param text The new name for the widget. |
109 * @text: The new name for the widget. |
| 110 */ |
110 */ |
| 111 void gnt_screen_rename_widget(GntWidget *widget, const char *text); |
111 void gnt_screen_rename_widget(GntWidget *widget, const char *text); |
| 112 |
112 |
| 113 /** |
113 /** |
| 114 * Check whether a widget has focus. |
114 * Check whether a widget has focus. |
| 115 * |
115 * |
| 116 * @param widget The widget. |
116 * @widget: The widget. |
| 117 * |
117 * |
| 118 * @return @c TRUE if the widget has the current focus, @c FALSE otherwise. |
118 * Returns: @c TRUE if the widget has the current focus, @c FALSE otherwise. |
| 119 */ |
119 */ |
| 120 gboolean gnt_widget_has_focus(GntWidget *widget); |
120 gboolean gnt_widget_has_focus(GntWidget *widget); |
| 121 |
121 |
| 122 /** |
122 /** |
| 123 * Set the URGENT hint for a widget. |
123 * Set the URGENT hint for a widget. |
| 124 * |
124 * |
| 125 * @param widget The widget to set the URGENT hint for. |
125 * @widget: The widget to set the URGENT hint for. |
| 126 */ |
126 */ |
| 127 void gnt_widget_set_urgent(GntWidget *widget); |
127 void gnt_widget_set_urgent(GntWidget *widget); |
| 128 |
128 |
| 129 /** |
129 /** |
| 130 * Register a global action. |
130 * Register a global action. |
| 131 * |
131 * |
| 132 * @param label The user-visible label for the action. |
132 * @label: The user-visible label for the action. |
| 133 * @param callback The callback function for the action. |
133 * @callback: The callback function for the action. |
| 134 */ |
134 */ |
| 135 void gnt_register_action(const char *label, void (*callback)(void)); |
135 void gnt_register_action(const char *label, void (*callback)(void)); |
| 136 |
136 |
| 137 /** |
137 /** |
| 138 * Show a menu. |
138 * Show a menu. |
| 139 * |
139 * |
| 140 * @param menu The menu to display. |
140 * @menu: The menu to display. |
| 141 * |
141 * |
| 142 * @return @c TRUE if the menu is displayed, @c FALSE otherwise (e.g., if another menu is currently displayed). |
142 * Returns: @c TRUE if the menu is displayed, @c FALSE otherwise (e.g., if another menu is currently displayed). |
| 143 */ |
143 */ |
| 144 gboolean gnt_screen_menu_show(gpointer menu); |
144 gboolean gnt_screen_menu_show(gpointer menu); |
| 145 |
145 |
| 146 /** |
146 /** |
| 147 * Terminate the mainloop of gnt. |
147 * Terminate the mainloop of gnt. |
| 149 void gnt_quit(void); |
149 void gnt_quit(void); |
| 150 |
150 |
| 151 /** |
151 /** |
| 152 * Get the global clipboard. |
152 * Get the global clipboard. |
| 153 * |
153 * |
| 154 * @return The clipboard. |
154 * Returns: The clipboard. |
| 155 */ |
155 */ |
| 156 GntClipboard * gnt_get_clipboard(void); |
156 GntClipboard * gnt_get_clipboard(void); |
| 157 |
157 |
| 158 /** |
158 /** |
| 159 * Get the string in the clipboard. |
159 * Get the string in the clipboard. |
| 160 * |
160 * |
| 161 * @return A copy of the string in the clipboard. The caller must @c g_free the string. |
161 * Returns: A copy of the string in the clipboard. The caller must @c g_free the string. |
| 162 */ |
162 */ |
| 163 gchar * gnt_get_clipboard_string(void); |
163 gchar * gnt_get_clipboard_string(void); |
| 164 |
164 |
| 165 /** |
165 /** |
| 166 * Set the contents of the global clipboard. |
166 * Set the contents of the global clipboard. |
| 167 * |
167 * |
| 168 * @param string The new content of the new clipboard. |
168 * @string: The new content of the new clipboard. |
| 169 */ |
169 */ |
| 170 void gnt_set_clipboard_string(const gchar *string); |
170 void gnt_set_clipboard_string(const gchar *string); |
| 171 |
171 |
| 172 /** |
172 /** |
| 173 * Spawn a different application that will consume the console. |
173 * Spawn a different application that will consume the console. |
| 174 * |
174 * |
| 175 * @param wd The working directory for the new application. |
175 * @wd: The working directory for the new application. |
| 176 * @param argv The argument vector. |
176 * @argv: The argument vector. |
| 177 * @param envp The environment, or @c NULL. |
177 * @envp: The environment, or @c NULL. |
| 178 * @param stin Location to store the child's stdin, or @c NULL. |
178 * @stin: Location to store the child's stdin, or @c NULL. |
| 179 * @param stout Location to store the child's stdout, or @c NULL. |
179 * @stout: Location to store the child's stdout, or @c NULL. |
| 180 * @param sterr Location to store the child's stderr, or @c NULL. |
180 * @sterr: Location to store the child's stderr, or @c NULL. |
| 181 * @param callback The callback to call after the child exits. |
181 * @callback: The callback to call after the child exits. |
| 182 * @param data The data to pass to the callback. |
182 * @data: The data to pass to the callback. |
| 183 * |
183 * |
| 184 * @return @c TRUE if the child was successfully spawned, @c FALSE otherwise. |
184 * Returns: @c TRUE if the child was successfully spawned, @c FALSE otherwise. |
| 185 */ |
185 */ |
| 186 gboolean gnt_giveup_console(const char *wd, char **argv, char **envp, |
186 gboolean gnt_giveup_console(const char *wd, char **argv, char **envp, |
| 187 gint *stin, gint *stout, gint *sterr, |
187 gint *stin, gint *stout, gint *sterr, |
| 188 void (*callback)(int status, gpointer data), gpointer data); |
188 void (*callback)(int status, gpointer data), gpointer data); |
| 189 |
189 |
| 190 /** |
190 /** |
| 191 * Check whether a child process is in control of the current terminal. |
191 * Check whether a child process is in control of the current terminal. |
| 192 * |
192 * |
| 193 * @return @c TRUE if a child process (eg., PAGER) is occupying the current |
193 * Returns: @c TRUE if a child process (eg., PAGER) is occupying the current |
| 194 * terminal, @c FALSE otherwise. |
194 * terminal, @c FALSE otherwise. |
| 195 */ |
195 */ |
| 196 gboolean gnt_is_refugee(void); |
196 gboolean gnt_is_refugee(void); |
| 197 |
197 |
| 198 #endif /* GNT_H */ |
198 #endif /* GNT_H */ |