]> Pileus Git - ~andy/gtk/blob - gtk/gtktextdisplay.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtktextdisplay.h
1 /* gtktextdisplay.c - display layed-out text
2  *
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
7  *
8  * This file can be used under your choice of two licenses, the LGPL
9  * and the original Tk license.
10  *
11  * LGPL:
12  *
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.
17  *
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.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
25  *
26  * Original Tk license:
27  *
28  * This software is copyrighted by the Regents of the University of
29  * California, Sun Microsystems, Inc., and other parties.  The
30  * following terms apply to all files associated with the software
31  * unless explicitly disclaimed in individual files.
32  *
33  * The authors hereby grant permission to use, copy, modify,
34  * distribute, and license this software and its documentation for any
35  * purpose, provided that existing copyright notices are retained in
36  * all copies and that this notice is included verbatim in any
37  * distributions. No written agreement, license, or royalty fee is
38  * required for any of the authorized uses.  Modifications to this
39  * software may be copyrighted by their authors and need not follow
40  * the licensing terms described here, provided that the new terms are
41  * clearly indicated on the first page of each file where they apply.
42  *
43  * IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY
44  * PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
45  * DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION,
46  * OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED
47  * OF THE POSSIBILITY OF SUCH DAMAGE.
48  *
49  * THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
50  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
51  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND
52  * NON-INFRINGEMENT.  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS,
53  * AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE
54  * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
55  *
56  * GOVERNMENT USE: If you are acquiring this software on behalf of the
57  * U.S. government, the Government shall have only "Restricted Rights"
58  * in the software and related documentation as defined in the Federal
59  * Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2).  If you
60  * are acquiring the software on behalf of the Department of Defense,
61  * the software shall be classified as "Commercial Computer Software"
62  * and the Government shall have only "Restricted Rights" as defined
63  * in Clause 252.227-7013 (c) (1) of DFARs.  Notwithstanding the
64  * foregoing, the authors grant the U.S. Government and others acting
65  * in its behalf permission to use and distribute the software in
66  * accordance with the terms specified in this license.
67  *
68  */
69 /*
70  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
71  * file for a list of people on the GTK+ Team.  See the ChangeLog
72  * files for a list of changes.  These files are distributed with
73  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
74  */
75
76 #ifndef __GTK_TEXT_DISPLAY_H__
77 #define __GTK_TEXT_DISPLAY_H__
78
79 #include <gtk/gtktextlayout.h>
80
81 G_BEGIN_DECLS
82
83 /* A semi-public header intended for use by code that also
84  * uses GtkTextLayout
85  */
86
87 /* The drawable should be pre-initialized to your preferred background.
88  * widget            - Widget to grab some style info from
89  * cr                - Context to render to, matrix set so that (0, 0)
90  *                     is the top left of the layout
91  * widgets           - list of widgets that need exposing
92  */
93 void gtk_text_layout_draw (GtkTextLayout        *layout,
94                            GtkWidget            *widget,
95                            cairo_t              *cr,
96                            GList               **widgets);
97
98
99 G_END_DECLS
100
101 #endif  /* __GTK_TEXT_DISPLAY_H__ */