1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * xed-encodings-combo-box.h
4  * This file is part of xed
5  *
6  * Copyright (C) 2003-2005 - Paolo Maggi
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23 
24 /*
25  * Modified by the xed Team, 2003-2005. See the AUTHORS file for a
26  * list of people on the xed Team.
27  * See the ChangeLog files for a list of changes.
28  *
29  * $Id: xed-encodings-option-menu.h 4429 2005-12-12 17:28:04Z pborelli $
30  */
31 
32 #ifndef __XED_ENCODINGS_COMBO_BOX_H__
33 #define __XED_ENCODINGS_COMBO_BOX_H__
34 
35 #include <gtksourceview/gtksource.h>
36 
37 G_BEGIN_DECLS
38 
39 #define XED_TYPE_ENCODINGS_COMBO_BOX             (xed_encodings_combo_box_get_type ())
40 #define XED_ENCODINGS_COMBO_BOX(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_ENCODINGS_COMBO_BOX, XedEncodingsComboBox))
41 #define XED_ENCODINGS_COMBO_BOX_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), XED_TYPE_ENCODINGS_COMBO_BOX, XedEncodingsComboBoxClass))
42 #define XED_IS_ENCODINGS_COMBO_BOX(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XED_TYPE_ENCODINGS_COMBO_BOX))
43 #define XED_IS_ENCODINGS_COMBO_BOX_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), XED_TYPE_ENCODINGS_COMBO_BOX))
44 #define XED_ENCODINGS_COMBO_BOX_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), XED_TYPE_ENCODINGS_COMBO_BOX, XedEncodingsComboBoxClass))
45 
46 
47 typedef struct _XedEncodingsComboBox        XedEncodingsComboBox;
48 typedef struct _XedEncodingsComboBoxClass   XedEncodingsComboBoxClass;
49 typedef struct _XedEncodingsComboBoxPrivate XedEncodingsComboBoxPrivate;
50 
51 struct _XedEncodingsComboBox
52 {
53     GtkComboBox parent;
54 
55     XedEncodingsComboBoxPrivate *priv;
56 };
57 
58 struct _XedEncodingsComboBoxClass
59 {
60     GtkComboBoxClass parent_class;
61 };
62 
63 GType xed_encodings_combo_box_get_type (void) G_GNUC_CONST;
64 
65 /* Constructor */
66 GtkWidget *xed_encodings_combo_box_new (gboolean save_mode);
67 
68 const GtkSourceEncoding *xed_encodings_combo_box_get_selected_encoding (XedEncodingsComboBox *menu);
69 void xed_encodings_combo_box_set_selected_encoding  (XedEncodingsComboBox    *menu,
70                                                      const GtkSourceEncoding *encoding);
71 
72 G_END_DECLS
73 
74 #endif /* __XED_ENCODINGS_COMBO_BOX_H__ */
75 
76 
77