comparison src/termhooks.h @ 88155:d7ddb3e565de

sync with trunk
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 00:03:54 +0000
parents 23a1cea22d13
children
comparison
equal deleted inserted replaced
88154:8ce476d3ba36 88155:d7ddb3e565de
1 /* Hooks by which low level terminal operations 1 /* Hooks by which low level terminal operations
2 can be made to call other routines. 2 can be made to call other routines.
3 Copyright (C) 1985, 1986, 1993, 1994 Free Software Foundation, Inc. 3 Copyright (C) 1985, 1986, 1993, 1994, 2002, 2003, 2004,
4 2005 Free Software Foundation, Inc.
4 5
5 This file is part of GNU Emacs. 6 This file is part of GNU Emacs.
6 7
7 GNU Emacs is free software; you can redistribute it and/or modify 8 GNU Emacs is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by 9 it under the terms of the GNU General Public License as published by
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details. 16 GNU General Public License for more details.
16 17
17 You should have received a copy of the GNU General Public License 18 You should have received a copy of the GNU General Public License
18 along with GNU Emacs; see the file COPYING. If not, write to 19 along with GNU Emacs; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02111-1307, USA. */ 21 Boston, MA 02110-1301, USA. */
21 22
22 23
23 /* Miscellanea. */ 24 /* Miscellanea. */
24 25
25 struct glyph; 26 struct glyph;
238 in characters, within the window. 239 in characters, within the window.
239 .frame_or_window gives the frame 240 .frame_or_window gives the frame
240 the mouse click occurred in. 241 the mouse click occurred in.
241 .timestamp gives a timestamp (in 242 .timestamp gives a timestamp (in
242 milliseconds) for the click. */ 243 milliseconds) for the click. */
243 #if defined(WINDOWSNT) || defined(MAC_OSX) 244 WHEEL_EVENT, /* A wheel event is generated by a
244 MOUSE_WHEEL_EVENT, /* A mouse-wheel event is generated 245 wheel on a mouse (e.g., MS
245 on WINDOWSNT or MAC_OSX by a 246 Intellimouse).
246 wheel on a mouse (e.g., MS Intellimouse). 247 .modifiers holds the rotate
247 The event contains a delta that corresponds 248 direction (up or down), and the
248 to the amount and direction that the wheel 249 state of the modifier keys.
249 is rotated. This delta is typically
250 used to implement a scroll or zoom.
251 .code gives the delta.
252 .modifiers holds the state of the
253 modifier keys.
254 .x and .y give the mouse position, 250 .x and .y give the mouse position,
255 in characters, within the window. 251 in characters, within the window.
256 .frame_or_window gives the frame 252 .frame_or_window gives the frame
257 the wheel event occurred in. 253 the wheel event occurred in.
258 .timestamp gives a timestamp (in 254 .timestamp gives a timestamp (in
259 milliseconds) for the wheel event. */ 255 milliseconds) for the event. */
260 #endif 256 #if defined (WINDOWSNT) || defined (MAC_OS)
261 #ifdef WINDOWSNT 257 LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is
262 LANGUAGE_CHANGE_EVENT, /* A LANGUAGE_CHANGE_EVENT is generated 258 generated on WINDOWSNT or Mac OS
263 on WINDOWSNT when the keyboard layout 259 when the keyboard layout or input
264 or input language is changed by the 260 language is changed by the
265 user. */ 261 user. */
266 #endif 262 #endif
267 SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button 263 SCROLL_BAR_CLICK_EVENT, /* .code gives the number of the mouse button
268 that was clicked. 264 that was clicked.
269 .modifiers holds the state of the modifier 265 .modifiers holds the state of the modifier
280 #ifdef WINDOWSNT 276 #ifdef WINDOWSNT
281 W32_SCROLL_BAR_CLICK_EVENT, /* as for SCROLL_BAR_CLICK, but only generated 277 W32_SCROLL_BAR_CLICK_EVENT, /* as for SCROLL_BAR_CLICK, but only generated
282 by MS-Windows scroll bar controls. */ 278 by MS-Windows scroll bar controls. */
283 #endif 279 #endif
284 SELECTION_REQUEST_EVENT, /* Another X client wants a selection from us. 280 SELECTION_REQUEST_EVENT, /* Another X client wants a selection from us.
285 See `struct selection_event'. */ 281 See `struct selection_input_event'. */
286 SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */ 282 SELECTION_CLEAR_EVENT, /* Another X client cleared our selection. */
287 BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */ 283 BUFFER_SWITCH_EVENT, /* A process filter has switched buffers. */
288 DELETE_WINDOW_EVENT, /* An X client said "delete this window". */ 284 DELETE_WINDOW_EVENT, /* An X client said "delete this window". */
289 MENU_BAR_EVENT, /* An event generated by the menu bar. 285 MENU_BAR_EVENT, /* An event generated by the menu bar.
290 The frame_or_window field's cdr holds the 286 The frame_or_window field's cdr holds the
295 MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar 291 MENU_BAR_ACTIVATE_EVENT, /* A button press in the menu bar
296 (toolkit version only). */ 292 (toolkit version only). */
297 DRAG_N_DROP_EVENT, /* A drag-n-drop event is generated when 293 DRAG_N_DROP_EVENT, /* A drag-n-drop event is generated when
298 files selected outside of Emacs are dropped 294 files selected outside of Emacs are dropped
299 onto an Emacs window. 295 onto an Emacs window.
300 Currently used only on Windows NT.
301 .modifiers holds the state of the 296 .modifiers holds the state of the
302 modifier keys. 297 modifier keys.
303 .x and .y give the mouse position, 298 .x and .y give the mouse position,
304 in characters, within the window. 299 in characters, within the window.
305 .frame_or_window is a cons of the frame 300 .frame_or_window is the frame in
306 in which the drop was made and a list of 301 which the drop was made.
307 the filenames of the dropped files. 302 .arg is a platform-dependent
303 representation of the dropped items.
308 .timestamp gives a timestamp (in 304 .timestamp gives a timestamp (in
309 milliseconds) for the click. */ 305 milliseconds) for the click. */
310 USER_SIGNAL_EVENT, /* A user signal. 306 USER_SIGNAL_EVENT, /* A user signal.
311 code is a number identifying it, 307 code is a number identifying it,
312 index into lispy_user_signals. */ 308 index into lispy_user_signals. */
328 /* Generated when mouse moves over window not currently selected. */ 324 /* Generated when mouse moves over window not currently selected. */
329 SELECT_WINDOW_EVENT, 325 SELECT_WINDOW_EVENT,
330 326
331 /* Queued from XTread_socket when session manager sends 327 /* Queued from XTread_socket when session manager sends
332 save yourself before shutdown. */ 328 save yourself before shutdown. */
333 SAVE_SESSION_EVENT 329 SAVE_SESSION_EVENT,
330
331 #ifdef MAC_OS
332 /* Generated when an Apple event, a HICommand event, or a Services
333 menu event is received and the corresponding handler is
334 registered. Members `x' and `y' are for the event class and ID
335 symbols, respectively. Member `code' points to the Apple event
336 descriptor. Parameters for Non-Apple events are converted to
337 those in Apple events. */
338 MAC_APPLE_EVENT
339 #endif
334 }; 340 };
335 341
336 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT 342 /* If a struct input_event has a kind which is SELECTION_REQUEST_EVENT
337 or SELECTION_CLEAR_EVENT, then its contents are really described 343 or SELECTION_CLEAR_EVENT, then its contents are really described
338 by `struct selection_event'; see xterm.h. */ 344 by `struct selection_input_event'; see xterm.h. */
339 345
340 /* The keyboard input buffer is an array of these structures. Each one 346 /* The keyboard input buffer is an array of these structures. Each one
341 represents some sort of input event - a keystroke, a mouse click, or 347 represents some sort of input event - a keystroke, a mouse click, or
342 a window system event. These get turned into their lispy forms when 348 a window system event. These get turned into their lispy forms when
343 they are removed from the event queue. */ 349 they are removed from the event queue. */
359 365
360 Lisp_Object x, y; 366 Lisp_Object x, y;
361 unsigned long timestamp; 367 unsigned long timestamp;
362 368
363 /* This is padding just to put the frame_or_window field 369 /* This is padding just to put the frame_or_window field
364 past the size of struct selection_event. */ 370 past the size of struct selection_input_event. */
365 int *padding[2]; 371 int *padding[2];
366 372
367 /* This field is copied into a vector while the event is in the queue, 373 /* This field is copied into a vector while the event is in the queue,
368 so that garbage collections won't kill it. */ 374 so that garbage collections won't kill it. */
369 /* In a menu_bar_event, this is a cons cell whose car is the frame 375 /* In a menu_bar_event, this is a cons cell whose car is the frame
375 /* Additional event argument. This is used for TOOL_BAR_EVENTs and 381 /* Additional event argument. This is used for TOOL_BAR_EVENTs and
376 HELP_EVENTs and avoids calling Fcons during signal handling. */ 382 HELP_EVENTs and avoids calling Fcons during signal handling. */
377 Lisp_Object arg; 383 Lisp_Object arg;
378 }; 384 };
379 385
386 #define EVENT_INIT(event) bzero (&(event), sizeof (struct input_event))
387
380 /* Called to read input events. */ 388 /* Called to read input events. */
381 extern int (*read_socket_hook) P_ ((int, struct input_event *, int, int)); 389 extern int (*read_socket_hook) P_ ((int, int, struct input_event *));
382 390
383 /* Called when a frame's display becomes entirely up to date. */ 391 /* Called when a frame's display becomes entirely up to date. */
384 extern void (*frame_up_to_date_hook) P_ ((struct frame *)); 392 extern void (*frame_up_to_date_hook) P_ ((struct frame *));
385 393
386 394
432 ctrl_modifier = CHAR_CTL, 440 ctrl_modifier = CHAR_CTL,
433 meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */ 441 meta_modifier = CHAR_META /* Under X, the XK_Meta_[LR] keysyms. */
434 }; 442 };
435 443
436 #endif 444 #endif
445
446 /* arch-tag: 33a00ecc-52b5-4186-a410-8801ac9f087d
447 (do not change this comment) */