comparison src/macterm.c @ 90796:4ef881a120fe

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 675-697) - Update from CVS - Merge from gnus--rel--5.10 - Release ERC 5.2. * gnus--rel--5.10 (patch 211-215) - Update from CVS - Merge from emacs--devo--0 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-189
author Miles Bader <miles@gnu.org>
date Wed, 11 Apr 2007 00:17:47 +0000
parents c0409ee15cee d3898ad6d0d5
children e6fdae9180d4
comparison
equal deleted inserted replaced
90795:b9182b6a90c9 90796:4ef881a120fe
7189 Lisp_Object charset_info = XCAR (rest); 7189 Lisp_Object charset_info = XCAR (rest);
7190 Lisp_Object charset, coding_system, text_encoding; 7190 Lisp_Object charset, coding_system, text_encoding;
7191 Lisp_Object existing_info; 7191 Lisp_Object existing_info;
7192 7192
7193 if (!(CONSP (charset_info) 7193 if (!(CONSP (charset_info)
7194 && STRINGP (charset = XCAR (charset_info)) 7194 && (charset = XCAR (charset_info),
7195 STRINGP (charset))
7195 && CONSP (XCDR (charset_info)) 7196 && CONSP (XCDR (charset_info))
7196 && INTEGERP (text_encoding = XCAR (XCDR (charset_info))) 7197 && (text_encoding = XCAR (XCDR (charset_info)),
7198 INTEGERP (text_encoding))
7197 && CONSP (XCDR (XCDR (charset_info))) 7199 && CONSP (XCDR (XCDR (charset_info)))
7198 && SYMBOLP (coding_system = XCAR (XCDR (XCDR (charset_info)))))) 7200 && (coding_system = XCAR (XCDR (XCDR (charset_info))),
7201 SYMBOLP (coding_system))))
7199 continue; 7202 continue;
7200 7203
7201 existing_info = assq_no_quit (text_encoding, result); 7204 existing_info = assq_no_quit (text_encoding, result);
7202 if (NILP (existing_info)) 7205 if (NILP (existing_info))
7203 result = Fcons (list3 (text_encoding, coding_system, charset), 7206 result = Fcons (list3 (text_encoding, coding_system, charset),
11533 #ifdef MAC_OSX 11536 #ifdef MAC_OSX
11534 /* HasDepth returns true if it is possible to have a 32 bit display, 11537 /* HasDepth returns true if it is possible to have a 32 bit display,
11535 but this may not be what is actually used. Mac OSX can do better. */ 11538 but this may not be what is actually used. Mac OSX can do better. */
11536 dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1; 11539 dpyinfo->color_p = CGDisplaySamplesPerPixel (kCGDirectMainDisplay) > 1;
11537 dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay); 11540 dpyinfo->n_planes = CGDisplayBitsPerPixel (kCGDirectMainDisplay);
11538 dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay); 11541 {
11539 dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay); 11542 CGDisplayErr err;
11543 CGDisplayCount ndisps;
11544 CGDirectDisplayID *displays;
11545
11546 err = CGGetActiveDisplayList (0, NULL, &ndisps);
11547 if (err == noErr)
11548 {
11549 displays = alloca (sizeof (CGDirectDisplayID) * ndisps);
11550 err = CGGetActiveDisplayList (ndisps, displays, &ndisps);
11551 }
11552 if (err == noErr)
11553 {
11554 CGRect bounds = CGRectMake (0, 0, 0, 0);
11555
11556 while (ndisps-- > 0)
11557 bounds = CGRectUnion (bounds, CGDisplayBounds (displays[ndisps]));
11558 dpyinfo->height = CGRectGetHeight (bounds);
11559 dpyinfo->width = CGRectGetWidth (bounds);
11560 }
11561 else
11562 {
11563 dpyinfo->height = CGDisplayPixelsHigh (kCGDirectMainDisplay);
11564 dpyinfo->width = CGDisplayPixelsWide (kCGDirectMainDisplay);
11565 }
11566 }
11540 #else 11567 #else
11541 { 11568 {
11542 GDHandle main_device_handle = LMGetMainDevice(); 11569 GDHandle main_device_handle = LMGetMainDevice();
11543 11570
11544 dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType); 11571 dpyinfo->color_p = TestDeviceAttribute (main_device_handle, gdDevType);