#ifdef USE_X_TOOLKIT
-static struct frame *x_frame_of_widget (Widget);
static Boolean cvt_string_to_pixel (Display *, XrmValue *, Cardinal *,
XrmValue *, XrmValue *, XtPointer *);
static void cvt_pixel_dtor (XtAppContext, XrmValue *, XtPointer,
XrmValue *, Cardinal *);
+#ifdef USE_LUCID
/* Return the frame on which widget WIDGET is used.. Abort if frame
cannot be determined. */
abort ();
}
-
-#ifdef USE_LUCID
-
/* Allocate a color which is lighter or darker than *PIXEL by FACTOR
or DELTA. Try a color with RGB values multiplied by FACTOR first.
If this produces the same color as PIXEL, try a color where all RGB
return x_alloc_lighter_color (f, display, cmap, pixel, factor, delta);
}
-#endif
+#endif /* USE_LUCID */
/* Structure specifying which arguments should be passed by Xt to
x_flush (f);
{
- EMACS_TIME wakeup, delay;
-
- EMACS_GET_TIME (wakeup);
- EMACS_SET_SECS_NSECS (delay, 0, 150 * 1000 * 1000);
- EMACS_ADD_TIME (wakeup, wakeup, delay);
+ EMACS_TIME delay = make_emacs_time (0, 150 * 1000 * 1000);
+ EMACS_TIME wakeup = add_emacs_time (current_emacs_time (), delay);
/* Keep waiting until past the time wakeup or any input gets
available. */
while (! detect_input_pending ())
{
- EMACS_TIME current, timeout;
-
- EMACS_GET_TIME (current);
+ EMACS_TIME current = current_emacs_time ();
+ EMACS_TIME timeout;
/* Break if result would not be positive. */
if (EMACS_TIME_LE (wakeup, current))
break;
/* How long `select' should wait. */
- EMACS_SET_SECS_NSECS (timeout, 0, 10 * 1000 * 1000);
+ timeout = make_emacs_time (0, 10 * 1000 * 1000);
/* Try to wait that long--but we might wake up sooner. */
pselect (0, NULL, NULL, NULL, &timeout, NULL);
Widget widget;
Arg av[20];
int ac = 0;
- char const *scroll_bar_name = SCROLL_BAR_NAME;
+ const char *scroll_bar_name = SCROLL_BAR_NAME;
unsigned long pixel;
BLOCK_INPUT;
}
widget = XmCreateScrollBar (f->output_data.x->edit_widget,
- scroll_bar_name, av, ac);
+ (char *) scroll_bar_name, av, ac);
/* Add one callback for everything that can happen. */
XtAddCallback (widget, XmNdecrementCallback, xm_scroll_callback,
/* Set timeout to 0.1 second. Hopefully not noticeable.
Maybe it should be configurable. */
- EMACS_SET_SECS_USECS (tmo, 0, 100000);
- EMACS_GET_TIME (tmo_at);
- EMACS_ADD_TIME (tmo_at, tmo_at, tmo);
+ tmo = make_emacs_time (0, 100 * 1000 * 1000);
+ tmo_at = add_emacs_time (current_emacs_time (), tmo);
while (pending_event_wait.eventtype)
{
FD_ZERO (&fds);
FD_SET (fd, &fds);
- EMACS_GET_TIME (time_now);
+ time_now = current_emacs_time ();
if (EMACS_TIME_LT (tmo_at, time_now))
break;
- EMACS_SUB_TIME (tmo, tmo_at, time_now);
+ tmo = sub_emacs_time (tmo_at, time_now);
if (pselect (fd + 1, &fds, NULL, NULL, &tmo, NULL) == 0)
break; /* Timeout */
}
BLOCK_INPUT;
if (!x_timeout_atimer_activated_flag)
{
- EMACS_TIME interval;
-
- EMACS_SET_SECS_USECS (interval, 0, 100000);
+ EMACS_TIME interval = make_emacs_time (0, 100 * 1000 * 1000);
start_atimer (ATIMER_RELATIVE, interval, x_process_timeouts, 0);
x_timeout_atimer_activated_flag = 1;
}
last_mouse_press_frame = Qnil;
#ifdef USE_GTK
- xg_default_icon_file = make_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg");
+ xg_default_icon_file = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg");
staticpro (&xg_default_icon_file);
DEFSYM (Qx_gtk_map_stock, "x-gtk-map-stock");