summaryrefslogtreecommitdiffstats
path: root/src/terminal-util.hh
blob: 3770c8540b016be984f2a708438f9232100a25a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
 * Copyright © 2001 Havoc Pennington
 * Copyright © 2008, 2010 Christian Persch
 *
 * This program 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 3 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, see <http://www.gnu.org/licenses/>.
 */

#ifndef TERMINAL_UTIL_H
#define TERMINAL_UTIL_H

#include <gio/gio.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

void terminal_util_show_error_dialog (GtkWindow *transient_parent,
                                      GtkWidget **weap_ptr,
                                      GError *error,
                                      const char *message_format, ...) G_GNUC_PRINTF(4, 5);

void terminal_util_show_help (const char *topic);

void terminal_util_show_about (void);

void terminal_util_set_labelled_by          (GtkWidget  *widget,
                                             GtkLabel   *label);
void terminal_util_set_atk_name_description (GtkWidget  *widget,
                                             const char *name,
                                             const char *desc);

void terminal_util_open_url (GtkWidget *parent,
                             const char *orig_url,
                             TerminalURLFlavor flavor,
                             guint32 user_time);

void terminal_util_transform_uris_to_quoted_fuse_paths (char **uris);

char *terminal_util_concat_uris (char **uris,
                                 gsize *length);

char *terminal_util_get_licence_text (void);

GtkBuilder *terminal_util_load_widgets_resource (const char *path,
                                                 const char *main_object_name,
                                                 const char *object_name,
                                                 ...);

void terminal_util_load_objects_resource (const char *path,
                                          const char *object_name,
                                          ...);

void terminal_util_dialog_focus_widget (GtkBuilder *builder,
                                        const char *widget_name);

gboolean terminal_util_dialog_response_on_delete (GtkWindow *widget);

void terminal_util_add_proxy_env (GHashTable *env_table);

char **terminal_util_get_etc_shells (void);

gboolean terminal_util_get_is_shell (const char *command);

const GdkRGBA *terminal_g_settings_get_rgba (GSettings  *settings,
                                             const char *key,
                                             GdkRGBA    *rgba);
void terminal_g_settings_set_rgba (GSettings  *settings,
                                   const char *key,
                                   const GdkRGBA *rgba);

GdkRGBA *terminal_g_settings_get_rgba_palette (GSettings  *settings,
                                               const char *key,
                                               gsize      *n_colors);
void terminal_g_settings_set_rgba_palette (GSettings      *settings,
                                           const char     *key,
                                           const GdkRGBA  *colors,
                                           gsize           n_colors);

void terminal_util_bind_mnemonic_label_sensitivity (GtkWidget *widget);

char *terminal_util_number_info (const char *str);
char *terminal_util_timestamp_info (const char *str);

char *terminal_util_uri_fixup (const char *uri,
                               GError **error);

char *terminal_util_hyperlink_uri_label (const char *str);

void terminal_util_load_print_settings (GtkPrintSettings **settings,
                                        GtkPageSetup **page_setup);

void terminal_util_save_print_settings (GtkPrintSettings *settings,
                                        GtkPageSetup *page_setup);

const char *terminal_util_translate_encoding (const char *encoding);

char *terminal_util_find_program_in_path (const char *path,
                                          const char *program);

gboolean terminal_util_check_envv(char const* const* strv);

char** terminal_util_get_desktops(void);

gboolean terminal_util_is_default_terminal(void);

gboolean terminal_util_make_default_terminal(void);

G_END_DECLS

#endif /* TERMINAL_UTIL_H */