summaryrefslogtreecommitdiff
path: root/new/ui_darwin.h
diff options
context:
space:
mode:
Diffstat (limited to 'new/ui_darwin.h')
-rw-r--r--new/ui_darwin.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/new/ui_darwin.h b/new/ui_darwin.h
new file mode 100644
index 0000000..0e7afb2
--- /dev/null
+++ b/new/ui_darwin.h
@@ -0,0 +1,17 @@
+// 7 april 2015
+
+/*
+This file assumes that you have imported <Cocoa/Cocoa.h> and "ui.h" beforehand. It provides API-specific functions for interfacing with foreign controls on Mac OS X.
+*/
+
+#ifndef __UI_UI_DARWIN_H__
+#define __UI_UI_DARWIN_H__
+
+// uiDarwinNewControl() creates a new uiControl with the given Cocoa control inside.
+// The first parameter should come from [RealControlType class].
+// The two scrollView parameters allow placing scrollbars on the new control.
+// The data parameter can be accessed with uiDarwinControlData().
+extern uiControl *uiDarwinNewControl(Class class, gboolean inScrollView, gboolean scrollViewHasBorder, void *data);
+extern void *uiDarwinControlData(uiControl *c);
+
+#endif