summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorJoakim Verona <joakim@verona.se>2014-12-23 17:03:28 +0100
committerJoakim Verona <joakim@verona.se>2014-12-23 17:03:28 +0100
commit5f46725992bf26f887483c14c63c03f5b5794f34 (patch)
tree2896a2b98a65851eaddba81d0138fe5647005b08 /src/termhooks.h
parent1d8b8a2d8f75d1e3ec9eb109e98720bd9a197bec (diff)
parente3040f2aee768655198dd6f979a1ff3a72d17d16 (diff)
downloademacs-5f46725992bf26f887483c14c63c03f5b5794f34.tar.gz
Merge branch 'master' into xwidget
Diffstat (limited to 'src/termhooks.h')
-rw-r--r--src/termhooks.h40
1 files changed, 25 insertions, 15 deletions
diff --git a/src/termhooks.h b/src/termhooks.h
index 3a72488e6e8..4672861603c 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -28,7 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
INLINE_HEADER_BEGIN
enum scroll_bar_part {
- scroll_bar_nowhere = -1,
+ scroll_bar_nowhere,
scroll_bar_above_handle,
scroll_bar_handle,
scroll_bar_below_handle,
@@ -258,28 +258,36 @@ enum event_kind
struct input_event
{
/* What kind of event was this? */
- enum event_kind kind;
+ ENUM_BF (event_kind) kind : 16;
+
+ /* Used in scroll back click events. */
+ ENUM_BF (scroll_bar_part) part : 16;
/* For an ASCII_KEYSTROKE_EVENT and MULTIBYTE_CHAR_KEYSTROKE_EVENT,
this is the character.
For a NON_ASCII_KEYSTROKE_EVENT, this is the keysym code.
- For a mouse event, this is the button number.
- For a HELP_EVENT, this is the position within the object
- (stored in ARG below) where the help was found. */
- ptrdiff_t code;
- enum scroll_bar_part part;
+ For a mouse event, this is the button number. */
+ unsigned code;
- int modifiers; /* See enum below for interpretation. */
+ /* See enum below for interpretation. */
+ unsigned modifiers;
+ /* One would prefer C integers, but HELP_EVENT uses these to
+ record frame or window object and a help form, respectively. */
Lisp_Object x, y;
+
+ /* Usually a time as reported by window system-specific event loop.
+ For a HELP_EVENT, this is the position within the object (stored
+ in ARG below) where the help was found. */
Time timestamp;
/* This field is copied into a vector while the event is in
the queue, so that garbage collections won't kill it. */
Lisp_Object frame_or_window;
- /* Additional event argument. This is used for TOOL_BAR_EVENTs and
- HELP_EVENTs and avoids calling Fcons during signal handling. */
+ /* This additional argument is used in attempt to avoid extra consing
+ when building events. Unfortunately some events have to pass much
+ more data than it's reasonable to pack directly into this structure. */
Lisp_Object arg;
};
@@ -446,7 +454,7 @@ struct terminal
void (*delete_glyphs_hook) (struct frame *, int);
void (*ring_bell_hook) (struct frame *f);
- void (*toggle_invisible_pointer_hook) (struct frame *f, int invisible);
+ void (*toggle_invisible_pointer_hook) (struct frame *f, bool invisible);
void (*reset_terminal_modes_hook) (struct terminal *);
void (*set_terminal_modes_hook) (struct terminal *);
@@ -491,10 +499,10 @@ struct terminal
support overlapping frames, so there's no need to raise or lower
anything.
- If RAISE_FLAG is non-zero, F is brought to the front, before all other
- windows. If RAISE_FLAG is zero, F is sent to the back, behind all other
+ If RAISE_FLAG, F is brought to the front, before all other
+ windows. If !RAISE_FLAG, F is sent to the back, behind all other
windows. */
- void (*frame_raise_lower_hook) (struct frame *f, int raise_flag);
+ void (*frame_raise_lower_hook) (struct frame *f, bool raise_flag);
/* If the value of the frame parameter changed, this hook is called.
For example, if going from fullscreen to not fullscreen this hook
@@ -676,7 +684,9 @@ extern struct terminal *terminal_list;
(t->type == output_ns ? t->display_info.ns->name_list_element : Qnil)
#endif
-extern struct terminal *get_terminal (Lisp_Object terminal, bool);
+extern struct terminal *decode_live_terminal (Lisp_Object);
+extern struct terminal *decode_tty_terminal (Lisp_Object);
+extern struct terminal *get_named_terminal (const char *);
extern struct terminal *create_terminal (enum output_method,
struct redisplay_interface *);
extern void delete_terminal (struct terminal *);