1
/* gtktextdisplay.c - display layed-out text
3
* Copyright (c) 1992-1994 The Regents of the University of California.
4
* Copyright (c) 1994-1997 Sun Microsystems, Inc.
5
* Copyright (c) 2000 Red Hat, Inc.
6
* Tk->Gtk port by Havoc Pennington
8
* This file can be used under your choice of two licenses, the LGPL
9
* and the original Tk license.
13
* This library is free software; you can redistribute it and/or
14
* modify it under the terms of the GNU Lesser General Public
15
* License as published by the Free Software Foundation; either
16
* version 2 of the License, or (at your option) any later version.
18
* This library is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
* Lesser General Public License for more details.
23
* You should have received a copy of the GNU Lesser General Public
24
* License along with this library; if not, write to the Free
25
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27
* Original Tk license:
29
* This software is copyrighted by the Regents of the University of
30
* California, Sun Microsystems, Inc., and other parties. The
31
* following terms apply to all files associated with the software
32
* unless explicitly disclaimed in individual files.
34
* The authors hereby grant permission to use, copy, modify,
35
* distribute, and license this software and its documentation for any
36
* purpose, provided that existing copyright notices are retained in
37
* all copies and that this notice is included verbatim in any
38
* distributions. No written agreement, license, or royalty fee is
39
* required for any of the authorized uses. Modifications to this
40
* software may be copyrighted by their authors and need not follow
41
* the licensing terms described here, provided that the new terms are
42
* clearly indicated on the first page of each file where they apply.
44
* IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
45
* PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
46
* DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
47
* OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
48
* OF THE POSSIBILITY OF SUCH DAMAGE.
50
* THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
51
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
52
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
53
* NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
54
* AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
55
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
57
* GOVERNMENT USE: If you are acquiring this software on behalf of the
58
* U.S. government, the Government shall have only "Restricted Rights"
59
* in the software and related documentation as defined in the Federal
60
* Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
61
* are acquiring the software on behalf of the Department of Defense,
62
* the software shall be classified as "Commercial Computer Software"
63
* and the Government shall have only "Restricted Rights" as defined
64
* in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the
65
* foregoing, the authors grant the U.S. Government and others acting
66
* in its behalf permission to use and distribute the software in
67
* accordance with the terms specified in this license.
71
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
72
* file for a list of people on the GTK+ Team. See the ChangeLog
73
* files for a list of changes. These files are distributed with
74
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
77
#ifndef __GTK_TEXT_DISPLAY_H__
78
#define __GTK_TEXT_DISPLAY_H__
80
#include <gtk/gtktextlayout.h>
84
/* A semi-public header intended for use by code that also
88
/* The drawable should be pre-initialized to your preferred background.
89
* widget - Widget to grab some style info from
90
* drawable - Drawable to render to
91
* cursor_gc - Graphics context to use for cursor
92
* x_offset/y_offset - Position of the drawable in layout coordinates
93
* x/y/width/height - Region of the layout to render. x,y must be inside
95
* widgets - list of widgets that need exposing
97
void gtk_text_layout_draw (GtkTextLayout *layout,
99
GdkDrawable *drawable,
112
#endif /* __GTK_TEXT_DISPLAY_H__ */