Mercurial > hg > xemacs-beta
comparison src/glyphs-msw.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | d883f39b8495 |
children | 064ab7fed2e0 |
comparison
equal
deleted
inserted
replaced
379:76b7d63099ad | 380:8626e4521993 |
---|---|
85 unsigned char *ip, *dp; | 85 unsigned char *ip, *dp; |
86 | 86 |
87 if (DEVICE_MSWINDOWS_BITSPIXEL (d) > 0) | 87 if (DEVICE_MSWINDOWS_BITSPIXEL (d) > 0) |
88 { | 88 { |
89 int bpline = BPLINE(width * 3); | 89 int bpline = BPLINE(width * 3); |
90 /* FIXME: we can do this because 24bpp implies no colour table, once | 90 /* FIXME: we can do this because 24bpp implies no color table, once |
91 * we start paletizing this is no longer true. The X versions of | 91 * we start palettizing this is no longer true. The X versions of |
92 * this function quantises to 256 colours or bit masks down to a | 92 * this function quantises to 256 colors or bit masks down to a |
93 * long. Windows can actually handle rgb triples in the raw so I | 93 * long. Windows can actually handle rgb triples in the raw so I |
94 * don't see much point trying to optimize down to the best | 94 * don't see much point trying to optimize down to the best |
95 * structure - unless it has memory / color allocation implications | 95 * structure - unless it has memory / color allocation implications |
96 * .... */ | 96 * .... */ |
97 bmp_info=xnew_and_zero (BITMAPINFO); | 97 bmp_info=xnew_and_zero (BITMAPINFO); |
697 { | 697 { |
698 case XpmSuccess: | 698 case XpmSuccess: |
699 break; | 699 break; |
700 case XpmFileInvalid: | 700 case XpmFileInvalid: |
701 { | 701 { |
702 signal_simple_error ("invalid XPM data", image); | 702 signal_simple_error ("Invalid XPM data", image); |
703 } | 703 } |
704 case XpmNoMemory: | 704 case XpmNoMemory: |
705 { | 705 { |
706 signal_double_file_error ("Parsing pixmap data", | 706 signal_double_file_error ("Parsing pixmap data", |
707 "out of memory", image); | 707 "out of memory", image); |
1171 resid = XSTRING_DATA (resource_id); | 1171 resid = XSTRING_DATA (resource_id); |
1172 } | 1172 } |
1173 } | 1173 } |
1174 else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id, | 1174 else if (!(resid = MAKEINTRESOURCE (resource_name_to_resource (resource_id, |
1175 type)))) | 1175 type)))) |
1176 signal_simple_error ("invalid resource identifier", resource_id); | 1176 signal_simple_error ("Invalid resource identifier", resource_id); |
1177 | 1177 |
1178 /* load the image */ | 1178 /* load the image */ |
1179 if (!(himage = LoadImage (hinst, resid, type, 0, 0, | 1179 if (!(himage = LoadImage (hinst, resid, type, 0, 0, |
1180 LR_CREATEDIBSECTION | LR_DEFAULTSIZE | | 1180 LR_CREATEDIBSECTION | LR_DEFAULTSIZE | |
1181 LR_SHARED | | 1181 LR_SHARED | |
1182 (!NILP (file) ? LR_LOADFROMFILE : 0)))) | 1182 (!NILP (file) ? LR_LOADFROMFILE : 0)))) |
1183 { | 1183 { |
1184 signal_simple_error ("cannot load image", instantiator); | 1184 signal_simple_error ("Cannot load image", instantiator); |
1185 } | 1185 } |
1186 | 1186 |
1187 if (hinst) | 1187 if (hinst) |
1188 FreeLibrary (hinst); | 1188 FreeLibrary (hinst); |
1189 | 1189 |
1293 * without the other). | 1293 * without the other). |
1294 */ | 1294 */ |
1295 | 1295 |
1296 | 1296 |
1297 /* | 1297 /* |
1298 * Based on an optimized version provided by Jim Becker, Auguest 5, 1988. | 1298 * Based on an optimized version provided by Jim Becker, August 5, 1988. |
1299 */ | 1299 */ |
1300 #ifndef BitmapSuccess | 1300 #ifndef BitmapSuccess |
1301 #define BitmapSuccess 0 | 1301 #define BitmapSuccess 0 |
1302 #define BitmapOpenFailed 1 | 1302 #define BitmapOpenFailed 1 |
1303 #define BitmapFileInvalid 2 | 1303 #define BitmapFileInvalid 2 |