aboutsummaryrefslogtreecommitdiff
path: root/src/widget.h
blob: c2091910fd70525f6a35fb1e2b9c18a49be68fd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* See LICENSE file for copyright and license details. */

#ifndef __CHERRY_WIDGET_H__
#define __CHERRY_WIDGET_H__

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <utils.h>
#include "dimension.h"

typedef struct CherryWidget {
	int x, y;
	CherryDimension *dimension;
	int visible;
	list_t components;

	/* Xlib stuff */
	XSizeHints hints;
	GC         gc;
	Window     wnd;

	void (*draw)(struct CherryWidget *);
} CherryWidget;

CherryWidget    *cherry_widget_new(void);
CherryDimension *cherry_widget_get_dimension(CherryWidget *);

#endif /* __CHERRY_WIDGET_H__ */