source: trunk/third/gtkhtml3/src/htmlgdkpainter.h @ 21116

Revision 21116, 3.0 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21115, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/* This file is part of the GtkHTML library.
3
4   Copyright (C) 2000 Helix Code, Inc.
5   
6   This library is free software; you can redistribute it and/or
7   modify it under the terms of the GNU Library General Public
8   License as published by the Free Software Foundation; either
9   version 2 of the License, or (at your option) any later version.
10   
11   This library is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   Library General Public License for more details.
15   
16   You should have received a copy of the GNU Library General Public License
17   along with this library; see the file COPYING.LIB.  If not, write to
18   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19   Boston, MA 02111-1307, USA.
20*/
21
22#ifndef _HTMLGDKPAINTER_H
23#define _HTMLGDKPAINTER_H
24
25#include <pango/pango-context.h>
26#include <pango/pango-layout.h>
27
28#include <gtk/gtkwidget.h>
29
30#include "htmlpainter.h"
31#include "htmlfontmanager.h"
32
33#define HTML_TYPE_GDK_PAINTER                 (html_gdk_painter_get_type ())
34#define HTML_GDK_PAINTER(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), HTML_TYPE_GDK_PAINTER, HTMLGdkPainter))
35#define HTML_GDK_PAINTER_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), HTML_TYPE_GDK_PAINTER, HTMLGdkPainterClass))
36#define HTML_IS_GDK_PAINTER(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HTML_TYPE_GDK_PAINTER))
37#define HTML_IS_GDK_PAINTER_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), HTML_TYPE_GDK_PAINTER))
38
39struct _HTMLGdkPainter {
40        HTMLPainter base;
41        PangoContext *pc;
42        GtkWidget *widget;
43
44        /* GdkWindow to draw on */
45        GdkWindow *window;
46
47        /* The current GC used.  */
48        GdkGC *gc;
49
50        /* For the double-buffering system.  */
51        gboolean double_buffer;
52        GdkPixmap *pixmap;
53        gint x1, y1, x2, y2;
54        GdkColor background;
55        gboolean set_background;
56        gboolean do_clear;
57
58        /* Colors used for shading.  */
59        GdkColor dark;
60        GdkColor light;
61        GdkColor black;
62};
63
64struct _HTMLGdkPainterClass {
65        HTMLPainterClass base;
66};
67
68GType              html_gdk_painter_get_type                         (void);
69HTMLPainter       *html_gdk_painter_new                              (GtkWidget             *widget,
70                                                                      gboolean               double_buffer);
71void               html_gdk_painter_realize                          (HTMLGdkPainter        *painter,
72                                                                      GdkWindow             *window);
73void               html_gdk_painter_unrealize                        (HTMLGdkPainter        *painter);
74gboolean           html_gdk_painter_realized                         (HTMLGdkPainter        *painter);
75HTMLTextPangoInfo *html_gdk_painter_text_itemize_and_prepare_glyphs  (HTMLGdkPainter        *painter,
76                                                                      PangoFontDescription  *desc,
77                                                                      const gchar           *text,
78                                                                      gint                   bytes,
79                                                                      GList                **glyphs);
80
81#endif /* _HTMLGDKPAINTER_H */
Note: See TracBrowser for help on using the repository browser.