diff --git a/misc/MyDrawingA.c b/misc/MyDrawingA.c new file mode 100644 index 0000000000000000000000000000000000000000..1de48ead101fd400406bf3ce9fcff8e07c4bac63 --- /dev/null +++ b/misc/MyDrawingA.c @@ -0,0 +1,126 @@ +/* -[]- + * + * copyright (c) 1992 Franz Inc, Berkeley, CA All rights reserved. + * + * The software, data and information contained herein are proprietary + * to, and comprise valuable trade secrets of, Franz, Inc. They are + * given in confidence by Franz, Inc. pursuant to a written license + * agreement, and may be stored and used only in accordance with the terms + * of such license. + * + * Restricted Rights Legend + * ------------------------ + * Use, duplication, and disclosure of the software, data and information + * contained herein by any agency, department or entity of the U.S. + * Government are subject to restrictions of Restricted Rights for + * Commercial Software developed at private expense as specified in FAR + * 52.227-19 or DOD FAR Supplement 252 52.227-7013 (c) (1) (ii), as + * applicable. + * + * $fiHeader$ + */ + + +#include <Xm/XmP.h> +#include "MyDrawingAP.h" + + +externaldef( xmmydrawingareaclassrec) XmMyDrawingAreaClassRec + xmMyDrawingAreaClassRec = +{ + { /* core_class fields */ + (WidgetClass) &xmDrawingAreaClassRec, /* superclass */ + "XmMyDrawingArea", /* class_name */ + sizeof(XmMyDrawingAreaRec), /* widget_size */ + NULL, /* class_initialize */ + NULL, /* class_part_init */ + FALSE, /* class_inited */ + NULL, /* initialize */ + NULL, /* initialize_hook */ + XtInheritRealize, /* realize */ + NULL, /* actions */ + 0, /* num_actions */ + NULL, /* resources */ + 0, /* num_resources */ + NULLQUARK, /* xrm_class */ + TRUE, /* compress_motion */ + XtExposeCompressMultiple, /* compress_exposure */ + TRUE, /* compress_enterlv */ + FALSE, /* visible_interest */ + NULL, /* destroy */ + XtInheritResize, /* resize */ + XtInheritExpose, /* expose */ + NULL, /* set_values */ + NULL, /* set_values_hook */ + XtInheritSetValuesAlmost, /* set_values_almost */ + NULL, /* get_values_hook */ + NULL, /* accept_focus */ + XtVersion, /* version */ + NULL, /* callback_private */ + XtInheritTranslations, /* tm_table */ + XtInheritQueryGeometry, /* query_geometry */ + NULL, /* display_accelerator*/ + NULL, /* extension */ + }, + { /* composite_class fields */ + XtInheritGeometryManager, /* geometry_manager */ + XtInheritChangeManaged, /* change_managed */ + XtInheritInsertChild, /* insert_child */ + XtInheritDeleteChild, /* delete_child */ + NULL, /* extension */ + }, + + { /* constraint_class fields */ + NULL, /* resource list */ + 0, /* num resources */ + 0, /* constraint size */ + NULL, /* init proc */ + NULL, /* destroy proc */ + NULL, /* set values proc */ + NULL, /* extension */ + }, + + { /* manager_class fields */ + XtInheritTranslations, /* translations */ + NULL, /* syn_resources */ + 0, /* num_get_resources */ + NULL, /* syn_cont_resources */ + 0, /* num_get_cont_resources */ + XmInheritParentProcess, /* parent_process */ + NULL, /* extension */ + }, + + { /* drawingArea class - none */ + 0 /* mumble */ + }, + + { /* mydrawingArea class - none */ + 0 /* mumble */ + } +}; + +externaldef( xmmydrawingareawidgetclass) WidgetClass xmMyDrawingAreaWidgetClass + = (WidgetClass) &xmMyDrawingAreaClassRec ; + +/**************************************************************** + * This convenience function creates and returns a MyDrawingArea widget. + ****************/ +Widget +#ifdef _NO_PROTO +XmCreateMyDrawingArea( p, name, args, n ) + Widget p ; + String name ; + ArgList args ; + Cardinal n ; +#else +XmCreateMyDrawingArea( + Widget p, + String name, + ArgList args, + Cardinal n ) +#endif /* _NO_PROTO */ +{ +/****************/ + + return( XtCreateWidget( name, xmMyDrawingAreaWidgetClass, p, args, n)) ; +} diff --git a/misc/MyDrawingA.h b/misc/MyDrawingA.h new file mode 100644 index 0000000000000000000000000000000000000000..365f1a47615657fa1b5a3557f2d8c587e57850e2 --- /dev/null +++ b/misc/MyDrawingA.h @@ -0,0 +1,68 @@ +/* -[]- + * + * copyright (c) 1992 Franz Inc, Berkeley, CA All rights reserved. + * + * The software, data and information contained herein are proprietary + * to, and comprise valuable trade secrets of, Franz, Inc. They are + * given in confidence by Franz, Inc. pursuant to a written license + * agreement, and may be stored and used only in accordance with the terms + * of such license. + * + * Restricted Rights Legend + * ------------------------ + * Use, duplication, and disclosure of the software, data and information + * contained herein by any agency, department or entity of the U.S. + * Government are subject to restrictions of Restricted Rights for + * Commercial Software developed at private expense as specified in FAR + * 52.227-19 or DOD FAR Supplement 252 52.227-7013 (c) (1) (ii), as + * applicable. + * + * $fiHeader$ + */ + +#ifndef _XmMyDrawingArea_h +#define _XmMyDrawingArea_h + +#include <Xm/Xm.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Class record constants */ + +externalref WidgetClass xmMyDrawingAreaWidgetClass; + +typedef struct _XmMyDrawingAreaClassRec * XmMyDrawingAreaWidgetClass; +typedef struct _XmMyDrawingAreaRec * XmMyDrawingAreaWidget; + + +#ifndef XmIsMyDrawingArea +#define XmIsMyDrawingArea(w) (XtIsSubclass (w, xmMyDrawingAreaWidgetClass)) +#endif + + + +/******** Public Function Declarations ********/ +#ifdef _NO_PROTO + +extern Widget XmCreateMyDrawingArea() ; + +#else + +extern Widget XmCreateMyDrawingArea( + Widget p, + String name, + ArgList args, + Cardinal n) ; + +#endif /* _NO_PROTO */ +/******** End Public Function Declarations ********/ + + +#ifdef __cplusplus +} /* Close scope of 'extern "C"' declaration which encloses file. */ +#endif + +#endif /* _XmMyDrawingArea_h */ +/* DON'T ADD ANYTHING AFTER THIS #endif */ diff --git a/misc/MyDrawingAP.h b/misc/MyDrawingAP.h new file mode 100644 index 0000000000000000000000000000000000000000..58cd88347c26022c6e1bf6b1292364dd381fdcc9 --- /dev/null +++ b/misc/MyDrawingAP.h @@ -0,0 +1,83 @@ +/* -[]- + * + * copyright (c) 1992 Franz Inc, Berkeley, CA All rights reserved. + * + * The software, data and information contained herein are proprietary + * to, and comprise valuable trade secrets of, Franz, Inc. They are + * given in confidence by Franz, Inc. pursuant to a written license + * agreement, and may be stored and used only in accordance with the terms + * of such license. + * + * Restricted Rights Legend + * ------------------------ + * Use, duplication, and disclosure of the software, data and information + * contained herein by any agency, department or entity of the U.S. + * Government are subject to restrictions of Restricted Rights for + * Commercial Software developed at private expense as specified in FAR + * 52.227-19 or DOD FAR Supplement 252 52.227-7013 (c) (1) (ii), as + * applicable. + * + * $fiHeader$ + */ + +#ifndef _XmMyDrawingAreaP_h +#define _XmMyDrawingAreaP_h + +#include <Xm/DrawingAP.h> +#include "MyDrawingA.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* New fields for the MyDrawingArea widget class record */ + +typedef struct +{ + int mumble; /* No new procedures */ +} XmMyDrawingAreaClassPart; + + +/* Full class record declaration */ + +typedef struct _XmMyDrawingAreaClassRec +{ + CoreClassPart core_class; + CompositeClassPart composite_class; + ConstraintClassPart constraint_class; + XmManagerClassPart manager_class; + XmDrawingAreaClassPart drawing_area_class; + XmMyDrawingAreaClassPart my_drawing_area_class; +} XmMyDrawingAreaClassRec; + + +externalref XmMyDrawingAreaClassRec xmMyDrawingAreaClassRec; + + +/* New fields for the MyDrawingArea widget record */ + +typedef struct +{ + int dummy; /* Don't really need any at this point. */ +} XmMyDrawingAreaPart; + + +/* Full instance record declaration */ + +typedef struct _XmMyDrawingAreaRec +{ + CorePart core; + CompositePart composite; + ConstraintPart constraint; + XmManagerPart manager; + XmDrawingAreaPart drawing_area; + XmMyDrawingAreaPart my_drawing_area; +} XmMyDrawingAreaRec; + + +#ifdef __cplusplus +} /* Close scope of 'extern "C"' declaration which encloses file. */ +#endif + +#endif /* _XmMyDrawingAreaP_h */ +/* DON'T ADD ANYTHING AFTER THIS #endif */ diff --git a/xlib/xlibsupport.c b/xlib/xlibsupport.c new file mode 100644 index 0000000000000000000000000000000000000000..53c8b924616ed6b6d85daa2433ad31fb7d6f60d7 --- /dev/null +++ b/xlib/xlibsupport.c @@ -0,0 +1,39 @@ +/* -[]- + * + * copyright (c) 1992 Franz Inc, Berkeley, CA All rights reserved. + * + * The software, data and information contained herein are proprietary + * to, and comprise valuable trade secrets of, Franz, Inc. They are + * given in confidence by Franz, Inc. pursuant to a written license + * agreement, and may be stored and used only in accordance with the terms + * of such license. + * + * Restricted Rights Legend + * ------------------------ + * Use, duplication, and disclosure of the software, data and information + * contained herein by any agency, department or entity of the U.S. + * Government are subject to restrictions of Restricted Rights for + * Commercial Software developed at private expense as specified in FAR + * 52.227-19 or DOD FAR Supplement 252 52.227-7013 (c) (1) (ii), as + * applicable. + * + * $fiHeader$ + */ + +/************************************************************************/ +/* Support code for Xlib interface */ +/************************************************************************/ + +#include <X11/Xlib.h> + +lisp_XDrawString(dpy, d, gc, x, y, string, start, end) + register Display *dpy; + Drawable d; + GC gc; + int x, y; + register char *string; + register int start, end; +{ + XDrawString(dpy, d, gc, x, y, &string[start], end - start); +} +