Oyranos  git-devel
Oyranos is a full featured Color Management System
Data Structures | Typedefs
Monitor Backend Modules

Simple way to hook a display system into a Oyranos device config module. More...

Collaboration diagram for Monitor Backend Modules:

Data Structures

struct  oyMonitorHooks3_s
 provide a set of hooks to enable support for a display system More...
 

Typedefs

typedef oyMonitor_s *(* oyGetMonitorFromName_f) (const char *monitor_name)
 create a monitor object More...
 
typedef int(* oyFreeMonitor_f) (oyMonitor_s **monitor)
 delete a monitor object More...
 
typedef int(* oySetupMonitorCalibration_f) (oyMonitor_s *monitor, const char *profil_name, const char *profile_data, size_t profile_data_size)
 set all device system specific properties More...
 
typedef int(* oySetupMonitorProfile_f) (oyMonitor_s *monitor, const char *profil_name, const char *profile_data, size_t profile_data_size)
 set all device system specific properties More...
 
typedef int(* oyUnsetMonitorProfile_f) (oyMonitor_s *monitor)
 unset all device system specific properties More...
 
typedef int(* oyGetRectangleFromMonitor_f) (oyMonitor_s *monitor, double *x, double *y, double *width, double *height)
 get area dimensions in pixel More...
 
typedef char *(* oyGetMonitorProfile_f) (oyMonitor_s *monitor, int flags, size_t *size)
 get a system specific monitor profile More...
 
typedef int(* oyGetAllMonitorNames_f) (const char *display_name, char ***monitor_names)
 get a list of connected monitors More...
 
typedef int(* oyGetMonitorInfo_f) (oyMonitor_s *monitor, char **manufacturer, char **mnft, char **model, char **serial, char **vendor, char **device_geometry, char **system_port, char **host, int *week, int *year, int *mnft_id, int *model_id, double *colors, char **edid, size_t *edid_size, int refresh_edid, char **debug_info)
 get various informations about a monitor device More...
 

Detailed Description

Simple way to hook a display system into a Oyranos device config module.

The motivation for this API is to interface with Oyranos device configuration module system. The abstraction layer allows to code independently from Oyranos API's with a fairly simple API set. Additionally the resulting code can be used elsewehere independently.

The set of hooks is used by the oyranos_cmm_disp.c module family with some additional headers. As a example take the oyX1 module with its oyranos_monitor_hooks_x11.h header and the implementation in oyranos_monitor_x11.c . The oyX1 CMakeLists.txt section gives more details on how to build the according module in the source tree. Please do not hesitate to contact the developers on gitlab or the mailing list for further help.

Typedef Documentation

◆ oyFreeMonitor_f

typedef int(* oyFreeMonitor_f) (oyMonitor_s **monitor)

delete a monitor object

Release all resources of the monitor object.

Parameters
[in]monitorobject
Returns
0 - success; < 0 - issue; > 0 - error
Version
Oyranos Monitor: 0.9.7
Date
2018/07/22
Since
2018/07/22 (Oyranos Monitor: 0.9.7)

◆ oyGetAllMonitorNames_f

typedef int(* oyGetAllMonitorNames_f) (const char *display_name, char ***monitor_names)

get a list of connected monitors

Function oyGetAllMonitorNames_f

Omit all non active monitors and non connected ports, as Oyranos has no notion of invisible devices.

Parameters
[in]display_namethe system specific display name
[out]monitor_namesa list of monitor identifier
Returns
count of detected monitors
Version
Oyranos Monitor: 0.9.7
Date
2021/11/24
Since
2016/11/27 (Oyranos Monitor: 0.9.6)

◆ oyGetMonitorFromName_f

typedef oyMonitor_s*(* oyGetMonitorFromName_f) (const char *monitor_name)

create a monitor object

Almost any other calls of the hook need this object.

Parameters
[in]monitor_namethe identifier of the device as returned by oyGetAllMonitorNames_f
Returns
object
Version
Oyranos Monitor: 0.9.7
Date
2018/07/22
Since
2018/07/22 (Oyranos Monitor: 0.9.7)

◆ oyGetMonitorInfo_f

typedef int(* oyGetMonitorInfo_f) (oyMonitor_s *monitor, char **manufacturer, char **mnft, char **model, char **serial, char **vendor, char **device_geometry, char **system_port, char **host, int *week, int *year, int *mnft_id, int *model_id, double *colors, char **edid, size_t *edid_size, int refresh_edid, char **debug_info)

get various informations about a monitor device

Function oyGetMonitorInfo_f

Get the informations about the device. Some values are host or system specific. If the EDID is available return that and omit all properties which can later be extracted from EDID. The from EDID values are meant to provide a way for system specific replacements in case the EDID is currently not available.

Parameters
[in]monitorobject
[out]manufacturerfrom EDID
[out]mnftthe three letter abbeviation from EDID
[out]modelfrom EDID
[out]serialfrom EDID, This property is very specific to a given device. If nothing else is returned, then generic profiles might not work.
[out]vendorfrom EDID
[out]device_geometrywidthxheight+x_offset+y_offset relative to the main monitor
[out]system_portthe system specific port name
[out]hostcomputer name
[out]weekfrom EDID
[out]yearfrom EDID
[out]mnft_idfrom EDID
[out]model_idfrom EDID
[out]colorsA list of primary color values. They are used to generate a fallback ICC profile. The values shall contain:
  • 0: red_x
  • 1: red_y
  • 2: green_x
  • 3: green_y
  • 4: blue_x
  • 5: blue_y
  • 6: white_x
  • 7: white_y
  • 8: gamma The values are contained in EDID, but could be obtained from other sources as well.
[out]edidThe EDID data blob as returned by i2c.
[out]edid_sizeThe edid data blob size.
[in]refresh_edidrequest a edid refresh
[in,out]debug_infoadditional text infos
Returns
0 - success; < 0 - issue; > 0 - error
Version
Oyranos Monitor: 0.9.7
Date
2021/11/24
Since
2016/11/27 (Oyranos Monitor: 0.9.6)

◆ oyGetMonitorProfile_f

typedef char*(* oyGetMonitorProfile_f) (oyMonitor_s *monitor, int flags, size_t *size)

get a system specific monitor profile

Function oyGetMonitorProfile_f

Parameters
[in]monitorobject
[in]flagsprofile selector
  • default: Return a target space profile. That will be the device profile or with a color server running typical sRGB.
  • 0x01: Return the real device profile. The requestor knows how to opt-out of color management and handle early color transforms by it own.
[out]sizereturned data block size
Returns
binary ICC profile
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)

◆ oyGetRectangleFromMonitor_f

typedef int(* oyGetRectangleFromMonitor_f) (oyMonitor_s *monitor, double *x, double *y, double *width, double *height)

get area dimensions in pixel

Function oyGetRectangleFromMonitor_f

Display devices typical cover a certain pixel area and have offsets to neighbours.

Parameters
[in]monitorobject
[in]xx offset
[in]yy offset
[in]widthw dimension
[in]heighth dimension
Returns
status
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)

◆ oySetupMonitorCalibration_f

typedef int(* oySetupMonitorCalibration_f) (oyMonitor_s *monitor, const char *profil_name, const char *profile_data, size_t profile_data_size)

set all device system specific properties

Function oySetupMonitorCalibration_f

The device type might need special setup to make it calibrated. The calibration data is inside the non standard vcgt tag. This VideCardGammaTable (vcgt) is uploaded into the devices gamma ramps.

Parameters
[in]monitorobject
[in]profle_namethe fopen()able on disk file name
[in]profile_dataa memory block containing a ICC profile
[in]profile_data_sizethe size of profile_data
Returns
status flags:
  • 0 : success, plain vgct load
  • OY_CALIB_ERROR : error, something went wrong with system; That can be authorisation problems, API or tool misses ...
  • OY_CALIB_VCGT_NOT_CONTAINED : no vcgt found
  • OY_CALIB_DEVICE_NOT_SUPPORTED : device supports no gamma setup
  • OY_CALIB_NOT_IMPLEMENTED : does nothing, not implemented
  • OY_CALIB_WITH_PROFILE_SETUP : combined in profile load; e.g. on OS X
Version
Oyranos Monitor: 0.9.7
Date
2018/02/22
Since
2018/02/22 (Oyranos Monitor: 0.9.7)

◆ oySetupMonitorProfile_f

typedef int(* oySetupMonitorProfile_f) (oyMonitor_s *monitor, const char *profil_name, const char *profile_data, size_t profile_data_size)

set all device system specific properties

Function oySetupMonitorProfile_f

The device type might need special setup to get a ICC profile assigned, visible in a device specific manner and transported by means of the device handling protocols and API's. This function is for the device specific setup part two.

Parameters
[in]monitorobject
[in]profle_namethe fopen()able on disk file name
[in]profile_dataa memory block containing a ICC profile
[in]profile_data_sizethe size of profile_data
Returns
status
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)

◆ oyUnsetMonitorProfile_f

typedef int(* oyUnsetMonitorProfile_f) (oyMonitor_s *monitor)

unset all device system specific properties

Function oyUnsetMonitorProfile_f

The device type might need special setup to get a ICC profile assigned, visible in a device specific manner and transported by means of the device handling protocols and API's. This function is for the device specific setup cleaning.

Parameters
[in]monitorobject
Returns
status
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)