File: library.h

package info (click to toggle)
gretl 2016d-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 48,620 kB
  • ctags: 22,779
  • sloc: ansic: 345,830; sh: 4,648; makefile: 2,712; xml: 570; perl: 364
file content (390 lines) | stat: -rw-r--r-- 8,731 bytes parent folder | download
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
/* 
 *  gretl -- Gnu Regression, Econometrics and Time-series Library
 *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

/* library.h for gretl */

#ifndef LIBRARY_H
#define LIBRARY_H

/* general purpose functions */

#ifdef G_OS_WIN32
void win_show_error (DWORD dw);

int winfork (char *cmdline, const char *dir, int wshow,
	     DWORD flags);
#endif

#ifdef OS_OSX
int osx_open_file (const char *path);

int osx_open_url (const char *url);

int osx_open_pdf (const char *path, const char *dest);
#endif

typedef struct _selector selector;

void library_command_init (void);

void library_command_free (void);

CMD *get_lib_cmd (void);

int lib_command_sprintf (const char *template, ...);

int lib_command_strcpy (const char *s);

int lib_command_strcat (const char *s);

int record_command_verbatim (void);

int record_model_command_verbatim (int model_ID);

int *command_list_from_string (const char *s, int *err);

int gui_run_genr (const char *line, DATASET *dset,
		  gretlopt opt, PRN *prn);

int execute_script (char *runfile, const char *buf,
		    PRN *prn, int exec_code,
		    GtkWidget *parent);

int user_fopen (const char *fname, char *fullname, PRN **pprn);

gint bufopen (PRN **pprn);

void menu_op_action (GtkAction *action, gpointer data);

void do_menu_op (int ci, const char *liststr, gretlopt opt);

void do_run_script (GtkWidget *w, windata_t *vwin);

void run_script_fragment (windata_t *vwin, gchar *buf);

void gui_errmsg (int errcode);

void gui_warnmsg (int errcode);

void errmsg_plus (int err, const char *plus);

void gui_graph_handler (int err);

/* sample-related functions */

int bool_subsample (const char *param, gretlopt opt,
		    GtkWidget *dialog);

void drop_missing_data (void);

void count_missing (void);

void do_add_markers (const char *fname);

int do_save_markers (const char *fname);

void markers_callback (void);

void do_add_labels (const char *fname);

int do_save_labels (const char *fname);

void labels_callback (void);

int dataset_is_restricted (void);

int maybe_restore_full_data (int action);

void gui_transpose_data (void);

void gui_sort_data (void);

void gui_resample_data (void);

void perma_sample_callback (void);

int dataset_is_subsampled (void);

void set_original_n (int n);

int get_original_n (void);

GList *get_or_send_gui_models (GList *list);

/* model-related functions */

int do_coint (selector *sr);

void gui_do_forecast (GtkAction *action, gpointer p);

void do_bootstrap (GtkAction *action, gpointer p);

int do_coeff_sum (selector *sr);

int do_add_omit (selector *sr);

int do_VAR_omit (selector *sr);

void VAR_omit_auto (GtkAction *action, gpointer p);

int do_confidence_region (selector *sr);

void do_modtest (GtkAction *action, gpointer p);

void do_autocorr (GtkAction *action, gpointer p);

void do_dwpval (GtkAction *action, gpointer p);

void do_chow_cusum (GtkAction *action, gpointer p);

void do_reset (GtkAction *action, gpointer p);

void unit_root_test (int ci);

void ur_callback (GtkAction *action);

void do_arch (GtkAction *action, gpointer p);

void do_restrict (GtkWidget *w, dialog_t *dlg);

void do_nls_model (GtkWidget *w, dialog_t *dlg);

void do_mle_model (GtkWidget *w, dialog_t *dlg);

void do_gmm_model (GtkWidget *w, dialog_t *dlg);

void do_eqn_system (GtkWidget *w, dialog_t *dlg);

void do_saved_eqn_system (GtkWidget *w, dialog_t *dlg);

int do_model (selector *sr);

int do_nonparam_model (selector *sr);

int do_vector_model (selector *sr);

void do_graph_model (const int *list, int fit);

void do_nonparam_plot (windata_t *vwin);

void do_gini (void);

void do_qqplot (void);

void do_kernel (void);

void do_vif (GtkAction *action, gpointer p);

void do_leverage (GtkAction *action, gpointer p);

void add_leverage_data (windata_t *vwin);

void do_coeff_intervals (GtkAction *action, gpointer p);

void do_panel_tests (GtkAction *action, gpointer p);

int do_rankcorr (selector *sr);

int out_of_sample_info (int add_ok, int *t2);

/* variable-related functions */

void do_minibuf (GtkWidget *w, dialog_t *dlg);

void do_genr (GtkWidget *w, dialog_t *dlg);

void do_model_genr (GtkWidget *w, dialog_t *dlg);

void do_selector_genr (GtkWidget *w, dialog_t *dlg);

void do_fncall_genr (GtkWidget *w, dialog_t *dlg);

void do_range_dummy_genr (const gchar *buf);

void do_global_setmiss (GtkWidget *w, dialog_t *dlg);

void do_variable_setmiss (GtkWidget *w, dialog_t *dlg);

void do_edit_label (GtkWidget *w, dialog_t *dlg);

int do_rename_variable (int v, const char *newname,
			GtkWidget *parent);

int record_varlabel_change (int v, int desc, int gname);

void do_resid_freq (GtkAction *action, gpointer p);

void do_freq_dist (void);

void do_corrgm (void);

void residual_correlogram_callback (GtkAction *action, gpointer p);

void do_pergm (GtkAction *action);

void do_fractint (GtkAction *action);

void residual_periodogram_callback (GtkAction *action, gpointer p);

void residual_qq_plot (GtkAction *action, gpointer p);

#if defined (HAVE_TRAMO) || defined (HAVE_X12A)
void do_tramo_x12a (GtkAction *action, gpointer p);
#endif

void do_range_mean (void);

void do_hurst (void);

void do_outcovmx (GtkAction *action, gpointer p);

void do_anova (GtkAction *action, gpointer p);

void add_dummies (GtkAction *action);

void add_index (GtkAction *action);

void do_add_obs (void);

void do_remove_obs (void);

void add_logs_etc (int ci, int varnum, int midas);

void add_discrete_dummies (int varnum);

void logs_etc_callback (GtkAction *action);

void add_system_resid (GtkAction *action, gpointer p);

int save_fit_resid (windata_t *vwin, int code);

int save_bundled_series (const double *x,
			 int t1, int t2,
			 const char *key,
			 const char *note,
			 windata_t *vwin);

void add_model_stat (MODEL *pmod, int which, windata_t *vwin);

void resid_plot (GtkAction *action, gpointer p);

void fit_actual_plot (GtkAction *action, gpointer p);

void fit_actual_splot (GtkAction *action, gpointer p);

void display_fit_resid (GtkAction *action, gpointer p);

void do_graph_var (int varnum);

void do_boxplot_var (int varnum, gretlopt opt);

int do_regular_boxplot (selector *sr);

int do_factorized_boxplot (selector *sr);

void ts_plot_callback (void);

int do_scatters (selector *sr);

int do_graph_from_selector (selector *sr);

int do_splot_from_selector (selector *sr);

void plot_from_selection (int code);

int do_dummy_graph (selector *sr);

int do_xyz_graph (selector *sr);

int do_xcorrgm (selector *sr);

void delete_selected_vars (void);

void delete_single_var (int id);

void display_selected (void);

void display_var (void);

void midas_list_callback (const int *list,
			  const char *listname,
			  int ci);

/* script- and file-related functions */

gboolean do_open_script (int action);

void dataset_info (void);

void do_new_script (int code, const char *buf);

void new_script_callback (GtkAction *action);

int do_store (char *filename, int action, gpointer data);

void set_csv_exclude_obs (gboolean s);

gboolean get_csv_exclude_obs (void);

void do_save_text (char *fname, MODEL *pmod);

int gui_exec_line (ExecState *s, DATASET *dset,
		   GtkWidget *parent);

int exec_line_with_output_handler (ExecState *s, 
				   DATASET *dset,
				   const char *title,
				   windata_t **outwin);

int script_install_function_package (const char *pkgname,
				     gretlopt opt,
				     PRN *prn,
				     GtkWidget *parent,
				     char **gfnpath);

void finalize_script_output_window (int role, gpointer data);

void start_wait_for_output (windata_t *vwin, GtkWidget *w);

int waiting_for_output (void);

int vwin_is_busy (windata_t *vwin);

/* other */

gchar *get_genr_string (GtkWidget *entry, dialog_t *dlg);

int menu_op_wrapper (selector *sr);

int max_untouchable_series_ID (void);

void add_mahalanobis_data (windata_t *vwin);

void add_pca_data (windata_t *vwin);

void add_fcast_data (windata_t *vwin);

void add_nonparam_data (windata_t *vwin);

void VECM_add_EC_data (GtkAction *action, gpointer p);

void maybe_display_string_table (void);

#endif /* LIBRARY_H */