GB_BASE
Syntax
typedef
struct {
GB_CLASS klass;
long ref;
}
GB_BASE;
This structure represents the base of every Gambas object.
It must be placed in the beginning of all object structure defined
in a component.
- The klass field is the class of the object.
- The ref field is its reference counter.
Do not touch them ! They are managed by the interpreter.
Examples
/* Here is the definition of a Control in the QT component */
typedef
struct CWIDGET {
GB_BASE ob;
QWidget *widget;
unsigned long flag;
GB_VARIANT_VALUE tag;
char *tooltip;
void *cursor;
CWIDGET *next;
CWIDGET *prev;
int level;
}
CWIDGET;