9 * Nokia Corporation - initial implementation |
9 * Nokia Corporation - initial implementation |
10 *******************************************************************************/ |
10 *******************************************************************************/ |
11 package org.eclipse.swt.internal.qt.graphics; |
11 package org.eclipse.swt.internal.qt.graphics; |
12 |
12 |
13 import org.eclipse.swt.graphics.ImageData; |
13 import org.eclipse.swt.graphics.ImageData; |
|
14 import org.eclipse.swt.graphics.Point; |
14 |
15 |
15 final class OS { |
16 final class OS { |
16 // Graphics Context |
17 // Graphics Context |
17 static final native int graphicsContext_get_windowsurface(int handle); |
18 static final native int graphicsContext_get_windowsurface(int handle); |
18 static final native int graphicsContext_init(); |
19 static final native int graphicsContext_init(); |
76 static final native void graphicsContext_resetTransform(int handle); |
77 static final native void graphicsContext_resetTransform(int handle); |
77 static final native void graphicsContext_saveSettings(int handle); |
78 static final native void graphicsContext_saveSettings(int handle); |
78 static final native void graphicsContext_restoreSettings(int handle); |
79 static final native void graphicsContext_restoreSettings(int handle); |
79 |
80 |
80 // Image |
81 // Image |
81 static final native int image_create(int width, int Height, int fillColor); |
82 static final native int image_create(int width, int height, int fillColor); |
82 static final native int image_create(int imageHandle, int x, int y, int width, int height); |
83 static final native int image_create(int imageHandle, int x, int y, int width, int height); |
83 static final native int image_create(ImageData imageData); |
84 static final native int image_create(ImageData imageData); |
84 static final native int image_create(int[] argbData, int width, int height, boolean hasAlpha); |
85 static final native int image_create(int[] argbData, int width, int height, boolean hasAlpha); |
|
86 static final native int image_create(int pixmapHandle); |
85 static final native int image_getFormat(int handle); |
87 static final native int image_getFormat(int handle); |
86 static final native int image_getHeight(int handle); |
88 static final native int image_getHeight(int handle); |
87 static final native int image_getWidth(int handle); |
89 static final native int image_getWidth(int handle); |
88 static final native void image_getRGB(int handle, int[] argbData, int offset, int scanlength,int x, int y, int width, int height); |
90 static final native void image_getRGB(int handle, int[] argbData, int offset, int scanlength,int x, int y, int width, int height); |
89 static final native void image_getRGB(int handle, byte[] argbData, byte[] transparencyMask, int offset, int scanlength,int x, int y, int width, int height, int format); |
91 static final native void image_getRGB(int handle, byte[] argbData, byte[] transparencyMask, int offset, int scanlength,int x, int y, int width, int height, int format); |
101 static final native int imageLoader_endStream(int handle); |
103 static final native int imageLoader_endStream(int handle); |
102 static final native int imageLoader_init(); |
104 static final native int imageLoader_init(); |
103 static final native void imageLoader_dispose(int handle); |
105 static final native void imageLoader_dispose(int handle); |
104 static final native int imageLoader_load(int handle, String fileName); |
106 static final native int imageLoader_load(int handle, String fileName); |
105 static final native void imageLoader_setLoadSize(int handle, int width, int height); |
107 static final native void imageLoader_setLoadSize(int handle, int width, int height); |
|
108 static final native Point imageLoader_getImageSize(byte[] data); |
106 |
109 |
107 // FontUtils |
110 // FontUtils |
108 static final native int fontUtils_getAscent(int fontHandle); |
111 static final native int fontUtils_getAscent(int fontHandle); |
109 static final native void fontUtils_getBoundingRect(int fontHandle, int[] rect, String str); |
112 static final native void fontUtils_getBoundingRect(int fontHandle, int[] rect, String str); |
110 static final native void fontUtils_getBoundingRect(int fontHanlde, int[] boundingBox, String string, int alignments, int flags, |
113 static final native void fontUtils_getBoundingRect(int fontHanlde, int[] boundingBox, String string, int alignments, int flags, |
123 static final native void windowsurface_endPaint(int handle); |
126 static final native void windowsurface_endPaint(int handle); |
124 static final native void windowsurface_flush(int handle); |
127 static final native void windowsurface_flush(int handle); |
125 static final native int windowsurface_getType(int handle); |
128 static final native int windowsurface_getType(int handle); |
126 static final native void windowsurface_dispose(int handle); |
129 static final native void windowsurface_dispose(int handle); |
127 static final native void windowsurface_refresh(int handle); |
130 static final native void windowsurface_refresh(int handle); |
|
131 static final native void windowsurface_handleSymbianWindowVisibilityChange(int handle, boolean visible); |
128 } |
132 } |