1 /*
2  *  gretl -- Gnu Regression, Econometrics and Time-series Library
3  *  Copyright (C) 2001 Allin Cottrell and Riccardo "Jack" Lucchetti
4  *
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
7  *  the Free Software Foundation, either version 3 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 /* datafiles.h for gretl */
21 
22 #ifndef DATAFILES_H
23 #define DATAFILES_H
24 
25 enum {
26     VIEW_FN_PKG_INFO,
27     VIEW_FN_PKG_CODE,
28     VIEW_FN_PKG_SAMPLE,
29     DELETE_FN_PKG,
30     CALL_FN_PKG,
31     MENU_ADD_FN_PKG,
32     MENU_REMOVE_FN_PKG,
33     VIEW_PKG_RESOURCES,
34     VIEW_PKG_DOC
35 };
36 
37 #define HELP_WIDTH 80
38 
39 void browser_open_data (GtkWidget *w, gpointer data);
40 
41 void browser_open_ps (GtkWidget *w, gpointer data);
42 
43 void browser_call_func (GtkWidget *w, gpointer data);
44 
45 void destroy_file_collections (void);
46 
47 void show_files (GtkAction *action, gpointer p);
48 
49 void display_files (int role, const gchar *path);
50 
51 void show_native_dbs (void);
52 
53 gint populate_filelist (windata_t *fdata, gpointer p);
54 
55 char *strip_extension (char *s);
56 
57 char *maybe_ellipsize_string (char *s, int maxlen);
58 
59 windata_t *display_function_package_data (const char *pkgname,
60 					  const char *path,
61 					  int role);
62 
63 void maybe_update_gfn_browser (const char *pkgname,
64 			       const char *version,
65 			       const char *date,
66 			       const char *author,
67 			       const char *descrip,
68 			       const char *fname,
69 			       int uses_subdir,
70 			       int pdfdoc);
71 
72 void maybe_update_pkg_registry_window (const char *pkgname,
73 				       int code);
74 
75 void set_alternate_gfn_dir (windata_t *vwin, char *path);
76 
77 gchar *gfn_browser_get_alt_path (void);
78 
79 void start_new_function_package (GtkWidget *w, gpointer data);
80 
81 windata_t *get_local_viewer (int remote_role);
82 
83 void listbox_select_first (windata_t *vwin);
84 
85 #endif /* DATAFILES_H */
86