GTK eradication -- the build chain.
[sxemacs] / src / ui / dialog.c
1 /* Implements elisp-programmable dialog boxes -- generic.
2    Copyright (C) 1993, 1994 Free Software Foundation, Inc.
3    Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
4    Copyright (C) 2000 Ben Wing.
5
6 This file is part of SXEmacs
7
8 SXEmacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 SXEmacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program.  If not, see <http://www.gnu.org/licenses/>. */
20
21
22 /* Synched up with: Not in FSF. */
23
24 #include <config.h>
25 #include "lisp.h"
26
27 #include "frame.h"
28 #include "device.h"
29
30 Lisp_Object Vdelete_dialog_box_hook;
31 Lisp_Object Qdelete_dialog_box_hook;
32
33 DEFUN("make-dialog-box-internal", Fmake_dialog_box_internal, 2, 2, 0,   /*
34 Internal helper function for `make-dialog-box'.
35 This handles all dialog-box types except `general'.
36 TYPE is the same as the first argument to `make-dialog-box', and KEYS
37 a list of the remaining arguments.
38 */
39       (type, keys))
40 {
41         struct frame *f = selected_frame();
42         struct device *d = XDEVICE(f->device);
43
44         CHECK_SYMBOL(type);
45
46         if (!HAS_DEVMETH_P(d, make_dialog_box_internal))
47                 signal_type_error(Qunimplemented,
48                                   "Device does not support dialogs", f->device);
49
50         return DEVMETH(d, make_dialog_box_internal, (f, type, keys));
51 }
52
53 void syms_of_dialog(void)
54 {
55         DEFSUBR(Fmake_dialog_box_internal);
56
57         DEFSYMBOL(Qdelete_dialog_box_hook);
58 }
59
60 void vars_of_dialog(void)
61 {
62         Fprovide(intern("dialog"));
63
64         DEFVAR_LISP("delete-dialog-box-hook", &Vdelete_dialog_box_hook  /*
65 Function or functions to call when a dialog box is about to be deleted.
66 One arg, the dialog box id.
67                                                                          */ );
68         Vdelete_dialog_box_hook = Qnil;
69 }