35 for (
size_t ind = 0; ind <
s->objcnt; ind++) {
36 if (
s->obj[ind]->common.visible
38 if (!rv ||
s->obj[ind]->common.layer >= rv->
common.
layer) {
39 if (
s->obj[ind]->common.functions.click)
186 s->base.common.width = (float)w;
187 s->base.common.height = (float)h;
194 s->base.common.compset =
s;
206 s->obj[
s->objcnt - 1] = obj;
214 glGetIntegerv(GL_VIEWPORT, vPort);
216 glMatrixMode(GL_PROJECTION);
221 glOrtho(0, vPort[2], 0, vPort[3], -1, 1);
222 glMatrixMode(GL_MODELVIEW);
227 glDisable(GL_DEPTH_TEST);
232 glMatrixMode(GL_PROJECTION);
234 glMatrixMode(GL_MODELVIEW);
236 glEnable(GL_DEPTH_TEST);
241 for (
size_t ind = 0; ind <
s->objcnt; ind++) {
242 s->obj[ind]->common.functions.draw(
s->obj[ind]);
249 if (w > 0 && h > 0) {
250 s->base.common.width = (float)w;
251 s->base.common.height = (float)h;
Memory allocation wrappers that exit on failure.
static void * gv_recalloc(void *ptr, size_t old_nmemb, size_t new_nmemb, size_t size)
static void * gv_alloc(size_t size)
#define GLCOMPSET_BORDERWIDTH
#define GLCOMP_DEFAULT_HEIGHT
void(* glcompmouseoverfunc_t)(glCompObj *obj, float x, float y)
void(* glcompmouseupfunc_t)(glCompObj *obj, float x, float y, glMouseButtonType t)
#define GLCOMP_DEFAULT_WIDTH
void(* glcompmousedownfunc_t)(glCompObj *obj, float x, float y, glMouseButtonType t)
#define GLCOMPSET_PANEL_COLOR_B
#define GLCOMPSET_PANEL_COLOR_G
#define GLCOMPSET_PANEL_COLOR_R
#define GLCOMPSET_PANEL_COLOR_ALPHA
glCompFont glNewFontFromParent(glCompObj *o, char *text)
void glDeleteFont(glCompFont *f)
void glCompMouseInit(glCompMouse *m)
static int glCompPointInObject(glCompObj *p, float x, float y)
void glCompInitCommon(glCompObj *childObj, glCompObj *parentObj, float x, float y)
void glCompEmptyCommon(glCompCommon *c)
static glCompObj * glCompGetObjByMouse(glCompSet *s, glCompMouse *m)
static void glCompMouseMove(void *obj, float x, float y)
void glCompSetDraw(glCompSet *s)
void glCompSetAddObj(glCompSet *s, glCompObj *obj)
void glCompDrawBegin(void)
glCompSet * glCompSetNew(int w, int h)
static void glCompSetMouseUp(void *obj, float x, float y, glMouseButtonType t)
static void glCompSetMouseDown(void *obj, float x, float y, glMouseButtonType t)
static void glCompSetMouseClick(void *obj, float x, float y, glMouseButtonType t)
void glcompsetUpdateBorder(glCompSet *s, int w, int h)
glcompdoubleclickfunc_t doubleclick
glcompmouseoutfunc_t mouseout
glcompmouseupfunc_t mouseup
glcompmouseinfunc_t mousein
glcompmousedownfunc_t mousedown
glcompmouseoverfunc_t mouseover
glCompCallBacks callbacks
glCompCallBacks functions
glCompFont font
font to use
glCompSet * compset
compset