File: Canvas.h

package info (click to toggle)
acfax 981011-14.1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 448 kB
  • ctags: 737
  • sloc: ansic: 5,501; makefile: 34
file content (100 lines) | stat: -rw-r--r-- 2,687 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 * $Header: /home/orchestra5/davy/stuff/misc/xsat/RCS/Canvas.h,v 1.1 92/04/10 14:08:04 davy Exp $
 *
 * Copyright 1992 by David A. Curry
 * Adapted for use with ACfax by Andreas Czechanowski
 *
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting documentation.  The
 * author makes no representations about the suitability of this software for
 * any purpose.  It is provided "as is" without express or implied warranty.
 *
 * Public include file for the canvas widget.  Based on the include file for
 * the Template widget in the X11R5 distribution.
 *
 * David A. Curry
 * Purdue University
 * Engineering Computer Network
 * 1285 Electrical Engineering Building
 * West Lafayette, IN 47907
 * davy@ecn.purdue.edu
 *
 * $Log:	Canvas.h,v $
 * Revision 1.1  92/04/10  14:08:04  davy
 * Initial revision
 * 
 */
#ifndef _Canvas_h
#define _Canvas_h

/****************************************************************
 *
 * Canvas widget
 *
 ****************************************************************/

/*
 * Resources:
 *
 * Name		     Class		RepType		Default Value
 * ----		     -----		-------		-------------
 * background	     Background		Pixel		XtDefaultBackground
 * border	     BorderColor	Pixel		XtDefaultForeground
 * borderWidth	     BorderWidth	Dimension	1
 * destroyCallback   Callback		Pointer		NULL
 * height	     Height		Dimension	0
 * mappedWhenManaged MappedWhenManaged	Boolean		True
 * sensitive	     Sensitive		Boolean		True
 * width	     Width		Dimension	0
 * x		     Position		Position	0
 * y		     Position		Position	0
 */

/*
 * Canvas-specific resource names.
 */
#define XtNidleCursor		"idleCursor"
#define XtNbusyCursor		"busyCursor"

enum { CanvasDrawGC, CanvasCopyGC, CanvasClearGC };
enum { CanvasPicture };

/*
 * Declare specific CanvasWidget class and instance datatypes.
 */
typedef struct _CanvasClassRec*		CanvasWidgetClass;
typedef struct _CanvasRec*		CanvasWidget;

/*
 * Declare the class constant.
 */
extern WidgetClass canvasWidgetClass;

/*
 * Declare the functions accessable for the user
 */
extern GC canvasGetGC(
#if NeedFunctionPrototypes
	CanvasWidget,	/* w */
	unsigned	/* type */
#endif
);

extern Pixmap canvasGetPixmap(
#if NeedFunctionPrototypes
	CanvasWidget,	/* w */
	unsigned	/* type */
#endif
);

extern void canvasUpdateArea(
#if NeedFunctionPrototypes
	CanvasWidget, /* w */
	unsigned, unsigned, /* x, y */
	unsigned, unsigned /* width, height */
#endif
);

#endif /* _Canvas_h */