01: /*******************************************************************************
02: * Copyright (c) 2000, 2007 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.swt.internal;
11:
12: public class C extends Platform {
13:
14: static {
15: if ("Linux".equals(System.getProperty("os.name")) && "motif".equals(Platform.PLATFORM)) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
16: try {
17: Library.loadLibrary("libXm.so.2", false); //$NON-NLS-1$
18: } catch (UnsatisfiedLinkError ex) {
19: }
20: }
21: Library.loadLibrary("swt"); //$NON-NLS-1$
22: }
23:
24: public static final int PTR_SIZEOF = PTR_sizeof();
25:
26: public static final native void free(int /*long*/ptr);
27:
28: public static final native int /*long*/getenv(byte[] wcsToMbcs);
29:
30: public static final native int /*long*/malloc(int /*long*/size);
31:
32: public static final native void memmove(int /*long*/dest,
33: byte[] src, int /*long*/size);
34:
35: public static final native void memmove(int /*long*/dest,
36: char[] src, int /*long*/size);
37:
38: public static final native void memmove(int /*long*/dest,
39: double[] src, int /*long*/size);
40:
41: public static final native void memmove(int /*long*/dest,
42: float[] src, int /*long*/size);
43:
44: public static final native void memmove(int /*long*/dest,
45: int[] src, int /*long*/size);
46:
47: public static final native void memmove(int /*long*/dest,
48: long[] src, int /*long*/size);
49:
50: public static final native void memmove(int /*long*/dest,
51: short[] src, int /*long*/size);
52:
53: public static final native void memmove(byte[] dest, char[] src,
54: int /*long*/size);
55:
56: public static final native void memmove(byte[] dest,
57: int /*long*/src, int /*long*/size);
58:
59: public static final native void memmove(int /*long*/dest,
60: int /*long*/src, int /*long*/size);
61:
62: public static final native void memmove(char[] dest,
63: int /*long*/src, int /*long*/size);
64:
65: public static final native void memmove(double[] dest,
66: int /*long*/src, int /*long*/size);
67:
68: public static final native void memmove(float[] dest,
69: int /*long*/src, int /*long*/size);
70:
71: public static final native void memmove(int[] dest, byte[] src,
72: int /*long*/size);
73:
74: public static final native void memmove(short[] dest,
75: int /*long*/src, int /*long*/size);
76:
77: public static final native void memmove(int[] dest,
78: int /*long*/src, int /*long*/size);
79:
80: public static final native void memmove(long[] dest,
81: int /*long*/src, int /*long*/size);
82:
83: public static final native int /*long*/memset(int /*long*/buffer,
84: int c, int /*long*/num);
85:
86: public static final native int PTR_sizeof();
87:
88: public static final native int strlen(int /*long*/s);
89: }
|