X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/5a61ec1817b5ed0af07ea1ade6b4dd78a52dea9f..3dfed6538787f747b1f76a90cae5e2ddce7352f5:/src/macterm.h diff --git a/src/macterm.h b/src/macterm.h index fb9651312c..fdc74cb637 100644 --- a/src/macterm.h +++ b/src/macterm.h @@ -1,6 +1,6 @@ /* Display module for Mac OS. Copyright (C) 2000, 2001, 2002, 2003, 2004, - 2005 Free Software Foundation, Inc. + 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -206,9 +206,6 @@ extern struct mac_display_info one_mac_display_info; FONT-LIST-CACHE records previous values returned by x-list-fonts. */ extern Lisp_Object x_display_name_list; -/* A flag to control how to display unibyte 8-bit character. */ -extern int unibyte_display_via_language_environment; - extern struct x_display_info *x_display_info_for_display P_ ((Display *)); extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); @@ -337,6 +334,16 @@ struct mac_output { /* Hints for the size and the position of a window. */ XSizeHints *size_hints; + +#if TARGET_API_MAC_CARBON + /* File name for the proxy icon of this frame. Might be NULL. */ + char *file_name; +#endif + +#if USE_CG_DRAWING + /* Quartz 2D graphics context. */ + CGContextRef cg_context; +#endif }; typedef struct mac_output mac_output; @@ -358,6 +365,8 @@ typedef struct mac_output mac_output; #define FRAME_SIZE_HINTS(f) ((f)->output_data.mac->size_hints) +#define FRAME_FILE_NAME(f) ((f)->output_data.mac->file_name) + /* This gives the mac_display_info structure for the display F is on. */ #define FRAME_MAC_DISPLAY_INFO(f) (&one_mac_display_info) #define FRAME_X_DISPLAY_INFO(f) (&one_mac_display_info) @@ -522,6 +531,10 @@ struct scroll_bar { text from glomming up against the scroll bar */ #define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0) +/* Variations of possible Aqua scroll bar width. */ +#define MAC_AQUA_VERTICAL_SCROLL_BAR_WIDTH (15) +#define MAC_AQUA_SMALL_VERTICAL_SCROLL_BAR_WIDTH (11) + /* Size of hourglass controls */ #define HOURGLASS_WIDTH 16 #define HOURGLASS_HEIGHT 16 @@ -544,7 +557,15 @@ extern int XParseGeometry P_ ((char *, int *, int *, unsigned int *, /* Defined in macterm.c. */ extern void x_set_window_size P_ ((struct frame *, int, int, int)); +extern void x_set_mouse_position P_ ((struct frame *, int, int)); +extern void x_set_mouse_pixel_position P_ ((struct frame *, int, int)); extern void x_make_frame_visible P_ ((struct frame *)); +extern void x_make_frame_invisible P_ ((struct frame *)); +extern void x_iconify_frame P_ ((struct frame *)); +extern void x_free_frame_resources P_ ((struct frame *)); +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, unsigned int, unsigned int)); @@ -554,6 +575,7 @@ extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, unsigned int)); extern void XFreePixmap P_ ((Display *, Pixmap)); extern GC XCreateGC P_ ((Display *, Window, 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)); @@ -564,26 +586,52 @@ extern void mac_clear_area P_ ((struct frame *, int, int, 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)); +extern void do_menu_choice P_ ((SInt32)); +extern OSStatus mac_post_mouse_moved_event P_ ((void)); +#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 +#define TYPE_FILE_NAME 'fNam' + /* Defined in macselect.c */ extern void x_clear_frame_selections P_ ((struct frame *)); +/* Defined in macfns.c */ + +extern int have_menus_p P_ ((void)); + +extern void x_real_positions P_ ((struct frame *, int *, int *)); +extern void x_set_menu_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); +extern int x_pixel_width P_ ((struct frame *)); +extern int x_pixel_height P_ ((struct frame *)); +extern int x_char_width P_ ((struct frame *)); +extern int x_char_height P_ ((struct frame *)); +extern void x_sync P_ ((struct frame *)); +extern void x_set_tool_bar_lines P_ ((struct frame *, Lisp_Object, Lisp_Object)); +extern void mac_update_title_bar P_ ((struct frame *, int)); + +/* Defined in macmenu.c */ + +extern void x_activate_menubar P_ ((struct frame *)); +extern void free_frame_menubar P_ ((struct frame *)); + /* Defined in mac.c. */ -extern OSErr posix_pathname_to_fsspec P_ ((const char *, FSSpec *)); -extern OSErr fsspec_to_posix_pathname P_ ((const FSSpec *, char *, int)); extern void mac_clear_font_name_table P_ ((void)); -extern Lisp_Object mac_aedesc_to_lisp P_ ((AEDesc *)); +extern Lisp_Object mac_aedesc_to_lisp P_ ((const AEDesc *)); #if TARGET_API_MAC_CARBON extern OSErr create_apple_event_from_event_ref P_ ((EventRef, UInt32, EventParamName *, EventParamType *, AppleEvent *)); +extern OSErr create_apple_event_from_drag_ref P_ ((DragRef, UInt32, + FlavorType *, + AppleEvent *)); extern CFStringRef cfstring_create_with_utf8_cstring P_ ((const char *)); extern CFStringRef cfstring_create_with_string P_ ((Lisp_Object)); extern Lisp_Object cfdata_to_lisp P_ ((CFDataRef));