CXXR (C++ R)
Rdevices.h
1 /*CXXR $Id: Rdevices.h 1348 2013-02-25 17:49:03Z arr $
2  *CXXR
3  *CXXR This file is part of CXXR, a project to refactor the R interpreter
4  *CXXR into C++. It may consist in whole or in part of program code and
5  *CXXR documentation taken from the R project itself, incorporated into
6  *CXXR CXXR (and possibly MODIFIED) under the terms of the GNU General Public
7  *CXXR Licence.
8  *CXXR
9  *CXXR CXXR is Copyright (C) 2008-13 Andrew R. Runnalls, subject to such other
10  *CXXR copyrights and copyright restrictions as may be stated below.
11  *CXXR
12  *CXXR CXXR is not part of the R project, and bugs and other issues should
13  *CXXR not be reported via r-bugs or other R project channels; instead refer
14  *CXXR to the CXXR website.
15  *CXXR */
16 
17 /*
18  * R : A Computer Language for Statistical Data Analysis
19  * Copyright (C) 2000-8 R Core Team
20  *
21  * This program is free software; you can redistribute it and/or modify
22  * it under the terms of the GNU General Public License as published by
23  * the Free Software Foundation; either version 2 of the License, or
24  * (at your option) any later version.
25  *
26  * This program is distributed in the hope that it will be useful,
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29  * GNU General Public License for more details.
30  *
31  * You should have received a copy of the GNU General Public License
32  * along with this program; if not, a copy is available at
33  * http://www.r-project.org/Licenses/
34  */
35 
36 #ifndef DEVICES_H_
37 #define DEVICES_H_
38 
39 /* A public header.
40  This is almost entirely of historical interest: it was the
41  interface for graphics device in R < 2.7.0
42  */
43 
44 #ifdef EVENTUALLY
45 #error Rdevices.h is obsolete
46 #endif
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 #include <Rgraphics.h>
53 #include <R_ext/GraphicsEngine.h> /* modern version */
54 #include <R_ext/Boolean.h>
55 
56 #define addDevice Rf_addDevice
57 #define devNumber Rf_devNumber
58 #define GetDevice Rf_GetDevice
59 #define KillDevice Rf_KillDevice
60 
61 /*-------------------------------------------------------------------
62  *
63  * DEVICE FUNCTIONS are concerned with the creation and destruction
64  * of devices.
65  *
66  */
67 
68 /* Return a pointer to a device which is identified by number */
69 DevDesc* GetDevice(int);
70 
71 /* Kill device which is identified by number.
72  * Here DevDesc * is being used as an opaque pointer to GEDevDesc.
73  */
74 void KillDevice(DevDesc*);
75 
76 /* Get the index of the specified device.
77  * This is used by a device to map from a *NewDevDesc to a device number.
78  * Here DevDesc * is being used as an opaque pointer to NewDevDesc.
79  */
80 int devNumber(DevDesc *);
81 /* New, properly declared version in GraphicsDevices.h */
82 
83 /* ...NO DOC... */
84 /* Here DevDesc * is being used as an opaque pointer to GEDevDesc. */
85 /* Replaced by GEaddDevice */
86 void addDevice(DevDesc *);
87 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif