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 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
{
int i;
float f;
void *p;
unsigned long l;
} value;
} EZ_Value;
#define EZ_INT 0
#define EZ_FLOAT 1
#define EZ_POINTER 2
#define EZ_ULONG 3
/* 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;