annotate src/redisplay-gtk.c @ 4974:fe0d3106cc36

fix compile problems in bytecode.c when no error-check-byte-code (issue 666) -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-05 Ben Wing <ben@xemacs.org> * bytecode.c (bytecode_assert): Use 0 instead of x in disabled_assert calls to avoid errors due to using undefined vars/params (they are defined only when ERROR_CHECK_BYTE_CODE, which also turns on/off the asserts).
author Ben Wing <ben@xemacs.org>
date Fri, 05 Feb 2010 04:07:47 -0600
parents b3ce27ca7647
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
1 /* GTK output and frame manipulation routines.
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
3 Copyright (C) 1994 Lucid, Inc.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
4 Copyright (C) 1995 Sun Microsystems, Inc.
1318
b531bf8658e9 [xemacs-hg @ 2003-02-21 06:56:46 by ben]
ben
parents: 872
diff changeset
5 Copyright (C) 2002, 2003 Ben Wing.
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
6
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
7 This file is part of XEmacs.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
8
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
9 XEmacs is free software; you can redistribute it and/or modify it
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
10 under the terms of the GNU General Public License as published by the
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
11 Free Software Foundation; either version 2, or (at your option) any
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
12 later version.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
13
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
14 XEmacs is distributed in the hope that it will be useful, but WITHOUT
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
17 for more details.
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
18
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
20 along with XEmacs; see the file COPYING. If not, write to
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
21 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
22 Boston, MA 02111-1307, USA. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
23
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
24 /* Synched up with: Not in FSF. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
25
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
26 #define THIS_IS_GTK
4881
a4322ac49e37 break out common separate-into-runs routines into redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 3479
diff changeset
27 #include "redisplay-xlike-inc.c"
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
28
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
29 /*****************************************************************************
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
30 Draw a shadow around the given area using the standard theme engine routines.
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
31 ****************************************************************************/
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
32
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
33 static void
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
34 XLIKE_bevel_area (struct window *w, face_index UNUSED (findex),
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
35 int x, int y, int width, int height,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
36 int shadow_thickness, int UNUSED (edges),
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
37 enum edge_style style)
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
38 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
39 struct frame *f = XFRAME (w->frame);
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
40 GdkWindow *x_win = GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f));
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
41 GtkStyle *gstyle = FRAME_GTK_TEXT_WIDGET (f)->style;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
42 GtkShadowType stype;
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
43
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
44 if (shadow_thickness == 0)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
45 stype = GTK_SHADOW_NONE;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
46 else
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
47 switch (style)
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
48 {
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
49 case EDGE_BEVEL_IN: style = GTK_SHADOW_IN; break;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
50 case EDGE_BEVEL_OUT: style = GTK_SHADOW_OUT; break;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
51 case EDGE_ETCHED_IN: style = GTK_SHADOW_ETCHED_IN; break;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
52 case EDGE_ETCHED_OUT: style = GTK_SHADOW_ETCHED_OUT; break;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
53 default: ABORT (); style = GTK_SHADOW_OUT;
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
54 }
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
55
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
56 /* Do we want to have some magic constants to set
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
57 GTK_SHADOW_ETCHED_IN or GTK_SHADOW_ETCHED_OUT? */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
58
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
59 gtk_paint_shadow (gstyle, x_win, GTK_STATE_NORMAL, stype, NULL,
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
60 FRAME_GTK_TEXT_WIDGET (f), "modeline",
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
61 x, y, width, height);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
62 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
63
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
64
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
65
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
66 /* Make audible bell. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
67 static void
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
68 XLIKE_ring_bell (struct device *UNUSED (d), int volume, int UNUSED (pitch),
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
69 int UNUSED (duration))
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
70 {
714
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
71 /* Gdk does not allow us to control the duration / pitch / volume */
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
72 if (volume > 0)
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
73 {
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
74 gdk_beep ();
02339d4ebed4 [xemacs-hg @ 2001-12-23 20:28:19 by wmperry]
wmperry
parents: 665
diff changeset
75 }
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
76 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
77
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
78
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
79 /* This makes me feel incredibly dirty... but there is no other way to
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
80 get this done right other than calling clear_area before every
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
81 single $#!%@ing piece of text, which I do NOT want to do. */
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
82 #define USE_X_SPECIFIC_DRAW_ROUTINES 1
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
83
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
84 #include "sysgdkx.h"
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
85
4908
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
86 static void
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
87 gdk_draw_text_image (GdkDrawable *drawable,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
88 GdkFont *font,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
89 GdkGC *gc,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
90 gint x,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
91 gint y,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
92 const gchar *text,
b3ce27ca7647 various fixes related to gtk, redisplay-xlike-inc.c
Ben Wing <ben@xemacs.org>
parents: 4882
diff changeset
93 gint text_length)
462
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
94 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
95 #if !USE_X_SPECIFIC_DRAW_ROUTINES
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
96 int width = gdk_text_measure (font, text, text_length);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
97 int height = gdk_text_height (font, text, text_length);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
98
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
99 gdk_draw_rectangle (drawable, gc, TRUE, x, y, width, height);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
100 gdk_draw_text (drawable, font, gc, x, y, text, text_length);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
101 #else
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
102 GdkWindowPrivate *drawable_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
103 GdkFontPrivate *font_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
104 GdkGCPrivate *gc_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
105
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
106 g_return_if_fail (drawable != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
107 g_return_if_fail (font != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
108 g_return_if_fail (gc != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
109 g_return_if_fail (text != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
110
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
111 drawable_private = (GdkWindowPrivate*) drawable;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
112 if (drawable_private->destroyed)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
113 return;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
114 gc_private = (GdkGCPrivate*) gc;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
115 font_private = (GdkFontPrivate*) font;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
116
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
117 if (font->type == GDK_FONT_FONT)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
118 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
119 XFontStruct *xfont = (XFontStruct *) font_private->xfont;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
120 XSetFont(drawable_private->xdisplay, gc_private->xgc, xfont->fid);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
121 if ((xfont->min_byte1 == 0) && (xfont->max_byte1 == 0))
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
122 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
123 XDrawImageString (drawable_private->xdisplay, drawable_private->xwindow,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
124 gc_private->xgc, x, y, text, text_length);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
125 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
126 else
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
127 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
128 XDrawImageString16 (drawable_private->xdisplay, drawable_private->xwindow,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
129 gc_private->xgc, x, y, (XChar2b *) text, text_length / 2);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
130 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
131 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
132 else if (font->type == GDK_FONT_FONTSET)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
133 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
134 XFontSet fontset = (XFontSet) font_private->xfont;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
135 XmbDrawImageString (drawable_private->xdisplay, drawable_private->xwindow,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
136 fontset, gc_private->xgc, x, y, text, text_length);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
137 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
138 else
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
139 g_error("undefined font type\n");
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
140 #endif
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
141 }
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
142
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
143 static void
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
144 our_draw_bitmap (GdkDrawable *drawable,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
145 GdkGC *gc,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
146 GdkPixmap *src,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
147 gint xsrc,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
148 gint ysrc,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
149 gint xdest,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
150 gint ydest,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
151 gint width,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
152 gint height)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
153 {
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
154 GdkWindowPrivate *drawable_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
155 GdkWindowPrivate *src_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
156 GdkGCPrivate *gc_private;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
157
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
158 g_return_if_fail (drawable != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
159 g_return_if_fail (src != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
160 g_return_if_fail (gc != NULL);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
161
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
162 drawable_private = (GdkWindowPrivate*) drawable;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
163 src_private = (GdkWindowPrivate*) src;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
164 if (drawable_private->destroyed || src_private->destroyed)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
165 return;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
166 gc_private = (GdkGCPrivate*) gc;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
167
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
168 if (width == -1)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
169 width = src_private->width;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
170 if (height == -1)
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
171 height = src_private->height;
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
172
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
173 XCopyPlane (drawable_private->xdisplay,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
174 src_private->xwindow,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
175 drawable_private->xwindow,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
176 gc_private->xgc,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
177 xsrc, ysrc,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
178 width, height,
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
179 xdest, ydest, 1L);
0784d089fdc9 Import from CVS: tag r21-2-46
cvs
parents:
diff changeset
180 }