Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / lib / widgets / .svn / text-base / ephy-location-entry.h.svn-base
blob549416c2361b343db29e688ae8424af3094383aa
1 /*
2  *  Copyright © 2002  Ricardo Fernández Pascual
3  *  Copyright © 2003, 2004  Marco Pesenti Gritti
4  *  Copyright © 2003, 2004, 2005  Christian Persch
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2, or (at your option)
9  *  any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  *
20  *  $Id$
21  */
23 #ifndef EPHY_LOCATION_ENTRY_H
24 #define EPHY_LOCATION_ENTRY_H
26 #include "ephy-node.h"
28 #include <gtk/gtkwidget.h>
29 #include <gtk/gtktoolitem.h>
30 #include <gtk/gtktreemodel.h>
32 G_BEGIN_DECLS
34 #define EPHY_TYPE_LOCATION_ENTRY                (ephy_location_entry_get_type())
35 #define EPHY_LOCATION_ENTRY(object)             (G_TYPE_CHECK_INSTANCE_CAST((object), EPHY_TYPE_LOCATION_ENTRY, EphyLocationEntry))
36 #define EPHY_LOCATION_ENTRY_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST((klass), EPHY_TYPE_LOCATION_ENTRY, EphyLocationEntryClass))
37 #define EPHY_IS_LOCATION_ENTRY(object)          (G_TYPE_CHECK_INSTANCE_TYPE((object), EPHY_TYPE_LOCATION_ENTRY))
38 #define EPHY_IS_LOCATION_ENTRY_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE((klass), EPHY_TYPE_LOCATION_ENTRY))
39 #define EPHY_LOCATION_ENTRY_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS((obj), EPHY_TYPE_LOCATION_ENTRY, EphyLocationEntryClass))
41 typedef struct _EphyLocationEntry               EphyLocationEntry;
42 typedef struct _EphyLocationEntryClass          EphyLocationEntryClass;
43 typedef struct _EphyLocationEntryPrivate        EphyLocationEntryPrivate;
45 struct _EphyLocationEntryClass
47         GtkToolItemClass parent_class;
49         /* Signals */
50         void   (* user_changed) (EphyLocationEntry *entry);
51         void   (* lock_clicked) (EphyLocationEntry *entry);
52         /* for getting the drag data */
53         char * (* get_location) (EphyLocationEntry *entry);
54         char * (* get_title)    (EphyLocationEntry *entry);
57 struct _EphyLocationEntry
59         GtkToolItem parent_object;
61         /*< private >*/
62         EphyLocationEntryPrivate *priv;
65 GType           ephy_location_entry_get_type            (void);
67 GtkWidget      *ephy_location_entry_new                 (void);
69 void            ephy_location_entry_set_completion      (EphyLocationEntry *le,
70                                                          GtkTreeModel *model,
71                                                          guint text_col,
72                                                          guint action_col,
73                                                          guint keywords_col,
74                                                          guint relevance_col,
75                                                          guint extra_col,
76                                                          guint favicon_col,
77                                                          guint url_col);
79 void            ephy_location_entry_set_location        (EphyLocationEntry *le,
80                                                          const char *address,
81                                                          const char *typed_address);
83 const char     *ephy_location_entry_get_location        (EphyLocationEntry *le);
85 gboolean        ephy_location_entry_reset               (EphyLocationEntry *entry);
87 void            ephy_location_entry_activate            (EphyLocationEntry *le);
89 GtkWidget      *ephy_location_entry_get_entry           (EphyLocationEntry *entry);
91 void            ephy_location_entry_set_favicon         (EphyLocationEntry *entry,
92                                                          GdkPixbuf *pixbuf);
94 void            ephy_location_entry_set_secure          (EphyLocationEntry *entry,
95                                                          gboolean secure);
97 void            ephy_location_entry_set_show_lock       (EphyLocationEntry *entry,
98                                                          gboolean show_lock);
100 void            ephy_location_entry_set_lock_stock      (EphyLocationEntry *entry,
101                                                          const char *stock_id);
103 void            ephy_location_entry_set_lock_tooltip    (EphyLocationEntry *entry,
104                                                          const char *tooltip);
106 G_END_DECLS
108 #endif