Mercurial > hg > xemacs-beta
comparison src/device-msw.c @ 657:ce0b3f2eff35
[xemacs-hg @ 2001-09-09 04:37:41 by andyp]
DDE, netinstall and cygwin file fixes
author | andyp |
---|---|
date | Sun, 09 Sep 2001 04:37:48 +0000 |
parents | b39c14581166 |
children | f1a615a0d9e0 |
comparison
equal
deleted
inserted
replaced
656:4035041996d8 | 657:ce0b3f2eff35 |
---|---|
48 #endif | 48 #endif |
49 | 49 |
50 /* win32 DDE management library globals */ | 50 /* win32 DDE management library globals */ |
51 #ifdef HAVE_DRAGNDROP | 51 #ifdef HAVE_DRAGNDROP |
52 DWORD mswindows_dde_mlid; | 52 DWORD mswindows_dde_mlid; |
53 int mswindows_dde_enable; | |
53 HSZ mswindows_dde_service; | 54 HSZ mswindows_dde_service; |
54 HSZ mswindows_dde_topic_system; | 55 HSZ mswindows_dde_topic_system; |
55 HSZ mswindows_dde_item_open; | 56 HSZ mswindows_dde_item_open; |
56 #endif | 57 #endif |
57 | 58 |
177 #if defined (HAVE_TOOLBARS) || defined (HAVE_WIDGETS) | 178 #if defined (HAVE_TOOLBARS) || defined (HAVE_WIDGETS) |
178 InitCommonControls (); | 179 InitCommonControls (); |
179 #endif | 180 #endif |
180 } | 181 } |
181 | 182 |
182 static void | 183 #ifdef HAVE_DRAGNDROP |
183 mswindows_finish_init_device (struct device *d, Lisp_Object props) | 184 static void |
185 mswindows_init_dde () | |
184 { | 186 { |
185 /* Initialize DDE management library and our related globals. We execute a | 187 /* Initialize DDE management library and our related globals. We execute a |
186 * dde Open("file") by simulating a drop, so this depends on dnd support. */ | 188 * dde Open("file") by simulating a drop, so this depends on dnd support. */ |
187 #ifdef HAVE_DRAGNDROP | |
188 # if !(defined(CYGWIN) || defined(MINGW)) | 189 # if !(defined(CYGWIN) || defined(MINGW)) |
189 CoInitialize (NULL); | 190 CoInitialize (NULL); |
190 # endif | 191 # endif |
191 | 192 |
192 mswindows_dde_mlid = 0; | 193 mswindows_dde_mlid = 0; |
194 mswindows_dde_enable = 1; | |
193 DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback, | 195 DdeInitialize (&mswindows_dde_mlid, (PFNCALLBACK)mswindows_dde_callback, |
194 APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| | 196 APPCMD_FILTERINITS|CBF_FAIL_SELFCONNECTIONS|CBF_FAIL_ADVISES| |
195 CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, | 197 CBF_FAIL_POKES|CBF_FAIL_REQUESTS|CBF_SKIP_ALLNOTIFICATIONS, |
196 0); | 198 0); |
197 | 199 |
200 mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, | 202 mswindows_dde_topic_system = DdeCreateStringHandle (mswindows_dde_mlid, |
201 SZDDESYS_TOPIC, 0); | 203 SZDDESYS_TOPIC, 0); |
202 mswindows_dde_item_open = DdeCreateStringHandle (mswindows_dde_mlid, | 204 mswindows_dde_item_open = DdeCreateStringHandle (mswindows_dde_mlid, |
203 TEXT(MSWINDOWS_DDE_ITEM_OPEN), 0); | 205 TEXT(MSWINDOWS_DDE_ITEM_OPEN), 0); |
204 DdeNameService (mswindows_dde_mlid, mswindows_dde_service, 0L, DNS_REGISTER); | 206 DdeNameService (mswindows_dde_mlid, mswindows_dde_service, 0L, DNS_REGISTER); |
207 } | |
208 #endif | |
209 | |
210 void | |
211 init_mswindows_very_early() | |
212 { | |
213 #ifdef HAVE_DRAGNDROP | |
214 /* Initializing dde when the device is created is too late - the | |
215 client will give up waiting. Instead we initialize here and tell | |
216 the client we're too busy until the rest of initialization has | |
217 happened. */ | |
218 mswindows_init_dde(); | |
219 #endif | |
220 } | |
221 | |
222 static void | |
223 mswindows_finish_init_device (struct device *d, Lisp_Object props) | |
224 { | |
225 #ifdef HAVE_DRAGNDROP | |
226 /* Tell pending clients we are ready. */ | |
227 mswindows_dde_enable = 1; | |
205 #endif | 228 #endif |
206 } | 229 } |
207 | 230 |
208 static void | 231 static void |
209 mswindows_delete_device (struct device *d) | 232 mswindows_delete_device (struct device *d) |