diff dwt/internal/cocoa/NSScriptObjectSpecifier.d @ 0:380af2bdd8e5

Upload of whole dwt tree
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Sat, 09 Aug 2008 17:00:02 +0200
parents
children 8b48be5454ce
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dwt/internal/cocoa/NSScriptObjectSpecifier.d	Sat Aug 09 17:00:02 2008 +0200
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     
+ * Port to the D Programming language:
+ *     Jacob Carlborg <jacob.carlborg@gmail.com>
+ *******************************************************************************/
+module dwt.internal.cocoa.NSScriptObjectSpecifier;
+
+import dwt.internal.cocoa.id;
+import dwt.internal.cocoa.NSAppleEventDescriptor;
+import dwt.internal.cocoa.NSInteger;
+import dwt.internal.cocoa.NSObject;
+import dwt.internal.cocoa.NSScriptClassDescription;
+import dwt.internal.cocoa.NSString;
+import dwt.internal.cocoa.OS;
+import objc = dwt.internal.objc.runtime;
+
+public class NSScriptObjectSpecifier : NSObject
+{
+
+    public this ()
+    {
+        super();
+    }
+
+    public this (objc.id id)
+    {
+        super(id);
+    }
+
+    public NSScriptObjectSpecifier childSpecifier ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_childSpecifier);
+        return result is this.id ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+    }
+
+    public NSScriptClassDescription containerClassDescription ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_containerClassDescription);
+        return result !is null ? new NSScriptClassDescription(result) : null;
+    }
+
+    public bool containerIsObjectBeingTested ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_containerIsObjectBeingTested) !is null;
+    }
+
+    public bool containerIsRangeContainerObject ()
+    {
+        return OS.objc_msgSend(this.id, OS.sel_containerIsRangeContainerObject) !is null;
+    }
+
+    public NSScriptObjectSpecifier containerSpecifier ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_containerSpecifier);
+        return result is this.id ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+    }
+
+    public NSAppleEventDescriptor descriptor ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_descriptor);
+        return result !is null ? new NSAppleEventDescriptor(result) : null;
+    }
+
+    public NSInteger evaluationErrorNumber ()
+    {
+        return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_evaluationErrorNumber);
+    }
+
+    public NSScriptObjectSpecifier evaluationErrorSpecifier ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_evaluationErrorSpecifier);
+        return result is this.id ? this : (result !is null ? new NSScriptObjectSpecifier(result) : null);
+    }
+
+    public NSInteger* indicesOfObjectsByEvaluatingWithContainer (id container, NSInteger* count)
+    {
+        return cast(NSInteger*) OS.objc_msgSend(this.id, OS.sel_indicesOfObjectsByEvaluatingWithContainer_1count_1, container !is null ? container.id : null, count);
+    }
+
+    public id initWithContainerClassDescription (NSScriptClassDescription classDesc, NSScriptObjectSpecifier container, NSString property)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContainerClassDescription_1containerSpecifier_1key_1,
+                classDesc !is null ? classDesc.id : null, container !is null ? container.id : null, property !is null ? property.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public id initWithContainerSpecifier (NSScriptObjectSpecifier container, NSString property)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSpecifier_1key_1, container !is null ? container.id : null,
+                property !is null ? property.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public NSString key ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_key);
+        return result !is null ? new NSString(result) : null;
+    }
+
+    public NSScriptClassDescription keyClassDescription ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_keyClassDescription);
+        return result !is null ? new NSScriptClassDescription(result) : null;
+    }
+
+    public static NSScriptObjectSpecifier objectSpecifierWithDescriptor (NSAppleEventDescriptor descriptor)
+    {
+        objc.id result = OS.objc_msgSend(OS.class_NSScriptObjectSpecifier, OS.sel_objectSpecifierWithDescriptor_1,
+                descriptor !is null ? descriptor.id : null);
+        return result !is null ? new NSScriptObjectSpecifier(result) : null;
+    }
+
+    public id objectsByEvaluatingSpecifier ()
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_objectsByEvaluatingSpecifier);
+        return result !is null ? new id(result) : null;
+    }
+
+    public id objectsByEvaluatingWithContainers (id containers)
+    {
+        objc.id result = OS.objc_msgSend(this.id, OS.sel_objectsByEvaluatingWithContainers_1, containers !is null ? containers.id : null);
+        return result !is null ? new id(result) : null;
+    }
+
+    public void setChildSpecifier (NSScriptObjectSpecifier child)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setChildSpecifier_1, child !is null ? child.id : null);
+    }
+
+    public void setContainerClassDescription (NSScriptClassDescription classDesc)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setContainerClassDescription_1, classDesc !is null ? classDesc.id : null);
+    }
+
+    public void setContainerIsObjectBeingTested (bool flag)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setContainerIsObjectBeingTested_1, flag);
+    }
+
+    public void setContainerIsRangeContainerObject (bool flag)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setContainerIsRangeContainerObject_1, flag);
+    }
+
+    public void setContainerSpecifier (NSScriptObjectSpecifier subRef)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setContainerSpecifier_1, subRef !is null ? subRef.id : null);
+    }
+
+    public void setEvaluationErrorNumber (NSInteger error)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setEvaluationErrorNumber_1, error);
+    }
+
+    public void setKey (NSString key)
+    {
+        OS.objc_msgSend(this.id, OS.sel_setKey_1, key !is null ? key.id : null);
+    }
+
+}