Mercurial > hg > xemacs-beta
comparison src/frame-x.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | e38acbeb1cae |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
1 /* Functions for the X window system. | 1 /* Functions for the X window system. |
2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. | 2 Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc. |
3 Copyright (C) 1995, 1996 Ben Wing. | 3 Copyright (C) 1995, 1996, 2001 Ben Wing. |
4 | 4 |
5 This file is part of XEmacs. | 5 This file is part of XEmacs. |
6 | 6 |
7 XEmacs is free software; you can redistribute it and/or modify it | 7 XEmacs is free software; you can redistribute it and/or modify it |
8 under the terms of the GNU General Public License as published by the | 8 under the terms of the GNU General Public License as published by the |
490 } | 490 } |
491 | 491 |
492 static Lisp_Object | 492 static Lisp_Object |
493 color_to_string (Widget w, unsigned long pixel) | 493 color_to_string (Widget w, unsigned long pixel) |
494 { | 494 { |
495 char buf[255]; | 495 Intbyte buf[255]; |
496 | 496 |
497 XColor color; | 497 XColor color; |
498 color.pixel = pixel; | 498 color.pixel = pixel; |
499 XQueryColor (XtDisplay (w), w->core.colormap, &color); | 499 XQueryColor (XtDisplay (w), w->core.colormap, &color); |
500 sprintf (buf, "#%04x%04x%04x", color.red, color.green, color.blue); | 500 qxesprintf (buf, "#%04x%04x%04x", color.red, color.green, color.blue); |
501 return build_string (buf); | 501 return build_intstring (buf); |
502 } | 502 } |
503 | 503 |
504 static void | 504 static void |
505 x_get_top_level_position (Display *d, Window w, Position *x, Position *y) | 505 x_get_top_level_position (Display *d, Window w, Position *x, Position *y) |
506 { | 506 { |
576 return make_int (w->emacs_frame.toolbar_shadow_thickness); | 576 return make_int (w->emacs_frame.toolbar_shadow_thickness); |
577 #endif /* HAVE_TOOLBARS */ | 577 #endif /* HAVE_TOOLBARS */ |
578 if (EQ (Qinter_line_space, property)) | 578 if (EQ (Qinter_line_space, property)) |
579 return make_int (w->emacs_frame.interline); | 579 return make_int (w->emacs_frame.interline); |
580 if (EQ (Qwindow_id, property)) | 580 if (EQ (Qwindow_id, property)) |
581 return Fx_window_id (make_frame (f)); | 581 return Fx_window_id (wrap_frame (f)); |
582 | 582 |
583 return Qunbound; | 583 return Qunbound; |
584 } | 584 } |
585 | 585 |
586 static int | 586 static int |
609 Widget shell = FRAME_X_SHELL_WIDGET (f); | 609 Widget shell = FRAME_X_SHELL_WIDGET (f); |
610 EmacsFrame w = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); | 610 EmacsFrame w = (EmacsFrame) FRAME_X_TEXT_WIDGET (f); |
611 Widget gw = (Widget) w; | 611 Widget gw = (Widget) w; |
612 Position x, y; | 612 Position x, y; |
613 | 613 |
614 props = cons3 (Qwindow_id, Fx_window_id (make_frame (f)), props); | 614 props = cons3 (Qwindow_id, Fx_window_id (wrap_frame (f)), props); |
615 props = cons3 (Qinter_line_space, make_int (w->emacs_frame.interline), props); | 615 props = cons3 (Qinter_line_space, make_int (w->emacs_frame.interline), props); |
616 | 616 |
617 #ifdef HAVE_TOOLBARS | 617 #ifdef HAVE_TOOLBARS |
618 props = cons3 (Qtoolbar_shadow_thickness, | 618 props = cons3 (Qtoolbar_shadow_thickness, |
619 make_int (w->emacs_frame.toolbar_shadow_thickness), | 619 make_int (w->emacs_frame.toolbar_shadow_thickness), |
1251 if (transferInfo == NULL) | 1251 if (transferInfo == NULL) |
1252 return; | 1252 return; |
1253 | 1253 |
1254 GCPRO3 (frame, l_type, l_data); | 1254 GCPRO3 (frame, l_type, l_data); |
1255 | 1255 |
1256 frame = make_frame ((struct frame *) clientData); | 1256 frame = wrap_frame ((struct frame *) clientData); |
1257 | 1257 |
1258 if (transferInfo->dropData->protocol == DtDND_FILENAME_TRANSFER) | 1258 if (transferInfo->dropData->protocol == DtDND_FILENAME_TRANSFER) |
1259 { | 1259 { |
1260 l_type = Qdragdrop_URL; | 1260 l_type = Qdragdrop_URL; |
1261 | 1261 |
1293 make_string ((Intbyte *)transferInfo->dropData->data.buffers[ii].bp, | 1293 make_string ((Intbyte *)transferInfo->dropData->data.buffers[ii].bp, |
1294 transferInfo->dropData->data.buffers[ii].size) ), | 1294 transferInfo->dropData->data.buffers[ii].size) ), |
1295 l_data ); | 1295 l_data ); |
1296 } | 1296 } |
1297 drag_not_done = 0; | 1297 drag_not_done = 0; |
1298 unbind_to(speccount, Qnil); | 1298 unbind_to (speccount); |
1299 } | 1299 } |
1300 else /* the other cases: NOOP_TRANSFER */ | 1300 else /* the other cases: NOOP_TRANSFER */ |
1301 enqueue=0; | 1301 enqueue=0; |
1302 | 1302 |
1303 /* The Problem: no button and mods from CDE... */ | 1303 /* The Problem: no button and mods from CDE... */ |
2153 /************************************************************************/ | 2153 /************************************************************************/ |
2154 /* Lisp functions */ | 2154 /* Lisp functions */ |
2155 /************************************************************************/ | 2155 /************************************************************************/ |
2156 | 2156 |
2157 static void | 2157 static void |
2158 x_init_frame_1 (struct frame *f, Lisp_Object props) | 2158 x_init_frame_1 (struct frame *f, Lisp_Object props, |
2159 int frame_name_is_defaulted) | |
2159 { | 2160 { |
2160 /* This function can GC */ | 2161 /* This function can GC */ |
2161 Lisp_Object device = FRAME_DEVICE (f); | 2162 Lisp_Object device = FRAME_DEVICE (f); |
2162 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil); | 2163 Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil); |
2163 Lisp_Object popup = Fplist_get (props, Qpopup, Qnil); | 2164 Lisp_Object popup = Fplist_get (props, Qpopup, Qnil); |
2284 different program. Since the ID is an unsigned long, we return it as | 2285 different program. Since the ID is an unsigned long, we return it as |
2285 a string. | 2286 a string. |
2286 */ | 2287 */ |
2287 (frame)) | 2288 (frame)) |
2288 { | 2289 { |
2289 char str[255]; | 2290 Intbyte str[255]; |
2290 struct frame *f = decode_x_frame (frame); | 2291 struct frame *f = decode_x_frame (frame); |
2291 | 2292 |
2292 sprintf (str, "%lu", XtWindow (FRAME_X_TEXT_WIDGET (f))); | 2293 qxesprintf (str, "%lu", XtWindow (FRAME_X_TEXT_WIDGET (f))); |
2293 return build_string (str); | 2294 return build_intstring (str); |
2294 } | 2295 } |
2295 | 2296 |
2296 | 2297 |
2297 /************************************************************************/ | 2298 /************************************************************************/ |
2298 /* manipulating the X window */ | 2299 /* manipulating the X window */ |