1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* 3 * Copyright © 2012 Igalia S.L. 4 * 5 * This file is part of Epiphany. 6 * 7 * Epiphany is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * Epiphany 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 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with Epiphany. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 21 #pragma once 22 23 #include <glib-object.h> 24 #include <glib.h> 25 26 G_BEGIN_DECLS 27 28 #define EPHY_TYPE_ENCODING (ephy_encoding_get_type ()) 29 30 G_DECLARE_FINAL_TYPE (EphyEncoding, ephy_encoding, EPHY, ENCODING, GObject) 31 32 typedef enum 33 { 34 LG_NONE = 0, 35 LG_ARABIC = 1 << 0, 36 LG_BALTIC = 1 << 1, 37 LG_CAUCASIAN = 1 << 2, 38 LG_C_EUROPEAN = 1 << 3, 39 LG_CHINESE_TRAD = 1 << 4, 40 LG_CHINESE_SIMP = 1 << 5, 41 LG_CYRILLIC = 1 << 6, 42 LG_GREEK = 1 << 7, 43 LG_HEBREW = 1 << 8, 44 LG_INDIAN = 1 << 9, 45 LG_JAPANESE = 1 << 10, 46 LG_KOREAN = 1 << 12, 47 LG_NORDIC = 1 << 13, 48 LG_PERSIAN = 1 << 14, 49 LG_SE_EUROPEAN = 1 << 15, 50 LG_THAI = 1 << 16, 51 LG_TURKISH = 1 << 17, 52 LG_UKRAINIAN = 1 << 18, 53 LG_UNICODE = 1 << 19, 54 LG_VIETNAMESE = 1 << 20, 55 LG_WESTERN = 1 << 21, 56 LG_ALL = 0x3fffff, 57 } EphyLanguageGroup; 58 59 EphyEncoding * ephy_encoding_new (const char *encoding, 60 const char *title, 61 int language_groups); 62 const char * ephy_encoding_get_title (EphyEncoding *encoding); 63 const char * ephy_encoding_get_title_elided (EphyEncoding *encoding); 64 const char * ephy_encoding_get_encoding (EphyEncoding *encoding); 65 const char * ephy_encoding_get_collation_key (EphyEncoding *encoding); 66 int ephy_encoding_get_language_groups (EphyEncoding *encoding); 67 68 G_END_DECLS 69