aboutsummaryrefslogtreecommitdiffstats
path: root/src/dispextern.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 6e1d85de924..cb9dddd82cb 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2667,8 +2667,57 @@ enum move_operation_enum
2667 MOVE_TO_POS = 0x08 2667 MOVE_TO_POS = 0x08
2668}; 2668};
2669 2669
2670/***********************************************************************
2671 Mouse Highlight
2672 ***********************************************************************/
2673
2674/* Structure to hold mouse highlight data. */
2675
2676typedef struct {
2677 /* These variables describe the range of text currently shown in its
2678 mouse-face, together with the window they apply to. As long as
2679 the mouse stays within this range, we need not redraw anything on
2680 its account. Rows and columns are glyph matrix positions in
2681 MOUSE_FACE_WINDOW. */
2682 int mouse_face_beg_row, mouse_face_beg_col, mouse_face_beg_x;
2683 int mouse_face_end_row, mouse_face_end_col, mouse_face_end_x;
2684 Lisp_Object mouse_face_window;
2685 int mouse_face_face_id;
2686 Lisp_Object mouse_face_overlay;
2687
2688 /* FRAME and X, Y position of mouse when last checked for
2689 highlighting. X and Y can be negative or out of range for the frame. */
2690 struct frame *mouse_face_mouse_frame;
2691 int mouse_face_mouse_x, mouse_face_mouse_y;
2692
2693 /* Nonzero if part of the text currently shown in
2694 its mouse-face is beyond the window end. */
2695 unsigned mouse_face_past_end : 1;
2696
2697 /* Nonzero means defer mouse-motion highlighting. */
2698 unsigned mouse_face_defer : 1;
2699
2700 /* Nonzero means that the mouse highlight should not be shown. */
2701 unsigned mouse_face_hidden : 1;
2702} Mouse_HLInfo;
2703
2704DISPEXTERN_INLINE void
2705reset_mouse_highlight (Mouse_HLInfo *hlinfo)
2706{
2707
2708 hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
2709 hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
2710 hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0;
2711 hlinfo->mouse_face_beg_x = hlinfo->mouse_face_end_x = 0;
2712 hlinfo->mouse_face_face_id = DEFAULT_FACE_ID;
2713 hlinfo->mouse_face_mouse_frame = NULL;
2714 hlinfo->mouse_face_window = Qnil;
2715 hlinfo->mouse_face_overlay = Qnil;
2716 hlinfo->mouse_face_past_end = 0;
2717 hlinfo->mouse_face_hidden = 0;
2718 hlinfo->mouse_face_defer = 0;
2719}
2670 2720
2671
2672/*********************************************************************** 2721/***********************************************************************
2673 Window-based redisplay interface 2722 Window-based redisplay interface
2674 ***********************************************************************/ 2723 ***********************************************************************/