aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/frame.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-06 21:20:35 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-06 21:20:35 +0100
commit6aa34e4fdcf3ffa45e2c9b3a8c7c15a43c043d38 (patch)
treee4b82e65113c39a5023e6a15570cb9f710623f32 /include/gwin/frame.h
parentfc984c3721b09b396424a51f3006491e026a5f97 (diff)
downloaduGFX-6aa34e4fdcf3ffa45e2c9b3a8c7c15a43c043d38.tar.gz
uGFX-6aa34e4fdcf3ffa45e2c9b3a8c7c15a43c043d38.tar.bz2
uGFX-6aa34e4fdcf3ffa45e2c9b3a8c7c15a43c043d38.zip
initial version of frames - still work in progress, DO NOT USE!!!
Diffstat (limited to 'include/gwin/frame.h')
-rw-r--r--include/gwin/frame.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/include/gwin/frame.h b/include/gwin/frame.h
new file mode 100644
index 00000000..156bdcd0
--- /dev/null
+++ b/include/gwin/frame.h
@@ -0,0 +1,52 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://ugfx.org/license.html
+ */
+
+/**
+ * @file include/gwin/frame.h
+ * @brief GWIN Graphic window subsystem header file.
+ *
+ * @defgroup Frame Frame
+ * @ingroup GWIN
+ *
+ * @details A frame is a rectangular window that can have optional border as well as buttons to
+ * close, maximize and minimize it. The main purpose of this widget is to contain children.
+ *
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GWIN_NEED_FRAME must be set to TRUE in your gfxconf.h
+ * @{
+ */
+
+#ifndef _GWIN_FRAME_H
+#define _GWIN_FRAME_H
+
+#include "gwin/class_gwin.h"
+
+// Flags for gwinFrameCreate()
+#define GWIN_FRAME_BORDER (GWIN_FIRST_CONTROL_FLAG << 0)
+#define GWIN_FRAME_CLOSE_BTN (GWIN_FIRST_CONTROL_FLAG << 1)
+#define GWIN_FRAME_MINMAX_BTN (GWIN_FIRST_CONTROL_FLAG << 2)
+
+typedef struct GFrameObject {
+ GWidgetObject w;
+
+ GHandle btnClose;
+ GHandle btnMin;
+ GHandle btnMax;
+} GFrameObject;
+
+GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint16_t flags);
+#define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags);
+
+GHandle gwinFrameGetClose(GHandle gh);
+
+GHandle gwinFrameGetMin(GHandle gh);
+
+GHandle gwinFrameGetMax(GHandle gh);
+
+#endif /* _GWIN_FRAME_H */
+/** @} */
+