From 204b78de1b66429250e18785a65392b5027ef103 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sun, 12 Mar 2006 08:21:06 +0000 Subject: [PATCH] (struct mac_output) [USE_CG_DRAWING]: New member cg_context. (mac_prepare_for_quickdraw) [USE_CG_DRAWING]: Add prototype. --- src/ChangeLog | 31 ++++++++++++++++++++++++++++++- src/macterm.h | 8 ++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 16565f77c03..50234cda0af 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,32 @@ +2006-03-12 YAMAMOTO Mitsuharu + + * macgui.h [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1. + + * macterm.h (struct mac_output) [USE_CG_DRAWING]: New member cg_context. + (mac_prepare_for_quickdraw) [USE_CG_DRAWING]: Add prototype. + + * mac.c (sys_select) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw. + + * macfns.c (x_create_tip_frame): Apply 2006-03-11 change for xfns.c. + + * macterm.c (mac_draw_rectangle, x_draw_glyph_string_foreground) + (x_draw_composite_glyph_string_foreground) + (x_draw_image_foreground): Undo previous changes. + (x_draw_hollow_cursor): Likewise. Subtract 1 from the last + argument of mac_draw_rectangle. + (CG_SET_FILL_COLOR, CG_SET_STROKE_COLOR): New macros. + (mac_draw_string_common, mac_draw_image_string_cg): Use them. + (FRAME_CG_CONTEXT) [USE_CG_DRAWING]: New macro. + (mac_begin_cg_clip, mac_end_cg_clip, mac_prepare_for_quickdraw) + [USE_CG_DRAWING]: New functions. + (mac_draw_line, mac_erase_rectangle, mac_clear_window) + (mac_fill_rectangle, mac_draw_rectangle, mac_draw_string_common) + (mac_draw_image_string_cg) [USE_CG_DRAWING]: Add Quartz 2D drawing part. + (mac_draw_bitmap, mac_invert_rectangle, mac_draw_string_common) + (mac_copy_area, mac_scroll_area, x_scroll_bar_create) + (x_scroll_bar_remove, XTset_vertical_scroll_bar, x_set_window_size) + (XTread_socket) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw. + 2006-03-12 L$,1 q(Brentey K,Aa(Broly * xfns.c (x_icon): Disable redundant call to `x_wm_set_window_state'. @@ -105,7 +134,7 @@ * image.c [MAC_OS] (XPutPixel): Set alpha channel bits if pixmap depth is 32. - [MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap + [MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap depth is 32. 2006-03-06 Chong Yidong diff --git a/src/macterm.h b/src/macterm.h index 54208354e2c..872a4b60199 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -334,6 +334,11 @@ struct mac_output { /* Hints for the size and the position of a window. */ XSizeHints *size_hints; + +#if USE_CG_DRAWING + /* Quartz 2D graphics context. */ + CGContextRef cg_context; +#endif }; typedef struct mac_output mac_output; @@ -566,6 +571,9 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); extern OSErr install_window_handler P_ ((WindowPtr)); extern void remove_window_handler P_ ((WindowPtr)); extern Lisp_Object mac_make_lispy_event_code P_ ((int)); +#if USE_CG_DRAWING +extern void mac_prepare_for_quickdraw P_ ((struct frame *)); +#endif #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 -- 2.39.2