summaryrefslogtreecommitdiff
path: root/src/terminal-encoding.h
blob: cae1dc34c23448c5147831ce745611ef4c44cead (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
/* Encoding stuff */

/*
 * Copyright © 2002 Red Hat, Inc.
 * Copyright (C) 2012-2021 MATE Developers
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

#ifndef TERMINAL_ENCODING_H
#define TERMINAL_ENCODING_H

#include <gtk/gtk.h>

#define TERMINAL_TYPE_ENCODING (terminal_encoding_get_type ())

typedef struct
{
	int   refcount;
	char *id;
	char *name;
	guint valid            : 1;
	guint validity_checked : 1;
	guint is_custom        : 1;
	guint is_active        : 1;
} TerminalEncoding;

GType terminal_encoding_get_type (void);

TerminalEncoding *terminal_encoding_new (const char *charset,
        const char *display_name,
        gboolean is_custom,
        gboolean force_valid);

TerminalEncoding *terminal_encoding_ref (TerminalEncoding *encoding);

void terminal_encoding_unref (TerminalEncoding *encoding);

gboolean terminal_encoding_is_valid (TerminalEncoding *encoding);

const char *terminal_encoding_get_id (TerminalEncoding *encoding);

const char *terminal_encoding_get_charset (TerminalEncoding *encoding);

GHashTable *terminal_encodings_get_builtins (void);

void terminal_encoding_dialog_show (GtkWindow *transient_parent);

#endif /* TERMINAL_ENCODING_H */