Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: DisplayManagerDisplayopenedCallback

[260:7] extends: object

Generated low-level callback wrapper for GIR callback display-opened.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • DisplayManagerDisplayopenedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, display, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: DisplayManagerMeta

[331:14] static extends: object

Generated metadata helpers for DisplayManager class surfaces.

Methods

  • properties ()

    Returns property metadata for DisplayManager.

    • @r A list.
  • signals ()

    Returns signal metadata for DisplayManager.

    • @r A list.

class: DisplayManager

[31:7] extends: object

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");

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • DisplayManager (Handle = null)

    Creates a new DisplayManager by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnDisplayopened (callback Fn, UserData = null)

    Emitted when a display is opened.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (DisplayManager Self, Display Display).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setDefaultdisplay (object Value)

    The default display.

    • @p Value is the new property value.
    • @r None.
  • get_default_display ()

    Gets the default GdkDisplay.

  • list_displays ()

    List all currently open displays.

  • open_display (string name)

    Opens a display.

    • @p name is the name of the display to open.
  • set_default_display (object display)

    Sets @display as the default display.

    • @p display is a GdkDisplay.
    • @r None.
  • displays ()

    Returns list_displays as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use list_displays() when lazy or change-notify access is required.

    • @r An Aussom list of elements.