summaryrefslogtreecommitdiff
path: root/lib/internal.h
diff options
context:
space:
mode:
authorJari Vetoniemi <mailroxas@gmail.com>2014-03-28 21:33:20 +0200
committerJari Vetoniemi <mailroxas@gmail.com>2014-03-28 21:35:32 +0200
commit908749cfdfa037b6f5fd0f5f7b2fa66080329156 (patch)
tree9875ca3fb9800c0b14f0cb68817d4f14e59105f9 /lib/internal.h
parentc2adc3c7cf691230f0ad4697e2bbb0bcd24c6afe (diff)
downloadbemenu-908749cfdfa037b6f5fd0f5f7b2fa66080329156.tar.gz
bemenu-908749cfdfa037b6f5fd0f5f7b2fa66080329156.tar.bz2
bemenu-908749cfdfa037b6f5fd0f5f7b2fa66080329156.zip
Add basic API code.
=> bmMenu instancing. => "Rendering" => bmMenu releasing.
Diffstat (limited to 'lib/internal.h')
-rw-r--r--lib/internal.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/internal.h b/lib/internal.h
new file mode 100644
index 0000000..d11ebe2
--- /dev/null
+++ b/lib/internal.h
@@ -0,0 +1,37 @@
+/**
+ * @file internal.h
+ */
+
+#include "bemenu.h"
+
+/**
+ * Internal bmItem struct that is not exposed to public.
+ * Represents a single item in menu.
+ */
+struct _bmItem {
+ char *text;
+} _bmItem;
+
+/**
+ * Internal bmRenderApi struct.
+ * Renderers should be able to fill this one as they see fit.
+ */
+struct _bmRenderApi {
+ void (*render)(struct _bmItem **items, unsigned int nmemb);
+ void (*free)(void);
+} _bmRenderApi;
+
+/**
+ * Internal bmMenu struct that is not exposed to public.
+ */
+struct _bmMenu {
+ bmDrawMode drawMode;
+ struct _bmRenderApi renderApi;
+ struct _bmItem **items;
+ unsigned int itemsCount;
+} _bmMenu;
+
+
+void bmRenderNullInit(struct _bmRenderApi *api);
+
+/* vim: set ts=8 sw=4 tw=0 :*/