diff options
| author | YAMAMOTO Mitsuharu | 2008-03-29 00:47:33 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2008-03-29 00:47:33 +0000 |
| commit | 153d35da2e1c3e56ca41cd24cb5c64ca60633bdb (patch) | |
| tree | 27d4988d3eb4c5a3f1bf7029592e89d62f7977b1 /src | |
| parent | 660425fa9e4e519db602df1100ca8946155c151e (diff) | |
| download | emacs-153d35da2e1c3e56ca41cd24cb5c64ca60633bdb.tar.gz emacs-153d35da2e1c3e56ca41cd24cb5c64ca60633bdb.zip | |
(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.
(mac_get_window_bounds): Move extern from macfns.c.
(FRAME_OUTER_TO_INNER_DIFF_X, FRAME_OUTER_TO_INNER_DIFF_Y): New macros.
(struct mac_output) [USE_MAC_TOOLBAR]: New member toolbar_win_gravity.
(struct scroll_bar) [MAC_OSX]: New member fringe_extended_p.
(update_frame_tool_bar, free_frame_tool_bar) [USE_MAC_TOOLBAR]:
Add externs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/macterm.h | 53 |
1 files changed, 40 insertions, 13 deletions
diff --git a/src/macterm.h b/src/macterm.h index 69d987b0cdc..c95d464544a 100644 --- a/src/macterm.h +++ b/src/macterm.h | |||
| @@ -333,6 +333,16 @@ struct mac_output | |||
| 333 | /* Hints for the size and the position of a window. */ | 333 | /* Hints for the size and the position of a window. */ |
| 334 | XSizeHints *size_hints; | 334 | XSizeHints *size_hints; |
| 335 | 335 | ||
| 336 | #if USE_MAC_TOOLBAR | ||
| 337 | /* This variable records the gravity value of the window position if | ||
| 338 | the window has an external tool bar when it is created. The | ||
| 339 | position of the window is adjusted using this information when | ||
| 340 | the tool bar is first redisplayed. Once the tool bar is | ||
| 341 | redisplayed, it is set to 0 in order to avoid further | ||
| 342 | adjustment. */ | ||
| 343 | int toolbar_win_gravity; | ||
| 344 | #endif | ||
| 345 | |||
| 336 | #if USE_CG_DRAWING | 346 | #if USE_CG_DRAWING |
| 337 | /* Quartz 2D graphics context. */ | 347 | /* Quartz 2D graphics context. */ |
| 338 | CGContextRef cg_context; | 348 | CGContextRef cg_context; |
| @@ -369,6 +379,12 @@ typedef struct mac_output mac_output; | |||
| 369 | /* This is the 'font_info *' which frame F has. */ | 379 | /* This is the 'font_info *' which frame F has. */ |
| 370 | #define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table) | 380 | #define FRAME_MAC_FONT_TABLE(f) (FRAME_MAC_DISPLAY_INFO (f)->font_table) |
| 371 | 381 | ||
| 382 | /* The difference in pixels between the top left corner of the | ||
| 383 | Emacs window (including possible window manager decorations) | ||
| 384 | and FRAME_MAC_WINDOW (f). */ | ||
| 385 | #define FRAME_OUTER_TO_INNER_DIFF_X(f) ((f)->x_pixels_diff) | ||
| 386 | #define FRAME_OUTER_TO_INNER_DIFF_Y(f) ((f)->y_pixels_diff) | ||
| 387 | |||
| 372 | /* Value is the smallest width of any character in any font on frame F. */ | 388 | /* Value is the smallest width of any character in any font on frame F. */ |
| 373 | 389 | ||
| 374 | #define FRAME_SMALLEST_CHAR_WIDTH(F) \ | 390 | #define FRAME_SMALLEST_CHAR_WIDTH(F) \ |
| @@ -406,9 +422,9 @@ struct scroll_bar { | |||
| 406 | /* The next and previous in the chain of scroll bars in this frame. */ | 422 | /* The next and previous in the chain of scroll bars in this frame. */ |
| 407 | Lisp_Object next, prev; | 423 | Lisp_Object next, prev; |
| 408 | 424 | ||
| 409 | /* The Mac control handle of this scroll bar. Since this is a | 425 | /* The Mac control reference of this scroll bar. Since this is a |
| 410 | pointer value, we store it split into two Lisp integers. */ | 426 | pointer value, we store it split into two Lisp integers. */ |
| 411 | Lisp_Object control_handle_low, control_handle_high; | 427 | Lisp_Object control_ref_low, control_ref_high; |
| 412 | 428 | ||
| 413 | /* The position and size of the scroll bar in pixels, relative to the | 429 | /* The position and size of the scroll bar in pixels, relative to the |
| 414 | frame. */ | 430 | frame. */ |
| @@ -435,6 +451,12 @@ struct scroll_bar { | |||
| 435 | being dragged, this is Qnil. */ | 451 | being dragged, this is Qnil. */ |
| 436 | Lisp_Object dragging; | 452 | Lisp_Object dragging; |
| 437 | 453 | ||
| 454 | #ifdef MAC_OSX | ||
| 455 | /* t if the background of the fringe that is adjacent to a scroll | ||
| 456 | bar is extended to the gap between the fringe and the bar. */ | ||
| 457 | Lisp_Object fringe_extended_p; | ||
| 458 | #endif | ||
| 459 | |||
| 438 | /* t if redraw needed in the next XTset_vertical_scroll_bar call. */ | 460 | /* t if redraw needed in the next XTset_vertical_scroll_bar call. */ |
| 439 | Lisp_Object redraw_needed_p; | 461 | Lisp_Object redraw_needed_p; |
| 440 | 462 | ||
| @@ -469,14 +491,14 @@ struct scroll_bar { | |||
| 469 | 491 | ||
| 470 | /* Extract the Mac control handle of the scroll bar from a struct | 492 | /* Extract the Mac control handle of the scroll bar from a struct |
| 471 | scroll_bar. */ | 493 | scroll_bar. */ |
| 472 | #define SCROLL_BAR_CONTROL_HANDLE(ptr) \ | 494 | #define SCROLL_BAR_CONTROL_REF(ptr) \ |
| 473 | ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \ | 495 | ((ControlRef) SCROLL_BAR_PACK ((ptr)->control_ref_low, \ |
| 474 | (ptr)->control_handle_high)) | 496 | (ptr)->control_ref_high)) |
| 475 | 497 | ||
| 476 | /* Store a Mac control handle in a struct scroll_bar. */ | 498 | /* Store a Mac control handle in a struct scroll_bar. */ |
| 477 | #define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \ | 499 | #define SET_SCROLL_BAR_CONTROL_REF(ptr, ref) \ |
| 478 | (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ | 500 | (SCROLL_BAR_UNPACK ((ptr)->control_ref_low, \ |
| 479 | (ptr)->control_handle_high, (unsigned long) (handle))) | 501 | (ptr)->control_ref_high, (unsigned long) (ref))) |
| 480 | 502 | ||
| 481 | /* Return the inside width of a vertical scroll bar, given the outside | 503 | /* Return the inside width of a vertical scroll bar, given the outside |
| 482 | width. */ | 504 | width. */ |
| @@ -618,9 +640,9 @@ extern void x_destroy_window P_ ((struct frame *)); | |||
| 618 | extern void x_wm_set_size_hint P_ ((struct frame *, long, int)); | 640 | extern void x_wm_set_size_hint P_ ((struct frame *, long, int)); |
| 619 | extern void x_delete_display P_ ((struct x_display_info *)); | 641 | extern void x_delete_display P_ ((struct x_display_info *)); |
| 620 | extern void mac_initialize P_ ((void)); | 642 | extern void mac_initialize P_ ((void)); |
| 621 | extern Pixmap XCreatePixmap P_ ((Display *, WindowPtr, unsigned int, | 643 | extern Pixmap XCreatePixmap P_ ((Display *, WindowRef, unsigned int, |
| 622 | unsigned int, unsigned int)); | 644 | unsigned int, unsigned int)); |
| 623 | extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowPtr, char *, | 645 | extern Pixmap XCreatePixmapFromBitmapData P_ ((Display *, WindowRef, char *, |
| 624 | unsigned int, unsigned int, | 646 | unsigned int, unsigned int, |
| 625 | unsigned long, unsigned long, | 647 | unsigned long, unsigned long, |
| 626 | unsigned int)); | 648 | unsigned int)); |
| @@ -629,7 +651,7 @@ extern GC XCreateGC P_ ((Display *, void *, unsigned long, XGCValues *)); | |||
| 629 | extern void XFreeGC P_ ((Display *, GC)); | 651 | extern void XFreeGC P_ ((Display *, GC)); |
| 630 | extern void XSetForeground P_ ((Display *, GC, unsigned long)); | 652 | extern void XSetForeground P_ ((Display *, GC, unsigned long)); |
| 631 | extern void XSetBackground P_ ((Display *, GC, unsigned long)); | 653 | extern void XSetBackground P_ ((Display *, GC, unsigned long)); |
| 632 | extern void XSetWindowBackground P_ ((Display *, WindowPtr, unsigned long)); | 654 | extern void XSetWindowBackground P_ ((Display *, WindowRef, unsigned long)); |
| 633 | extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int)); | 655 | extern void XDrawLine P_ ((Display *, Pixmap, GC, int, int, int, int)); |
| 634 | extern void mac_clear_area P_ ((struct frame *, int, int, | 656 | extern void mac_clear_area P_ ((struct frame *, int, int, |
| 635 | unsigned int, unsigned int)); | 657 | unsigned int, unsigned int)); |
| @@ -637,8 +659,8 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *)); | |||
| 637 | extern int mac_font_panel_visible_p P_ ((void)); | 659 | extern int mac_font_panel_visible_p P_ ((void)); |
| 638 | extern OSStatus mac_show_hide_font_panel P_ ((void)); | 660 | extern OSStatus mac_show_hide_font_panel P_ ((void)); |
| 639 | extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int)); | 661 | extern OSStatus mac_set_font_info_for_selection P_ ((struct frame *, int, int)); |
| 640 | extern OSStatus install_window_handler P_ ((WindowPtr)); | 662 | extern OSStatus install_window_handler P_ ((WindowRef)); |
| 641 | extern void remove_window_handler P_ ((WindowPtr)); | 663 | extern void remove_window_handler P_ ((WindowRef)); |
| 642 | extern OSStatus mac_post_mouse_moved_event P_ ((void)); | 664 | extern OSStatus mac_post_mouse_moved_event P_ ((void)); |
| 643 | #if !TARGET_API_MAC_CARBON | 665 | #if !TARGET_API_MAC_CARBON |
| 644 | extern void do_apple_menu P_ ((SInt16)); | 666 | extern void do_apple_menu P_ ((SInt16)); |
| @@ -646,7 +668,12 @@ extern void do_apple_menu P_ ((SInt16)); | |||
| 646 | #if USE_CG_DRAWING | 668 | #if USE_CG_DRAWING |
| 647 | extern void mac_prepare_for_quickdraw P_ ((struct frame *)); | 669 | extern void mac_prepare_for_quickdraw P_ ((struct frame *)); |
| 648 | #endif | 670 | #endif |
| 671 | extern void mac_get_window_bounds P_ ((struct frame *, Rect *, Rect *)); | ||
| 649 | extern int mac_quit_char_key_p P_ ((UInt32, UInt32)); | 672 | extern int mac_quit_char_key_p P_ ((UInt32, UInt32)); |
| 673 | #if USE_MAC_TOOLBAR | ||
| 674 | extern void update_frame_tool_bar P_ ((FRAME_PTR f)); | ||
| 675 | extern void free_frame_tool_bar P_ ((FRAME_PTR f)); | ||
| 676 | #endif | ||
| 650 | 677 | ||
| 651 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 | 678 | #define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 |
| 652 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 | 679 | #define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 |