2006-12-17 03:23:19 -06:00
|
|
|
/*
|
|
|
|
* mooencodings.h
|
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2006-12-17 03:23:19 -06:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit is free software; you can
|
|
|
|
* redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2006-12-17 03:23:19 -06:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2006-12-17 03:23:19 -06:00
|
|
|
*/
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#ifndef MOO_ENCODINGS_H
|
|
|
|
#define MOO_ENCODINGS_H
|
2006-12-17 03:23:19 -06:00
|
|
|
|
2007-11-25 12:22:34 -06:00
|
|
|
#include <gtk/gtk.h>
|
2006-12-17 03:23:19 -06:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
2012-08-11 15:02:55 -07:00
|
|
|
#define MOO_ENCODING_AUTO "auto"
|
|
|
|
#define MOO_ENCODING_UTF8 "UTF-8"
|
|
|
|
|
|
|
|
#define MOO_ENCODING_UTF16 "UTF-16"
|
|
|
|
#define MOO_ENCODING_UTF16LE "UTF-16LE"
|
|
|
|
#define MOO_ENCODING_UTF16BE "UTF-16BE"
|
|
|
|
#define MOO_ENCODING_UTF16LE_BOM "UTF-16LE-BOM"
|
|
|
|
#define MOO_ENCODING_UTF16BE_BOM "UTF-16BE-BOM"
|
|
|
|
|
|
|
|
#define MOO_ENCODING_UTF32 "UTF-32"
|
|
|
|
#define MOO_ENCODING_UTF32LE "UTF-32LE"
|
|
|
|
#define MOO_ENCODING_UTF32BE "UTF-32BE"
|
|
|
|
#define MOO_ENCODING_UTF32LE_BOM "UTF-32LE-BOM"
|
|
|
|
#define MOO_ENCODING_UTF32BE_BOM "UTF-32BE-BOM"
|
2006-12-17 03:23:19 -06:00
|
|
|
|
2007-05-02 00:37:36 -05:00
|
|
|
typedef enum {
|
|
|
|
MOO_ENCODING_COMBO_OPEN,
|
|
|
|
MOO_ENCODING_COMBO_SAVE
|
|
|
|
} MooEncodingComboType;
|
|
|
|
|
2007-11-25 12:22:34 -06:00
|
|
|
void _moo_encodings_combo_init (GtkComboBox *combo,
|
|
|
|
MooEncodingComboType type,
|
|
|
|
gboolean use_separators);
|
|
|
|
void _moo_encodings_combo_set_enc (GtkComboBox *combo,
|
|
|
|
const char *enc,
|
|
|
|
MooEncodingComboType type);
|
|
|
|
const char *_moo_encodings_combo_get_enc (GtkComboBox *combo,
|
|
|
|
MooEncodingComboType type);
|
2007-05-02 00:37:36 -05:00
|
|
|
|
|
|
|
void _moo_encodings_attach_combo (GtkWidget *dialog,
|
|
|
|
GtkWidget *box,
|
|
|
|
gboolean save_mode,
|
|
|
|
const char *encoding);
|
|
|
|
const char *_moo_encodings_combo_get (GtkWidget *dialog,
|
|
|
|
gboolean save_mode);
|
2006-12-17 03:23:19 -06:00
|
|
|
|
2007-11-25 12:22:34 -06:00
|
|
|
typedef void (*MooEncodingsMenuFunc) (const char *encoding,
|
|
|
|
gpointer data);
|
|
|
|
GtkAction *_moo_encodings_menu_action_new (const char *id,
|
|
|
|
const char *label,
|
|
|
|
MooEncodingsMenuFunc func,
|
|
|
|
gpointer data);
|
2007-11-29 19:53:33 -06:00
|
|
|
void _moo_encodings_menu_action_set_current (GtkAction *action,
|
|
|
|
const char *enc);
|
2007-11-25 12:22:34 -06:00
|
|
|
|
2006-12-17 10:58:17 -06:00
|
|
|
const char *_moo_encoding_locale (void);
|
2007-11-26 00:13:17 -06:00
|
|
|
gboolean _moo_encodings_equal (const char *enc1,
|
|
|
|
const char *enc2);
|
|
|
|
const char *_moo_encoding_get_display_name (const char *enc);
|
2006-12-17 10:58:17 -06:00
|
|
|
|
2006-12-17 03:23:19 -06:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-04-12 10:31:28 -05:00
|
|
|
#endif /* MOO_ENCODINGS_H */
|