Klasse Monitor

Alle implementierten Schnittstellen:
PointerInterface

public class Monitor extends PropertyHolder
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.

https://docs.gtk.org/gdk4/class.Monitor.html

  • Felddetails

  • Konstruktordetails

  • Methodendetails

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getConnector

      public Str getConnector()
      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.
      Gibt zurück:
      the name of the connector
    • getDescription

      public Str getDescription()
      Gets a string describing the monitor, if available.

      This can be used to identify a monitor in the UI.
      Gibt zurück:
      the monitor description
    • getDisplay

      public Display getDisplay()
      Gets the display that this monitor belongs to.
      Gibt zurück:
      the display
    • getGeometry

      public void getGeometry(@Nonnull Rectangle geometry)
      Retrieves the size and position of the monitor within the
      display coordinate space.

      The returned geometry is in ”application pixels”, not in
      ”device pixels” (see [method@Gdk.Monitor.get_scale]).
      Parameter:
      geometry - a `GdkRectangle` to be filled with the monitor geometry
    • getHeightMm

      public int getHeightMm()
      Gets the height in millimeters of the monitor.
      Gibt zurück:
      the physical height of the monitor
    • getManufacturer

      public Str getManufacturer()
      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](https://uefi.org/pnp_id_list).
      Gibt zurück:
      the name of the manufacturer
    • getModel

      public Str getModel()
      Gets the string identifying the monitor model, if available.
      Gibt zurück:
      the monitor model
    • getRefreshRate

      public int getRefreshRate()
      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.
      Gibt zurück:
      the refresh rate in milli-Hertz, or 0
    • getScale

      public double getScale()
      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.
      Gibt zurück:
      the scale
    • getScaleFactor

      public int getScaleFactor()
      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.
      Gibt zurück:
      the scale factor
    • getSubpixelLayout

      public int getSubpixelLayout()
      Gets information about the layout of red, green and blue
      primaries for pixels.
      Gibt zurück:
      the subpixel layout
    • getWidthMm

      public int getWidthMm()
      Gets the width in millimeters of the monitor.
      Gibt zurück:
      the physical width of the monitor
    • isValid

      public boolean isValid()
      Returns %TRUE if the @monitor object corresponds to a
      physical monitor.

      The @monitor becomes invalid when the physical monitor
      is unplugged or removed.
      Gibt zurück:
      %TRUE if the object corresponds to a physical monitor
    • onInvalidate

      public SignalHandler onInvalidate(Monitor.OnInvalidate signal)
      Connect to signal "invalidate".
      See Monitor.OnInvalidate.onInvalidate() for signal description.
      Field SIGNAL_ON_INVALIDATE 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.
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()