summaryrefslogtreecommitdiffstats
path: root/src/terminal-app.h
blob: a36361e0daf251b33295804e213a80d5acfd3f6d (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
/*
 * Copyright © 2001 Havoc Pennington
 * Copyright © 2008 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_APP_H
#define TERMINAL_APP_H

#include <gtk/gtk.h>

#include "terminal-screen.h"
#include "terminal-profiles-list.h"

G_BEGIN_DECLS

#define GNOME_TERMINAL_ICON_NAME "org.gnome.Terminal"

#define TERMINAL_RESOURCES_PATH_PREFIX "/org/gnome/terminal"

#define MONOSPACE_FONT_KEY_NAME                 "monospace-font-name"

/* TerminalApp */

#define TERMINAL_TYPE_APP              (terminal_app_get_type ())
#define TERMINAL_APP(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_APP, TerminalApp))
#define TERMINAL_APP_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_APP, TerminalAppClass))
#define TERMINAL_IS_APP(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_APP))
#define TERMINAL_IS_APP_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_APP))
#define TERMINAL_APP_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_APP, TerminalAppClass))

typedef struct _TerminalAppClass TerminalAppClass;
typedef struct _TerminalApp TerminalApp;

GType terminal_app_get_type (void);

GApplication *terminal_app_new (const char *app_id);

#define terminal_app_get (TerminalApp *) g_application_get_default

GDBusObjectManagerServer *terminal_app_get_object_manager (TerminalApp *app);

GdkAtom *terminal_app_get_clipboard_targets (TerminalApp *app,
                                             GtkClipboard *clipboard,
                                             int *n_targets);

void terminal_app_edit_preferences (TerminalApp *app,
                                    GSettings   *profile,
                                    const char  *widget_name);

char *terminal_app_new_profile (TerminalApp *app,
                                GSettings   *default_base_profile,
                                const char  *name);

void terminal_app_remove_profile (TerminalApp *app,
                                  GSettings *profile);

char *terminal_app_dup_screen_object_path (TerminalApp *app,
                                           TerminalScreen *screen);

TerminalScreen *terminal_app_get_screen_by_uuid (TerminalApp *app,
                                                 const char  *uuid);

TerminalScreen *terminal_app_get_screen_by_object_path (TerminalApp *app,
                                                        const char *object_path);

void terminal_app_register_screen (TerminalApp *app,
                                   TerminalScreen *screen);

void terminal_app_unregister_screen (TerminalApp *app,
                                     TerminalScreen *screen);

TerminalSettingsList *terminal_app_get_profiles_list (TerminalApp *app);

/* Menus */

GMenuModel *terminal_app_get_menubar (TerminalApp *app);

GMenuModel *terminal_app_get_headermenu (TerminalApp *app);

GMenuModel *terminal_app_get_profilemenu (TerminalApp *app);

GMenuModel *terminal_app_get_profile_section (TerminalApp *app);

gboolean terminal_app_get_menu_unified (TerminalApp *app);

gboolean terminal_app_get_use_headerbar (TerminalApp *app);

gboolean terminal_app_get_dialog_use_headerbar (TerminalApp *app);

/* GSettings */

GSettings *terminal_app_get_global_settings (TerminalApp *app);

GSettings *terminal_app_get_desktop_interface_settings (TerminalApp *app);

GSettings *terminal_app_get_proxy_settings (TerminalApp *app);

GSettings *terminal_app_get_gtk_debug_settings (TerminalApp *app);

PangoFontDescription *terminal_app_get_system_font (TerminalApp *app);

G_END_DECLS

#endif /* !TERMINAL_APP_H */