aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/term.c70
1 files changed, 51 insertions, 19 deletions
diff --git a/src/term.c b/src/term.c
index 5fbfcc46107..f0cb67b8f6d 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,5 +1,5 @@
1/* terminal control module for terminals described by TERMCAP 1/* terminal control module for terminals described by TERMCAP
2 Copyright (C) 1985, 1986, 1987, 1992 Free Software Foundation, Inc. 2 Copyright (C) 1985, 1986, 1987, 1992, 1993 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -94,11 +94,25 @@ int (*set_terminal_window_hook) ();
94int (*read_socket_hook) (); 94int (*read_socket_hook) ();
95 95
96/* Return the current position of the mouse. 96/* Return the current position of the mouse.
97 Set `bar' to point to the scrollbar if the mouse movement started 97
98 in a scrollbar, or zero if it started elsewhere in the frame. 98 Set *f to the frame the mouse is in, or zero if the mouse is in no
99 This should clear mouse_moved until the next motion event arrives. */ 99 Emacs frame. If it is set to zero, all the other arguments are
100 garbage.
101
102 If the motion started in a scrollbar, set *bar_window to the
103 scrollbar's window, *part to the part the mouse is currently over,
104 *x to the position of the mouse along the scrollbar, and *y to the
105 overall length of the scrollbar.
106
107 Otherwise, set *bar_window to Qnil, and *x and *y to the column and
108 row of the character cell the mouse is over.
109
110 Set *time to the time the mouse was at the returned position.
111
112 This should clear mouse_moved until the next motion
113 event arrives. */
100void (*mouse_position_hook) ( /* FRAME_PTR *f, 114void (*mouse_position_hook) ( /* FRAME_PTR *f,
101 struct scrollbar **bar, 115 Lisp_Object *bar_window,
102 enum scrollbar_part *part, 116 enum scrollbar_part *part,
103 Lisp_Object *x, 117 Lisp_Object *x,
104 Lisp_Object *y, 118 Lisp_Object *y,
@@ -111,16 +125,16 @@ void (*mouse_position_hook) ( /* FRAME_PTR *f,
111 the highlight. */ 125 the highlight. */
112void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ ); 126void (*frame_rehighlight_hook) ( /* FRAME_PTR f */ );
113 127
114/* Set vertical scollbar BAR to have its upper left corner at (TOP, 128/* Set the vertical scrollbar for WINDOW to have its upper left corner
115 LEFT), and be LENGTH rows high. Set its handle to indicate that we 129 at (TOP, LEFT), and be LENGTH rows high. Set its handle to
116 are displaying PORTION characters out of a total of WHOLE 130 indicate that we are displaying PORTION characters out of a total
117 characters, starting at POSITION. Return BAR. If BAR is zero, 131 of WHOLE characters, starting at POSITION. If WINDOW doesn't yet
118 create a new scrollbar and return a pointer to it. */ 132 have a scrollbar, create one for it. */
119struct scrollbar *(*set_vertical_scrollbar_hook) 133void (*set_vertical_scrollbar_hook)
120 ( /* struct scrollbar *BAR, 134 ( /* struct window *window,
121 struct window *window,
122 int portion, int whole, int position */ ); 135 int portion, int whole, int position */ );
123 136
137
124/* The following three hooks are used when we're doing a thorough 138/* The following three hooks are used when we're doing a thorough
125 redisplay of the frame. We don't explicitly know which scrollbars 139 redisplay of the frame. We don't explicitly know which scrollbars
126 are going to be deleted, because keeping track of when windows go 140 are going to be deleted, because keeping track of when windows go
@@ -131,16 +145,34 @@ struct scrollbar *(*set_vertical_scrollbar_hook)
131 145
132/* Arrange for all scrollbars on FRAME to be removed at the next call 146/* Arrange for all scrollbars on FRAME to be removed at the next call
133 to `*judge_scrollbars_hook'. A scrollbar may be spared if 147 to `*judge_scrollbars_hook'. A scrollbar may be spared if
134 `*redeem_scrollbar_hook' is applied to it before the judgement. */ 148 `*redeem_scrollbar_hook' is applied to its window before the judgement.
135void (*condemn_scrollbars_hook)( /* FRAME_PTR *FRAME */ );
136 149
137/* Unmark BAR for deletion in this judgement cycle. */ 150 This should be applied to each frame each time its window tree is
138void (*redeem_scrollbar_hook)( /* struct scrollbar *BAR */ ); 151 redisplayed, even if it is not displaying scrollbars at the moment;
152 if the HAS_SCROLLBARS flag has just been turned off, only calling
153 this and the judge_scrollbars_hook will get rid of them.
154
155 If non-zero, this hook should be safe to apply to any frame,
156 whether or not it can support scrollbars, and whether or not it is
157 currently displaying them. */
158void (*condemn_scrollbars_hook)( /* FRAME_PTR *frame */ );
159
160/* Unmark WINDOW's scrollbar for deletion in this judgement cycle.
161 Note that it's okay to redeem a scrollbar that is not condemned. */
162void (*redeem_scrollbar_hook)( /* struct window *window */ );
139 163
140/* Remove all scrollbars on FRAME that haven't been saved since the 164/* Remove all scrollbars on FRAME that haven't been saved since the
141 last call to `*condemn_scrollbars_hook'. */ 165 last call to `*condemn_scrollbars_hook'.
142void (*judge_scrollbars_hook)( /* FRAME_PTR *FRAME */ );
143 166
167 This should be applied to each frame after each time its window
168 tree is redisplayed, even if it is not displaying scrollbars at the
169 moment; if the HAS_SCROLLBARS flag has just been turned off, only
170 calling this and condemn_scrollbars_hook will get rid of them.
171
172 If non-zero, this hook should be safe to apply to any frame,
173 whether or not it can support scrollbars, and whether or not it is
174 currently displaying them. */
175void (*judge_scrollbars_hook)( /* FRAME_PTR *FRAME */ );
144 176
145 177
146/* Strings, numbers and flags taken from the termcap entry. */ 178/* Strings, numbers and flags taken from the termcap entry. */