The R Project SVN R

Rev

Rev 31661 | Rev 37572 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
31538 ripley 1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1995, 1996  Robert Gentleman and Ross Ihaka
4
 *  Copyright (C) 1998--2004  The R Development Core Team.
5
 *
6
 *  This program is free software; you can redistribute it and/or modify
7
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 2 of the License, or
9
 *  (at your option) any later version.
10
 *
11
 *  This program is distributed in the hope that it will be useful,
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 *  GNU General Public License for more details.
15
 *
16
 *  You should have received a copy of the GNU General Public License
17
 *  along with this program; if not, write to the Free Software
18
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
 */
20
 
21
/* This header file is to provide hooks for external GUIs such as
22
   GNOME and Cocoa.  It is only used on Unix-alikes */
23
 
24
#ifndef RINTERFACE_H_
25
#define RINTERFACE_H_
26
 
31542 ripley 27
#ifdef __cplusplus
28
extern "C" {
29
#endif
30
 
31538 ripley 31
#include <R_ext/Boolean.h>
32
#include <R_ext/RStartup.h>
33
 
34
/* from Defn.h */
35
/* this duplication will be removed in due course */
36
 
37
extern Rboolean R_Interactive;	/* TRUE during interactive use*/
38
extern Rboolean	R_Quiet;	/* Be as quiet as possible */
39
extern Rboolean	R_Slave;	/* Run as a slave process */
40
extern Rboolean	R_Verbose;	/* Be verbose */
41
 
42
extern void R_RestoreGlobalEnv(void);
43
extern void R_RestoreGlobalEnvFromFile(const char *, Rboolean);
44
extern void R_SaveGlobalEnv(void);
45
extern void R_SaveGlobalEnvToFile(const char *);
46
extern void R_FlushConsole(void);
47
extern void R_ClearerrConsole(void);
48
extern void R_Suicide(char*);
49
extern char* R_HomeDir(void);
50
extern int R_DirtyImage;	/* Current image dirty */
51
extern char* R_GUIType;
52
extern void R_setupHistory();
53
extern char* R_HistoryFile;	/* Name of the history file */
54
extern int R_HistorySize;	/* Size of the history file */
55
extern int R_RestoreHistory;	/* restore the history file? */
56
extern char* R_Home;		    /* Root of the R tree */
57
 
58
# define jump_to_toplevel	Rf_jump_to_toplevel
59
# define mainloop		Rf_mainloop
60
# define onintr			Rf_onintr
61
void jump_to_toplevel(void);
62
void mainloop(void);
63
void onintr();
64
#ifndef DEFN_H_
65
extern void* R_GlobalContext;    /* Need opaque pointer type for export */
66
#endif
67
 
68
void process_site_Renviron();
69
void process_system_Renviron();
70
void process_user_Renviron();
71
 
31540 ripley 72
#include <stdio.h>
73
extern FILE * R_Consolefile;
74
extern FILE * R_Outputfile;
31538 ripley 75
 
31540 ripley 76
 
31538 ripley 77
/* in sys-unix.c */
78
void R_setStartTime(void);
79
void fpu_setup(Rboolean);
80
 
81
/* formerly in src/unix/devUI.h */
82
 
83
#ifdef R_INTERFACE_PTRS
84
#include <Rinternals.h>
85
 
86
#ifdef __SYSTEM__
87
# define extern
88
#endif
89
 
90
extern void (*ptr_R_Suicide)(char *);
31661 ripley 91
extern void (*ptr_R_ShowMessage)(char *);
31538 ripley 92
extern int  (*ptr_R_ReadConsole)(char *, unsigned char *, int, int);
93
extern void (*ptr_R_WriteConsole)(char *, int);
94
extern void (*ptr_R_ResetConsole)();
95
extern void (*ptr_R_FlushConsole)();
96
extern void (*ptr_R_ClearerrConsole)();
97
extern void (*ptr_R_Busy)(int);
98
extern void (*ptr_R_CleanUp)(SA_TYPE, int, int);
99
extern int  (*ptr_R_ShowFiles)(int, char **, char **, char *, Rboolean, char *);
100
extern int  (*ptr_R_ChooseFile)(int, char *, int);
31540 ripley 101
extern int  (*ptr_R_EditFile)(char *);
31538 ripley 102
extern void (*ptr_R_loadhistory)(SEXP, SEXP, SEXP, SEXP);
103
extern void (*ptr_R_savehistory)(SEXP, SEXP, SEXP, SEXP);
35328 ripley 104
 
105
/* These two are not used by R itself, but are used by the GNOME front end
106
   and the tcltk package */
31538 ripley 107
extern int  (*R_timeout_handler)();
108
extern long R_timeout_val;
109
 
110
#ifdef HAVE_AQUA
111
extern int  (*ptr_R_EditFiles)(int, char **, char **, char *);
112
#endif
113
 
114
#endif
115
 
116
#ifdef __SYSTEM__
117
# undef extern
118
#endif
119
 
31542 ripley 120
#ifdef __cplusplus
121
}
122
#endif
123
 
31538 ripley 124
#endif /* RINTERFACE_H_ */