Mercurial > emacs
comparison src/gtkutil.h @ 106559:bac7488df503
Bug 5177: Scroll bar thumb did not move when scrolling with mouse wheel.
* xterm.c (xg_scroll_callback): Parameter list changed,
use parameter GtkScrollType to determine scroll/line/page.
Only allow dragging if a button < 4 is grabbed (bug #5177).
(xg_end_scroll_callback): New function.
(x_create_toolkit_scroll_bar): Pass xg_end_scroll_callback to
xg_create_scroll_bar.
* gtkutil.c (xg_gtk_scroll_destroy): Remove XG_LAST_SB_DATA handling.
(scroll_end_callback): Remove.
(xg_create_scroll_bar): Add parameter end_callback, bind it to
button-release-event. Replace value-changed event with change-value,
bug #5177,
(xg_event_is_for_scrollbar): Only return true if button is less than 4,
bug #5177.
* gtkutil.h (XG_LAST_SB_DATA): Remove.
(xg_create_scroll_bar): Add GCallback end_callback.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Sun, 13 Dec 2009 13:31:35 +0000 |
parents | 5910e0380daf |
children | 1d1d5d9bd884 |
comparison
equal
deleted
inserted
replaced
106558:3d091f151696 | 106559:bac7488df503 |
---|---|
30 | 30 |
31 #define XG_SB_MIN 1 | 31 #define XG_SB_MIN 1 |
32 #define XG_SB_MAX 10000000 | 32 #define XG_SB_MAX 10000000 |
33 #define XG_SB_RANGE (XG_SB_MAX-XG_SB_MIN) | 33 #define XG_SB_RANGE (XG_SB_MAX-XG_SB_MIN) |
34 | 34 |
35 /* Key for data that is valid for menus in a frame */ | 35 /* Key for data that is valid for menus and scroll bars in a frame */ |
36 #define XG_FRAME_DATA "emacs_frame" | 36 #define XG_FRAME_DATA "emacs_frame" |
37 | |
38 /* Key for data that is the last scrollbar value */ | |
39 #define XG_LAST_SB_DATA "emacs_last_sb_value" | |
40 | 37 |
41 /* Key for data that menu items hold. */ | 38 /* Key for data that menu items hold. */ |
42 #define XG_ITEM_DATA "emacs_menuitem" | 39 #define XG_ITEM_DATA "emacs_menuitem" |
43 | 40 |
44 | 41 |
162 extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid)); | 159 extern int xg_get_scroll_id_for_window P_ ((Display *dpy, Window wid)); |
163 | 160 |
164 extern void xg_create_scroll_bar P_ ((FRAME_PTR f, | 161 extern void xg_create_scroll_bar P_ ((FRAME_PTR f, |
165 struct scroll_bar *bar, | 162 struct scroll_bar *bar, |
166 GCallback scroll_callback, | 163 GCallback scroll_callback, |
164 GCallback end_callback, | |
167 char *scroll_bar_name)); | 165 char *scroll_bar_name)); |
168 extern void xg_show_scroll_bar P_ ((int scrollbar_id)); | 166 extern void xg_show_scroll_bar P_ ((int scrollbar_id)); |
169 extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id)); | 167 extern void xg_remove_scroll_bar P_ ((FRAME_PTR f, int scrollbar_id)); |
170 | 168 |
171 extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f, | 169 extern void xg_update_scrollbar_pos P_ ((FRAME_PTR f, |