213
|
1 /* Console functions for mswindows.
|
|
2 Copyright (C) 1996 Ben Wing.
|
|
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 /* Authorship:
|
|
24
|
|
25 Ben Wing: January 1996, for 19.14.
|
272
|
26 Rewritten for mswindows by Jonathan Harris, November 1997 for 21.0
|
213
|
27 */
|
|
28
|
|
29 #include <config.h>
|
|
30 #include "lisp.h"
|
|
31
|
|
32 #include "console-msw.h"
|
|
33
|
249
|
34
|
213
|
35 DEFINE_CONSOLE_TYPE (mswindows);
|
|
36
|
|
37
|
|
38 static int
|
|
39 mswindows_initially_selected_for_input (struct console *con)
|
|
40 {
|
|
41 return 1;
|
|
42 }
|
|
43
|
|
44
|
|
45
|
|
46
|
|
47 /************************************************************************/
|
|
48 /* initialization */
|
|
49 /************************************************************************/
|
|
50
|
|
51 void
|
|
52 syms_of_console_mswindows (void)
|
|
53 {
|
|
54 }
|
|
55
|
|
56 void
|
|
57 console_type_create_mswindows (void)
|
|
58 {
|
|
59 INITIALIZE_CONSOLE_TYPE (mswindows, "mswindows", "console-mswindows-p");
|
|
60
|
|
61 /* console methods */
|
|
62 /* CONSOLE_HAS_METHOD (mswindows, init_console); */
|
|
63 /* CONSOLE_HAS_METHOD (mswindows, mark_console); */
|
|
64 CONSOLE_HAS_METHOD (mswindows, initially_selected_for_input);
|
|
65 /* CONSOLE_HAS_METHOD (mswindows, delete_console); */
|
|
66 /* CONSOLE_HAS_METHOD (mswindows, canonicalize_console_connection); */
|
|
67 /* CONSOLE_HAS_METHOD (mswindows, canonicalize_device_connection); */
|
|
68 /* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_console_connection); */
|
|
69 /* CONSOLE_HAS_METHOD (mswindows, semi_canonicalize_device_connection); */
|
|
70 }
|
|
71
|
|
72 void
|
|
73 vars_of_console_mswindows (void)
|
|
74 {
|
|
75 Fprovide (Qmswindows);
|
|
76 }
|
249
|
77
|
|
78
|
|
79 #ifdef DEBUG_XEMACS
|
|
80 #include "events.h"
|
|
81 #include "opaque.h"
|
|
82 /*
|
|
83 * Random helper functions for debugging.
|
|
84 * Intended for use in the MSVC "Watch" window which doesn't like
|
|
85 * the aborts that the error_check_foo() functions can make.
|
|
86 */
|
382
|
87 struct lrecord_header *
|
|
88 DHEADER (Lisp_Object obj)
|
249
|
89 {
|
382
|
90 return LRECORDP (obj) ? XRECORD_LHEADER (obj) : NULL;
|
249
|
91 }
|
|
92
|
382
|
93 void *
|
|
94 DOPAQUE_DATA (Lisp_Object obj)
|
249
|
95 {
|
382
|
96 return OPAQUEP (obj) ? OPAQUE_DATA (XOPAQUE (obj)) : NULL;
|
249
|
97 }
|
|
98
|
382
|
99 struct Lisp_Event *
|
|
100 DEVENT (Lisp_Object obj)
|
249
|
101 {
|
382
|
102 return EVENTP (obj) ? XEVENT (obj) : NULL;
|
249
|
103 }
|
|
104
|
382
|
105 struct Lisp_Cons *
|
|
106 DCONS (Lisp_Object obj)
|
249
|
107 {
|
382
|
108 return CONSP (obj) ? XCONS (obj) : NULL;
|
249
|
109 }
|
|
110
|
382
|
111 struct Lisp_Cons *
|
|
112 DCONSCDR (Lisp_Object obj)
|
249
|
113 {
|
382
|
114 return (CONSP (obj) && CONSP (XCDR (obj))) ? XCONS (XCDR (obj)) : 0;
|
249
|
115 }
|
|
116
|
382
|
117 Bufbyte *
|
|
118 DSTRING (Lisp_Object obj)
|
249
|
119 {
|
382
|
120 return STRINGP (obj) ? XSTRING_DATA (obj) : NULL;
|
249
|
121 }
|
|
122
|
382
|
123 struct Lisp_Vector *
|
|
124 DVECTOR (Lisp_Object obj)
|
249
|
125 {
|
382
|
126 return VECTORP (obj) ? XVECTOR (obj) : NULL;
|
249
|
127 }
|
|
128
|
382
|
129 struct Lisp_Symbol *
|
|
130 DSYMBOL (Lisp_Object obj)
|
249
|
131 {
|
382
|
132 return SYMBOLP (obj) ? XSYMBOL (obj) : NULL;
|
249
|
133 }
|
|
134
|
382
|
135 Bufbyte *
|
|
136 DSYMNAME (Lisp_Object obj)
|
249
|
137 {
|
382
|
138 return SYMBOLP (obj) ? string_data (XSYMBOL (obj)->name) : NULL;
|
249
|
139 }
|
|
140
|
|
141 #endif
|