2008-03-29 Cosimo Cecchi <cosimoc@gnome.org>
[nautilus.git] / libnautilus-private / nautilus-entry.h
blob0d28e85d8ce187a9af8a313196511d91b6981090
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /* NautilusEntry: one-line text editing widget. This consists of bug fixes
4 * and other improvements to GtkEntry, and all the changes could be rolled
5 * into GtkEntry some day.
7 * Copyright (C) 2000 Eazel, Inc.
9 * Author: John Sullivan <sullivan@eazel.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Library General Public
13 * License as published by the Free Software Foundation; either
14 * version 2 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Library General Public License for more details.
21 * You should have received a copy of the GNU Library General Public
22 * License along with this library; if not, write to the
23 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 * Boston, MA 02111-1307, USA.
27 #ifndef NAUTILUS_ENTRY_H
28 #define NAUTILUS_ENTRY_H
30 #include <gtk/gtkentry.h>
32 G_BEGIN_DECLS
34 #define NAUTILUS_TYPE_ENTRY \
35 (nautilus_entry_get_type ())
36 #define NAUTILUS_ENTRY(obj) \
37 (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_ENTRY, NautilusEntry))
38 #define NAUTILUS_ENTRY_CLASS(klass) \
39 (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_ENTRY, NautilusEntryClass))
40 #define NAUTILUS_IS_ENTRY(obj) \
41 (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_ENTRY))
42 #define NAUTILUS_IS_ENTRY_CLASS(klass) \
43 (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_ENTRY))
45 typedef struct NautilusEntryDetails NautilusEntryDetails;
47 typedef struct {
48 GtkEntry parent;
49 NautilusEntryDetails *details;
50 } NautilusEntry;
52 typedef struct {
53 GtkEntryClass parent_class;
55 void (*user_changed) (NautilusEntry *entry);
56 void (*selection_changed) (NautilusEntry *entry);
57 } NautilusEntryClass;
59 GType nautilus_entry_get_type (void);
60 GtkWidget *nautilus_entry_new (void);
61 GtkWidget *nautilus_entry_new_with_max_length (guint16 max);
62 void nautilus_entry_set_text (NautilusEntry *entry,
63 const char *text);
64 void nautilus_entry_select_all (NautilusEntry *entry);
65 void nautilus_entry_select_all_at_idle (NautilusEntry *entry);
66 void nautilus_entry_set_special_tab_handling (NautilusEntry *entry,
67 gboolean special_tab_handling);
69 G_END_DECLS
71 #endif /* NAUTILUS_ENTRY_H */