gtktextutil.h 2.26 KB
Newer Older
Cody Russell's avatar
Cody Russell committed
1
/* GTK - The GIMP Toolkit
2 3 4 5 6 7 8 9 10 11 12 13 14
 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 17 18 19 20 21
 */

/*
 * Modified by the GTK+ Team and others 1997-2001.  See the AUTHORS
 * file for a list of people on the GTK+ Team.  See the ChangeLog
 * files for a list of changes.  These files are distributed with
22
 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
23 24 25 26 27
 */

#ifndef __GTK_TEXT_UTIL_H__
#define __GTK_TEXT_UTIL_H__

28
G_BEGIN_DECLS
29

30 31 32
/* This is a private uninstalled header shared between
 * GtkTextView and GtkEntry
 */
33 34 35 36 37 38 39 40

typedef void (* GtkTextUtilCharChosenFunc) (const char *text,
                                            gpointer    data);

void _gtk_text_util_append_special_char_menuitems (GtkMenuShell              *menushell,
                                                   GtkTextUtilCharChosenFunc  func,
                                                   gpointer                   data);

41 42 43
cairo_surface_t * _gtk_text_util_create_drag_icon (GtkWidget     *widget,
                                                   gchar         *text,
                                                   gsize          len);
44 45 46 47
cairo_surface_t * _gtk_text_util_create_rich_drag_icon (GtkWidget     *widget,
                                                   GtkTextBuffer *buffer,
                                                   GtkTextIter   *start,
                                                   GtkTextIter   *end);
48

49 50 51 52 53 54 55
gboolean _gtk_text_util_get_block_cursor_location (PangoLayout    *layout,
						   gint            index_,
						   PangoRectangle *rectangle,
						   gboolean       *at_line_end);

G_END_DECLS

56
#endif /* __GTK_TEXT_UTIL_H__ */