Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- a/src/gtkutil.c Fri Nov 16 20:36:34 2007 +0000 +++ b/src/gtkutil.c Fri Nov 16 21:04:30 2007 +0000 @@ -2970,10 +2970,9 @@ int xg_ignore_gtk_scrollbar; -/* SET_SCROLL_BAR_X_WINDOW assumes the second argument fits in - 32 bits. But we want to store pointers, and they may be larger - than 32 bits. Keep a mapping from integer index to widget pointers - to get around the 32 bit limitation. */ +/* Xlib's `Window' fits in 32 bits. But we want to store pointers, and they + may be larger than 32 bits. Keep a mapping from integer index to widget + pointers to get around the 32 bit limitation. */ static struct { @@ -3183,7 +3182,7 @@ /* Set the cursor to an arrow. */ xg_set_cursor (webox, FRAME_X_DISPLAY_INFO (f)->xg_cursor); - SET_SCROLL_BAR_X_WINDOW (bar, scroll_id); + bar->x_window = scroll_id; } /* Make the scroll bar represented by SCROLLBAR_ID visible. */ @@ -3258,7 +3257,7 @@ struct scroll_bar *bar; int portion, position, whole; { - GtkWidget *wscroll = xg_get_widget_from_map (SCROLL_BAR_X_WINDOW (bar)); + GtkWidget *wscroll = xg_get_widget_from_map (bar->x_window); FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (bar->window)));