Mercurial > emacs
comparison src/macterm.c @ 78968:6d6dc60c958b
(mac_load_query_font): Fix missing return value.
[USE_CG_DRAWING] (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap):
Add BLOCK_INPUT.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Fri, 05 Oct 2007 08:15:24 +0000 |
parents | 1c0e611785d0 |
children | c975fef407b4 |
comparison
equal
deleted
inserted
replaced
78967:ab500f45053d | 78968:6d6dc60c958b |
---|---|
2273 fringe_bmp[i++] = 0; | 2273 fringe_bmp[i++] = 0; |
2274 } | 2274 } |
2275 | 2275 |
2276 for (i = 0; i < h; i++) | 2276 for (i = 0; i < h; i++) |
2277 bits[i] = ~bits[i]; | 2277 bits[i] = ~bits[i]; |
2278 | |
2279 BLOCK_INPUT; | |
2280 | |
2278 provider = CGDataProviderCreateWithData (NULL, bits, | 2281 provider = CGDataProviderCreateWithData (NULL, bits, |
2279 sizeof (unsigned short) * h, NULL); | 2282 sizeof (unsigned short) * h, NULL); |
2280 if (provider) | 2283 if (provider) |
2281 { | 2284 { |
2282 fringe_bmp[which] = CGImageMaskCreate (wd, h, 1, 1, | 2285 fringe_bmp[which] = CGImageMaskCreate (wd, h, 1, 1, |
2283 sizeof (unsigned short), | 2286 sizeof (unsigned short), |
2284 provider, NULL, 0); | 2287 provider, NULL, 0); |
2285 CGDataProviderRelease (provider); | 2288 CGDataProviderRelease (provider); |
2286 } | 2289 } |
2290 | |
2291 UNBLOCK_INPUT; | |
2287 } | 2292 } |
2288 | 2293 |
2289 static void | 2294 static void |
2290 mac_destroy_fringe_bitmap (which) | 2295 mac_destroy_fringe_bitmap (which) |
2291 int which; | 2296 int which; |
2292 { | 2297 { |
2293 if (which >= max_fringe_bmp) | 2298 if (which >= max_fringe_bmp) |
2294 return; | 2299 return; |
2295 | 2300 |
2296 if (fringe_bmp[which]) | 2301 if (fringe_bmp[which]) |
2297 CGImageRelease (fringe_bmp[which]); | 2302 { |
2303 BLOCK_INPUT; | |
2304 CGImageRelease (fringe_bmp[which]); | |
2305 UNBLOCK_INPUT; | |
2306 } | |
2298 fringe_bmp[which] = 0; | 2307 fringe_bmp[which] = 0; |
2299 } | 2308 } |
2300 #endif | 2309 #endif |
2301 | 2310 |
2302 | 2311 |
8141 {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; | 8150 {kAllTypeFeaturesOffSelector, kDecomposeDiacriticsSelector}; |
8142 FMFontStyle style; | 8151 FMFontStyle style; |
8143 | 8152 |
8144 font_id = atsu_find_font_from_family_name (family); | 8153 font_id = atsu_find_font_from_family_name (family); |
8145 if (font_id == kATSUInvalidFontID) | 8154 if (font_id == kATSUInvalidFontID) |
8146 return; | 8155 return NULL; |
8147 size_fixed = Long2Fix (size); | 8156 size_fixed = Long2Fix (size); |
8148 bold_p = (fontface & bold) != 0; | 8157 bold_p = (fontface & bold) != 0; |
8149 italic_p = (fontface & italic) != 0; | 8158 italic_p = (fontface & italic) != 0; |
8150 err = ATSUCreateStyle (&mac_style); | 8159 err = ATSUCreateStyle (&mac_style); |
8151 if (err != noErr) | 8160 if (err != noErr) |