From 7eb0d72732f4d52beb1f60f6d29152575a07696c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Wed, 6 Jun 2007 08:33:32 +0000 Subject: [PATCH] (struct scroll_bar): Rename member control_handle_low and control_handle_high to control_ref_low and control_ref_high. All uses changed. (SCROLL_BAR_CONTROL_REF, SET_SCROLL_BAR_CONTROL_REF): Rename from SCROLL_BAR_CONTROL_HANDLE and SET_SCROLL_BAR_CONTROL_HANDLE, respectively. All uses changed. (XCreatePixmap, XCreatePixmapFromBitmapData, XSetWindowBackground) (install_window_handler, remove_window_handler): Replace WindowPtr with WindowRef in externs. --- src/ChangeLog | 27 +++++++++++++++++++++++++++ src/macterm.h | 26 +++++++++++++------------- 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index e1e8867e882..49168498e9f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,30 @@ +2007-06-06 YAMAMOTO Mitsuharu + + * macfns.c (mac_window): Replace WindowPtr with WindowRef. + + * macgui.h: Replace WindowPtr with WindowRef. + + * macmenu.c: Replace MenuHandle and GetMenuHandle with MenuRef and + GetMenuRef, respectively. Replace WindowPtr with WindowRef. + Replace ControlHandle with ControlRef. + (install_menu_quit_handler): Rename arg MENU_HANDLE to ROOT_MENU. + + * macterm.c: Replace MenuHandle and GetMenuHandle with MenuRef and + GetMenuRef, respectively. Replace WindowPtr with WindowRef. + Replace ControlHandle with ControlRef. + (USE_CARBON_EVENTS): Remove. Use TARGET_API_MAC_CARBON instead. + [MAC_OS8] (do_get_menus): Rename variable `menu_handle' to `menu'. + + * macterm.h (struct scroll_bar): Rename member control_handle_low + and control_handle_high to control_ref_low and control_ref_high. + All uses changed. + (SCROLL_BAR_CONTROL_REF, SET_SCROLL_BAR_CONTROL_REF): Rename from + SCROLL_BAR_CONTROL_HANDLE and SET_SCROLL_BAR_CONTROL_HANDLE, + respectively. All uses changed. + (XCreatePixmap, XCreatePixmapFromBitmapData, XSetWindowBackground) + (install_window_handler, remove_window_handler): Replace WindowPtr + with WindowRef in externs. + 2007-06-05 Juanma Barranquero * xfaces.c (Finternal_lisp_face_p): Signal error for face alias loops. diff --git a/src/macterm.h b/src/macterm.h index b3826c5e7f7..789089b0bc9 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -406,9 +406,9 @@ struct scroll_bar { /* The next and previous in the chain of scroll bars in this frame. */ Lisp_Object next, prev; - /* The Mac control handle of this scroll bar. Since this is a + /* The Mac control reference of this scroll bar. Since this is a pointer value, we store it split into two Lisp integers. */ - Lisp_Object control_handle_low, control_handle_high; + Lisp_Object control_ref_low, control_ref_high; /* The position and size of the scroll bar in pixels, relative to the frame. */ @@ -466,14 +466,14 @@ struct scroll_bar { /* Extract the Mac control handle of the scroll bar from a struct scroll_bar. */ -#define SCROLL_BAR_CONTROL_HANDLE(ptr) \ - ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \ - (ptr)->control_handle_high)) +#define SCROLL_BAR_CONTROL_REF(ptr) \ + ((ControlRef) SCROLL_BAR_PACK ((ptr)->control_ref_low, \ + (ptr)->control_ref_high)) /* Store a Mac control handle in a struct scroll_bar. */ -#define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \ - (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ - (ptr)->control_handle_high, (unsigned long) (handle))) +#define SET_SCROLL_BAR_CONTROL_REF(ptr, ref) \ + (SCROLL_BAR_UNPACK ((ptr)->control_ref_low, \ + (ptr)->control_ref_high, (unsigned long) (ref))) /* Return the inside width of a vertical scroll bar, given the outside width. */ @@ -615,9 +615,9 @@ extern void x_destroy_window P_ ((struct frame *)); extern void x_wm_set_size_hint P_ ((struct frame *, long, int)); extern void x_delete_display P_ ((struct x_display_info *)); extern void mac_initialize P_ ((void)); -extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, +extern Pixmap XCreatePixmap P_ ((Display *, WindowRef, unsigned int, unsigned int, unsigned int)); -extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, +extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowRef, char *, unsigned int, unsigned int, unsigned long, unsigned long, unsigned int)); @@ -626,7 +626,7 @@ extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *)); extern void XFreeGC P_ ((Display *, GC)); extern void XSetForeground P_ ((Display *, GC, unsigned long)); extern void XSetBackground P_ ((Display *, GC, unsigned long)); -extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); +extern void XSetWindowBackground P_ ((Display *, WindowRef, unsigned long)); extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int)); extern void mac_clear_area P_ ((struct frame *, int, int, unsigned int, unsigned int)); @@ -634,8 +634,8 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); extern int mac_font_panel_visible_p P_ ((void)); extern OSStatus mac_show_hide_font_panel P_ ((void)); extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int)); -extern OSStatus install_window_handler P_ ((WindowPtr)); -extern void remove_window_handler P_ ((WindowPtr)); +extern OSStatus install_window_handler P_ ((WindowRef)); +extern void remove_window_handler P_ ((WindowRef)); extern OSStatus mac_post_mouse_moved_event P_ ((void)); #if !TARGET_API_MAC_CARBON extern void do_apple_menu P_ ((SInt16)); -- 2.39.2