This patch:
1. fixes the mswindows build problem
2. Implements a new function Fprovide_on_console which can be used to
specify that a particular feature is available on a particular
console-type. featurep has been extended to check this information based on
the console you are on. i.e if you are on a mswindows console and
(featurep 'bmp) will return t. But runing the same executable x will return
nil in this instance.
3. Changed some of the widget glyph names to be more meaningful.
I will apply this to cvs.
andy
1999-06-29 Andy Piper <andy(a)xemacs.org>
* event-msw.c: fix definition booboo.
1999-06-28 Andy Piper <andy(a)xemacs.org>
* glyphs-x.c: change tree -> tree-view, progress ->
progress_gauge, edit -> edit-field, tab -> tab-control, combo ->
combo-box.
(complex_vars_of_glyphs_x): provide-on-console the implemented
widget types.
* glyphs-msw.c: ditto.
(complex_vars_of_glyphs_mswindows): ditto.
* lisp.h: add Fprovide_on_console.
* fns.c (Ffeaturep): add extra optional console argument.
(Fprovide_on_console): like Fprovide but provides only on the
specified console-type.
(Frequire): check console-features as well as global features.
* console.c (Fconsole_features): new function. return features for
this console.
(syms_of_console): add Fconsole_features.
* console.h (CONMETH_FEATURES): new function for accessing features.
(CONSOLE_FEATURES): ditto.
(struct console_methods): add features slot.
(INITIALIZE_CONSOLE_TYPE): initialize features slot.
? munge.awk
? Root
? tmp
? tst
? wid.patch
? wid2.patch
? wid3.patch
? etc/ChangeLog
? lib-src/run.res
? lisp/.emacs_andyp
? lisp/msw-faces.el.fm
? lisp/mule
? lisp/prim
? lisp/x-font-menu.el.dist
? lisp/x-font-menu.el.fm
? man/internals/patch.exe.core
? modules/ChangeLog
? nt/Addtargetscheckandcheck-temacstoxemacsmakremovemule-c.txt
? nt/Installation
? nt/obj
? nt/puresize-adjust.h
? nt/xemacs.mak+
? nt/xemacs95.mak
? src/depend.tmp
? src/l
? src/mkdc
? src/t.c
? src/TDOC
? src/temacs.exe.core
? src/tstdoc
? src/weblogic.log
? src/winsup
? src/xstrace.gz
Index: CHANGES-beta
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/CHANGES-beta,v
retrieving revision 1.153.2.62
diff -u -r1.153.2.62 CHANGES-beta
--- CHANGES-beta 1999/06/25 14:16:40 1.153.2.62
+++ CHANGES-beta 1999/06/29 14:23:00
@@ -1,5 +1,6 @@
-*- indented-text -*-
to 21.2.18 "Toshima"
+-- console features implementation from Andy Piper.
-- glyph widget support under X/Motif from Andy Piper
-- Make docdir configurable, update package searching rules from Michael
Sperber
Index: src/conslots.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/conslots.h,v
retrieving revision 1.3.2.2
diff -u -r1.3.2.2 conslots.h
--- src/conslots.h 1999/06/28 16:15:55 1.3.2.2
+++ src/conslots.h 1999/06/29 14:23:35
@@ -93,7 +93,4 @@
Initialized by the terminal-specific lisp files. */
MARKED_SLOT (function_key_map);
- /* Console-specific features */
- MARKED_SLOT (features);
-
Index: src/console.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/console.c,v
retrieving revision 1.17.2.3
diff -u -r1.17.2.3 console.c
--- src/console.c 1999/06/22 18:02:50 1.17.2.3
+++ src/console.c 1999/06/29 14:23:40
@@ -781,6 +781,14 @@
return !EQ (type, Qtty) && !EQ (type, Qstream) ? Qt : Qnil;
}
+DEFUN ("console-features", Fconsole_features, 0, 1, 0, /*
+Return a list of console-specific features.
+*/
+ (console))
+{
+ return CONSOLE_FEATURES (decode_console (console));
+}
+
/**********************************************************************/
@@ -1079,6 +1087,7 @@
DEFSUBR (Fconsole_enable_input);
DEFSUBR (Fconsole_disable_input);
DEFSUBR (Fconsole_on_window_system_p);
+ DEFSUBR (Fconsole_features);
DEFSUBR (Fsuspend_console);
DEFSUBR (Fresume_console);
Index: src/console.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/console.h,v
retrieving revision 1.22.2.5
diff -u -r1.22.2.5 console.h
--- src/console.h 1999/06/28 16:15:55 1.22.2.5
+++ src/console.h 1999/06/29 14:23:40
@@ -272,6 +272,9 @@
/* dialog methods */
void (*popup_dialog_box_method) (struct frame *, Lisp_Object dbox_desc);
#endif
+
+ /* Console-specific features */
+ Lisp_Object features;
};
/*
@@ -283,7 +286,9 @@
#define CONSOLE_TYPE_NAME(c) ((c)->conmeths->name)
#define CONSOLE_TYPE(c) ((c)->conmeths->symbol)
+#define CONSOLE_FEATURES(c) ((c)->conmeths->features)
#define CONMETH_TYPE(meths) ((meths)->symbol)
+#define CONMETH_FEATURES(c) ((meths)->features)
/******** Accessing / calling a console method *********/
@@ -349,6 +354,8 @@
add_entry_to_console_type_list (Q##type, type##_console_methods); \
type##_console_methods->image_conversion_list = Qnil; \
staticpro (&type##_console_methods->image_conversion_list); \
+ type##_console_methods->features = Qnil; \
+ staticpro (&type##_console_methods->features); \
} while (0)
/* Declare that console-type TYPE has method M; used in
@@ -528,7 +535,6 @@
DEVICE_SELECTED_FRAME (XDEVICE ((con)->selected_device))
#define CONSOLE_LAST_NONMINIBUF_FRAME(con) NON_LVALUE ((con)->last_nonminibuf_frame)
#define CONSOLE_QUIT_CHAR(con) ((con)->quit_char)
-#define CONSOLE_FEATURES(con) ((con)->features)
#define CDFW_CONSOLE(obj) \
(WINDOWP (obj) ? WINDOW_CONSOLE (XWINDOW (obj)) \
Index: src/event-msw.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/event-msw.c,v
retrieving revision 1.38.2.13
diff -u -r1.38.2.13 event-msw.c
--- src/event-msw.c 1999/06/28 16:15:56 1.38.2.13
+++ src/event-msw.c 1999/06/29 14:23:52
@@ -72,7 +72,7 @@
#include <io.h>
#include <errno.h>
-#ifndef CYGWIN_VERSION_DLL_MAJOR
+#if defined (__CYGWIN32__) && !defined (CYGWIN_VERSION_DLL_MAJOR)
typedef struct tagNMHDR {
HWND hwndFrom;
UINT idFrom;
Index: src/fns.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/fns.c,v
retrieving revision 1.30.2.16
diff -u -r1.30.2.16 fns.c
--- src/fns.c 1999/06/22 18:02:55 1.30.2.16
+++ src/fns.c 1999/06/29 14:24:00
@@ -3231,7 +3231,7 @@
Lisp_Object Vfeatures;
-DEFUN ("featurep", Ffeaturep, 1, 1, 0, /*
+DEFUN ("featurep", Ffeaturep, 1, 2, 0, /*
Return non-nil if feature FEXP is present in this Emacs.
Use this to conditionalize execution of lisp code based on the
presence or absence of emacs or environment extensions.
@@ -3266,7 +3266,7 @@
for supporting multiple Emacs variants, lobby Richard Stallman at
<bug-gnu-emacs(a)prep.ai.mit.edu>.
*/
- (fexp))
+ (fexp, console))
{
#ifndef FEATUREP_SYNTAX
CHECK_SYMBOL (fexp);
@@ -3278,7 +3278,11 @@
if (SYMBOLP (fexp))
{
/* Original definition */
- return NILP (Fmemq (fexp, Vfeatures)) ? Qnil : Qt;
+ return (NILP (Fmemq (fexp, Vfeatures))
+ &&
+ NILP (Fmemq (fexp,
+ CONSOLE_FEATURES (decode_console (console)))))
+ ? Qnil : Qt;
}
else if (INTP (fexp) || FLOATP (fexp))
{
@@ -3347,6 +3351,7 @@
CHECK_SYMBOL (feature);
if (!NILP (Vautoload_queue))
Vautoload_queue = Fcons (Fcons (Vfeatures, Qnil), Vautoload_queue);
+
tem = Fmemq (feature, Vfeatures);
if (NILP (tem))
Vfeatures = Fcons (feature, Vfeatures);
@@ -3354,6 +3359,38 @@
return feature;
}
+DEFUN ("provide-on-console", Fprovide_on_console, 2, 2, 0, /*
+Announce that FEATURE is a feature of the current Emacs.
+This function updates the value of `console-features' for the provided CONSOLE.
+*/
+ (feature, console))
+{
+ Lisp_Object tem;
+ CHECK_SYMBOL (feature);
+
+ if (SYMBOLP (console))
+ {
+ struct console_methods* meths = decode_console_type (console, ERROR_ME);
+
+ tem = Fmemq (feature, CONMETH_FEATURES (meths));
+ if (NILP (tem))
+ CONMETH_FEATURES (meths) =
+ Fcons (feature, CONMETH_FEATURES (meths));
+ }
+ else
+ {
+ struct console* pconsole;
+ CHECK_CONSOLE (console);
+
+ pconsole = decode_console (console);
+ tem = Fmemq (feature, CONSOLE_FEATURES (pconsole));
+ if (NILP (tem))
+ CONSOLE_FEATURES (pconsole) =
+ Fcons (feature, CONSOLE_FEATURES (pconsole));
+ }
+ return feature;
+}
+
DEFUN ("require", Frequire, 1, 2, 0, /*
If feature FEATURE is not loaded, load it from FILENAME.
If FEATURE is not a member of the list `features', then the feature
@@ -3366,7 +3403,10 @@
CHECK_SYMBOL (feature);
tem = Fmemq (feature, Vfeatures);
LOADHIST_ATTACH (Fcons (Qrequire, feature));
- if (!NILP (tem))
+ if (!NILP (tem)
+ ||
+ !NILP (Fmemq (feature, CONSOLE_FEATURES
+ (XCONSOLE (Fselected_console ())))))
return feature;
else
{
@@ -3877,6 +3917,7 @@
DEFSUBR (Ffeaturep);
DEFSUBR (Frequire);
DEFSUBR (Fprovide);
+ DEFSUBR (Fprovide_on_console);
DEFSUBR (Fbase64_encode_region);
DEFSUBR (Fbase64_encode_string);
DEFSUBR (Fbase64_decode_region);
Index: src/glyphs-msw.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-msw.c,v
retrieving revision 1.21.2.16
diff -u -r1.21.2.16 glyphs-msw.c
--- src/glyphs-msw.c 1999/06/28 16:15:56 1.21.2.16
+++ src/glyphs-msw.c 1999/06/29 14:24:05
@@ -61,7 +61,7 @@
DEFINE_DEVICE_IIFORMAT (mswindows, xface);
#endif
DEFINE_DEVICE_IIFORMAT (mswindows, button);
-DEFINE_DEVICE_IIFORMAT (mswindows, edit);
+DEFINE_DEVICE_IIFORMAT (mswindows, edit_field);
#if 0
DEFINE_DEVICE_IIFORMAT (mswindows, group);
#endif
@@ -69,10 +69,10 @@
DEFINE_DEVICE_IIFORMAT (mswindows, widget);
DEFINE_DEVICE_IIFORMAT (mswindows, label);
DEFINE_DEVICE_IIFORMAT (mswindows, scrollbar);
-DEFINE_DEVICE_IIFORMAT (mswindows, combo);
-DEFINE_DEVICE_IIFORMAT (mswindows, progress);
-DEFINE_DEVICE_IIFORMAT (mswindows, tree);
-DEFINE_DEVICE_IIFORMAT (mswindows, tab);
+DEFINE_DEVICE_IIFORMAT (mswindows, combo_box);
+DEFINE_DEVICE_IIFORMAT (mswindows, progress_gauge);
+DEFINE_DEVICE_IIFORMAT (mswindows, tree_view);
+DEFINE_DEVICE_IIFORMAT (mswindows, tab_control);
DEFINE_IMAGE_INSTANTIATOR_FORMAT (bmp);
Lisp_Object Qbmp;
@@ -2319,7 +2319,7 @@
/* instantiate an edit control */
static void
-mswindows_edit_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+mswindows_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2332,7 +2332,7 @@
/* instantiate a progress gauge */
static void
-mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+mswindows_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2431,7 +2431,7 @@
}
static void
-mswindows_tree_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+mswindows_tree_view_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2509,7 +2509,7 @@
}
static void
-mswindows_tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+mswindows_tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2572,7 +2572,7 @@
/* instantiate a combo control */
static void
-mswindows_combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+mswindows_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2645,7 +2645,7 @@
/* get properties of a combo box */
static Lisp_Object
-mswindows_combo_property (Lisp_Object image_instance, Lisp_Object prop)
+mswindows_combo_box_property (Lisp_Object image_instance, Lisp_Object prop)
{
struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
HANDLE wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
@@ -2682,7 +2682,7 @@
/* set the properties of a progres guage */
static Lisp_Object
-mswindows_progress_set_property (Lisp_Object image_instance, Lisp_Object prop,
+mswindows_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
Lisp_Object val)
{
struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
@@ -2744,8 +2744,8 @@
IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
- INITIALIZE_DEVICE_IIFORMAT (mswindows, edit);
- IIFORMAT_HAS_DEVMETHOD (mswindows, edit, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, edit_field);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, edit_field, instantiate);
INITIALIZE_DEVICE_IIFORMAT (mswindows, subwindow);
IIFORMAT_HAS_DEVMETHOD (mswindows, subwindow, instantiate);
@@ -2762,27 +2762,27 @@
IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate);
/* combo box */
- INITIALIZE_DEVICE_IIFORMAT (mswindows, combo);
- IIFORMAT_HAS_DEVMETHOD (mswindows, combo, property);
- IIFORMAT_HAS_DEVMETHOD (mswindows, combo, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, combo_box);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, property);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, combo_box, instantiate);
/* scrollbar */
INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar);
IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate);
/* progress gauge */
- INITIALIZE_DEVICE_IIFORMAT (mswindows, progress);
- IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);
- IIFORMAT_HAS_DEVMETHOD (mswindows, progress, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, progress_gauge);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, set_property);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, progress_gauge, instantiate);
/* tree view widget */
- INITIALIZE_DEVICE_IIFORMAT (mswindows, tree);
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, tree_view);
/* IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);*/
- IIFORMAT_HAS_DEVMETHOD (mswindows, tree, instantiate);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, tree_view, instantiate);
/* tab control widget */
- INITIALIZE_DEVICE_IIFORMAT (mswindows, tab);
- IIFORMAT_HAS_DEVMETHOD (mswindows, tab, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (mswindows, tab_control);
+ IIFORMAT_HAS_DEVMETHOD (mswindows, tab_control, instantiate);
/* windows bitmap format */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
@@ -2812,25 +2812,24 @@
void
vars_of_glyphs_mswindows (void)
{
- Fprovide (Qbmp);
- Fprovide (Qmswindows_resource);
DEFVAR_LISP ("mswindows-bitmap-file-path", &Vmswindows_bitmap_file_path /*
A list of the directories in which mswindows bitmap files may be found.
This is used by the `make-image-instance' function.
*/ );
Vmswindows_bitmap_file_path = Qnil;
-
- Fprovide (Qbutton);
- Fprovide (Qedit);
- Fprovide (Qcombo);
- Fprovide (Qscrollbar);
- Fprovide (Qlabel);
- Fprovide (Qprogress);
- Fprovide (Qtree);
- Fprovide (Qtab);
}
void
complex_vars_of_glyphs_mswindows (void)
{
+ Fprovide_on_console (Qbmp, Qmswindows);
+ Fprovide_on_console (Qmswindows_resource, Qmswindows);
+ Fprovide_on_console (Qbutton, Qmswindows);
+ Fprovide_on_console (Qedit_field, Qmswindows);
+ Fprovide_on_console (Qcombo_box, Qmswindows);
+ Fprovide_on_console (Qscrollbar, Qmswindows);
+ Fprovide_on_console (Qlabel, Qmswindows);
+ Fprovide_on_console (Qprogress_gauge, Qmswindows);
+ Fprovide_on_console (Qtree_view, Qmswindows);
+ Fprovide_on_console (Qtab_control, Qmswindows);
}
Index: src/glyphs-widget.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/Attic/glyphs-widget.c,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 glyphs-widget.c
--- src/glyphs-widget.c 1999/06/13 21:45:14 1.1.2.5
+++ src/glyphs-widget.c 1999/06/29 14:24:07
@@ -38,10 +38,10 @@
#include "opaque.h"
DEFINE_IMAGE_INSTANTIATOR_FORMAT (button);
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (combo);
-Lisp_Object Qcombo;
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (edit);
-Lisp_Object Qedit;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (combo_box);
+Lisp_Object Qcombo_box;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (edit_field);
+Lisp_Object Qedit_field;
DEFINE_IMAGE_INSTANTIATOR_FORMAT (scrollbar);
Lisp_Object Qscrollbar;
DEFINE_IMAGE_INSTANTIATOR_FORMAT (widget);
@@ -51,12 +51,12 @@
#endif
DEFINE_IMAGE_INSTANTIATOR_FORMAT (label);
Lisp_Object Qlabel;
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress);
-Lisp_Object Qprogress;
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree);
-Lisp_Object Qtree;
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab);
-Lisp_Object Qtab;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge);
+Lisp_Object Qprogress_gauge;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree_view);
+Lisp_Object Qtree_view;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab_control);
+Lisp_Object Qtab_control;
Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items;
Lisp_Object Q_image, Q_text, Q_percent;
@@ -187,7 +187,7 @@
the instances. This is encoded in the widget type
field. widget_property gets invoked by decoding the primary type
(Qwidget), widget property then invokes based on the secondary type
- (Qedit for example). It is debatable that we should wire things in this
+ (Qedit_field for example). It is debatable that we should wire things in this
generalised way rather than treating widgets specially in
image_instance_property. */
static Lisp_Object
@@ -270,7 +270,7 @@
}
static void
-combo_validate (Lisp_Object instantiator)
+combo_box_validate (Lisp_Object instantiator)
{
widget_validate (instantiator);
if (NILP (find_keyword_in_vector (instantiator, Q_properties)))
@@ -434,7 +434,7 @@
/* combo-box generic instantiation - get he heigh right */
static void
-combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -447,7 +447,7 @@
}
static void
-tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+tab_control_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -541,25 +541,25 @@
VALID_GUI_KEYWORDS (button);
/* edit fields */
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit, "edit");
- IIFORMAT_HAS_SHARED_METHOD (edit, validate, widget);
- IIFORMAT_HAS_SHARED_METHOD (edit, possible_dest_types, widget);
- IIFORMAT_HAS_SHARED_METHOD (edit, instantiate, widget);
- VALID_WIDGET_KEYWORDS (edit);
- VALID_GUI_KEYWORDS (edit);
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (edit_field, "edit-field");
+ IIFORMAT_HAS_SHARED_METHOD (edit_field, validate, widget);
+ IIFORMAT_HAS_SHARED_METHOD (edit_field, possible_dest_types, widget);
+ IIFORMAT_HAS_SHARED_METHOD (edit_field, instantiate, widget);
+ VALID_WIDGET_KEYWORDS (edit_field);
+ VALID_GUI_KEYWORDS (edit_field);
/* combo box */
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo, "combo");
- IIFORMAT_HAS_METHOD (combo, validate);
- IIFORMAT_HAS_SHARED_METHOD (combo, possible_dest_types, widget);
- IIFORMAT_HAS_METHOD (combo, instantiate);
- VALID_GUI_KEYWORDS (combo);
-
- IIFORMAT_VALID_KEYWORD (combo, Q_width, check_valid_int);
- IIFORMAT_VALID_KEYWORD (combo, Q_height, check_valid_int);
- IIFORMAT_VALID_KEYWORD (combo, Q_pixel_width, check_valid_int);
- IIFORMAT_VALID_KEYWORD (combo, Q_face, check_valid_face);
- IIFORMAT_VALID_KEYWORD (combo, Q_properties, check_valid_item_list);
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (combo_box, "combo-box");
+ IIFORMAT_HAS_METHOD (combo_box, validate);
+ IIFORMAT_HAS_SHARED_METHOD (combo_box, possible_dest_types, widget);
+ IIFORMAT_HAS_METHOD (combo_box, instantiate);
+ VALID_GUI_KEYWORDS (combo_box);
+
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_width, check_valid_int);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_height, check_valid_int);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_pixel_width, check_valid_int);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_face, check_valid_face);
+ IIFORMAT_VALID_KEYWORD (combo_box, Q_properties, check_valid_item_list);
/* scrollbar */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (scrollbar, "scrollbar");
@@ -573,30 +573,30 @@
IIFORMAT_VALID_KEYWORD (scrollbar, Q_face, check_valid_face);
/* progress guage */
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress, "progress");
- IIFORMAT_HAS_SHARED_METHOD (progress, validate, widget);
- IIFORMAT_HAS_SHARED_METHOD (progress, possible_dest_types, widget);
- IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, combo);
- VALID_WIDGET_KEYWORDS (progress);
- VALID_GUI_KEYWORDS (progress);
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress_gauge, "progress-gauge");
+ IIFORMAT_HAS_SHARED_METHOD (progress_gauge, validate, widget);
+ IIFORMAT_HAS_SHARED_METHOD (progress_gauge, possible_dest_types, widget);
+ IIFORMAT_HAS_SHARED_METHOD (progress_gauge, instantiate, combo_box);
+ VALID_WIDGET_KEYWORDS (progress_gauge);
+ VALID_GUI_KEYWORDS (progress_gauge);
/* tree view */
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree, "tree");
- IIFORMAT_HAS_SHARED_METHOD (tree, validate, combo);
- IIFORMAT_HAS_SHARED_METHOD (tree, possible_dest_types, widget);
- IIFORMAT_HAS_SHARED_METHOD (tree, instantiate, combo);
- VALID_WIDGET_KEYWORDS (tree);
- VALID_GUI_KEYWORDS (tree);
- IIFORMAT_VALID_KEYWORD (tree, Q_properties, check_valid_item_list);
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree_view, "tree-view");
+ IIFORMAT_HAS_SHARED_METHOD (tree_view, validate, combo_box);
+ IIFORMAT_HAS_SHARED_METHOD (tree_view, possible_dest_types, widget);
+ IIFORMAT_HAS_SHARED_METHOD (tree_view, instantiate, combo_box);
+ VALID_WIDGET_KEYWORDS (tree_view);
+ VALID_GUI_KEYWORDS (tree_view);
+ IIFORMAT_VALID_KEYWORD (tree_view, Q_properties, check_valid_item_list);
/* tab control */
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab, "tab");
- IIFORMAT_HAS_SHARED_METHOD (tab, validate, combo);
- IIFORMAT_HAS_SHARED_METHOD (tab, possible_dest_types, widget);
- IIFORMAT_HAS_METHOD (tab, instantiate);
- VALID_WIDGET_KEYWORDS (tab);
- VALID_GUI_KEYWORDS (tab);
- IIFORMAT_VALID_KEYWORD (tab, Q_properties, check_valid_item_list);
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab_control, "tab-control");
+ IIFORMAT_HAS_SHARED_METHOD (tab_control, validate, combo_box);
+ IIFORMAT_HAS_SHARED_METHOD (tab_control, possible_dest_types, widget);
+ IIFORMAT_HAS_METHOD (tab_control, instantiate);
+ VALID_WIDGET_KEYWORDS (tab_control);
+ VALID_GUI_KEYWORDS (tab_control);
+ IIFORMAT_VALID_KEYWORD (tab_control, Q_properties, check_valid_item_list);
/* labels */
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
Index: src/glyphs-x.c
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.49.2.10
diff -u -r1.49.2.10 glyphs-x.c
--- src/glyphs-x.c 1999/06/28 16:15:57 1.49.2.10
+++ src/glyphs-x.c 1999/06/29 14:24:10
@@ -107,9 +107,9 @@
DEFINE_DEVICE_IIFORMAT (x, widget);
DEFINE_DEVICE_IIFORMAT (x, button);
-DEFINE_DEVICE_IIFORMAT (x, progress);
-DEFINE_DEVICE_IIFORMAT (x, edit);
-DEFINE_DEVICE_IIFORMAT (x, combo);
+DEFINE_DEVICE_IIFORMAT (x, progress_gauge);
+DEFINE_DEVICE_IIFORMAT (x, edit_field);
+DEFINE_DEVICE_IIFORMAT (x, combo_box);
static void cursor_font_instantiate (Lisp_Object image_instance,
Lisp_Object instantiator,
@@ -2300,7 +2300,7 @@
/* instantiate a progress gauge */
static void
-x_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+x_progress_gauge_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2316,7 +2316,7 @@
/* set the properties of a progres guage */
static Lisp_Object
-x_progress_set_property (Lisp_Object image_instance, Lisp_Object prop,
+x_progress_gauge_set_property (Lisp_Object image_instance, Lisp_Object prop,
Lisp_Object val)
{
struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
@@ -2334,7 +2334,7 @@
/* instantiate an edit control */
static void
-x_edit_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+x_edit_field_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2350,7 +2350,7 @@
/* instantiate a combo control */
static void
-x_combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+x_combo_box_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
Lisp_Object pointer_fg, Lisp_Object pointer_bg,
int dest_mask, Lisp_Object domain)
{
@@ -2430,15 +2430,15 @@
IIFORMAT_HAS_DEVMETHOD (x, widget, property);
IIFORMAT_HAS_DEVMETHOD (x, widget, set_property);
/* progress gauge */
- INITIALIZE_DEVICE_IIFORMAT (x, progress);
- IIFORMAT_HAS_DEVMETHOD (x, progress, set_property);
- IIFORMAT_HAS_DEVMETHOD (x, progress, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (x, progress_gauge);
+ IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, set_property);
+ IIFORMAT_HAS_DEVMETHOD (x, progress_gauge, instantiate);
/* text field */
- INITIALIZE_DEVICE_IIFORMAT (x, edit);
- IIFORMAT_HAS_DEVMETHOD (x, edit, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (x, edit_field);
+ IIFORMAT_HAS_DEVMETHOD (x, edit_field, instantiate);
/* combo box */
- INITIALIZE_DEVICE_IIFORMAT (x, combo);
- IIFORMAT_HAS_DEVMETHOD (x, combo, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (x, combo_box);
+ IIFORMAT_HAS_DEVMETHOD (x, combo_box, instantiate);
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
@@ -2486,11 +2486,6 @@
the environment variable XBMLANGPATH is set, it is consulted first).
*/ );
Vx_bitmap_file_path = Qnil;
-
- Fprovide (Qbutton);
- Fprovide (Qedit);
- Fprovide (Qprogress);
- /* Fprovide (Qcombo);*/
}
void
@@ -2513,4 +2508,8 @@
BUILD_GLYPH_INST (Vhscroll_glyph, hscroll);
#undef BUILD_GLYPH_INST
+ Fprovide_on_console (Qbutton, Qx);
+ Fprovide_on_console (Qedit_field, Qx);
+ Fprovide_on_console (Qprogress_gauge, Qx);
+ /* Fprovide (Qcombo_box);*/
}
Index: src/glyphs.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/glyphs.h,v
retrieving revision 1.18.2.11
diff -u -r1.18.2.11 glyphs.h
--- src/glyphs.h 1999/06/13 21:45:14 1.18.2.11
+++ src/glyphs.h 1999/06/29 14:24:13
@@ -624,8 +624,8 @@
extern Lisp_Object Qxpm, Qxface;
extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
-extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress;
-extern Lisp_Object Qtree, Qtab;
+extern Lisp_Object Qxbm, Qedit_field, Qgroup, Qlabel, Qcombo_box, Qscrollbar;
+extern Lisp_Object Qtree_view, Qtab_control, Qprogress_gauge;
extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
Index: src/lisp.h
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.38.2.15
diff -u -r1.38.2.15 lisp.h
--- src/lisp.h 1999/06/23 12:25:55 1.38.2.15
+++ src/lisp.h 1999/06/29 14:24:19
@@ -2739,6 +2739,7 @@
EXFUN (Fprocess_status, 1);
EXFUN (Fprogn, UNEVALLED);
EXFUN (Fprovide, 1);
+EXFUN (Fprovide_on_console, 2);
EXFUN (Fpurecopy, 1);
EXFUN (Fput, 3);
EXFUN (Fput_range_table, 4);
Index: tests/glyph-test.el
===================================================================
RCS file: /usr/CVSroot/XEmacs/xemacs/tests/Attic/glyph-test.el,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 glyph-test.el
--- tests/glyph-test.el 1999/06/28 16:15:58 1.1.2.7
+++ tests/glyph-test.el 1999/06/29 14:24:20
@@ -43,30 +43,30 @@
(set-extent-begin-glyph
(make-extent (point) (point))
(setq tree (make-glyph
- [tree :width 10
- :descriptor "My Tree"
- :properties (:items (["One" foo]
- (["Two" foo]
- ["Four" foo]
- "Six")
- "Three"))])))
+ [tree-view :width 10
+ :descriptor "My Tree"
+ :properties (:items (["One" foo]
+ (["Two" foo]
+ ["Four" foo]
+ "Six")
+ "Three"))])))
;; tab control
(set-extent-begin-glyph
(make-extent (point) (point))
(setq tab (make-glyph
- [tab :descriptor "My Tab"
- :face default
- :properties (:items (["One" foo]
- ["Two" foo]
- ["Three" foo]))])))
+ [tab-control :descriptor "My Tab"
+ :face default
+ :properties (:items (["One" foo]
+ ["Two" foo]
+ ["Three" foo]))])))
;; progress gauge
(set-extent-begin-glyph
(make-extent (point) (point))
(setq pgauge (make-glyph
- [progress :width 10 :height 2
- :descriptor "ok"])))
+ [progress-gauge :width 10 :height 2
+ :descriptor "ok"])))
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
@@ -78,8 +78,8 @@
(setq global-mode-string
(cons (make-extent nil nil)
(setq pg (make-glyph
- [progress :width 5 :pixel-height 16
- :descriptor "ok"]))))
+ [progress-gauge :width 5 :pixel-height 16
+ :descriptor "ok"]))))
;; progress the progress ...
(let ((x 0))
(while (<= x 100)
@@ -103,15 +103,15 @@
;; edit box
(set-extent-begin-glyph
(make-extent (point) (point))
- (setq hedit (make-glyph [edit :pixel-width 50 :pixel-height 30
- :face bold-italic
- :descriptor ["Hello"]])))
+ (setq hedit (make-glyph [edit-field :pixel-width 50 :pixel-height 30
+ :face bold-italic
+ :descriptor ["Hello"]])))
;; combo box
(set-extent-begin-glyph
(make-extent (point) (point))
(setq hcombo (make-glyph
- [combo :width 10 :height 3 :descriptor ["Hello"]
- :properties (:items ("One" "Two" "Three"))])))
+ [combo-box :width 10 :height 3 :descriptor ["Hello"]
+ :properties (:items ("One" "Two" "Three"))])))
;; line
(set-extent-begin-glyph
--------------------------------------------------------------
Dr Andy Piper
Senior Consultant Architect, BEA Systems Ltd