Mercurial > hg > xemacs-beta
comparison src/scrollbar.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | a145efe76779 |
children | 12579d965149 |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
166 static struct scrollbar_instance * | 166 static struct scrollbar_instance * |
167 create_scrollbar_instance (struct frame *f, int vertical) | 167 create_scrollbar_instance (struct frame *f, int vertical) |
168 { | 168 { |
169 struct device *d = XDEVICE (f->device); | 169 struct device *d = XDEVICE (f->device); |
170 struct scrollbar_instance *instance = | 170 struct scrollbar_instance *instance = |
171 (struct scrollbar_instance *) xmalloc (sizeof (*instance)); | 171 xnew_and_zero (struct scrollbar_instance); |
172 | 172 |
173 memset (instance, 0, sizeof (*instance)); | |
174 MAYBE_DEVMETH (d, create_scrollbar_instance, (f, vertical, instance)); | 173 MAYBE_DEVMETH (d, create_scrollbar_instance, (f, vertical, instance)); |
175 | 174 |
176 return instance; | 175 return instance; |
177 } | 176 } |
178 | 177 |
703 zmacs_region_stays = 1; | 702 zmacs_region_stays = 1; |
704 return Qnil; | 703 return Qnil; |
705 } | 704 } |
706 | 705 |
707 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /* | 706 DEFUN ("scrollbar-page-up", Fscrollbar_page_up, 1, 1, 0, /* |
708 Function called when the user gives the \"page-up\" scrollbar action. | 707 Function called when the user gives the "page-up" scrollbar action. |
709 (The way this is done can vary from scrollbar to scrollbar.) One argument, | 708 (The way this is done can vary from scrollbar to scrollbar.) One argument, |
710 a cons containing the scrollbar's window and a value (#### document me! | 709 a cons containing the scrollbar's window and a value (#### document me! |
711 This value is nil for Motif/Lucid scrollbars and a number for Athena | 710 This value is nil for Motif/Lucid scrollbars and a number for Athena |
712 scrollbars). You can advise this function to change the scrollbar | 711 scrollbars). You can advise this function to change the scrollbar |
713 behavior. | 712 behavior. |
744 zmacs_region_stays = 1; | 743 zmacs_region_stays = 1; |
745 return Qnil; | 744 return Qnil; |
746 } | 745 } |
747 | 746 |
748 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /* | 747 DEFUN ("scrollbar-page-down", Fscrollbar_page_down, 1, 1, 0, /* |
749 Function called when the user gives the \"page-down\" scrollbar action. | 748 Function called when the user gives the "page-down" scrollbar action. |
750 (The way this is done can vary from scrollbar to scrollbar.) One argument, | 749 (The way this is done can vary from scrollbar to scrollbar.) One argument, |
751 a cons containing the scrollbar's window and a value (#### document me! | 750 a cons containing the scrollbar's window and a value (#### document me! |
752 This value is nil for Motif/Lucid scrollbars and a number for Athena | 751 This value is nil for Motif/Lucid scrollbars and a number for Athena |
753 scrollbars). You can advise this function to change the scrollbar | 752 scrollbars). You can advise this function to change the scrollbar |
754 behavior. | 753 behavior. |
776 zmacs_region_stays = 1; | 775 zmacs_region_stays = 1; |
777 return Qnil; | 776 return Qnil; |
778 } | 777 } |
779 | 778 |
780 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /* | 779 DEFUN ("scrollbar-to-top", Fscrollbar_to_top, 1, 1, 0, /* |
781 Function called when the user invokes the \"to-top\" scrollbar action. | 780 Function called when the user invokes the "to-top" scrollbar action. |
782 The way this is done can vary from scrollbar to scrollbar, but | 781 The way this is done can vary from scrollbar to scrollbar, but |
783 C-button1 on the up-arrow is very common. One argument, the | 782 C-button1 on the up-arrow is very common. One argument, the |
784 scrollbar's window. You can advise this function to change the | 783 scrollbar's window. You can advise this function to change the |
785 scrollbar behavior. | 784 scrollbar behavior. |
786 */ | 785 */ |
793 zmacs_region_stays = 1; | 792 zmacs_region_stays = 1; |
794 return Qnil; | 793 return Qnil; |
795 } | 794 } |
796 | 795 |
797 DEFUN ("scrollbar-to-bottom", Fscrollbar_to_bottom, 1, 1, 0, /* | 796 DEFUN ("scrollbar-to-bottom", Fscrollbar_to_bottom, 1, 1, 0, /* |
798 Function called when the user invokes the \"to-bottom\" scrollbar action. | 797 Function called when the user invokes the "to-bottom" scrollbar action. |
799 The way this is done can vary from scrollbar to scrollbar, but | 798 The way this is done can vary from scrollbar to scrollbar, but |
800 C-button1 on the down-arrow is very common. One argument, the | 799 C-button1 on the down-arrow is very common. One argument, the |
801 scrollbar's window. You can advise this function to change the | 800 scrollbar's window. You can advise this function to change the |
802 scrollbar behavior. | 801 scrollbar behavior. |
803 */ | 802 */ |
883 defsymbol (&Qscrollbar_page_up, "scrollbar-page-up"); | 882 defsymbol (&Qscrollbar_page_up, "scrollbar-page-up"); |
884 defsymbol (&Qscrollbar_page_down, "scrollbar-page-down"); | 883 defsymbol (&Qscrollbar_page_down, "scrollbar-page-down"); |
885 defsymbol (&Qscrollbar_to_top, "scrollbar-to-top"); | 884 defsymbol (&Qscrollbar_to_top, "scrollbar-to-top"); |
886 defsymbol (&Qscrollbar_to_bottom, "scrollbar-to-bottom"); | 885 defsymbol (&Qscrollbar_to_bottom, "scrollbar-to-bottom"); |
887 defsymbol (&Qscrollbar_vertical_drag, "scrollbar-vertical-drag"); | 886 defsymbol (&Qscrollbar_vertical_drag, "scrollbar-vertical-drag"); |
888 | 887 |
889 defsymbol (&Qscrollbar_char_left, "scrollbar-char-left"); | 888 defsymbol (&Qscrollbar_char_left, "scrollbar-char-left"); |
890 defsymbol (&Qscrollbar_char_right, "scrollbar-char-right"); | 889 defsymbol (&Qscrollbar_char_right, "scrollbar-char-right"); |
891 defsymbol (&Qscrollbar_page_left, "scrollbar-page-left"); | 890 defsymbol (&Qscrollbar_page_left, "scrollbar-page-left"); |
892 defsymbol (&Qscrollbar_page_right, "scrollbar-page-right"); | 891 defsymbol (&Qscrollbar_page_right, "scrollbar-page-right"); |
893 defsymbol (&Qscrollbar_to_left, "scrollbar-to-left"); | 892 defsymbol (&Qscrollbar_to_left, "scrollbar-to-left"); |