#define KBD_BUFFER_SIZE 4096
#endif /* No X-windows */
-#define abs(x) ((x) >= 0 ? (x) : -(x))
-
/* Following definition copied from eval.c */
struct backtrace
/* The above pair of variables forms a "queue empty" flag. When we
enqueue a non-hook event, we increment kbd_store_ptr. When we
dequeue a non-hook event, we increment kbd_fetch_ptr. We say that
- there is input available iff the two pointers are not equal.
+ there is input available if the two pointers are not equal.
Why not just have a flag set and cleared by the enqueuing and
dequeuing functions? Such a flag could be screwed up by interrupts
}
}
-#ifdef C_ALLOCA
- alloca (0); /* Cause a garbage collection now */
- /* Since we can free the most stuff here. */
-#endif /* C_ALLOCA */
-
#if 0
/* Select the frame that the last event came from. Usually,
switch-frame events will take care of this, but if some lisp
kbd_buffer_store_event places events in kbd_buffer, and
kbd_buffer_get_event retrieves them. */
-/* Return true iff there are any events in the queue that read-char
+/* Return true if there are any events in the queue that read-char
would return. If this returns false, a read-char would block. */
static int
readable_events (flags)
if (sp->kind == MOUSE_CLICK_EVENT
|| sp->kind == WHEEL_EVENT
+ || sp->kind == HORIZ_WHEEL_EVENT
#ifdef WINDOWSNT
|| sp->kind == W32_SCROLL_BAR_CLICK_EVENT
#endif
static char *lispy_wheel_names[] =
{
- "wheel-up", "wheel-down"
+ "wheel-up", "wheel-down", "wheel-left", "wheel-right"
};
/* drag-n-drop events are generated when a set of selected files are
}
case WHEEL_EVENT:
+ case HORIZ_WHEEL_EVENT:
{
Lisp_Object position;
Lisp_Object head;
the up_modifier set. */
abort ();
+ if (event->kind == HORIZ_WHEEL_EVENT)
+ symbol_num += 2;
+
/* Get the symbol we should use for the wheel event. */
head = modify_event_symbol (symbol_num,
event->modifiers,
struct tty_display_info *tty = terminal->display_info.tty;
int nread = 0;
- if (terminal->deleted) /* Don't read from a deleted terminal. */
+ if (!terminal->name) /* Don't read from a dead terminal. */
return;
if (terminal->type != output_termcap)
return 0; /* The terminal is suspended. */
#ifdef HAVE_GPM
- if (term_gpm && gpm_tty == tty->terminal->id)
+ if (gpm_tty == tty)
{
Gpm_Event event;
struct input_event hold_quit;
static int ntool_bar_items;
-/* The symbols `tool-bar', and `:image'. */
+/* The symbols `tool-bar', `:image' and `:rtl'. */
extern Lisp_Object Qtool_bar;
Lisp_Object QCimage;
+Lisp_Object Qrtl;
/* Function prototypes. */
/* Value is either a single image specification or a vector
of 4 such specifications for the different button states. */
PROP (TOOL_BAR_ITEM_IMAGES) = value;
+ else if (EQ (key, Qrtl))
+ /* ':rtl STRING' */
+ PROP (TOOL_BAR_ITEM_RTL_IMAGE) = value;
}
/* If got a filter apply it on binding. */
Fset_input_interrupt_mode (interrupt);
Fset_output_flow_control (flow, Qnil);
Fset_input_meta_mode (meta, Qnil);
- Fset_quit_char (quit);
+ if (!NILP (quit))
+ Fset_quit_char (quit);
return Qnil;
}
staticpro (&Qhelp_echo);
Qhelp_echo = intern ("help-echo");
+ staticpro (&Qrtl);
+ Qrtl = intern (":rtl");
+
staticpro (&item_properties);
item_properties = Qnil;
staticpro (&button_down_location);
mouse_syms = Fmake_vector (make_number (1), Qnil);
staticpro (&mouse_syms);
- wheel_syms = Fmake_vector (make_number (2), Qnil);
+ wheel_syms = Fmake_vector (make_number (4), Qnil);
staticpro (&wheel_syms);
{