2 * This file is part of hildon-libs
4 * Copyright (C) 2005, 2006 Nokia Corporation.
6 * Contact: Michael Dominic Kostrzewa <michael.kostrzewa@nokia.com>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; version 2.1 of
13 * This library is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 #ifndef __HILDON_TELEPHONE_EDITOR_H__
26 #define __HILDON_TELEPHONE_EDITOR_H__
28 #include <gtk/gtkcontainer.h>
32 * HILDON_TELEPHONE_EDITOR_TYPE:
34 * Macro for getting type of telephone editor.
36 #define HILDON_TELEPHONE_EDITOR_TYPE \
37 ( hildon_telephone_editor_get_type() )
38 #define HILDON_TELEPHONE_EDITOR(obj) \
39 (GTK_CHECK_CAST (obj, HILDON_TELEPHONE_EDITOR_TYPE, \
40 HildonTelephoneEditor))
41 #define HILDON_TELEPHONE_EDITOR_CLASS(klass) \
42 (GTK_CHECK_CLASS_CAST ((klass), HILDON_TELEPHONE_EDITOR_TYPE, \
43 HildonTelephoneEditorClass))
44 #define HILDON_IS_TELEPHONE_EDITOR(obj) \
45 (GTK_CHECK_TYPE (obj, HILDON_TELEPHONE_EDITOR_TYPE))
46 #define HILDON_IS_TELEPHONE_EDITOR_CLASS(klass) \
47 (GTK_CHECK_CLASS_TYPE ((klass), HILDON_TELEPHONE_EDITOR_TYPE))
49 * HildonTelephoneEditorFormat:
50 * @HILDON_TELEPHONE_EDITOR_FORMAT_FREE: Free format.
51 * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE: Coerce format, three fields.
52 * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY: Coerce format, only
54 * @HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA: Coerce format, country
57 * Define all possible format modes for the HildonTelephoneEditor.
61 HILDON_TELEPHONE_EDITOR_FORMAT_FREE = 0,
62 HILDON_TELEPHONE_EDITOR_FORMAT_COERCE,
63 HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_COUNTRY,
64 HILDON_TELEPHONE_EDITOR_FORMAT_COERCE_AREA
65 } HildonTelephoneEditorFormat;
69 * HildonTelephoneEditor:
71 * Internal struct for telephone editor.
73 typedef struct _HildonTelephoneEditor HildonTelephoneEditor;
74 typedef struct _HildonTelephoneEditorClass HildonTelephoneEditorClass;
77 struct _HildonTelephoneEditor {
81 struct _HildonTelephoneEditorClass {
82 GtkContainerClass parent_class;
85 GType hildon_telephone_editor_get_type(void);
87 GtkWidget *hildon_telephone_editor_new(HildonTelephoneEditorFormat format);
89 *hildon_telephone_editor_new_with_strings(HildonTelephoneEditorFormat
91 const gchar * country,
93 const gchar * number);
94 void hildon_telephone_editor_set_editable(HildonTelephoneEditor * hte,
95 gboolean country, gboolean area,
98 void hildon_telephone_editor_set_show_plus(HildonTelephoneEditor * hte,
101 gboolean hildon_telephone_editor_get_show_plus(HildonTelephoneEditor *
104 void hildon_telephone_editor_set_show_border(HildonTelephoneEditor * hte,
107 gboolean hildon_telephone_editor_get_show_border(HildonTelephoneEditor *
111 void hildon_telephone_editor_set_widths(HildonTelephoneEditor * hte,
113 guint area, guint number);
115 const gchar *hildon_telephone_editor_get_country(HildonTelephoneEditor *
118 void hildon_telephone_editor_set_country(HildonTelephoneEditor * hte,
119 const gchar * country);
121 const gchar *hildon_telephone_editor_get_area(HildonTelephoneEditor * hte);
123 void hildon_telephone_editor_set_area(HildonTelephoneEditor * hte,
126 const gchar *hildon_telephone_editor_get_number(HildonTelephoneEditor *
129 void hildon_telephone_editor_set_number(HildonTelephoneEditor * hte,
130 const gchar * number);
133 #endif /* __HILDON_TELEPHONE_EDITOR_H__ */