comparison src/gui-msw.c @ 384:bbff43aa5eb7 r21-2-7

Import from CVS: tag r21-2-7
author cvs
date Mon, 13 Aug 2007 11:08:24 +0200
parents
children 74fd4e045ea6
comparison
equal deleted inserted replaced
383:6a50c6a581a5 384:bbff43aa5eb7
1 /* mswindows GUI code. (menubars, scrollbars, toolbars, dialogs)
2 Copyright (C) 1998 Andy Piper.
3
4 This file is part of XEmacs.
5
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
9 later version.
10
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
14 for more details.
15
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. */
20
21 /* Synched up with: Not in FSF. */
22
23 #include <config.h>
24 #include "lisp.h"
25 #include "gui.h"
26 #include "redisplay.h"
27 #include "frame.h"
28 #include "elhash.h"
29 #include "console-msw.h"
30
31 /*
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
36 */
37 Lisp_Object
38 mswindows_handle_gui_wm_command (struct frame* f, HWND ctrl, WORD id)
39 {
40 /* Try to map the command id through the proper hash table */
41 Lisp_Object data, fn, arg, frame;
42
43 data = Fgethash (make_int (id),
44 FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f), Qnil);
45
46 if (NILP (data) || UNBOUNDP (data))
47 return Qnil;
48
49 MARK_SUBWINDOWS_CHANGED;
50 /* Ok, this is our one. Enqueue it. */
51 get_gui_callback (data, &fn, &arg);
52 XSETFRAME (frame, f);
53 mswindows_enqueue_misc_user_event (frame, fn, arg);
54
55 return Qt;
56 }
57