Mercurial > projects > dwt-mac
comparison dwt/browser/HelperAppLauncherDialogFactory.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | e831403a80a9 |
children | 5583f8eeee6c |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2003, 2007 IBM Corporation and others. | 2 * Copyright (c) 2003, 2007 IBM Corporation and others. |
3 * All rights reserved. This program and the accompanying materials | 3 * All rights reserved. This program and the accompanying materials |
4 * are made available under the terms of the Eclipse Public License v1.0 | 4 * are made available under the terms of the Eclipse Public License v1.0 |
5 * which accompanies this distribution, and is available at | 5 * which accompanies this distribution, and is available at |
6 * http://www.eclipse.org/legal/epl-v10.html | 6 * http://www.eclipse.org/legal/epl-v10.html |
21 | 21 |
22 class HelperAppLauncherDialogFactory { | 22 class HelperAppLauncherDialogFactory { |
23 XPCOMObject supports; | 23 XPCOMObject supports; |
24 XPCOMObject factory; | 24 XPCOMObject factory; |
25 int refCount = 0; | 25 int refCount = 0; |
26 bool isPre_1_9 = true; | |
26 | 27 |
27 this () { | 28 this () { |
28 createCOMInterfaces (); | 29 createCOMInterfaces (); |
29 } | 30 } |
30 | 31 |
92 } | 93 } |
93 | 94 |
94 /* nsIFactory */ | 95 /* nsIFactory */ |
95 | 96 |
96 int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { | 97 int CreateInstance (int /*long*/ aOuter, int /*long*/ iid, int /*long*/ result) { |
97 HelperAppLauncherDialog helperAppLauncherDialog = new HelperAppLauncherDialog (); | 98 if (isPre_1_9) { |
98 helperAppLauncherDialog.AddRef (); | 99 HelperAppLauncherDialog helperAppLauncherDialog = new HelperAppLauncherDialog (); |
99 XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF); | 100 helperAppLauncherDialog.AddRef (); |
101 XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF); | |
102 } else { | |
103 HelperAppLauncherDialog_1_9 helperAppLauncherDialog = new HelperAppLauncherDialog_1_9 (); | |
104 helperAppLauncherDialog.AddRef (); | |
105 XPCOM.memmove (result, new int /*long*/[] {helperAppLauncherDialog.getAddress ()}, C.PTR_SIZEOF); | |
106 } | |
100 return XPCOM.NS_OK; | 107 return XPCOM.NS_OK; |
101 } | 108 } |
102 | 109 |
103 int LockFactory (int lock) { | 110 int LockFactory (int lock) { |
104 return XPCOM.NS_OK; | 111 return XPCOM.NS_OK; |