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 m

⟦c7d0fff39⟧ TextFile

    Length: 3020 (0xbcc)
    Types: TextFile
    Names: »main.h.orig«

Derivation

└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
    └─⟦this⟧ »EUUGD18/X/Dragon/main.h.orig« 

TextFile

/******************************************************************************
* Dragon - a version of Mah-Jongg for X Windows
*
* Author: Gary E. Barnes	March 1989
*
* main.h - #include'ed into all source files.
******************************************************************************/

#include <stdio.h>
#include <X11/Xlib.h>

#include <X11/Intrinsic.h>
#include <X11/IntrinsicP.h>
#include <X11/Shell.h>
#include <X11/Simple.h>
#include <X11/StringDefs.h>

#define TRUE	1
#define FALSE	0

#ifdef _MAIN_C_
#define VAR(A)		A
#define VARI(A,B)	A = B
#else
#define VAR(A)		extern A
#define VARI(A,B)	extern A
#endif

\f


/******************************************************************************
* Dragon Resources
******************************************************************************/

typedef struct _Dragon_Resources_Rec{
    Cursor		Cursor;			/* Name of cursor to use */
    Boolean		Debug;			/* Debug printouts */
    int			Double_Click_Time;	/* Time (ms) between clicks */
    String		Geometry;		/* Geometry for the board */
    String		Icon_Geometry;		/* Geometry for our icon */
    Boolean		Iconic;			/* Do we start as an icon? */
    String		Icon_Name;		/* Name for the icon */
    Boolean		Reverse_Video;		/* Do all in reverse? */
    Boolean		Tile_Shadows;		/* Want shadows? */
    String		Tile_Sides;		/* What side type? */
} Dragon_Resources_Rec, *Dragon_Resources_Ptr;

#define DEBUG_CALL(Name) \
  if (Dragon_Resources.Debug) { \
    fprintf( stderr, "Name call\n" ); fflush(stderr); \
  }
#define DEBUG_RETURN(Name) \
  if (Dragon_Resources.Debug) { \
    fprintf( stderr, "Name return\n" ); fflush(stderr); \
  }
#define DEBUG_OTHER(Name,Other) \
  if (Dragon_Resources.Debug) { \
    fprintf( stderr, "Name Other\n" ); fflush(stderr); \
  }

/******************************************************************************
* Bitmap/Image Initialization Structure
******************************************************************************/

typedef struct _XImage_Init {
    XImage	*image;
    char	*bits;
    int		 width;
    int		 height;
} XImage_Init;


\f


/******************************************************************************
* Global State
******************************************************************************/

typedef enum { s_Normal, s_Sample } Display_State;

VARI( Display_State	Board_State,		s_Normal );

VAR( Dragon_Resources_Rec  Dragon_Resources );	/* Application resources */

VAR( Widget		   Dragon );		/* The top level widget */
VAR( Widget		   Board );		/* Our main drawable */

VAR( String		   Program_Name );	/* Name of program in cmd */

VAR( int		   Tile_Control );	/* Control bits */

#define SHADOW		(1<<0)
#define BLACKSIDE	(1<<1)
#define GRAYSIDE	(1<<2)

VAR( GC			   Gray_GC );		/* fg=blk, bg=wht, fcn=copy */
VAR( GC			   Normal_GC );		/* fg=blk, bg=wht, fcn=copy */
VAR( GC			   Over_GC );		/* fg=blk, bg=wht, fcn=or */
VAR( GC			   Reverse_GC );	/* fg=wht, bg=blk, fcn=copy */
VAR( GC			   Xor_GC );		/* fg=blk, bg=wht, fcn=xor */