view dstep/appkit/NSNibLoading.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 source

/**
 * 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.NSNibLoading;

import dstep.foundation.NSDictionary;
import dstep.foundation.NSString;
import dstep.foundation.NSBundle;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc;

const TNSNibLoading = `

	static bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone)
	{
		return invokeObjcSelfClass!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone);
	}

	static bool loadNibNamed (NSString nibName, Object owner)
	{
		return invokeObjcSelfClass!(bool, "loadNibNamed:owner:", NSString, Object)(nibName, owner);
	}

	bool loadNibFile (NSString fileName, NSDictionary context, NSZone* zone)
	{
		return invokeObjcSelf!(bool, "loadNibFile:externalNameTable:withZone:", NSString, NSDictionary, NSZone*)(fileName, context, zone);
	}

	//mixin ObjcBindClassMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:");
	//mixin ObjcBindClassMethod!(loadNibNamed, "loadNibNamed:owner:");
	//mixin ObjcBindMethod!(loadNibFile, "loadNibFile:externalNameTable:withZone:");

`;

const TNSNibAwaking = `

	void awakeFromNib ()
	{
		return invokeObjcSelf!(void, "awakeFromNib");
	}

	//mixin ObjcBindMethod!(awakeFromNib, "awakeFromNib");

`;