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.
6 This file is part of SXEmacs
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.
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.
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/>. */
22 /* Synched up with: Not in FSF. */
30 Lisp_Object Vdelete_dialog_box_hook;
31 Lisp_Object Qdelete_dialog_box_hook;
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.
41 struct frame *f = selected_frame();
42 struct device *d = XDEVICE(f->device);
46 if (!HAS_DEVMETH_P(d, make_dialog_box_internal))
47 signal_type_error(Qunimplemented,
48 "Device does not support dialogs", f->device);
50 return DEVMETH(d, make_dialog_box_internal, (f, type, keys));
53 void syms_of_dialog(void)
55 DEFSUBR(Fmake_dialog_box_internal);
57 DEFSYMBOL(Qdelete_dialog_box_hook);
60 void vars_of_dialog(void)
62 Fprovide(intern("dialog"));
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.
68 Vdelete_dialog_box_hook = Qnil;