Mercurial > emacs
comparison src/macterm.h @ 76092:008b1f6418fd
(x_display_info_for_display): Remove extern.
(SCROLL_BAR_UNPACK, SET_SCROLL_BAR_CONTROL_HANDLE): Don't limit
value to be unpacked to 32-bit on LP64 model.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Fri, 23 Feb 2007 08:26:13 +0000 |
parents | 3d45362f1d38 |
children | 2bb3bf56c28d |
comparison
equal
deleted
inserted
replaced
76091:746a3424769c | 76092:008b1f6418fd |
---|---|
202 one for each element of x_display_list and in the same order. | 202 one for each element of x_display_list and in the same order. |
203 NAME is the name of the frame. | 203 NAME is the name of the frame. |
204 FONT-LIST-CACHE records previous values returned by x-list-fonts. */ | 204 FONT-LIST-CACHE records previous values returned by x-list-fonts. */ |
205 extern Lisp_Object x_display_name_list; | 205 extern Lisp_Object x_display_name_list; |
206 | 206 |
207 extern struct x_display_info *x_display_info_for_display P_ ((Display *)); | |
208 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); | 207 extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); |
209 | 208 |
210 extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *)); | 209 extern struct mac_display_info *mac_term_init P_ ((Lisp_Object, char *, char *)); |
211 | 210 |
212 extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); | 211 extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); |
402 Lisp_Object window; | 401 Lisp_Object window; |
403 | 402 |
404 /* The next and previous in the chain of scroll bars in this frame. */ | 403 /* The next and previous in the chain of scroll bars in this frame. */ |
405 Lisp_Object next, prev; | 404 Lisp_Object next, prev; |
406 | 405 |
407 /* The Mac control handle of this scroll bar. Since this is a full | 406 /* The Mac control handle of this scroll bar. Since this is a |
408 32-bit quantity, we store it split into two 32-bit values. */ | 407 pointer value, we store it split into two Lisp integers. */ |
409 Lisp_Object control_handle_low, control_handle_high; | 408 Lisp_Object control_handle_low, control_handle_high; |
410 | 409 |
411 /* The position and size of the scroll bar in pixels, relative to the | 410 /* The position and size of the scroll bar in pixels, relative to the |
412 frame. */ | 411 frame. */ |
413 Lisp_Object top, left, width, height; | 412 Lisp_Object top, left, width, height; |
425 different co-ordinate system. */ | 424 different co-ordinate system. */ |
426 Lisp_Object start, end; | 425 Lisp_Object start, end; |
427 | 426 |
428 /* If the scroll bar handle is currently being dragged by the user, | 427 /* If the scroll bar handle is currently being dragged by the user, |
429 this is the number of pixels from the top of the handle to the | 428 this is the number of pixels from the top of the handle to the |
430 place where the user grabbed it. If the handle isn't currently | 429 place where the user grabbed it. If the handle is pressed but |
430 not dragged yet, this is a negative integer whose absolute value | |
431 is the number of pixels plus 1. If the handle isn't currently | |
431 being dragged, this is Qnil. */ | 432 being dragged, this is Qnil. */ |
432 Lisp_Object dragging; | 433 Lisp_Object dragging; |
433 | 434 |
434 #ifdef USE_TOOLKIT_SCROLL_BARS | 435 #ifdef USE_TOOLKIT_SCROLL_BARS |
435 /* The position and size of the scroll bar handle track area in | 436 /* The position and size of the scroll bar handle track area in |
446 | 447 |
447 /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ | 448 /* Turning a lisp vector value into a pointer to a struct scroll_bar. */ |
448 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) | 449 #define XSCROLL_BAR(vec) ((struct scroll_bar *) XVECTOR (vec)) |
449 | 450 |
450 | 451 |
451 /* Building a 32-bit C integer from two 16-bit lisp integers. */ | 452 /* Building a C long integer from two lisp integers. */ |
452 #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) | 453 #define SCROLL_BAR_PACK(low, high) (XINT (high) << 16 | XINT (low)) |
453 | 454 |
454 /* Setting two lisp integers to the low and high words of a 32-bit C int. */ | 455 /* Setting two lisp integers to two parts of a C unsigned long. */ |
455 #define SCROLL_BAR_UNPACK(low, high, int32) \ | 456 #define SCROLL_BAR_UNPACK(low, high, ulong) \ |
456 (XSETINT ((low), (int32) & 0xffff), \ | 457 (XSETINT ((low), (ulong) & 0xffff), \ |
457 XSETINT ((high), ((int32) >> 16) & 0xffff)) | 458 XSETINT ((high), (ulong) >> 16)) |
458 | 459 |
459 | 460 |
460 /* Extract the Mac control handle of the scroll bar from a struct | 461 /* Extract the Mac control handle of the scroll bar from a struct |
461 scroll_bar. */ | 462 scroll_bar. */ |
462 #define SCROLL_BAR_CONTROL_HANDLE(ptr) \ | 463 #define SCROLL_BAR_CONTROL_HANDLE(ptr) \ |
463 ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \ | 464 ((ControlHandle) SCROLL_BAR_PACK ((ptr)->control_handle_low, \ |
464 (ptr)->control_handle_high)) | 465 (ptr)->control_handle_high)) |
465 | 466 |
466 /* Store a Mac control handle in a struct scroll_bar. */ | 467 /* Store a Mac control handle in a struct scroll_bar. */ |
467 #define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, id) \ | 468 #define SET_SCROLL_BAR_CONTROL_HANDLE(ptr, handle) \ |
468 (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ | 469 (SCROLL_BAR_UNPACK ((ptr)->control_handle_low, \ |
469 (ptr)->control_handle_high, (int) id)) | 470 (ptr)->control_handle_high, (unsigned long) (handle))) |
470 | 471 |
471 /* Return the inside width of a vertical scroll bar, given the outside | 472 /* Return the inside width of a vertical scroll bar, given the outside |
472 width. */ | 473 width. */ |
473 #define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \ | 474 #define VERTICAL_SCROLL_BAR_INSIDE_WIDTH(f, width) \ |
474 ((width) \ | 475 ((width) \ |