DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T X

⟦0e6f2bd6c⟧ TextFile

    Length: 3529 (0xdc9)
    Types: TextFile
    Names: »XGas.c«

Derivation

└─⟦276d19d6e⟧ Bits:30007243 EUUGD5_I: X11R5
    └─⟦af7d3f39a⟧ »./mit-2/mit-2.00« 
        └─⟦0abaffd9e⟧ 
            └─⟦this⟧ »mit/demos/xgas/XGas.c« 

TextFile

/* $XConsortium: XGas.c,v 1.1 91/04/18 09:48:25 dave Exp $ */

/* Copyright	Massachusetts Institute of Technology	1987, 1988
 *
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the name of M.I.T. not be used in advertising or
 * publicity pertaining to distribution of the software without specific,
 * written prior permission.  M.I.T. makes no representations about the
 * suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 *
 * M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T.
 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 *
 */

#include <X11/IntrinsicP.h>
#include <X11/StringDefs.h>
#include "XGasP.h"

static XtResource resources[] = {
#define offset(field) XtOffset(GasWidget, gas.field)
    /* {name, class, type, size, offset, default_type, default_addr}, */
/*    { XtNgasResource, XtCGasResource, XtRGasResource, sizeof(char*),*/
/*	  offset(resource), XtRString, "default" },*/
    { XtNresize, XtCCallback, XtRCallback, sizeof(char*),
	  offset(resource), XtRPointer, NULL },
#undef offset
};

static void GasAction(/* Widget, XEvent*, String*, Cardinal* */);
static void Resize();

static XtActionsRec actions[] =
{
  /* {name, procedure}, */
    {"gas",	GasAction},
};

static char translations[] =
"<Key>:		gas()	\n\
";

GasClassRec gasClassRec = {
  { /* core fields */
    /* superclass		*/	(WidgetClass) &widgetClassRec,
    /* class_name		*/	"Gas",
    /* widget_size		*/	sizeof(GasRec),
    /* class_initialize		*/	NULL,
    /* class_part_initialize	*/	NULL,
    /* class_inited		*/	FALSE,
    /* initialize		*/	NULL,
    /* initialize_hook		*/	NULL,
    /* realize			*/	XtInheritRealize,
    /* actions			*/	actions,
    /* num_actions		*/	XtNumber(actions),
    /* resources		*/	resources,
    /* num_resources		*/	XtNumber(resources),
    /* xrm_class		*/	NULLQUARK,
    /* compress_motion		*/	TRUE,
    /* compress_exposure	*/	TRUE,
    /* compress_enterleave	*/	TRUE,
    /* visible_interest		*/	FALSE,
    /* destroy			*/	NULL,
    /* resize			*/	Resize,
    /* expose			*/	NULL,
    /* set_values		*/	NULL,
    /* set_values_hook		*/	NULL,
    /* set_values_almost	*/	XtInheritSetValuesAlmost,
    /* get_values_hook		*/	NULL,
    /* accept_focus		*/	NULL,
    /* version			*/	XtVersion,
    /* callback_private		*/	NULL,
    /* tm_table			*/	translations,
    /* query_geometry		*/	XtInheritQueryGeometry,
    /* display_accelerator	*/	XtInheritDisplayAccelerator,
    /* extension		*/	NULL
  },
  { /* gas fields */
    /* empty			*/	0
  }
};

WidgetClass gasWidgetClass = (WidgetClass)&gasClassRec;

static void
GasAction(w, event, params, num_params)			/* ARGSUSED */
     Widget w;
     XEvent *event;
     String *params;		/* unused */
     Cardinal *num_params;	/* unused */
{
  XtCallCallbacks(w, XtNcallback, (caddr_t)event);
}

static void
Resize(w)
Widget w;
{
  XtCallCallbacks(w, XtNresize, NULL);
}