Most of the data types in EZwgl are hidden from the user. There are only a few special data types an application programmer needs to be aware of. The important ones are the prototypes for callbacks and event handlers. Below is a list of these data types.
/* these can only be used as pointers */
typedef void EZ_Widget;
typedef void EZ_LabelPixmap;
typedef void EZ_TextProperty;
typedef void EZ_TextProp;
typedef void EZ_Item;
typedef void EZ_TreeNode;
typedef void EZ_Timer;
typedef void EZ_Bitmap;
typedef void EZ_Pixmap;
typedef void EZ_Input;
/* prototypes for func ptrs */
typedef void (*EZ_CallBack)(void *object, void *data));
typedef void (*EZ_InputCallback)(void *object, void *data, int fd, int mask));
typedef void (*EZ_EventHandler)(void *object, void *data, int etype, XEvent *event));
typedef void (*EZ_MessageHandler)(void *msgIn, void *client_data);
typedef int (*EZ_DnDEncoder)(void *object, void *data, char **msg,int *len, int *needfree));
typedef int (*EZ_DnDDecoder)(void *object, void *data, char *msg,int len));
typedef int (*EZ_SChartHandle)(EZ_Widget *ssheet, void *chart, int r1, int c1,
int r2, int c2, int kind, void *data);
typedef void *(*EZ_DirTreeNodeCreator)(char *path, void *data);
typedef void (*EZ_WorkAreaGeometryManager)(void *GMData, EZ_Item **data, int nitems,
int Rx,int Ry,int Rw, int Rh, int xsp, int ysp,
int *w_ret, int *h_ret));
/*
* Used to attach client data to a widget/item.
*/
typedef union {
char c;
short s;
int i;
long l;
unsigned char uc;
unsigned short us;
unsigned int ui;
unsigned long ul;
float f;
void *p;
} EZ_UnknownDataType;
/*
* message
*/
typedef struct {
Atom messageType;
int messageLength;
char *message;
int messageId; /* set by the sender, transaction serial # */
int replyId;
int isReply;
/* src info */
Window sender;
Atom senderClass;
Atom senderInstance;
int senderIsSelf;
} EZ_Message;
/*
* application resource values.
*/
typedef struct EZ_Value_ {
int type; /* EZ_INT ... see below */
union {
char c; unsigned char uc;
short s; unsigned short us;
int i; unsigned int ui;
float f;
void *p;
void *function;
char *str;
unsigned long l;
} value;
} EZ_Value;
#define EZ_INT 0
#define EZ_FLOAT 1
#define EZ_POINTER 2
#define EZ_ULONG 3
#define EZ_LONG 4
#define EZ_UCHAR 5
#define EZ_CHAR 6
#define EZ_USHORT 7
#define EZ_SHORT 8
#define EZ_UINT 9
#define EZ_STRING 10
#define EZ_ENUM 11
#define EZ_BOOL 12
#define EZ_FUNCTION 13
#define EZ_FONTNAME 14
#define EZ_FILENAME 15
/* used in the GL */
typedef void EZ_GLImage;
typedef float EZ_Vector[4];
typedef float EZ_Vector3[3];
typedef float EZ_Matrix[4][4];
typedef float EZ_Material;
typedef float EZ_LightSrc;
typedef float EZ_LightModel;