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