annotate src/scrollbar-x.h @ 5084:6afe991b8135

Add a PARSE_KEYWORDS macro, use it in #'make-hash-table. lisp/ChangeLog addition: 2010-03-01 Aidan Kehoe <kehoea@parhasard.net> * cl-seq.el (cl-parsing-keywords): * cl-macs.el (cl-do-arglist): Use the new invalid-keyword-argument error here. src/ChangeLog addition: 2010-03-01 Aidan Kehoe <kehoea@parhasard.net> * lisp.h (PARSE_KEYWORDS): New macro, for parsing keyword arguments from C subrs. * elhash.c (Fmake_hash_table): Use it. * general-slots.h (Q_allow_other_keys): Add this symbol. * eval.c (non_nil_allow_other_keys_p): (invalid_keyword_argument): New functions, called from the keyword argument parsing code. * data.c (init_errors_once_early): Add the new invalid-keyword-argument error here.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 01 Mar 2010 21:05:33 +0000
parents fdefd0186b75
children 308d34e9f07d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 /* Define X-specific scrollbar instance.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 This file is part of XEmacs.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 later version.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 for more details.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
20
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
23 #ifndef INCLUDED_scrollbar_x_h_
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
24 #define INCLUDED_scrollbar_x_h_
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 #if defined (HAVE_X_WINDOWS) && defined (HAVE_SCROLLBARS)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 #include "scrollbar.h"
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 struct x_scrollbar_data
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 {
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 /* Unique scrollbar identifier and name. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 unsigned int id;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 char *name;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 /* Is set if we have already set the backing_store attribute correctly */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 char backing_store_initialized;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 /* Positioning and sizing information for scrollbar and slider. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 scrollbar_values pos_data;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 /* Pointer to the scrollbar widget this structure describes. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 Widget widget;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 defined (LWLIB_SCROLLBARS_ATHENA3D)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 /* Recorded starting position for Motif-like scrollbar drags. */
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 int vdrag_orig_value;
665
fdefd0186b75 [xemacs-hg @ 2001-09-20 06:28:42 by ben]
ben
parents: 440
diff changeset
49 Charbpos vdrag_orig_window_start;
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 };
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 #define SCROLLBAR_X_DATA(i) ((struct x_scrollbar_data *) ((i)->scrollbar_data))
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 #define SCROLLBAR_X_ID(i) (SCROLLBAR_X_DATA (i)->id)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 #define SCROLLBAR_X_NAME(i) (SCROLLBAR_X_DATA (i)->name)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 #define SCROLLBAR_X_BACKING_STORE_INITIALIZED(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58 (SCROLLBAR_X_DATA (i)->backing_store_initialized)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 #define SCROLLBAR_X_POS_DATA(i) (SCROLLBAR_X_DATA (i)->pos_data)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 #define SCROLLBAR_X_WIDGET(i) (SCROLLBAR_X_DATA (i)->widget)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 #if defined (LWLIB_SCROLLBARS_MOTIF) || defined (LWLIB_SCROLLBARS_LUCID) || \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63 defined (LWLIB_SCROLLBARS_ATHENA3D)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 #define SCROLLBAR_X_VDRAG_ORIG_VALUE(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 (SCROLLBAR_X_DATA (i)->vdrag_orig_value)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 #define SCROLLBAR_X_VDRAG_ORIG_WINDOW_START(i) \
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67 (SCROLLBAR_X_DATA (i)->vdrag_orig_window_start)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68 #endif
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 void x_update_frame_scrollbars (struct frame *f);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 void x_set_scrollbar_pointer (struct frame *f, Lisp_Object cursor);
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 #endif /* HAVE_X_WINDOWS and HAVE_SCROLLBARS */
440
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
74
8de8e3f6228a Import from CVS: tag r21-2-28
cvs
parents: 428
diff changeset
75 #endif /* INCLUDED_scrollbar_x_h_ */