Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: MonitorInvalidateCallback

[273:7] extends: object

Generated low-level callback wrapper for GIR callback invalidate.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • MonitorInvalidateCallback (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, 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: Monitor

[16:7] extends: object

Represents the individual outputs that are associated with a GdkDisplay. GdkDisplay keeps a GListModel to enumerate and monitor monitors with [method@Gdk.Display.get_monitors]. You can use [method@Gdk.Display.get_monitor_at_surface] to find a particular monitor.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Monitor (Handle = null)

    Creates a new Monitor 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.
  • setOnInvalidate (callback Fn, UserData = null)

    Emitted when the output represented by @monitor gets disconnected.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (Monitor Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • get_connector ()

    Gets the name of the monitor's connector, if available. These are strings such as "eDP-1", or "HDMI-2". They depend on software and hardware configuration, and should not be relied on as stable identifiers of a specific monitor.

  • get_description ()

    Gets a string describing the monitor, if available. This can be used to identify a monitor in the UI.

  • get_display ()

    Gets the display that this monitor belongs to.

  • get_height_mm ()

    Gets the height in millimeters of the monitor.

  • get_manufacturer ()

    Gets the name or PNP ID of the monitor's manufacturer. Note that this value might also vary depending on actual display backend. The PNP ID registry is located at https://uefi.org/pnp_id_list.

  • get_model ()

    Gets the string identifying the monitor model, if available.

  • get_refresh_rate ()

    Gets the refresh rate of the monitor, if available. The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.

  • get_scale ()

    Gets the internal scale factor that maps from monitor coordinates to device pixels. This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a surface where it is better to use [method@Gdk.Surface.get_scale] instead.

  • get_scale_factor ()

    Gets the internal scale factor that maps from monitor coordinates to device pixels. On traditional systems this is 1, but on very high density outputs it can be a higher value (often 2). This can be used if you want to create pixel based data for a particular monitor, but most of the time you’re drawing to a surface where it is better to use [method@Gdk.Surface.get_scale_factor] instead.

  • get_subpixel_layout ()

    Gets information about the layout of red, green and blue primaries for pixels.

  • get_width_mm ()

    Gets the width in millimeters of the monitor.

  • is_valid ()

    Returns %TRUE if the @monitor object corresponds to a physical monitor. The @monitor becomes invalid when the physical monitor is unplugged or removed.

class: MonitorMeta

[343:14] static extends: object

Generated metadata helpers for Monitor class surfaces.

Methods

  • properties ()

    Returns property metadata for Monitor.

    • @r A list.
  • signals ()

    Returns signal metadata for Monitor.

    • @r A list.