Mercurial > emacs
comparison src/gtkutil.c @ 86161:3408ab8b4152
* xterm.h (struct scroll_bar): Only use Lisp_Object for lisp data.
Turn integer fields into `int'. Merge x_window_low and x_window_high.
(SCROLL_BAR_PACK, SCROLL_BAR_UNPACK, SCROLL_BAR_X_WINDOW)
(SET_SCROLL_BAR_X_WINDOW): Remove.
(SCROLL_BAR_X_WIDGET, SET_SCROLL_BAR_X_WIDGET):
Access the new x_window field directly.
* xterm.c (x_scroll_bar_create): Use a pseudovector.
Don't wrap/unwrap integers into Lisp_Objects.
(XTset_vertical_scroll_bar, x_scroll_bar_handle_click)
(x_scroll_bar_report_motion):
Don't wrap/unwrap integers into Lisp_Objects.
(x_term_init): Use SDATA.
(x_window_to_scroll_bar, x_create_toolkit_scroll_bar)
(x_scroll_bar_set_handle, x_scroll_bar_remove)
(XTset_vertical_scroll_bar, x_scroll_bar_expose)
(x_scroll_bar_report_motion, x_scroll_bar_clear):
* xfns.c (x_set_background_color):
* gtkutil.c (xg_create_scroll_bar, xg_set_toolkit_scroll_bar_thumb):
Access the new x_window field directly.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 16 Nov 2007 21:04:30 +0000 |
parents | d7e05ac913d8 |
children | f0601f6fb8b0 |
comparison
equal
deleted
inserted
replaced
86160:1ede747999c6 | 86161:3408ab8b4152 |
---|---|
2968 /* Setting scroll bar values invokes the callback. Use this variable | 2968 /* Setting scroll bar values invokes the callback. Use this variable |
2969 to indicate that callback should do nothing. */ | 2969 to indicate that callback should do nothing. */ |
2970 | 2970 |
2971 int xg_ignore_gtk_scrollbar; | 2971 int xg_ignore_gtk_scrollbar; |
2972 | 2972 |
2973 /* SET_SCROLL_BAR_X_WINDOW assumes the second argument fits in | 2973 /* Xlib's `Window' fits in 32 bits. But we want to store pointers, and they |
2974 32 bits. But we want to store pointers, and they may be larger | 2974 may be larger than 32 bits. Keep a mapping from integer index to widget |
2975 than 32 bits. Keep a mapping from integer index to widget pointers | 2975 pointers to get around the 32 bit limitation. */ |
2976 to get around the 32 bit limitation. */ | |
2977 | 2976 |
2978 static struct | 2977 static struct |
2979 { | 2978 { |
2980 GtkWidget **widgets; | 2979 GtkWidget **widgets; |
2981 int max_size; | 2980 int max_size; |
3181 | 3180 |
3182 | 3181 |
3183 /* Set the cursor to an arrow. */ | 3182 /* Set the cursor to an arrow. */ |
3184 xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor); | 3183 xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor); |
3185 | 3184 |
3186 SET_SCROLL_BAR_X_WINDOW (bar, scroll_id); | 3185 bar->x_window = scroll_id; |
3187 } | 3186 } |
3188 | 3187 |
3189 /* Make the scroll bar represented by SCROLLBAR_ID visible. */ | 3188 /* Make the scroll bar represented by SCROLLBAR_ID visible. */ |
3190 | 3189 |
3191 void | 3190 void |
3256 void | 3255 void |
3257 xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) | 3256 xg_set_toolkit_scroll_bar_thumb (bar, portion, position, whole) |
3258 struct scroll_bar *bar; | 3257 struct scroll_bar *bar; |
3259 int portion, position, whole; | 3258 int portion, position, whole; |
3260 { | 3259 { |
3261 GtkWidget *wscroll = xg_get_widget_from_map (SCROLL_BAR_X_WINDOW (bar)); | 3260 GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window); |
3262 | 3261 |
3263 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); | 3262 FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window))); |
3264 | 3263 |
3265 if (wscroll && NILP (bar->dragging)) | 3264 if (wscroll && NILP (bar->dragging)) |
3266 { | 3265 { |