remove unused and useless "src" argument for a number of Region property modifying...
[ardour.git] / libs / gnomecanvas / libgnomecanvas / gnome-canvas-rich-text.h
1 /* Editable GnomeCanvas text item based on GtkTextLayout, borrowed heavily
2  * from GtkTextView.
3  *
4  * Copyright (c) 2000 Red Hat, Inc.
5  * Copyright (c) 2001 Joe Shaw
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef GNOME_CANVAS_RICH_TEXT_H
24 #define GNOME_CANVAS_RICH_TEXT_H
25
26 #include <libgnomecanvas/gnome-canvas.h>
27 #include <gtk/gtk.h>
28
29 G_BEGIN_DECLS
30
31 #define GNOME_TYPE_CANVAS_RICH_TEXT             (gnome_canvas_rich_text_get_type ())
32 #define GNOME_CANVAS_RICH_TEXT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichText))
33 #define GNOME_CANVAS_RICH_TEXT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichTextClass))
34 #define GNOME_IS_CANVAS_RICH_TEXT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNOME_TYPE_CANVAS_RICH_TEXT))
35 #define GNOME_IS_CANVAS_RICH_TEXT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GNOME_TYPE_CANVAS_RICH_TEXT))
36 #define GNOME_CANVAS_RICH_TEXT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GNOME_TYPE_CANVAS_RICH_TEXT, GnomeCanvasRichTextClass))
37
38 typedef struct _GnomeCanvasRichText             GnomeCanvasRichText;
39 typedef struct _GnomeCanvasRichTextPrivate      GnomeCanvasRichTextPrivate;
40 typedef struct _GnomeCanvasRichTextClass        GnomeCanvasRichTextClass;
41
42 struct _GnomeCanvasRichText {
43         GnomeCanvasItem item;
44
45     GnomeCanvasRichTextPrivate *_priv;
46 };
47
48 struct _GnomeCanvasRichTextClass {
49         GnomeCanvasItemClass parent_class;
50
51         void (* tag_changed)(GnomeCanvasRichText *text,
52                              GtkTextTag *tag);
53 };
54
55 GType gnome_canvas_rich_text_get_type(void) G_GNUC_CONST;
56
57 void gnome_canvas_rich_text_cut_clipboard(GnomeCanvasRichText *text);
58
59 void gnome_canvas_rich_text_copy_clipboard(GnomeCanvasRichText *text);
60
61 void gnome_canvas_rich_text_paste_clipboard(GnomeCanvasRichText *text);
62
63 void gnome_canvas_rich_text_set_buffer(GnomeCanvasRichText *text,
64                                        GtkTextBuffer *buffer);
65
66 GtkTextBuffer *gnome_canvas_rich_text_get_buffer(GnomeCanvasRichText *text);
67 void
68 gnome_canvas_rich_text_get_iter_location (GnomeCanvasRichText *text,
69                                           const GtkTextIter *iter,
70                                           GdkRectangle      *location);
71 void
72 gnome_canvas_rich_text_get_iter_at_location (GnomeCanvasRichText *text,
73                                     GtkTextIter *iter,
74                                     gint         x,
75                                              gint         y);
76
77 G_END_DECLS
78
79 #endif /* GNOME_CANVAS_RICH_TEXT_H */