1 /* Encoding stuff */
2 
3 /*
4  * Copyright © 2002 Red Hat, Inc.
5  * Copyright (C) 2012-2021 MATE Developers
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 3 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef TERMINAL_ENCODING_H
24 #define TERMINAL_ENCODING_H
25 
26 #include <gtk/gtk.h>
27 
28 #define TERMINAL_TYPE_ENCODING (terminal_encoding_get_type ())
29 
30 typedef struct
31 {
32 	int   refcount;
33 	char *id;
34 	char *name;
35 	guint valid            : 1;
36 	guint validity_checked : 1;
37 	guint is_custom        : 1;
38 	guint is_active        : 1;
39 } TerminalEncoding;
40 
41 GType terminal_encoding_get_type (void);
42 
43 TerminalEncoding *terminal_encoding_new (const char *charset,
44         const char *display_name,
45         gboolean is_custom,
46         gboolean force_valid);
47 
48 TerminalEncoding *terminal_encoding_ref (TerminalEncoding *encoding);
49 
50 void terminal_encoding_unref (TerminalEncoding *encoding);
51 
52 gboolean terminal_encoding_is_valid (TerminalEncoding *encoding);
53 
54 const char *terminal_encoding_get_id (TerminalEncoding *encoding);
55 
56 const char *terminal_encoding_get_charset (TerminalEncoding *encoding);
57 
58 GHashTable *terminal_encodings_get_builtins (void);
59 
60 void terminal_encoding_dialog_show (GtkWindow *transient_parent);
61 
62 #endif /* TERMINAL_ENCODING_H */
63