2 * Copyright © 2002 Ricardo Fernández Pascual
3 * Copyright © 2003, 2004 Marco Pesenti Gritti
4 * Copyright © 2003, 2004, 2005 Christian Persch
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)
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.
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.
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>
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;
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;
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,
79 void ephy_location_entry_set_location (EphyLocationEntry *le,
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,
94 void ephy_location_entry_set_secure (EphyLocationEntry *entry,
97 void ephy_location_entry_set_show_lock (EphyLocationEntry *entry,
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);