001: /*******************************************************************************
002: * Copyright (c) 2000, 2004 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: *******************************************************************************/package org.eclipse.swt.internal.cde;
011:
012: import org.eclipse.swt.internal.*;
013:
014: public class CDE extends Platform {
015:
016: /** Constants */
017: public static final int DtACTION_FILE = 1;
018: public static final String DtDTS_DA_ACTION_LIST = "ACTIONS";
019: public static final String DtDTS_DA_ICON = "ICON";
020: public static final String DtDTS_DA_MIME_TYPE = "MIME_TYPE";
021: public static final String DtDTS_DA_NAME_TEMPLATE = "NAME_TEMPLATE";
022:
023: /** 64 bit */
024: public static final native int DtActionArg_sizeof();
025:
026: /** Natives */
027: public static final native boolean _DtAppInitialize(
028: int /*long*/appContext, int /*long*/display,
029: int /*long*/topWiget, byte[] appName, byte[] appClass);
030:
031: public static final boolean DtAppInitialize(
032: int /*long*/appContext, int /*long*/display,
033: int /*long*/topWiget, byte[] appName, byte[] appClass) {
034: lock.lock();
035: try {
036: return _DtAppInitialize(appContext, display, topWiget,
037: appName, appClass);
038: } finally {
039: lock.unlock();
040: }
041: }
042:
043: public static final native void _DtDbLoad();
044:
045: public static final void DtDbLoad() {
046: lock.lock();
047: try {
048: _DtDbLoad();
049: } finally {
050: lock.unlock();
051: }
052: }
053:
054: public static final native int /*long*/_DtDtsDataTypeNames();
055:
056: public static final int /*long*/DtDtsDataTypeNames() {
057: lock.lock();
058: try {
059: return _DtDtsDataTypeNames();
060: } finally {
061: lock.unlock();
062: }
063: }
064:
065: public static final native int /*long*/_DtDtsFileToDataType(
066: byte[] fileName);
067:
068: public static final int /*long*/DtDtsFileToDataType(byte[] fileName) {
069: lock.lock();
070: try {
071: return _DtDtsFileToDataType(fileName);
072: } finally {
073: lock.unlock();
074: }
075: }
076:
077: public static final native boolean _DtDtsDataTypeIsAction(
078: byte[] dataType);
079:
080: public static final boolean DtDtsDataTypeIsAction(byte[] dataType) {
081: lock.lock();
082: try {
083: return _DtDtsDataTypeIsAction(dataType);
084: } finally {
085: lock.unlock();
086: }
087: }
088:
089: public static final native int /*long*/_DtDtsDataTypeToAttributeValue(
090: byte[] dataType, byte[] attrName, byte[] optName);
091:
092: public static final int /*long*/DtDtsDataTypeToAttributeValue(
093: byte[] dataType, byte[] attrName, byte[] optName) {
094: lock.lock();
095: try {
096: return _DtDtsDataTypeToAttributeValue(dataType, attrName,
097: optName);
098: } finally {
099: lock.unlock();
100: }
101: }
102:
103: public static final native void _DtDtsFreeDataType(
104: int /*long*/dataType);
105:
106: public static final void DtDtsFreeDataType(int /*long*/dataType) {
107: lock.lock();
108: try {
109: _DtDtsFreeDataType(dataType);
110: } finally {
111: lock.unlock();
112: }
113: }
114:
115: public static final native void _DtDtsFreeDataTypeNames(
116: int /*long*/dataTypeList);
117:
118: public static final void DtDtsFreeDataTypeNames(
119: int /*long*/dataTypeList) {
120: lock.lock();
121: try {
122: _DtDtsFreeDataTypeNames(dataTypeList);
123: } finally {
124: lock.unlock();
125: }
126: }
127:
128: public static final native void _DtDtsFreeAttributeValue(
129: int /*long*/attrValue);
130:
131: public static final void DtDtsFreeAttributeValue(
132: int /*long*/attrValue) {
133: lock.lock();
134: try {
135: _DtDtsFreeAttributeValue(attrValue);
136: } finally {
137: lock.unlock();
138: }
139: }
140:
141: public static final native long _DtActionInvoke(
142: int /*long*/topWidget, byte[] action, DtActionArg args,
143: int argCount, byte[] termOpts, byte[] execHost,
144: byte[] contextDir, int useIndicator, int /*long*/callback,
145: int /*long*/clientData);
146:
147: public static final long DtActionInvoke(int /*long*/topWidget,
148: byte[] action, DtActionArg args, int argCount,
149: byte[] termOpts, byte[] execHost, byte[] contextDir,
150: int useIndicator, int /*long*/callback,
151: int /*long*/clientData) {
152: lock.lock();
153: try {
154: return _DtActionInvoke(topWidget, action, args, argCount,
155: termOpts, execHost, contextDir, useIndicator,
156: callback, clientData);
157: } finally {
158: lock.unlock();
159: }
160: }
161:
162: public static final native int /*long*/_topLevelShellWidgetClass();
163:
164: public static final int /*long*/topLevelShellWidgetClass() {
165: lock.lock();
166: try {
167: return _topLevelShellWidgetClass();
168: } finally {
169: lock.unlock();
170: }
171: }
172:
173: public static final native int /*long*/_XtAppCreateShell(
174: byte[] appName, byte[] appClass, int /*long*/widgetClass,
175: int /*long*/display, int /*long*/[] argList, int argCount);
176:
177: public static final int /*long*/XtAppCreateShell(byte[] appName,
178: byte[] appClass, int /*long*/widgetClass,
179: int /*long*/display, int /*long*/[] argList, int argCount) {
180: lock.lock();
181: try {
182: return _XtAppCreateShell(appName, appClass, widgetClass,
183: display, argList, argCount);
184: } finally {
185: lock.unlock();
186: }
187: }
188:
189: public static final native int /*long*/_XtCreateApplicationContext();
190:
191: public static final int /*long*/XtCreateApplicationContext() {
192: lock.lock();
193: try {
194: return _XtCreateApplicationContext();
195: } finally {
196: lock.unlock();
197: }
198: }
199:
200: public static final native void _XtDisplayInitialize(
201: int /*long*/app_context, int /*long*/display,
202: byte[] appName, byte[] appClass, int /*long*/options,
203: int num_options, int /*long*/[] argc, int argv);
204:
205: public static final void XtDisplayInitialize(
206: int /*long*/appContext, int /*long*/display,
207: byte[] appName, byte[] appClass, int /*long*/options,
208: int num_options, int /*long*/[] argc, int argv) {
209: lock.lock();
210: try {
211: _XtDisplayInitialize(appContext, display, appName,
212: appClass, options, num_options, argc, argv);
213: } finally {
214: lock.unlock();
215: }
216: }
217:
218: public static final native void _XtRealizeWidget(
219: int /*long*/widget);
220:
221: public static final void XtRealizeWidget(int /*long*/widget) {
222: lock.lock();
223: try {
224: _XtRealizeWidget(widget);
225: } finally {
226: lock.unlock();
227: }
228: }
229:
230: public static final native void _XtResizeWidget(
231: int /*long*/widget, int width, int height, int borderWidth);
232:
233: public static final void XtResizeWidget(int /*long*/widget,
234: int width, int height, int borderWidth) {
235: lock.lock();
236: try {
237: _XtResizeWidget(widget, width, height, borderWidth);
238: } finally {
239: lock.unlock();
240: }
241: }
242:
243: public static final native void _XtSetMappedWhenManaged(
244: int /*long*/widget, boolean flag);
245:
246: public static final void XtSetMappedWhenManaged(
247: int /*long*/widget, boolean flag) {
248: lock.lock();
249: try {
250: _XtSetMappedWhenManaged(widget, flag);
251: } finally {
252: lock.unlock();
253: }
254: }
255:
256: public static final native void _XtToolkitInitialize();
257:
258: public static final void XtToolkitInitialize() {
259: lock.lock();
260: try {
261: _XtToolkitInitialize();
262: } finally {
263: lock.unlock();
264: }
265: }
266: }
|