1 /* Define Gtk-specific 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 _XEMACS_SCROLLBAR_GTK_H_
23 #define _XEMACS_SCROLLBAR_GTK_H_
25 #if defined (HAVE_GTK) && defined (HAVE_SCROLLBARS)
27 #include "ui/scrollbar.h"
29 typedef struct _scrollbar_values {
39 int scrollbar_width, scrollbar_height;
40 int scrollbar_x, scrollbar_y;
43 struct gtk_scrollbar_data {
44 /* Unique scrollbar identifier and name. */
47 /* Is set if we have already set the backing_store attribute correctly */
48 char backing_store_initialized;
50 /* Positioning and sizing information for scrollbar and slider. */
51 scrollbar_values pos_data;
53 /* Pointer to the scrollbar widget this structure describes. */
58 /* Recorded starting position for Motif-like scrollbar drags. */
60 Bufpos vdrag_orig_window_start;
63 #define SCROLLBAR_GTK_DATA(i) ((struct gtk_scrollbar_data *) ((i)->scrollbar_data))
65 #define SCROLLBAR_GTK_ID(i) (SCROLLBAR_GTK_DATA (i)->id)
66 #define SCROLLBAR_GTK_BACKING_STORE_INITIALIZED(i) \
67 (SCROLLBAR_GTK_DATA (i)->backing_store_initialized)
68 #define SCROLLBAR_GTK_POS_DATA(i) (SCROLLBAR_GTK_DATA (i)->pos_data)
69 #define SCROLLBAR_GTK_WIDGET(i) (SCROLLBAR_GTK_DATA (i)->widget)
70 #define SCROLLBAR_GTK_LAST_VALUE(i) SCROLLBAR_GTK_DATA (i)->last_value
72 #define SCROLLBAR_GTK_VDRAG_ORIG_VALUE(i) \
73 (SCROLLBAR_GTK_DATA (i)->vdrag_orig_value)
74 #define SCROLLBAR_GTK_VDRAG_ORIG_WINDOW_START(i) \
75 (SCROLLBAR_GTK_DATA (i)->vdrag_orig_window_start)
77 void gtk_update_frame_scrollbars(struct frame *f);
78 void gtk_set_scrollbar_pointer(struct frame *f, Lisp_Object cursor);
80 #endif /* HAVE_GDK and HAVE_SCROLLBARS */
81 #endif /* _XEMACS_SCROLLBAR_GTK_H_ */