package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gdk/Ocgtk_gdk/Gdk/Wrappers/Monitor/index.html
Module Wrappers.Monitor
type t = [ `monitor | `object_ ] Gobject.objval is_valid : t -> boolReturns %TRUE if the @monitor object corresponds to a physical monitor.
The @monitor becomes invalid when the physical monitor is unplugged or removed.
val get_width_mm : t -> intGets the width in millimeters of the monitor.
val get_subpixel_layout : t -> Gdk_enums.subpixellayoutGets information about the layout of red, green and blue primaries for pixels.
val get_scale_factor : t -> intGets 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.
val get_scale : t -> floatGets 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.
val get_refresh_rate : t -> intGets the refresh rate of the monitor, if available.
The value is in milli-Hertz, so a refresh rate of 60Hz is returned as 60000.
val get_model : t -> string optionGets the string identifying the monitor model, if available.
val get_manufacturer : t -> string optionGets 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).
val get_height_mm : t -> intGets the height in millimeters of the monitor.
val get_geometry : t -> [ `rectangle ] Gobject.objRetrieves 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).
val get_display : t -> [ `display | `object_ ] Gobject.objGets the display that this monitor belongs to.
val get_description : t -> string optionGets a string describing the monitor, if available.
This can be used to identify a monitor in the UI.
val get_connector : t -> string optionGets 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.
val get_valid : t -> boolGet property: valid
val on_invalidate :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id