1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 3 /* CajaEntry: 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. 6 * 7 * Copyright (C) 2000 Eazel, Inc. 8 * 9 * Author: John Sullivan <sullivan@eazel.com> 10 * 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. 15 * 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. 20 * 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., 51 Franklin St, Fifth Floor, 24 * Boston, MA 02110-1301, USA. 25 */ 26 27 #ifndef CAJA_ENTRY_H 28 #define CAJA_ENTRY_H 29 30 #include <gtk/gtk.h> 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #define CAJA_TYPE_ENTRY caja_entry_get_type() 37 #define CAJA_ENTRY(obj) \ 38 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAJA_TYPE_ENTRY, CajaEntry)) 39 #define CAJA_ENTRY_CLASS(klass) \ 40 (G_TYPE_CHECK_CLASS_CAST ((klass), CAJA_TYPE_ENTRY, CajaEntryClass)) 41 #define CAJA_IS_ENTRY(obj) \ 42 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAJA_TYPE_ENTRY)) 43 #define CAJA_IS_ENTRY_CLASS(klass) \ 44 (G_TYPE_CHECK_CLASS_TYPE ((klass), CAJA_TYPE_ENTRY)) 45 #define CAJA_ENTRY_GET_CLASS(obj) \ 46 (G_TYPE_INSTANCE_GET_CLASS ((obj), CAJA_TYPE_ENTRY, CajaEntryClass)) 47 48 typedef struct CajaEntryDetails CajaEntryDetails; 49 50 typedef struct 51 { 52 GtkEntry parent; 53 CajaEntryDetails *details; 54 } CajaEntry; 55 56 typedef struct 57 { 58 GtkEntryClass parent_class; 59 60 void (*user_changed) (CajaEntry *entry); 61 void (*selection_changed) (CajaEntry *entry); 62 } CajaEntryClass; 63 64 GType caja_entry_get_type (void); 65 GtkWidget *caja_entry_new (void); 66 void caja_entry_set_text (CajaEntry *entry, 67 const char *text); 68 void caja_entry_select_all (CajaEntry *entry); 69 void caja_entry_select_all_at_idle (CajaEntry *entry); 70 void caja_entry_set_special_tab_handling (CajaEntry *entry, 71 gboolean special_tab_handling); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif /* CAJA_ENTRY_H */ 78