1 /*
2 
3     Canvas.h - public header file for the Canvas Widget
4     -  a widget that allows programmer-specified refresh procedures.
5     Copyright (C) 1990,93,94 Robert H. Forsman Jr.
6 
7     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Library General Public
9     License as published by the Free Software Foundation; either
10     version 2 of the License, or (at your option) any later version.
11 
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Library General Public License for more details.
16 
17     You should have received a copy of the GNU Library General Public
18     License along with this library; if not, write to the Free
19     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21  */
22 
23 #ifndef _Canvas_h
24 #define _Canvas_h
25 
26 #include <X11/Intrinsic.h>
27 #include <X11/Core.h>
28 
29 #ifndef XtNexposeProc
30 #define	XtNexposeProc		"exposeProc"
31 #define	XtCExposeProc		"ExposeProc"
32 #endif
33 
34 #ifndef XtNexposeProcData
35 #define	XtNexposeProcData	"exposeProcData"
36 #define	XtCExposeProcData	"ExposeProcData"
37 #endif
38 
39 #ifndef	XtNresizeProc
40 #define	XtNresizeProc		"resizeProc"
41 #define	XtCResizeProc		"ResizeProc"
42 #endif
43 
44 #ifndef	XtNresizeProcData
45 #define	XtNresizeProcData	"resizeProcData"
46 #define	XtCResizeProcData	"ResizeProcData"
47 #endif
48 
49 #ifndef XtNvisual
50 #define XtNvisual		"visual"
51 #define XtCVisual		"Visual"
52 #endif
53 
54 #ifndef XtNBackPixmap
55 #define XtNBackPixmap		"backPixmap"
56 #define XtCBackPixmap		"BackPixmap"
57 #endif
58 
59 extern WidgetClass xfwfcanvasWidgetClass;
60 
61 typedef struct _CanvasClassRec *CanvasWidgetClass;
62 typedef struct _CanvasRec      *CanvasWidget;
63 
64 typedef void(*XfwfCanvasExposeProc)(
65 #if NeedFunctionPrototypes
66 	Widget w,
67 	XExposeEvent *event,
68 	Region region,
69 	XtPointer client_data
70 #endif
71 );
72 
73 typedef void(*XfwfCanvasResizeProc)(
74 #if NeedFunctionPrototypes
75 	Widget w,
76 	XtPointer client_data
77 #endif
78 );
79 
80 Pixmap canvas_get_backpixmap(Widget w);
81 void canvas_copy_to_backpixmap(Widget w, Pixmap src);
82 void canvas_show(Widget w);
83 void canvas_hide(Widget w);
84 
85 #endif /* _Canvas_h */
86