The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
12778 pd 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 2000  R Development Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 2 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU General Public License
16
 *  along with this program; if not, write to the Free Software
17
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 */
19
 
20
#ifndef DEVICES_H_
21
#define DEVICES_H_
22
 
23
#include <Rgraphics.h>
24
#include <R_ext/Boolean.h>
25
 
26
#define addDevice		Rf_addDevice
27
#define copyDisplayList		Rf_copyDisplayList
28
#define deviceNumber		Rf_deviceNumber
20423 murrell 29
#define devNumber		Rf_devNumber
12778 pd 30
#define DevNull			Rf_DevNull
25661 ripley 31
#define enableDisplayList	Rf_enableDisplayList
12778 pd 32
#define inhibitDisplayList	Rf_inhibitDisplayList
33
#define InitGraphics		Rf_InitGraphics
34
#define GetDevice		Rf_GetDevice
35
#define KillAllDevices		Rf_KillAllDevices
36
#define KillDevice		Rf_KillDevice
37
#define killDevice		Rf_killDevice
38
#define nextDevice		Rf_nextDevice
39
#define NumDevices		Rf_NumDevices
40
#define StartDevice		Rf_StartDevice
41
#define playDisplayList		Rf_playDisplayList
42
#define prevDevice		Rf_prevDevice
43
#define recordGraphicOperation	Rf_recordGraphicOperation
44
 
45
/* Initialize internal device structures. */
46
void InitGraphics(void);
47
/* Kill all active devices (used at shutdown). */
48
void KillAllDevices(void);
49
 
50
/* Drivers from ../main/devices.c , 
51
 * description there;   platform-specific drivers in platform directories! */
52
 
53
Rboolean 
54
PicTeXDeviceDriver(DevDesc*, char*, char*, char*, double, double, Rboolean);
55
 
56
Rboolean 
57
PSDeviceDriver(DevDesc*, char*, char*, char*, char**,
58
	       char*, char*, char*, double, double, Rboolean, double, 
22279 ripley 59
	       Rboolean, Rboolean, Rboolean, char*, char*);
12778 pd 60
Rboolean 
61
XFigDeviceDriver(DevDesc*, char*, char*, char*,
62
		 char*, char*, double, double, 
63
		 Rboolean, double, Rboolean, Rboolean);
12784 ripley 64
Rboolean
65
PDFDeviceDriver(DevDesc* dd, char *, char *, char *, 
66
		char *, char *, double, double, double,
22279 ripley 67
		int, char*);
12778 pd 68
 
69
 
12784 ripley 70
 
12778 pd 71
/*-------------------------------------------------------------------
72
 *
73
 *  DEVICE FUNCTIONS are concerned with the creation and destruction
74
 *  of devices.
75
 *
76
 */
77
 
78
/* Return a pointer to a device which is identified by number */
79
DevDesc* GetDevice(int);
80
/* Kill device which is identified by number. */
81
void KillDevice(DevDesc*);
82
/* How many devices exist ? (>= 1) */
83
int NumDevices(void);
20423 murrell 84
/* Get the index of the specified device. 
85
 * This is used by the graphics engine to map from a *GEDevDesc to
86
 * a device number.
87
 */
12778 pd 88
int deviceNumber(DevDesc*);
20423 murrell 89
/* Get the index of the specified device. 
90
 * This is used by a device to map from a *NewDevDesc to
91
 * a device number.
92
 */
93
int devNumber(DevDesc *dd);
12778 pd 94
/* Create a new device. */
95
int StartDevice(SEXP, SEXP, int, SEXP, int);
96
/* Check for an available device slot */
97
void R_CheckDeviceAvailable(void);
98
Rboolean R_CheckDeviceAvailableBool(void);
99
 
100
void DevNull(void);
101
 
102
/* Miscellaneous */
103
void recordGraphicOperation(SEXP, SEXP, DevDesc*);
104
void copyDisplayList(int);
105
void playDisplayList(DevDesc*);
25661 ripley 106
void enableDisplayList(DevDesc*);
12778 pd 107
void inhibitDisplayList(DevDesc*);
108
 
109
/*-------------------------------------------------------------------
110
 *
111
 *  DEVICE UTILITIES are concerned with providing information
112
 *  for R interpreted functions.
113
 *
114
 */
115
 
116
/* Return the number of the next device. */
117
int nextDevice(int);
118
/* Return the number of the previous device. */
119
int prevDevice(int);
120
/* Make the specified device (specified by number) the current device */
121
int selectDevice(int);
122
/* Kill device which is identified by number. */
123
void killDevice(int);
124
/* ...NO DOC... */
125
void addDevice(DevDesc *);
126
 
127
 
128
 
129
#endif