1 /*
2   fxasq_c.h - Plain "C" API for fxasq.cpp
3   Copyright (c) 2007-2009 Jeffrey Pohlmeyer <yetanothergeek@gmail.com>
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 2 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 along
16   with this program; if not, write to the Free Software Foundation, Inc.,
17   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 */
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 typedef struct _FXasqItem {
25   char* key;
26   char* value;
27   struct _FXasqItem*next;
28 } FxAsqItem;
29 
30 
31 typedef struct _FXasqDlg FxAsqDlg;
32 
33 typedef const char* FxAsqStr;
34 
35 
36 void fxasq_free_results(FxAsqItem*results);
37 
38 FxAsqDlg* fxasq_new(const char*title, const char **buttons);
39 FxAsqItem* fxasq_run(FxAsqDlg*dlg, int*btn, void *user_data);
40 void fxasq_free(FxAsqDlg*dlg);
41 
42 void fxasq_text(     FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
43 void fxasq_password( FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
44 
45 void fxasq_textarea( FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
46 void fxasq_file(     FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
47 void fxasq_color(    FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
48 void fxasq_font(     FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
49 
50 void fxasq_group(    FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
51 void fxasq_radio(    FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
52 void fxasq_select(   FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
53 void fxasq_option(   FxAsqDlg *dlg, FxAsqStr key, FxAsqStr value, FxAsqStr label);
54 
55 void fxasq_checkbox( FxAsqDlg *dlg, FxAsqStr key, int value, FxAsqStr label);
56 
57 void fxasq_label(    FxAsqDlg *dlg, FxAsqStr text);
58 void fxasq_heading(  FxAsqDlg *dlg, FxAsqStr text);
59 void fxasq_hr(       FxAsqDlg *dlg);
60 
61 #ifdef __cplusplus
62 }
63 #endif
64 
65