Package ch.bailu.gtk.gdk
Klasse DisplayManager
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gdk.DisplayManager
- Alle implementierten Schnittstellen:
PointerInterface
Offers notification when displays appear or disappear.
`GdkDisplayManager` is a singleton object.
You can use [func@Gdk.DisplayManager.get] to obtain the `GdkDisplayManager`
singleton, but that should be rarely necessary. Typically, initializing
GTK opens a display that you can work with without ever accessing the
`GdkDisplayManager`.
The GDK library can be built with support for multiple backends.
The `GdkDisplayManager` object determines which backend is used
at runtime.
In the rare case that you need to influence which of the backends
is being used, you can use [func@Gdk.set_allowed_backends]. Note
that you need to call this function before initializing GTK.
## Backend-specific code
When writing backend-specific code that is supposed to work with
multiple GDK backends, you have to consider both compile time and
runtime. At compile time, use the `GDK_WINDOWING_X11`, `GDK_WINDOWING_WIN32`
macros, etc. to find out which backends are present in the GDK library
you are building your application against. At runtime, use type-check
macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
```c
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
{
// make X11-specific calls here
}
else
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_DISPLAY (display))
{
// make Quartz-specific calls here
}
else
#endif
g_error ("Unsupported GDK backend");
```
`GdkDisplayManager` is a singleton object.
You can use [func@Gdk.DisplayManager.get] to obtain the `GdkDisplayManager`
singleton, but that should be rarely necessary. Typically, initializing
GTK opens a display that you can work with without ever accessing the
`GdkDisplayManager`.
The GDK library can be built with support for multiple backends.
The `GdkDisplayManager` object determines which backend is used
at runtime.
In the rare case that you need to influence which of the backends
is being used, you can use [func@Gdk.set_allowed_backends]. Note
that you need to call this function before initializing GTK.
## Backend-specific code
When writing backend-specific code that is supposed to work with
multiple GDK backends, you have to consider both compile time and
runtime. At compile time, use the `GDK_WINDOWING_X11`, `GDK_WINDOWING_WIN32`
macros, etc. to find out which backends are present in the GDK library
you are building your application against. At runtime, use type-check
macros like GDK_IS_X11_DISPLAY() to find out which backend is in use:
```c
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
{
// make X11-specific calls here
}
else
#endif
#ifdef GDK_WINDOWING_MACOS
if (GDK_IS_MACOS_DISPLAY (display))
{
// make Quartz-specific calls here
}
else
#endif
g_error ("Unsupported GDK backend");
```
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic DisplayManager
get()
Gets the singleton `GdkDisplayManager` object.static ClassHandler
Gets the default `GdkDisplay`.static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
List all currently open displays.Connect to signal "display-opened".openDisplay
(Str name) Opens a display.openDisplay
(String name) Opens a display.void
setDefaultDisplay
(Display display) Sets @display as the default display.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
Konstruktordetails
-
Methodendetails
-
getClassHandler
-
getDefaultDisplay
Gets the default `GdkDisplay`.- Gibt zurück:
- a `GdkDisplay`
-
listDisplays
List all currently open displays.- Gibt zurück:
- a newly allocated `GSList` of `GdkDisplay` objects
-
openDisplay
Opens a display.- Parameter:
name
- the name of the display to open- Gibt zurück:
- a `GdkDisplay`, or %NULL if the display could not be opened
-
openDisplay
Opens a display.- Parameter:
name
- the name of the display to open- Gibt zurück:
- a `GdkDisplay`, or %NULL if the display could not be opened
-
setDefaultDisplay
Sets @display as the default display.- Parameter:
display
- a `GdkDisplay`
-
onDisplayOpened
Connect to signal "display-opened".
SeeDisplayManager.OnDisplayOpened.onDisplayOpened(ch.bailu.gtk.gdk.Display)
for signal description.
FieldSIGNAL_ON_DISPLAY_OPENED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
get
Gets the singleton `GdkDisplayManager` object.
When called for the first time, this function consults the
`GDK_BACKEND` environment variable to find out which of the
supported GDK backends to use (in case GDK has been compiled
with multiple backends).
Applications can use [func@set_allowed_backends] to limit what
backends will be used.- Gibt zurück:
- The global `GdkDisplayManager` singleton
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-