1 /* GTK - The GTK+ 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 Lesser 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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #ifndef GTK_DISABLE_DEPRECATED
29 #ifndef __GTK_OLD_EDITABLE_H__
30 #define __GTK_OLD_EDITABLE_H__
37 #define GTK_TYPE_OLD_EDITABLE (gtk_old_editable_get_type ())
38 #define GTK_OLD_EDITABLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_OLD_EDITABLE, GtkOldEditable))
39 #define GTK_OLD_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_OLD_EDITABLE, GtkOldEditableClass))
40 #define GTK_IS_OLD_EDITABLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_OLD_EDITABLE))
41 #define GTK_IS_OLD_EDITABLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_OLD_EDITABLE))
42 #define GTK_OLD_EDITABLE_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_OLD_EDITABLE, GtkOldEditableClass))
45 typedef struct _GtkOldEditable GtkOldEditable;
46 typedef struct _GtkOldEditableClass GtkOldEditableClass;
48 typedef void (*GtkTextFunction) (GtkOldEditable *editable, guint32 time_);
50 struct _GtkOldEditable
57 guint selection_start_pos;
58 guint selection_end_pos;
59 guint has_selection : 1;
65 gchar *clipboard_text;
68 struct _GtkOldEditableClass
70 GtkWidgetClass parent_class;
72 /* Bindings actions */
73 void (* activate) (GtkOldEditable *editable);
74 void (* set_editable) (GtkOldEditable *editable,
75 gboolean is_editable);
76 void (* move_cursor) (GtkOldEditable *editable,
79 void (* move_word) (GtkOldEditable *editable,
81 void (* move_page) (GtkOldEditable *editable,
84 void (* move_to_row) (GtkOldEditable *editable,
86 void (* move_to_column) (GtkOldEditable *editable,
88 void (* kill_char) (GtkOldEditable *editable,
90 void (* kill_word) (GtkOldEditable *editable,
92 void (* kill_line) (GtkOldEditable *editable,
94 void (* cut_clipboard) (GtkOldEditable *editable);
95 void (* copy_clipboard) (GtkOldEditable *editable);
96 void (* paste_clipboard) (GtkOldEditable *editable);
98 /* Virtual functions. get_chars is in paricular not a signal because
99 * it returns malloced memory. The others are not signals because
100 * they would not be particularly useful as such. (All changes to
101 * selection and position do not go through these functions)
103 void (* update_text) (GtkOldEditable *editable,
106 gchar* (* get_chars) (GtkOldEditable *editable,
109 void (* set_selection)(GtkOldEditable *editable,
112 void (* set_position) (GtkOldEditable *editable,
116 GtkType gtk_old_editable_get_type (void) G_GNUC_CONST;
117 void gtk_old_editable_claim_selection (GtkOldEditable *old_editable,
120 void gtk_old_editable_changed (GtkOldEditable *old_editable);
124 #endif /* __GTK_OLD_EDITABLE_H__ */
126 #endif /* GTK_DISABLE_DEPRECATED */