comparison src/nsterm.h @ 98458:5db459c2e438

* nsterm.h (ns_cursor_types, ns_output.desired_cursor_color)(ns_output.current_cursor, ns_output.desired_cursor) (ns_output.last_inactive, FRAME_CURSOR, FRAME_NEW_CURSOR) (FRAME_NEW_CURSOR_COLOR,): Remove. * nsfns.m (ns_set_cursor_color): Use FRAME_CURSOR_COLOR. (ns_lisp_to_cursor_type, ns_cursor_type_to_lisp): Use core emacs enumeration (HOLLOW_BOX_CURSOR, etc.). * nsterm.m (ns_frame_rehighlight): Remove commented code. (draw_window_cursor): Simplify code. (EmacsView-windowDidBecomeKey:,-windowDidResignKey:): Don't change cursor type. In latter, call rehighlight instead of doing updates manually. (EmacsPrefsController-setPanelFromValues,-setValuesFromPanel): Use core emacs cursor types. * xdisp.c (draw_glyphs): Don't call notice_overwritten_cursor() under NS.
author Adrian Robert <Adrian.B.Robert@gmail.com>
date Thu, 02 Oct 2008 13:57:39 +0000
parents 8adf9be2900c
children e038c1a8307c
comparison
equal deleted inserted replaced
98457:2f9a184c3276 98458:5db459c2e438
381 381
382 Non-OO stuff 382 Non-OO stuff
383 383
384 ========================================================================== */ 384 ========================================================================== */
385 385
386 enum ns_cursor_types
387 {
388 no_highlight =0,
389 filled_box,
390 hollow_box,
391 underscore,
392 bar
393 };
394
395
396 /* could use list to store these, but rest of emacs has a big infrastructure 386 /* could use list to store these, but rest of emacs has a big infrastructure
397 for managing a table of bitmap "records" */ 387 for managing a table of bitmap "records" */
398 struct ns_bitmap_record 388 struct ns_bitmap_record
399 { 389 {
400 #ifdef __OBJC__ 390 #ifdef __OBJC__
558 struct ns_output 548 struct ns_output
559 { 549 {
560 #ifdef __OBJC__ 550 #ifdef __OBJC__
561 EmacsView *view; 551 EmacsView *view;
562 id miniimage; 552 id miniimage;
563 NSColor *current_cursor_color; 553 NSColor *cursor_color;
564 NSColor *desired_cursor_color;
565 NSColor *foreground_color; 554 NSColor *foreground_color;
566 NSColor *background_color; 555 NSColor *background_color;
567 EmacsToolbar *toolbar; 556 EmacsToolbar *toolbar;
568 #else 557 #else
569 void *view; 558 void *view;
570 void *miniimage; 559 void *miniimage;
571 void *current_cursor_color; 560 void *cursor_color;
572 void *desired_cursor_color;
573 void *foreground_color; 561 void *foreground_color;
574 void *background_color; 562 void *background_color;
575 void *toolbar; 563 void *toolbar;
576 #endif 564 #endif
577 565
597 value contains an ID of the fontset, else -1. */ 585 value contains an ID of the fontset, else -1. */
598 int fontset; /* only used with font_backend */ 586 int fontset; /* only used with font_backend */
599 587
600 Lisp_Object icon_top; 588 Lisp_Object icon_top;
601 Lisp_Object icon_left; 589 Lisp_Object icon_left;
602 enum ns_cursor_types current_cursor, desired_cursor;
603 unsigned char last_inactive;
604 590
605 /* The size of the extra width currently allotted for vertical 591 /* The size of the extra width currently allotted for vertical
606 scroll bars, in pixels. */ 592 scroll bars, in pixels. */
607 int vertical_scroll_bar_extra; 593 int vertical_scroll_bar_extra;
608 594
654 #define FONT_DESCENT(f) (((struct nsfont_info *)f)->max_bounds.descent) 640 #define FONT_DESCENT(f) (((struct nsfont_info *)f)->max_bounds.descent)
655 641
656 #define FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID) 642 #define FRAME_DEFAULT_FACE(f) FACE_FROM_ID (f, DEFAULT_FACE_ID)
657 643
658 #define FRAME_NS_VIEW(f) ((f)->output_data.ns->view) 644 #define FRAME_NS_VIEW(f) ((f)->output_data.ns->view)
659 #define FRAME_CURSOR(f) ((f)->output_data.ns->current_cursor) 645 #define FRAME_CURSOR_COLOR(f) ((f)->output_data.ns->cursor_color)
660 #define FRAME_CURSOR_COLOR(f) ((f)->output_data.ns->current_cursor_color)
661 #define FRAME_NEW_CURSOR_COLOR(f) ((f)->output_data.ns->desired_cursor_color)
662 #define FRAME_NEW_CURSOR(f) ((f)->output_data.ns->desired_cursor)
663 #define FRAME_POINTER_TYPE(f) ((f)->output_data.ns->current_pointer) 646 #define FRAME_POINTER_TYPE(f) ((f)->output_data.ns->current_pointer)
664 #define FRAME_LAST_INACTIVE(f) ((f)->output_data.ns->last_inactive)
665 647
666 #define FRAME_FONT(f) ((f)->output_data.ns->font) 648 #define FRAME_FONT(f) ((f)->output_data.ns->font)
667 649
668 #ifdef __OBJC__ 650 #ifdef __OBJC__
669 #define XNS_SCROLL_BAR(vec) ((id) XSAVE_VALUE (vec)->pointer) 651 #define XNS_SCROLL_BAR(vec) ((id) XSAVE_VALUE (vec)->pointer)