#ifndef _obj_h_ #define _obj_h_ #include "text.h" #include "animate.h" #include "href.h" typedef enum { HTMLOBJ_NONE, HTMLOBJ_BLOCK, HTMLOBJ_TEXT, HTMLOBJ_TEXT_MEM, HTMLOBJ_IMAGE, HTMLOBJ_HR, HTMLOBJ_BULLET, } HTMLObjType; typedef struct HTMLObj { struct HTMLObj *prev; struct HTMLObj *next; HTMLObjType type; int x, y; int width; int height; void *data; /* non block obj */ int ascent; int descent; int lbearing; int rbearing; u_long pixel; HTMLHrefInfo *link; } HTMLObj, *HTMLObjList; typedef struct HTMLTextObj { wchar_t *str; int len; OC *oc; } HTMLTextObj, *HTMLTextObjList; typedef struct HTMLImageObj { Animate *anim; } HTMLImageObj, *HTMLImageObjList; HTMLObj* htmlobj_new(void); void htmlobj_delete(HTMLObj *p); void htmlobjlist_delete(HTMLObjList l); HTMLTextObj* htmltextobj_new(void); void htmltextobj_delete(HTMLTextObj *p); HTMLImageObj* htmlimageobj_new(void); void htmlimageobj_delete(HTMLImageObj *p); void htmlobj_draw(Display *dpy, Window win, GC gc, int x, int y, HTMLObj *o, int x1,int y1,int w, int h); #endif