File: session.h

package info (click to toggle)
gretl 2019a-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 53,708 kB
  • sloc: ansic: 367,137; sh: 4,416; makefile: 2,636; cpp: 2,499; xml: 580; perl: 364
file content (140 lines) | stat: -rw-r--r-- 3,271 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
/* 
 *  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/>.
 * 
 */

/* session.h for gretl */

#ifndef SESSION_H
#define SESSION_H

#include "objstack.h"

enum {
    SCHEDULE_FOR_DELETION,
    REALLY_DELETE_ALL,
    CLEAR_DELFILES
};

enum {
    ADD_OBJECT_OK,
    ADD_OBJECT_REPLACE,
    ADD_OBJECT_FAIL
};

enum {
    LOG_SAVE,
    LOG_SAVE_AS,
    LOG_OPEN,
    LOG_CLOSE,
    LOG_NULL
};

int save_session (char *fname);

int save_session_commands (char *fname);

int save_session_dataset (void);

int session_is_modified (void);

int session_is_open (void);

void set_commands_recorded (void);

int get_commands_recorded (void);

void session_menu_state (gboolean s);

int have_session_objects (void);

int widget_is_iconview (GtkWidget *w);

const char *get_session_dirname (void);

int real_add_text_to_session (PRN *prn, int pos, const char *tname);

void save_output_as_text_icon (windata_t *vwin);

int gui_add_graph_to_session (char *fname, char *fullname, int type);

int cli_add_graph_to_session (const char *fname, const char *gname,
			      GretlObjType type, int display);

char *session_graph_make_path (char *path, const char *fname);

const char *last_session_graph_name (void);

void model_add_as_icon (GtkAction *action, gpointer p);

int add_model_to_session_callback (void *ptr, GretlObjType type,
				   gretlopt opt);

void session_model_callback (void *ptr, int action);

void bundle_add_as_icon (GtkAction *action, gpointer p);

void *get_session_object_by_name (const char *name, GretlObjType *type);

int session_user_var_destroy_by_name (const char *name,
				      GretlObjType type);

void delete_text_from_session (void *p);

void display_saved_text (void *p);

void mark_session_changed (void);

void session_init (void);

gboolean do_open_session (void);

void gui_clear_dataset (void);

void verify_clear_data (void);

void close_session (gretlopt opt);

void free_session (int on_exit);

int highest_numbered_variable_in_session (void);

GList *session_model_list (void);

int is_session_model (void *p);

void view_session (void);

void maybe_view_session (void);

void maybe_sensitize_iconview (void);

void save_session_callback (GtkAction *action);

int session_file_is_open (void);

int clear_or_save_model (MODEL **ppmod, DATASET *pdinfo, int rebuild);

void disable_graph_page (void);

void display_session_graph_by_data (void *p);

void view_matrix_properties (const gretl_matrix *m, const char *name);

void session_notes_callback (GtkWidget *w, gpointer p);

#endif /* SESSION_H */