1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the Free
16 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 #ifndef __GTK_EDITABLE_H__
19 #define __GTK_EDITABLE_H__
23 #include <gtk/gtkwidget.h>
28 #endif /* __cplusplus */
31 #define GTK_EDITABLE(obj) GTK_CHECK_CAST (obj, gtk_editable_get_type (), GtkEditable)
32 #define GTK_EDITABLE_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_editable_get_type (), GtkEditableClass)
33 #define GTK_IS_EDITABLE(obj) GTK_CHECK_TYPE (obj, gtk_editable_get_type ())
36 typedef struct _GtkEditable GtkEditable;
37 typedef struct _GtkEditableClass GtkEditableClass;
39 typedef void (*GtkTextFunction) (GtkEditable *editable, guint32 time);
47 guint selection_start_pos;
48 guint selection_end_pos;
49 guint has_selection : 1;
53 gchar *clipboard_text;
56 struct _GtkEditableClass
58 GtkWidgetClass parent_class;
60 void (* insert_text) (GtkEditable *editable,
64 void (* delete_text) (GtkEditable *editable,
67 void (* update_text) (GtkEditable *editable,
70 gchar* (* get_chars) (GtkEditable *editable,
73 void (* set_selection)(GtkEditable *editable,
76 void (* activate) (GtkEditable *editable);
77 void (* changed) (GtkEditable *editable);
80 guint gtk_editable_get_type (void);
81 void gtk_editable_select_region (GtkEditable *editable,
84 void gtk_editable_insert_text (GtkEditable *editable,
85 const gchar *new_text,
88 void gtk_editable_delete_text (GtkEditable *editable,
91 gchar * gtk_editable_get_chars (GtkEditable *editable,
94 void gtk_editable_cut_clipboard (GtkEditable *editable,
96 void gtk_editable_copy_clipboard (GtkEditable *editable,
98 void gtk_editable_paste_clipboard (GtkEditable *editable,
100 void gtk_editable_claim_selection (GtkEditable *editable,
103 void gtk_editable_delete_selection (GtkEditable *editable);
105 void gtk_editable_changed (GtkEditable *editable);
110 #endif /* __cplusplus */
113 #endif /* __GTK_EDITABLE_H__ */