comparison src/scrollbar.c @ 408:501cfd01ee6d r21-2-34

Import from CVS: tag r21-2-34
author cvs
date Mon, 13 Aug 2007 11:18:11 +0200
parents 2f8bb876ab1d
children 697ef44129c6
comparison
equal deleted inserted replaced
407:ed6218a7d4d3 408:501cfd01ee6d
733 CHECK_LIVE_WINDOW (window); 733 CHECK_LIVE_WINDOW (window);
734 /* Motif and Athena scrollbars behave differently, but in accordance 734 /* Motif and Athena scrollbars behave differently, but in accordance
735 with their standard behaviors. It is not possible to hide the 735 with their standard behaviors. It is not possible to hide the
736 differences down in lwlib because knowledge of XEmacs buffer and 736 differences down in lwlib because knowledge of XEmacs buffer and
737 cursor motion routines is necessary. */ 737 cursor motion routines is necessary. */
738 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ 738
739 defined (LWLIB_SCROLLBARS_ATHENA3D) || defined(HAVE_MS_WINDOWS) 739 if (NILP (XCDR (object)))
740 window_scroll (window, Qnil, -1, ERROR_ME_NOT); 740 window_scroll (window, Qnil, -1, ERROR_ME_NOT);
741 #else /* Athena */ 741 else
742 { 742 {
743 Bufpos bufpos; 743 Bufpos bufpos;
744 Lisp_Object value = Fcdr (object); 744 Lisp_Object value = Fcdr (object);
745 745
746 CHECK_INT (value); 746 CHECK_INT (value);
747 Fmove_to_window_line (Qzero, window); 747 Fmove_to_window_line (Qzero, window);
748 /* can't use Fvertical_motion() because it moves the buffer point 748 /* can't use Fvertical_motion() because it moves the buffer point
749 rather than the window's point. 749 rather than the window's point.
750 750
751 #### It does? Why does it take a window argument then? */ 751 #### It does? Why does it take a window argument then? */
752 bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)), 752 bufpos = vmotion (XWINDOW (window), XINT (Fwindow_point (window)),
753 XINT (value), 0); 753 XINT (value), 0);
754 Fset_window_point (window, make_int (bufpos)); 754 Fset_window_point (window, make_int (bufpos));
755 Fcenter_to_window_line (Qzero, window); 755 Fcenter_to_window_line (Qzero, window);
756 } 756 }
757 #endif /* Athena */ 757
758 zmacs_region_stays = 1; 758 zmacs_region_stays = 1;
759 return Qnil; 759 return Qnil;
760 } 760 }
761 761
762 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /* 762 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /*
774 CHECK_LIVE_WINDOW (window); 774 CHECK_LIVE_WINDOW (window);
775 /* Motif and Athena scrollbars behave differently, but in accordance 775 /* Motif and Athena scrollbars behave differently, but in accordance
776 with their standard behaviors. It is not possible to hide the 776 with their standard behaviors. It is not possible to hide the
777 differences down in lwlib because knowledge of XEmacs buffer and 777 differences down in lwlib because knowledge of XEmacs buffer and
778 cursor motion routines is necessary. */ 778 cursor motion routines is necessary. */
779 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \ 779
780 defined (LWLIB_SCROLLBARS_ATHENA3D) || defined (HAVE_MS_WINDOWS) 780 if (NILP (XCDR (object)))
781 window_scroll (window, Qnil, 1, ERROR_ME_NOT); 781 window_scroll (window, Qnil, 1, ERROR_ME_NOT);
782 #else /* Athena */ 782 else
783 { 783 {
784 Lisp_Object value = Fcdr (object); 784 Lisp_Object value = Fcdr (object);
785 CHECK_INT (value); 785 CHECK_INT (value);
786 Fmove_to_window_line (value, window); 786 Fmove_to_window_line (value, window);
787 Fcenter_to_window_line (Qzero, window); 787 Fcenter_to_window_line (Qzero, window);
788 } 788 }
789 #endif /* Athena */ 789
790 zmacs_region_stays = 1; 790 zmacs_region_stays = 1;
791 return Qnil; 791 return Qnil;
792 } 792 }
793 793
794 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /* 794 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /*