XTree Struct

To work with XSTEP, yours functions must support the "xtree" structure. This structure describe the current object context in the tree of objects:
struct xtree {

    int                     x,y,w,h,aw,ah,
                            k,s,c,l,p,*q,r,*m,*n,delete;
    struct                  timevaltv;
    char                    *t,*b,**z;
    void                    (*f)(struct xtree *);
    void                    (*dc)(struct xtree *);
    void                    (*rc)(struct xtree *);
    struct                  xtree *treestk;
    struct                  xtree *next;
    struct                  xtree *last;
    struct                  xtree *parent;
    Window                  win;
    GC                      gc,gcpix;
    Pixmap                  pix;
    XFontStruct             *font; 
    void(*keypress)         (struct xtree *);
    void(*keyrelease)       (struct xtree *);
    void(*buttonpress)      (struct xtree *);
    void(*buttonrelease)    (struct xtree *);
    void(*buttonmotion)     (struct xtree *);
    void(*expose)           (struct xtree *);
    void(*focusin)          (struct xtree *);
    void(*focusout)         (struct xtree *);
    void(*broadcast)        (struct xtree *); 
    void(*buttonrepeat)     (struct xtree *);
    void(*message)          (struct xtree *);
    void(*configure)        (struct xtree *);
} *treestk;
Of course:
x,y,w,h(x,y)         position and (w,h) size,all in 
                     relative values!
aw,ah                (w,h) positions in real values.
k                    widget checksum
s                    size (of a buffer)
c                    cursor (in any buffer)
l                    any last integer
p                    focus flag
*q                   list pointer
r                    the last visible header
*m                   list size
*n                   list visible header
delete               deletion flag
tv                   time reference
*t                   static buffer
*b                   dynamic buffer
**z                  list of buffers
(*f)                 first widget functions
(*dc)                double click function
(*rc)                second widget function
*treestk             child widget
*next                next brother widget
*last                last brother widget
*parent              parent widget
win                  widget pointer
gc,gcpix             any graphic contexts
pix                  any pixmap
*font                default font of widget 
(*keypress)          keyboard event
(*keyrelease)        keyboard event
(*buttonpress)       mouse event
(*buttonrelease)     mouse event
(*buttonmotion)      mouse event
(*expose)            redraw event
(*focusin)           focus event
(*focusout)          focus event
(*broadcast)         broadcast event
(*buttonrepeat)      mouse event
(*message)           message event
(*configure)         reconfigure event
All XSTEP widgets use this structure. In examples directory you will find how to use this structure.

In a basic aproach, XSTEP is just a linked list of XTREE structures. References to XTREE between main versions of XSTEP can be incompatible! check the XSTEP header of your version.