comparison src/scrollbar.c @ 272:c5d627a313b1 r21-0b34

Import from CVS: tag r21-0b34
author cvs
date Mon, 13 Aug 2007 10:28:48 +0200
parents 0e522484dd2a
children 6330739388db
comparison
equal deleted inserted replaced
271:c7b7086b0a39 272:c5d627a313b1
539 { 539 {
540 struct device *d = XDEVICE (f->device); 540 struct device *d = XDEVICE (f->device);
541 541
542 if (HAS_DEVMETH_P (d, create_scrollbar_instance)) 542 if (HAS_DEVMETH_P (d, create_scrollbar_instance))
543 { 543 {
544 Lisp_Object frame = Qnil; 544 Lisp_Object frame;
545
546 XSETFRAME (frame, f); 545 XSETFRAME (frame, f);
547 call_critical_lisp_code (XDEVICE (FRAME_DEVICE (f)), 546 call_critical_lisp_code (XDEVICE (FRAME_DEVICE (f)),
548 Qinit_scrollbar_from_resources, 547 Qinit_scrollbar_from_resources,
549 frame); 548 frame);
550 } 549 }
553 void 552 void
554 init_device_scrollbars (struct device *d) 553 init_device_scrollbars (struct device *d)
555 { 554 {
556 if (HAS_DEVMETH_P (d, create_scrollbar_instance)) 555 if (HAS_DEVMETH_P (d, create_scrollbar_instance))
557 { 556 {
558 Lisp_Object device = Qnil; 557 Lisp_Object device;
559
560 XSETDEVICE (device, d); 558 XSETDEVICE (device, d);
561 call_critical_lisp_code (d, 559 call_critical_lisp_code (d,
562 Qinit_scrollbar_from_resources, 560 Qinit_scrollbar_from_resources,
563 device); 561 device);
564 } 562 }
703 return Qnil; 701 return Qnil;
704 } 702 }
705 703
706 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /* 704 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /*
707 Function called when the user gives the "page-up" scrollbar action. 705 Function called when the user gives the "page-up" scrollbar action.
708 (The way this is done can vary from scrollbar to scrollbar.) One argument, 706 \(The way this is done can vary from scrollbar to scrollbar.) One argument,
709 a cons containing the scrollbar's window and a value (#### document me! 707 a cons containing the scrollbar's window and a value (#### document me!
710 This value is nil for Motif/Lucid scrollbars and a number for Athena 708 This value is nil for Motif/Lucid scrollbars and a number for Athena
711 scrollbars). You can advise this function to change the scrollbar 709 scrollbars). You can advise this function to change the scrollbar
712 behavior. 710 behavior.
713 */ 711 */
744 return Qnil; 742 return Qnil;
745 } 743 }
746 744
747 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /* 745 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /*
748 Function called when the user gives the "page-down" scrollbar action. 746 Function called when the user gives the "page-down" scrollbar action.
749 (The way this is done can vary from scrollbar to scrollbar.) One argument, 747 \(The way this is done can vary from scrollbar to scrollbar.) One argument,
750 a cons containing the scrollbar's window and a value (#### document me! 748 a cons containing the scrollbar's window and a value (#### document me!
751 This value is nil for Motif/Lucid scrollbars and a number for Athena 749 This value is nil for Motif/Lucid scrollbars and a number for Athena
752 scrollbars). You can advise this function to change the scrollbar 750 scrollbars). You can advise this function to change the scrollbar
753 behavior. 751 behavior.
754 */ 752 */
832 zmacs_region_stays = 1; 830 zmacs_region_stays = 1;
833 return Qnil; 831 return Qnil;
834 } 832 }
835 833
836 DEFUN ("scrollbar-set-hscroll", Fscrollbar_set_hscroll, 2, 2, 0, /* 834 DEFUN ("scrollbar-set-hscroll", Fscrollbar_set_hscroll, 2, 2, 0, /*
837 Sets WINDOW's hscroll position to VALUE. 835 Set WINDOW's hscroll position to VALUE.
838 This ensures that VALUE is in the proper range for the horizontal scrollbar. 836 This ensures that VALUE is in the proper range for the horizontal scrollbar.
839 */ 837 */
840 (window, value)) 838 (window, value))
841 { 839 {
842 struct window *w; 840 struct window *w;