geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

encodingsprivate.h
Go to the documentation of this file.
1/*
2 * encodingsprivate.h - this file is part of Geany, a fast and lightweight IDE
3 *
4 * Copyright 2005 The Geany contributors
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef ENCODINGSPRIVATE_H
22#define ENCODINGSPRIVATE_H
23
24#include "encodings.h"
25
26/* Groups of encodings */
27typedef enum
28{
29 NONE = 0,
36
40
41/* Structure to represent an encoding to be used in Geany. */
42typedef struct GeanyEncoding
43{
44 GeanyEncodingIndex idx; /* The index of the encoding inside globa encodes array.*/
45 gint order; /* Internally used member for grouping */
46 GeanyEncodingGroup group; /* Internally used member for grouping */
47 const gchar *charset; /* String representation of the encoding, e.g. "ISO-8859-3" */
48 const gchar *name; /* Translatable and descriptive name of the encoding, e.g. "South European" */
49}
51
52const GeanyEncoding* encodings_get_from_charset(const gchar *charset);
54
55gchar* encodings_to_string(const GeanyEncoding* enc);
56const gchar* encodings_get_charset(const GeanyEncoding* enc);
57
58void encodings_select_radio_item(const gchar *charset);
59
60void encodings_init(void);
61void encodings_finalize(void);
62
63GtkTreeStore *encodings_encoding_store_new(gboolean has_detect);
64
65gint encodings_encoding_store_get_encoding(GtkTreeStore *store, GtkTreeIter *iter);
66
67gboolean encodings_encoding_store_get_iter(GtkTreeStore *store, GtkTreeIter *iter, gint enc);
68
69void encodings_encoding_store_cell_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell,
70 GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
71
72gboolean encodings_is_unicode_charset(const gchar *string);
73
74gboolean encodings_convert_to_utf8_auto(gchar **buf, gsize *size, const gchar *forced_enc,
75 gchar **used_encoding, gboolean *has_bom, gboolean *partial);
76
77GeanyEncodingIndex encodings_scan_unicode_bom(const gchar *string, gsize len, guint *bom_len);
78
80
82
83#endif /* ENCODINGSPRIVATE_H */
Encoding conversion and Byte Order Mark (BOM) handling.
GeanyEncodingIndex
List of known and supported encodings.
Definition: encodings.h:50
@ GEANY_ENCODINGS_MAX
Definition: encodings.h:124
gboolean encodings_convert_to_utf8_auto(gchar **buf, gsize *size, const gchar *forced_enc, gchar **used_encoding, gboolean *has_bom, gboolean *partial)
Definition: encodings.c:1057
void encodings_encoding_store_cell_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
Definition: encodings.c:597
void encodings_finalize(void)
Definition: encodings.c:391
GeanyEncoding encodings[GEANY_ENCODINGS_MAX]
Definition: encodings.c:59
GeanyEncodingIndex encodings_scan_unicode_bom(const gchar *string, gsize len, guint *bom_len)
Definition: encodings.c:801
GeanyEncodingIndex encodings_get_idx_from_charset(const gchar *charset)
Definition: encodings.c:196
gboolean encodings_encoding_store_get_iter(GtkTreeStore *store, GtkTreeIter *iter, gint enc)
Definition: encodings.c:582
struct GeanyEncoding GeanyEncoding
GeanyEncodingGroup
@ GEANY_ENCODING_GROUPS_MAX
@ UNICODE
@ MIDDLEEASTERN
@ EASTASIAN
@ WESTEUROPEAN
@ NONE
@ EASTEUROPEAN
@ ASIAN
void encodings_init(void)
Definition: encodings.c:405
gint encodings_encoding_store_get_encoding(GtkTreeStore *store, GtkTreeIter *iter)
Definition: encodings.c:574
gchar * encodings_to_string(const GeanyEncoding *enc)
Definition: encodings.c:275
gboolean encodings_is_unicode_charset(const gchar *string)
Definition: encodings.c:855
const GeanyEncoding * encodings_get_from_index(gint idx)
Definition: encodings.c:247
void encodings_select_radio_item(const gchar *charset)
Definition: encodings.c:297
GtkTreeStore * encodings_encoding_store_new(gboolean has_detect)
Definition: encodings.c:517
const GeanyEncoding * encodings_get_from_charset(const gchar *charset)
Definition: encodings.c:215
const gchar * encodings_get_charset(const GeanyEncoding *enc)
Definition: encodings.c:285
GeanyEncodingIndex idx
GeanyEncodingGroup group
const gchar * charset
const gchar * name