/* If the display is already accurate, do nothing. */
if (! rebuild
- && start == XINT (bar->start)
- && end == XINT (bar->end))
+ && start == bar->start
+ && end == bar->end)
return;
BLOCK_INPUT;
{
- int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, XINT (bar->width));
- int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, XINT (bar->height));
- int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, XINT (bar->height));
+ int inside_width = VERTICAL_SCROLL_BAR_INSIDE_WIDTH (f, bar->width);
+ int inside_height = VERTICAL_SCROLL_BAR_INSIDE_HEIGHT (f, bar->height);
+ int top_range = VERTICAL_SCROLL_BAR_TOP_RANGE (f, bar->height);
/* Make sure the values are reasonable, and try to preserve
the distance between start and end. */
}
/* Store the adjusted setting in the scroll bar. */
- XSETINT (bar->start, start);
- XSETINT (bar->end, end);
+ bar->start = start;
+ bar->end = end;
/* Clip the end position, just for display. */
if (end > top_range)
BLOCK_INPUT;
- x_scroll_bar_set_handle (bar, XINT (bar->start), XINT (bar->end), 1);
+ x_scroll_bar_set_handle (bar, bar->start, bar->end, 1);
/* Switch to scroll bar foreground color. */
if (f->output_data.x->scroll_bar_foreground_pixel != -1)
/* x, y, width, height */
0, 0,
- XINT (bar->width) - 1 - width_trim - width_trim,
- XINT (bar->height) - 1);
+ bar->width - 1 - width_trim - width_trim,
+ bar->height - 1);
/* Restore the foreground color of the GC if we changed it above. */
if (f->output_data.x->scroll_bar_foreground_pixel != -1)
holding it. */
if (event->type == ButtonPress
&& emacs_event->part == scroll_bar_handle)
- XSETINT (bar->dragging, y - XINT (bar->start));
+ XSETINT (bar->dragging, y - bar->start);
#endif
#ifndef USE_TOOLKIT_SCROLL_BARS
&& ! NILP (bar->dragging))
{
int new_start = y - XINT (bar->dragging);
- int new_end = new_start + (XINT (bar->end) - XINT (bar->start));
+ int new_end = new_start + bar->end - bar->start;
x_scroll_bar_set_handle (bar, new_start, new_end, 0);
bar->dragging = Qnil;
/* Where should the handle be now? */
int new_start = event->xmotion.y - XINT (bar->dragging);
- if (new_start != XINT (bar->start))
+ if (new_start != bar->start)
{
- int new_end = new_start + (XINT (bar->end) - XINT (bar->start));
+ int new_end = new_start + bar->end - bar->start;
x_scroll_bar_set_handle (bar, new_start, new_end, 0);
}