Package com.jogamp.nativewindow.swt
Class SWTAccessor
java.lang.Object
com.jogamp.nativewindow.swt.SWTAccessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanstatic final booleanstatic final booleanstatic final booleanstatic final Class<?>static final com.jogamp.common.util.VersionNumber -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longcreateCompatibleGDKChildWindow(org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height) static longcreateCompatibleX11ChildWindow(AbstractGraphicsScreen screen, org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height) static voiddestroyGDKWindow(long gdkWindow) static voiddestroyX11Window(AbstractGraphicsDevice device, long x11Window) static voiddisposeGC(org.eclipse.swt.widgets.Control swtControl, long gc, org.eclipse.swt.graphics.GCData gcData) static voidfocusGDKWindow(long gdkWindow) static longgdk_widget_get_window(long handle) static longgdk_window_get_xdisplay(long window) static longgdk_window_get_xwindow(long window) static voidgdk_window_set_back_pixmap(long window, long pixmap, boolean parent_relative) static AbstractGraphicsDevicegetDevice(org.eclipse.swt.widgets.Control swtControl) static longgetHandle(org.eclipse.swt.widgets.Control swtControl) static intgetNativeVisualID(AbstractGraphicsDevice device, long windowHandle) static AbstractGraphicsScreengetScreen(AbstractGraphicsDevice device, int screen) static longgetWindowHandle(org.eclipse.swt.widgets.Control swtControl) static com.jogamp.common.util.VersionNumberstatic voidRuns the specified action in an SWT compatible thread, which is: Mac OSX Main Thread: Run on OSX UI main thread.static voidRuns the specified action on the SWT UI thread.static booleanstatic longnewGC(org.eclipse.swt.widgets.Control swtControl, org.eclipse.swt.graphics.GCData gcData) static voidresizeGDKWindow(org.eclipse.swt.graphics.Rectangle clientArea, long gdkWindow) static voidresizeX11Window(AbstractGraphicsDevice device, org.eclipse.swt.graphics.Rectangle clientArea, long x11Window) static voidsetRealized(org.eclipse.swt.widgets.Control swtControl, boolean realize) static voidshowGDKWindow(long gdkWindow) static boolean
-
Field Details
-
isOSX
public static final boolean isOSX -
isWindows
public static final boolean isWindows -
isX11
public static final boolean isX11 -
isX11GTK
public static final boolean isX11GTK -
OS_gtk_class
-
OS_gtk_version
public static final com.jogamp.common.util.VersionNumber OS_gtk_version
-
-
Constructor Details
-
SWTAccessor
public SWTAccessor()
-
-
Method Details
-
isUsingLongHandles
public static boolean isUsingLongHandles() -
useX11GTK
public static boolean useX11GTK() -
GTK_VERSION
public static com.jogamp.common.util.VersionNumber GTK_VERSION() -
gdk_widget_get_window
public static long gdk_widget_get_window(long handle) -
gdk_window_get_xdisplay
public static long gdk_window_get_xdisplay(long window) -
gdk_window_get_xwindow
public static long gdk_window_get_xwindow(long window) -
gdk_window_set_back_pixmap
public static void gdk_window_set_back_pixmap(long window, long pixmap, boolean parent_relative) -
getHandle
public static long getHandle(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException - Parameters:
swtControl- the SWT Control to retrieve the native widget-handle from- Returns:
- the native widget-handle
- Throws:
NativeWindowException- if the widget handle is null
-
setRealized
public static void setRealized(org.eclipse.swt.widgets.Control swtControl, boolean realize) throws NativeWindowException - Throws:
NativeWindowException
-
getDevice
public static AbstractGraphicsDevice getDevice(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException, UnsupportedOperationException - Parameters:
swtControl- the SWT Control to retrieve the native device handle from- Returns:
- the AbstractGraphicsDevice w/ the native device handle
- Throws:
NativeWindowException- if the widget handle is nullUnsupportedOperationException- if the windowing system is not supported
-
getScreen
- Parameters:
device-screen- -1 is default screen of the given device, e.g. maybe 0 or determined by native API. >= 0 is specific screen- Returns:
-
getNativeVisualID
-
getWindowHandle
public static long getWindowHandle(org.eclipse.swt.widgets.Control swtControl) throws NativeWindowException, UnsupportedOperationException - Parameters:
swtControl- the SWT Control to retrieve the native window handle from- Returns:
- the native window handle
- Throws:
NativeWindowException- if the widget handle is nullUnsupportedOperationException- if the windowing system is not supported
-
newGC
public static long newGC(org.eclipse.swt.widgets.Control swtControl, org.eclipse.swt.graphics.GCData gcData) -
disposeGC
public static void disposeGC(org.eclipse.swt.widgets.Control swtControl, long gc, org.eclipse.swt.graphics.GCData gcData) -
invoke
Runs the specified action in an SWT compatible thread, which is:- Mac OSX
- Main Thread: Run on OSX UI main thread. 'wait' is implemented on Java site via lock/wait on
RunnableTaskto not freeze OSX main thread.
- Main Thread: Run on OSX UI main thread. 'wait' is implemented on Java site via lock/wait on
- Linux, Windows, ..
- Current thread.
- See Also:
-
Platform.AWT_AVAILABLEPlatform.getOSType()
- Mac OSX
-
invoke
Runs the specified action on the SWT UI thread.If
displayis disposed or the current thread is the SWT UI threadinvoke(boolean, Runnable)is being used.- See Also:
-
createCompatibleX11ChildWindow
public static long createCompatibleX11ChildWindow(AbstractGraphicsScreen screen, org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height) -
resizeX11Window
public static void resizeX11Window(AbstractGraphicsDevice device, org.eclipse.swt.graphics.Rectangle clientArea, long x11Window) -
destroyX11Window
-
createCompatibleGDKChildWindow
public static long createCompatibleGDKChildWindow(org.eclipse.swt.widgets.Control swtControl, int visualID, int width, int height) -
showGDKWindow
public static void showGDKWindow(long gdkWindow) -
focusGDKWindow
public static void focusGDKWindow(long gdkWindow) -
resizeGDKWindow
public static void resizeGDKWindow(org.eclipse.swt.graphics.Rectangle clientArea, long gdkWindow) -
destroyGDKWindow
public static void destroyGDKWindow(long gdkWindow)
-