public class SWTAccessor extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
isOSX |
static boolean |
isWindows |
static boolean |
isX11 |
static boolean |
isX11GTK |
static Class<?> |
OS_gtk_class |
static VersionNumber |
OS_gtk_version |
Constructor and Description |
---|
SWTAccessor() |
Modifier and Type | Method and Description |
---|---|
static long |
createCompatibleGDKChildWindow(org.eclipse.swt.widgets.Control swtControl,
int visualID,
int width,
int height) |
static long |
createCompatibleX11ChildWindow(AbstractGraphicsScreen screen,
org.eclipse.swt.widgets.Control swtControl,
int visualID,
int width,
int height) |
static void |
destroyGDKWindow(long gdkWindow) |
static void |
destroyX11Window(AbstractGraphicsDevice device,
long x11Window) |
static void |
disposeGC(org.eclipse.swt.widgets.Control swtControl,
long gc,
org.eclipse.swt.graphics.GCData gcData) |
static void |
focusGDKWindow(long gdkWindow) |
static long |
gdk_widget_get_window(long handle) |
static long |
gdk_window_get_xdisplay(long window) |
static long |
gdk_window_get_xwindow(long window) |
static void |
gdk_window_set_back_pixmap(long window,
long pixmap,
boolean parent_relative) |
static AbstractGraphicsDevice |
getDevice(org.eclipse.swt.widgets.Control swtControl) |
static long |
getHandle(org.eclipse.swt.widgets.Control swtControl) |
static int |
getNativeVisualID(AbstractGraphicsDevice device,
long windowHandle) |
static AbstractGraphicsScreen |
getScreen(AbstractGraphicsDevice device,
int screen) |
static long |
getWindowHandle(org.eclipse.swt.widgets.Control swtControl) |
static VersionNumber |
GTK_VERSION() |
static void |
invoke(boolean wait,
Runnable runnable)
Runs the specified action in an SWT compatible thread, which is:
Mac OSX
Main Thread: Run on OSX UI main thread.
|
static void |
invoke(org.eclipse.swt.widgets.Display display,
boolean wait,
Runnable runnable)
Runs the specified action on the SWT UI thread.
|
static boolean |
isUsingLongHandles() |
static long |
newGC(org.eclipse.swt.widgets.Control swtControl,
org.eclipse.swt.graphics.GCData gcData) |
static void |
resizeGDKWindow(org.eclipse.swt.graphics.Rectangle clientArea,
long gdkWindow) |
static void |
resizeX11Window(AbstractGraphicsDevice device,
org.eclipse.swt.graphics.Rectangle clientArea,
long x11Window) |
static void |
setRealized(org.eclipse.swt.widgets.Control swtControl,
boolean realize) |
static void |
showGDKWindow(long gdkWindow) |
static boolean |
useX11GTK() |
public static final boolean isOSX
public static final boolean isWindows
public static final boolean isX11
public static final boolean isX11GTK
public static final Class<?> OS_gtk_class
public static final VersionNumber OS_gtk_version
public static boolean isUsingLongHandles()
public static boolean useX11GTK()
public static VersionNumber GTK_VERSION()
public static long gdk_widget_get_window(long handle)
public static long gdk_window_get_xdisplay(long window)
public static long gdk_window_get_xwindow(long window)
public static void gdk_window_set_back_pixmap(long window, long pixmap, boolean parent_relative)
public static long getHandle(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException
swtControl
- the SWT Control to retrieve the native widget-handle fromNativeWindowException
- if the widget handle is nullpublic static void setRealized(org.eclipse.swt.widgets.Control swtControl, boolean realize) throws NativeWindowException
NativeWindowException
public static AbstractGraphicsDevice getDevice(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException, UnsupportedOperationException
swtControl
- the SWT Control to retrieve the native device handle fromNativeWindowException
- if the widget handle is nullUnsupportedOperationException
- if the windowing system is not supportedpublic static AbstractGraphicsScreen getScreen(AbstractGraphicsDevice device, int screen)
device
- screen
- -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screenpublic static int getNativeVisualID(AbstractGraphicsDevice device, long windowHandle)
public static long getWindowHandle(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException, UnsupportedOperationException
swtControl
- the SWT Control to retrieve the native window handle fromNativeWindowException
- if the widget handle is nullUnsupportedOperationException
- if the windowing system is not supportedpublic static long newGC(org.eclipse.swt.widgets.Control swtControl, org.eclipse.swt.graphics.GCData gcData)
public static void disposeGC(org.eclipse.swt.widgets.Control swtControl, long gc, org.eclipse.swt.graphics.GCData gcData)
public static void invoke(boolean wait, Runnable runnable)
RunnableTask
to not freeze OSX main thread.Platform.AWT_AVAILABLE
,
Platform.getOSType()
public static void invoke(org.eclipse.swt.widgets.Display display, boolean wait, Runnable runnable)
If display
is disposed or the current thread is the SWT UI thread
invoke(boolean, Runnable)
is being used.
invoke(boolean, Runnable)
public static long createCompatibleX11ChildWindow(AbstractGraphicsScreen screen, org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height)
public static void resizeX11Window(AbstractGraphicsDevice device, org.eclipse.swt.graphics.Rectangle clientArea, long x11Window)
public static void destroyX11Window(AbstractGraphicsDevice device, long x11Window)
public static long createCompatibleGDKChildWindow(org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height)
public static void showGDKWindow(long gdkWindow)
public static void focusGDKWindow(long gdkWindow)
public static void resizeGDKWindow(org.eclipse.swt.graphics.Rectangle clientArea, long gdkWindow)
public static void destroyGDKWindow(long gdkWindow)
Copyright 2010 JogAmp Community.