comparison src/frame-x.c @ 2500:3d8143fc88e1

[xemacs-hg @ 2005-01-24 23:33:30 by ben] get working with VC7 config.inc.samp: Declare OPTIONAL_LIBRARY_DIR as root of library directories. Redo all graphics library defaults to mirror the versions and directories in the current binary aux distribution on xemacs web site. Enable TIFF and COMPFACE by default since you can now compile with them and binary libs are provided. xemacs.mak: Put our own directories first in case of conflict (e.g. config.h in compface). xemacs.mak: Use MSVCRT to avoid link problems. s/windowsnt.h: bytecode.c, print.c: Add casts to avoid warning. compiler.h: Add MSC_VERSION and include definitions of DOESNT_RETURN and friends here, like for GCC. Need different definitions for VC7 and VC6. s/windowsnt.h: Remove stuff moved to compiler.h. Disable warning 4646 ("function declared with __declspec(noreturn) has non-void return type") on VC7 since lots of Lisp primitives trigger this and there is no easy way to kludge around the warning. glyphs-eimage.c: Some really nasty hacks to allow TIFF and JPEG to both be compiled. #### The better solution is to move the TIFF and JPEG code to different files. glyphs-msw.c: Define __STDC__ to avoid problems with compface.h. intl-auto-encap-win32.c, intl-auto-encap-win32.h, intl-encap-win32.c, syswindows.h: Those wankers at Microsoft cannot leave well enough alone. Various functions change parameter types semi-randomly between VC6 and VC7, so we need to include our own versions that can handle both kinds with appropriate casting. EmacsFrame.c, EmacsShell-sub.c, EmacsShell.c, alloc.c, alloca.c, buffer.c, bytecode.c, charset.h, chartab.c, cm.c, console-stream.c, console.c, data.c, debug.h, device-msw.c, device-tty.c, device-x.c, doprnt.c, dumper.c, dynarr.c, elhash.c, emacs.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, events.c, extents.c, faces.c, file-coding.c, fileio.c, fns.c, font-lock.c, frame-gtk.c, frame-x.c, frame.c, free-hook.c, gccache-gtk.c, glyphs-eimage.c, glyphs-gtk.c, glyphs-msw.c, glyphs-x.c, glyphs.c, gtk-glue.c, gutter.c, input-method-xlib.c, insdel.c, intl-win32.c, keymap.c, lisp.h, lread.c, lstream.c, macros.c, malloc.c, menubar-gtk.c, menubar-msw.c, menubar-x.c, mule-coding.c, native-gtk-toolbar.c, number.c, objects-msw.c, objects.c, print.c, process-nt.c, process-unix.c, process.c, ralloc.c, rangetab.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, regex.c, scrollbar-gtk.c, scrollbar-x.c, search.c, select-x.c, signal.c, specifier.c, specifier.h, strftime.c, sunplay.c, symbols.c, sysdep.c, sysproc.h, text.c, text.h, toolbar-common.c, toolbar-msw.c, toolbar.c, ui-gtk.c, unexnt.c, unicode.c, win32.c, window.c, xgccache.c, s/windowsnt.h: abort() -> ABORT(). Eliminate preprocessor games with abort() since it creates huge problems in VC7, solvable only by including massive amounts of files in every compile (and not worth it).
author ben
date Mon, 24 Jan 2005 23:34:34 +0000
parents 79c79ee56386
children 0882ede40b55
comparison
equal deleted inserted replaced
2499:4c5ee4d2e921 2500:3d8143fc88e1
219 /* Not currently used. */ 219 /* Not currently used. */
220 220
221 void 221 void
222 x_wm_mark_shell_size_user_specified (Widget wmshell) 222 x_wm_mark_shell_size_user_specified (Widget wmshell)
223 { 223 {
224 if (! XtIsWMShell (wmshell)) abort (); 224 if (! XtIsWMShell (wmshell)) ABORT ();
225 EmacsShellSetSizeUserSpecified (wmshell); 225 EmacsShellSetSizeUserSpecified (wmshell);
226 } 226 }
227 227
228 void 228 void
229 x_wm_mark_shell_position_user_specified (Widget wmshell) 229 x_wm_mark_shell_position_user_specified (Widget wmshell)
230 { 230 {
231 if (! XtIsWMShell (wmshell)) abort (); 231 if (! XtIsWMShell (wmshell)) ABORT ();
232 EmacsShellSetPositionUserSpecified (wmshell); 232 EmacsShellSetPositionUserSpecified (wmshell);
233 } 233 }
234 234
235 #endif 235 #endif
236 236
237 void 237 void
238 x_wm_set_shell_iconic_p (Widget shell, int iconic_p) 238 x_wm_set_shell_iconic_p (Widget shell, int iconic_p)
239 { 239 {
240 if (! XtIsWMShell (shell)) abort (); 240 if (! XtIsWMShell (shell)) ABORT ();
241 241
242 /* Because of questionable logic in Shell.c, this sequence can't work: 242 /* Because of questionable logic in Shell.c, this sequence can't work:
243 243
244 w = XtCreatePopupShell (...); 244 w = XtCreatePopupShell (...);
245 Xt_SET_VALUE (w, XtNiconic, True); 245 Xt_SET_VALUE (w, XtNiconic, True);
265 x_wm_set_cell_size (Widget wmshell, int cw, int ch) 265 x_wm_set_cell_size (Widget wmshell, int cw, int ch)
266 { 266 {
267 Arg al [2]; 267 Arg al [2];
268 268
269 if (!XtIsWMShell (wmshell)) 269 if (!XtIsWMShell (wmshell))
270 abort (); 270 ABORT ();
271 if (cw <= 0 || ch <= 0) 271 if (cw <= 0 || ch <= 0)
272 abort (); 272 ABORT ();
273 273
274 XtSetArg (al[0], XtNwidthInc, cw); 274 XtSetArg (al[0], XtNwidthInc, cw);
275 XtSetArg (al[1], XtNheightInc, ch); 275 XtSetArg (al[1], XtNheightInc, ch);
276 XtSetValues (wmshell, al, 2); 276 XtSetValues (wmshell, al, 2);
277 } 277 }
280 x_wm_set_variable_size (Widget wmshell, int width, int height) 280 x_wm_set_variable_size (Widget wmshell, int width, int height)
281 { 281 {
282 Arg al [2]; 282 Arg al [2];
283 283
284 if (!XtIsWMShell (wmshell)) 284 if (!XtIsWMShell (wmshell))
285 abort (); 285 ABORT ();
286 #ifdef DEBUG_GEOMETRY_MANAGEMENT 286 #ifdef DEBUG_GEOMETRY_MANAGEMENT
287 /* See comment in EmacsShell.c */ 287 /* See comment in EmacsShell.c */
288 printf ("x_wm_set_variable_size: %d %d\n", width, height); 288 printf ("x_wm_set_variable_size: %d %d\n", width, height);
289 fflush (stdout); 289 fflush (stdout);
290 #endif 290 #endif
349 Display *dpy = XtDisplay (shell); 349 Display *dpy = XtDisplay (shell);
350 Extbyte *app_name, *app_class; 350 Extbyte *app_name, *app_class;
351 XClassHint classhint; 351 XClassHint classhint;
352 352
353 if (!XtIsWMShell (shell)) 353 if (!XtIsWMShell (shell))
354 abort (); 354 ABORT ();
355 355
356 XtGetApplicationNameAndClass (dpy, &app_name, &app_class); 356 XtGetApplicationNameAndClass (dpy, &app_name, &app_class);
357 classhint.res_name = frame_name; 357 classhint.res_name = frame_name;
358 classhint.res_class = app_class; 358 classhint.res_class = app_class;
359 XSetClassHint (dpy, XtWindow (shell), &classhint); 359 XSetClassHint (dpy, XtWindow (shell), &classhint);
366 { 366 {
367 Widget w = FRAME_X_SHELL_WIDGET (f); 367 Widget w = FRAME_X_SHELL_WIDGET (f);
368 struct device *d = XDEVICE (FRAME_DEVICE (f)); 368 struct device *d = XDEVICE (FRAME_DEVICE (f));
369 369
370 if (!XtIsWMShell (w)) 370 if (!XtIsWMShell (w))
371 abort (); 371 ABORT ();
372 372
373 if (NILP (DEVICE_X_WM_COMMAND_FRAME (d))) 373 if (NILP (DEVICE_X_WM_COMMAND_FRAME (d)))
374 { 374 {
375 int argc; 375 int argc;
376 Wexttext **argv; 376 Wexttext **argv;
1555 #endif 1555 #endif
1556 1556
1557 /* OK, we're a top-level shell. */ 1557 /* OK, we're a top-level shell. */
1558 1558
1559 if (!XtIsWMShell (wmshell)) 1559 if (!XtIsWMShell (wmshell))
1560 abort (); 1560 ABORT ();
1561 1561
1562 /* If the EmacsFrame doesn't have a geometry but the shell does, 1562 /* If the EmacsFrame doesn't have a geometry but the shell does,
1563 treat that as the geometry of the frame. 1563 treat that as the geometry of the frame.
1564 (Is this bogus? I'm not sure.) */ 1564 (Is this bogus? I'm not sure.) */
1565 1565
2682 (void *) FONT_INSTANCE_X_FONT (XFONT_INSTANCE (font))); 2682 (void *) FONT_INSTANCE_X_FONT (XFONT_INSTANCE (font)));
2683 ac++; 2683 ac++;
2684 } 2684 }
2685 } 2685 }
2686 else 2686 else
2687 abort (); 2687 ABORT ();
2688 2688
2689 XtSetValues (FRAME_X_TEXT_WIDGET (frm), al, ac); 2689 XtSetValues (FRAME_X_TEXT_WIDGET (frm), al, ac);
2690 2690
2691 #ifdef HAVE_TOOLBARS 2691 #ifdef HAVE_TOOLBARS
2692 /* Setting the background clears the entire frame area 2692 /* Setting the background clears the entire frame area