diff dstep/appkit/NSWindowScripting.d @ 16:19885b43130e

Huge update, the bridge actually works now
author Jacob Carlborg <doob@me.com>
date Sun, 03 Jan 2010 22:06:11 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/appkit/NSWindowScripting.d	Sun Jan 03 22:06:11 2010 +0100
@@ -0,0 +1,107 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Sep 24, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.appkit.NSWindowScripting;
+
+import dstep.appkit.NSWindow;
+import dstep.objc.bridge.Bridge;
+import dstep.objc.objc;
+
+const TNSScripting = `
+
+	bool hasCloseBox ()
+	{
+		return invokeObjcSelf!(bool, "hasCloseBox");
+	}
+
+	bool hasTitleBar ()
+	{
+		return invokeObjcSelf!(bool, "hasTitleBar");
+	}
+
+	bool isFloatingPanel ()
+	{
+		return invokeObjcSelf!(bool, "isFloatingPanel");
+	}
+
+	bool isMiniaturizable ()
+	{
+		return invokeObjcSelf!(bool, "isMiniaturizable");
+	}
+
+	bool isModalPanel ()
+	{
+		return invokeObjcSelf!(bool, "isModalPanel");
+	}
+
+	bool isResizable ()
+	{
+		return invokeObjcSelf!(bool, "isResizable");
+	}
+
+	bool isZoomable ()
+	{
+		return invokeObjcSelf!(bool, "isZoomable");
+	}
+
+	NSInteger orderedIndex ()
+	{
+		return invokeObjcSelf!(NSInteger, "orderedIndex");
+	}
+
+	void setIsMiniaturized (bool flag)
+	{
+		return invokeObjcSelf!(void, "setIsMiniaturized:", bool)(flag);
+	}
+
+	void setIsVisible (bool flag)
+	{
+		return invokeObjcSelf!(void, "setIsVisible:", bool)(flag);
+	}
+
+	void setIsZoomed (bool flag)
+	{
+		return invokeObjcSelf!(void, "setIsZoomed:", bool)(flag);
+	}
+
+	void setOrderedIndex (NSInteger index)
+	{
+		return invokeObjcSelf!(void, "setOrderedIndex:", NSInteger)(index);
+	}
+
+	Object handleCloseScriptCommand (NSCloseCommand command)
+	{
+		return invokeObjcSelf!(Object, "handleCloseScriptCommand:", NSCloseCommand)(command);
+	}
+
+	Object handlePrintScriptCommand (NSScriptCommand command)
+	{
+		return invokeObjcSelf!(Object, "handlePrintScriptCommand:", NSScriptCommand)(command);
+	}
+
+	Object handleSaveScriptCommand (NSScriptCommand command)
+	{
+		return invokeObjcSelf!(Object, "handleSaveScriptCommand:", NSScriptCommand)(command);
+	}
+
+	//mixin ObjcBindMethod!(hasCloseBox, "hasCloseBox");
+	//mixin ObjcBindMethod!(hasTitleBar, "hasTitleBar");
+	//mixin ObjcBindMethod!(isFloatingPanel, "isFloatingPanel");
+	//mixin ObjcBindMethod!(isMiniaturizable, "isMiniaturizable");
+	//mixin ObjcBindMethod!(isModalPanel, "isModalPanel");
+	//mixin ObjcBindMethod!(isResizable, "isResizable");
+	//mixin ObjcBindMethod!(isZoomable, "isZoomable");
+	//mixin ObjcBindMethod!(orderedIndex, "orderedIndex");
+	//mixin ObjcBindMethod!(setIsMiniaturized, "setIsMiniaturized:");
+	//mixin ObjcBindMethod!(setIsVisible, "setIsVisible:");
+	//mixin ObjcBindMethod!(setIsZoomed, "setIsZoomed:");
+	//mixin ObjcBindMethod!(setOrderedIndex, "setOrderedIndex:");
+	//mixin ObjcBindMethod!(handleCloseScriptCommand, "handleCloseScriptCommand:");
+	//mixin ObjcBindMethod!(handlePrintScriptCommand, "handlePrintScriptCommand:");
+	//mixin ObjcBindMethod!(handleSaveScriptCommand, "handleSaveScriptCommand:");
+
+`;
+