1 /* Define scrollbar instance.
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
4 This file is part of SXEmacs
6 SXEmacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 SXEmacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* Synched up with: Not in FSF. */
22 #ifndef INCLUDED_scrollbar_h_
23 #define INCLUDED_scrollbar_h_
25 #ifdef HAVE_SCROLLBARS
27 struct scrollbar_instance {
28 /* Used by the frame caches. */
29 struct scrollbar_instance *next;
31 /* Pointer back to the mirror structure attached to. */
32 struct window_mirror *mirror;
34 /* This flag indicates if the scrollbar is currently in use. */
35 char scrollbar_is_active;
37 /* This flag indicates if a data parameter has changed. */
38 char scrollbar_instance_changed;
40 /* A structure of auxiliary data specific to the device type.
41 struct x_scrollbar_data is used for X window frames; defined in
46 #define SCROLLBAR_INSTANCE_FRAME(inst) (inst->mirror->frame)
48 void init_frame_scrollbars(struct frame *f);
49 void init_device_scrollbars(struct device *d);
50 void init_global_scrollbars(struct device *d);
51 void free_frame_scrollbars(struct frame *f);
52 void release_window_mirror_scrollbars(struct window_mirror *mir);
53 void update_window_scrollbars(struct window *w,
54 struct window_mirror *mirror,
55 int active, int horiz_only);
56 #ifdef MEMORY_USAGE_STATS
57 int compute_scrollbar_instance_usage(struct device *d,
58 struct scrollbar_instance *inst,
59 struct overhead_stats *ovstats);
62 extern Lisp_Object Vscrollbar_width, Vscrollbar_height;
64 extern Lisp_Object Qscrollbar_line_up;
65 extern Lisp_Object Qscrollbar_line_down;
66 extern Lisp_Object Qscrollbar_page_up;
67 extern Lisp_Object Qscrollbar_page_down;
68 extern Lisp_Object Qscrollbar_to_top;
69 extern Lisp_Object Qscrollbar_to_bottom;
70 extern Lisp_Object Qscrollbar_vertical_drag;
72 extern Lisp_Object Qscrollbar_char_left;
73 extern Lisp_Object Qscrollbar_char_right;
74 extern Lisp_Object Qscrollbar_page_left;
75 extern Lisp_Object Qscrollbar_page_right;
76 extern Lisp_Object Qscrollbar_to_left;
77 extern Lisp_Object Qscrollbar_to_right;
78 extern Lisp_Object Qscrollbar_horizontal_drag;
80 #endif /* HAVE_SCROLLBARS */
82 #endif /* INCLUDED_scrollbar_h_ */