Mercurial > hg > xemacs-beta
comparison src/events.c @ 384:bbff43aa5eb7 r21-2-7
Import from CVS: tag r21-2-7
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:08:24 +0200 |
parents | 8626e4521993 |
children | 74fd4e045ea6 |
comparison
equal
deleted
inserted
replaced
383:6a50c6a581a5 | 384:bbff43aa5eb7 |
---|---|
177 Lisp_Object Vx, Vy; | 177 Lisp_Object Vx, Vy; |
178 Vx = Fevent_x_pixel (obj); | 178 Vx = Fevent_x_pixel (obj); |
179 assert (INTP (Vx)); | 179 assert (INTP (Vx)); |
180 Vy = Fevent_y_pixel (obj); | 180 Vy = Fevent_y_pixel (obj); |
181 assert (INTP (Vy)); | 181 assert (INTP (Vy)); |
182 sprintf (buf, "#<motion-event %ld, %ld", (long)(XINT (Vx)), (long)(XINT (Vy))); | 182 sprintf (buf, "#<motion-event %ld, %ld", (long) XINT (Vx), (long) XINT (Vy)); |
183 write_c_string (buf, printcharfun); | 183 write_c_string (buf, printcharfun); |
184 break; | 184 break; |
185 } | 185 } |
186 case process_event: | 186 case process_event: |
187 write_c_string ("#<process-event ", printcharfun); | 187 write_c_string ("#<process-event ", printcharfun); |
1453 } | 1453 } |
1454 | 1454 |
1455 #define CHECK_EVENT_TYPE(e,t1,sym) do { \ | 1455 #define CHECK_EVENT_TYPE(e,t1,sym) do { \ |
1456 CHECK_LIVE_EVENT (e); \ | 1456 CHECK_LIVE_EVENT (e); \ |
1457 if (XEVENT(e)->event_type != (t1)) \ | 1457 if (XEVENT(e)->event_type != (t1)) \ |
1458 e = wrong_type_argument ((sym),(e)); \ | 1458 e = wrong_type_argument (sym,e); \ |
1459 } while (0) | 1459 } while (0) |
1460 | 1460 |
1461 #define CHECK_EVENT_TYPE2(e,t1,t2,sym) do { \ | 1461 #define CHECK_EVENT_TYPE2(e,t1,t2,sym) do { \ |
1462 CHECK_LIVE_EVENT (e); \ | 1462 CHECK_LIVE_EVENT (e); \ |
1463 if (XEVENT(e)->event_type != (t1) && \ | 1463 { \ |
1464 XEVENT(e)->event_type != (t2)) \ | 1464 emacs_event_type CET_type = XEVENT (e)->event_type; \ |
1465 e = wrong_type_argument ((sym),(e)); \ | 1465 if (CET_type != (t1) && \ |
1466 CET_type != (t2)) \ | |
1467 e = wrong_type_argument (sym,e); \ | |
1468 } \ | |
1466 } while (0) | 1469 } while (0) |
1467 | 1470 |
1468 #define CHECK_EVENT_TYPE3(e,t1,t2,t3,sym) do { \ | 1471 #define CHECK_EVENT_TYPE3(e,t1,t2,t3,sym) do { \ |
1469 CHECK_LIVE_EVENT (e); \ | 1472 CHECK_LIVE_EVENT (e); \ |
1470 if (XEVENT(e)->event_type != (t1) && \ | 1473 { \ |
1471 XEVENT(e)->event_type != (t2) && \ | 1474 emacs_event_type CET_type = XEVENT (e)->event_type; \ |
1472 XEVENT(e)->event_type != (t3)) \ | 1475 if (CET_type != (t1) && \ |
1473 e = wrong_type_argument ((sym),(e)); \ | 1476 CET_type != (t2) && \ |
1477 CET_type != (t3)) \ | |
1478 e = wrong_type_argument (sym,e); \ | |
1479 } \ | |
1474 } while (0) | 1480 } while (0) |
1475 | 1481 |
1476 DEFUN ("event-key", Fevent_key, 1, 1, 0, /* | 1482 DEFUN ("event-key", Fevent_key, 1, 1, 0, /* |
1477 Return the Keysym of the key-press event EVENT. | 1483 Return the Keysym of the key-press event EVENT. |
1478 This will be a character if the event is associated with one, else a symbol. | 1484 This will be a character if the event is associated with one, else a symbol. |