diff options
author | 2023-05-25 22:35:52 +0200 | |
---|---|---|
committer | 2023-05-25 22:35:52 +0200 | |
commit | a4382713e7ba7b3651b2cb321034009f6f8bb525 (patch) | |
tree | 8ccb9bbc2f6a5c13ddeaa5624949f08e7d5244c2 | |
parent | cf2ca10ff02491de7e035cd49d39bfcda5d741bd (diff) | |
download | cherry-a4382713e7ba7b3651b2cb321034009f6f8bb525.tar.gz cherry-a4382713e7ba7b3651b2cb321034009f6f8bb525.zip |
Add widget.h
-rw-r--r-- | src/widget.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/widget.h b/src/widget.h new file mode 100644 index 0000000..c209191 --- /dev/null +++ b/src/widget.h @@ -0,0 +1,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__ */ |