eb2ab710d4070ad9133a3a66d05133024e4b4db8
[hildon] / hildon / hildon-entry.h
1 /*
2  * This file is a part of hildon
3  *
4  * Copyright (C) 2008 Nokia Corporation, all rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser Public License as published by
8  * the Free Software Foundation; version 2 of the license.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser Public License for more details.
14  *
15  */
16
17 #ifndef                                         __HILDON_ENTRY_H__
18 #define                                         __HILDON_ENTRY_H__
19
20 #include                                        "hildon-gtk.h"
21
22 G_BEGIN_DECLS
23
24 #define                                         HILDON_TYPE_ENTRY \
25                                                 (hildon_entry_get_type())
26
27 #define                                         HILDON_ENTRY(obj) \
28                                                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
29                                                 HILDON_TYPE_ENTRY, HildonEntry))
30
31 #define                                         HILDON_ENTRY_CLASS(klass) \
32                                                 (G_TYPE_CHECK_CLASS_CAST ((klass), \
33                                                 HILDON_TYPE_ENTRY, HildonEntryClass))
34
35 #define                                         HILDON_IS_ENTRY(obj) \
36                                                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HILDON_TYPE_ENTRY))
37
38 #define                                         HILDON_IS_ENTRY_CLASS(klass) \
39                                                 (G_TYPE_CHECK_CLASS_TYPE ((klass), HILDON_TYPE_ENTRY))
40
41 #define                                         HILDON_ENTRY_GET_CLASS(obj) \
42                                                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
43                                                 HILDON_TYPE_ENTRY, HildonEntryClass))
44
45 typedef struct                                  _HildonEntry HildonEntry;
46
47 typedef struct                                  _HildonEntryClass HildonEntryClass;
48
49 typedef struct                                  _HildonEntryPrivate HildonEntryPrivate;
50
51 struct                                          _HildonEntryClass
52 {
53     GtkEntryClass parent_class;
54 };
55
56 struct                                          _HildonEntry
57 {
58     GtkEntry parent;
59
60     /* private */
61     HildonEntryPrivate *priv;
62 };
63
64
65 GType
66 hildon_entry_get_type                           (void) G_GNUC_CONST;
67
68 GtkWidget *
69 hildon_entry_new                                (HildonSizeType size);
70
71 void
72 hildon_entry_set_text                           (HildonEntry *entry,
73                                                  const gchar *text);
74
75 const gchar *
76 hildon_entry_get_text                           (HildonEntry *entry);
77
78 void
79 hildon_entry_set_placeholder                    (HildonEntry *entry,
80                                                  const gchar *text);
81
82 G_END_DECLS
83
84 #endif /* __HILDON_ENTRY_H__ */