Mercurial > projects > dwt-mac
comparison dwt/graphics/Resource.d @ 45:d8635bb48c7c
Merge with SWT 3.5
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Mon, 01 Dec 2008 17:07:00 +0100 |
parents | db5a898b2119 |
children |
comparison
equal
deleted
inserted
replaced
44:ca5e494f2bbf | 45:d8635bb48c7c |
---|---|
1 /******************************************************************************* | 1 /******************************************************************************* |
2 * Copyright (c) 2000, 2005 IBM Corporation and others. | 2 * Copyright (c) 2000, 2008 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 |
7 * | 7 * |
8 * Contributors: | 8 * Contributors: |
9 * IBM Corporation - initial API and implementation | 9 * IBM Corporation - initial API and implementation |
10 * | 10 * |
11 * Port to the D programming language: | 11 * Port to the D programming language: |
12 * Jacob Carlborg <jacob.carlborg@gmail.com> | 12 * Jacob Carlborg <doob@me.com> |
13 *******************************************************************************/ | 13 *******************************************************************************/ |
14 module dwt.graphics.Resource; | 14 module dwt.graphics.Resource; |
15 | 15 |
16 import dwt.DWT; | 16 import dwt.DWT; |
17 | 17 |
35 * implemented as subclasses of this class. | 35 * implemented as subclasses of this class. |
36 * </p> | 36 * </p> |
37 * | 37 * |
38 * @see #dispose | 38 * @see #dispose |
39 * @see #isDisposed | 39 * @see #isDisposed |
40 * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a> | |
40 * | 41 * |
41 * @since 3.1 | 42 * @since 3.1 |
42 */ | 43 */ |
43 public abstract class Resource { | 44 public abstract class Resource { |
44 | 45 |
45 /** | 46 /** |
46 * the device where this resource was created | 47 * the device where this resource was created |
47 */ | 48 */ |
48 Device device; | 49 Device device; |
49 | 50 |
50 this() { | 51 public this() { |
51 } | 52 } |
52 | 53 |
53 this(Device device) { | 54 this(Device device) { |
54 if (device is null) device = Device.getDevice(); | 55 if (device is null) device = Device.getDevice(); |
55 if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); | 56 if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); |