Oyranos  0.9.7
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  oyMonitorHooks_s
 provide a set of hooks to enable support for a display system More...
 

Typedefs

typedef int(* oySetupMonitorProfile_f) (const char *monitor_name, const char *profil_name, const char *profile_data, size_t profile_data_size)
 set all device system specific properties More...
 
typedef int(* oyUnsetMonitorProfile_f) (const char *monitor_name)
 unset all device system specific properties More...
 
typedef int(* oyGetRectangleFromMonitor_f) (const char *monitor_name, double *x, double *y, double *width, double *height)
 get area dimensions in pixel More...
 
typedef char *(* oyGetMonitorProfile_f) (const char *monitor_name, 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) (const char *monitor_name, 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)
 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 github or the mailing list for further help.

Typedef Documentation

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.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)
typedef int(* oyGetMonitorInfo_f) (const char *monitor_name, 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)

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]monitor_namethe system specific display name
[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
Returns
0 - success; < 0 - issue; > 0 - error
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)
typedef char*(* oyGetMonitorProfile_f) (const char *monitor_name, int flags, size_t *size)

get a system specific monitor profile

Function oyGetMonitorProfile_f

Parameters
[in]monitor_namethe identifier of the device as returned by oyGetAllMonitorNames_f
[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)
typedef int(* oyGetRectangleFromMonitor_f) (const char *monitor_name, 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]monitor_namethe identifier of the device as returned by oyGetAllMonitorNames_f
[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)
typedef int(* oySetupMonitorProfile_f) (const char *monitor_name, 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.

Parameters
[in]monitor_namethe identifier of the device as returned by oyGetAllMonitorNames_f
[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)
typedef int(* oyUnsetMonitorProfile_f) (const char *monitor_name)

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]monitor_namethe identifier of the device as returned by oyGetAllMonitorNames_f
Returns
status
Version
Oyranos Monitor: 0.9.6
Date
2016/11/27
Since
2016/11/27 (Oyranos Monitor: 0.9.6)