1 /* mswindows GUI code. (menubars, scrollbars, toolbars, dialogs)
2 Copyright (C) 1998 Andy Piper.
4 This file is part of XEmacs.
6 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with XEmacs; see the file COPYING. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* Synched up with: Not in FSF. */
26 #include "redisplay.h"
29 #include "console-msw.h"
32 * Return value is Qt if we have dispatched the command,
33 * or Qnil if id has not been mapped to a callback.
34 * Window procedure may try other targets to route the
35 * command if we return nil
38 mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id)
40 /* Try to map the command id through the proper hash table */
41 Lisp_Object data, fn, arg, frame;
43 data = Fgethash (make_int (id),
44 FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
46 if (NILP (data) || UNBOUNDP (data))
49 MARK_SUBWINDOWS_CHANGED;
50 /* Ok, this is our one. Enqueue it. */
51 get_gui_callback (data, &fn, &arg);
53 mswindows_enqueue_misc_user_event (frame, fn, arg);