Oyranos Color Management System API
Functions
Monitor API

Hardware detection and profile selection for monitors. More...

Functions

int oyGetMonitorInfo (const char *display_name, char **manufacturer, char **model, char **serial, char **system_port, char **display_geometry, oyBlob_s **edid, oyAlloc_f allocate_func)
 brief pick up monitor information with Xlib More...
 
int oyGetScreenFromPosition (const char *display_name, int x, int y)
 screen number from position More...
 
char * oyGetDisplayNameFromPosition2 (const char *device_type, const char *device_class, const char *display_name, int x, int y, oyAlloc_f allocateFunc)
 display name from position More...
 
char * oyGetDisplayNameFromPosition (const char *display_name, int x, int y, oyAlloc_f allocateFunc)
 display name from position More...
 
char * oyGetMonitorProfile (const char *device_name, size_t *size, oyAlloc_f allocate_func)
 get the monitor profile from the server More...
 
char * oyMonitorProfileNameFromDB (oyConfig_s *device, oyAlloc_f allocateFunc)
 get the monitor profile filename from the device database More...
 
char * oyGetMonitorProfileNameFromDB (const char *display_name, oyAlloc_f allocateFunc)
 get the monitor profile filename from the device profile database More...
 
int oySetMonitorProfile (const char *display_name, const char *profile_name)
 set the monitor profile by filename More...
 
int oyActivateMonitorProfiles (const char *display_name)
 activate the monitor using the stored configuration More...
 

Detailed Description

Hardware detection and profile selection for monitors.

The notation of screens for the X Window system is equal for traditional and Xinerama screens.
The X11 libraries will be loaded at runtime.

The functions can be studied by looking at the oyranos-monitor utiliy. The code for that tool is in oyranos_gamma.c .

Function Documentation

int oyActivateMonitorProfiles ( const char *  display_name)

activate the monitor using the stored configuration

Function: oyActivateMonitorProfiles

Deprecated:
because the functionality shall be integrated into a general framwork

Activate in case the appropriate profile is not yet setup in the server.
To deactivate a profile in the server call oySetMonitorProfile( device_name, 0 ).

See also
oySetMonitorProfile for permanently configuring a monitor
Parameters
display_namethe device string
Returns
error
Version
Oyranos: 0.1.10
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2009/01/28

References OY_TYPE_STD, oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_Get(), oyConfigs_s::oyConfigs_Release(), oyDeviceSetup(), oyOptions_s::oyOptions_Release(), and oyOptions_s::oyOptions_SetFromText().

char* oyGetDisplayNameFromPosition ( const char *  display_name,
int  x,
int  y,
oyAlloc_f  allocateFunc 
)

display name from position

Function: oyGetDisplayNameFromPosition This function will hit exact results only with Xinerama.

Parameters
display_nameraw display string
xx position on screen
yy position on screen
allocateFuncfunction used to allocate memory for the string
Returns
display name
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2008/10/24

we want a fuzzy look at our display, not the narrow "device_name"

References OY_TYPE_STD, oyConfig_s::oyConfig_Find(), oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_Get(), oyConfigs_s::oyConfigs_Release(), oyOBJECT_RECTANGLE_S, oyOption_s::oyOption_GetStruct(), oyOptions_s::oyOptions_Release(), oyOptions_s::oyOptions_SetFromText(), and oyRectangle_s::oyRectangle_PointIsInside().

char* oyGetDisplayNameFromPosition2 ( const char *  device_type,
const char *  device_class,
const char *  display_name,
int  x,
int  y,
oyAlloc_f  allocateFunc 
)

display name from position

Function: oyGetDisplayNameFromPosition2 This function will hit exact results only with Xinerama.

Parameters
[in]device_typethe device type, e.g. OY_TYPE_STD, defaults to OY_TYPE_STD (optional)
[in]device_classregistration oyFILTER_REG_APPLICATION part, e.g. "monitor", mandatory
display_nameraw display string
xx position on screen
yy position on screen
allocateFuncfunction used to allocate memory for the string
Returns
display name
Version
Oyranos: 0.1.13
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2010/11/12

we want a fuzzy look at our display, not the narrow "device_name"

References OY_TYPE_STD, oyConfig_s::oyConfig_Find(), oyConfig_s::oyConfig_FindString(), oyConfig_s::oyConfig_Release(), oyConfigs_s::oyConfigs_Count(), oyConfigs_s::oyConfigs_FromDeviceClass(), oyConfigs_s::oyConfigs_Get(), oyConfigs_s::oyConfigs_Release(), oyOBJECT_RECTANGLE_S, oyOption_s::oyOption_GetStruct(), oyOptions_s::oyOptions_Release(), oyOptions_s::oyOptions_SetFromText(), and oyRectangle_s::oyRectangle_PointIsInside().

int oyGetMonitorInfo ( const char *  display_name,
char **  manufacturer,
char **  model,
char **  serial,
char **  system_port,
char **  display_geometry,
oyBlob_s **  edid,
oyAlloc_f  allocate_func 
)

brief pick up monitor information with Xlib

Function: oyGetMonitorInfo

Deprecated:
because the functionality shall be integrated into a general framwork
Parameters
display_namethe display string
[out]manufacturerthe manufacturer of the monitor device
[out]modelthe model of the monitor device
[out]serialthe serial number of the monitor device
[out]system_portthe system port name the monitor device is connectted to
[out]display_geometrythe display geometry description of the monitor
[out]edidthe edid data blob of the monitor device
allocate_functhe allocator for the above strings
Returns
error
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2008/10/24
char* oyGetMonitorProfile ( const char *  device_name,
size_t *  size,
oyAlloc_f  allocate_func 
)

get the monitor profile from the server

Function: oyGetMonitorProfile

Deprecated:
because the functionality shall be integrated into a general framwork
Parameters
device_namethe display string
[out]sizethe size of profile
allocate_funcfunction used to allocate memory for the profile
Returns
the memory block containing the profile
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2009/02/10

References OY_TYPE_STD, oyConfig_s::oyConfig_Release(), oyDeviceGet(), oyDeviceGetProfile(), and oyProfile_s::oyProfile_GetMem().

char* oyGetMonitorProfileNameFromDB ( const char *  display_name,
oyAlloc_f  allocateFunc 
)

get the monitor profile filename from the device profile database

Function: oyGetMonitorProfileNameFromDB

Deprecated:
because the functionality shall be integrated into a general framwork
Parameters
display_namethe display string
allocateFuncfunction used to allocate memory for the string
Returns
the profiles filename (if localy available)
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2008/10/24
  1. get monitor device
  2. check for success of device detection

References OY_SLASH_C, OY_TYPE_STD, oyConfig_s::oyConfig_Release(), oyDeviceGet(), oyDeviceProfileFromDB(), oyOptions_s::oyOptions_Release(), and oyProfile_s::oyProfile_Release().

int oyGetScreenFromPosition ( const char *  display_name,
int  x,
int  y 
)

screen number from position

Function: oyGetScreenFromPosition

Deprecated:
because the functionality shall be integrated into a general framwork

This function will hit exact results only with Xinerama.
a platform specific function

Parameters
display_namethe display string
xx position on screen
yy position on screen
Returns
screen
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2008/10/24
char* oyMonitorProfileNameFromDB ( oyConfig_s device,
oyAlloc_f  allocateFunc 
)

get the monitor profile filename from the device database

Function: oyMonitorProfileNameFromDB

Deprecated:
because the functionality shall be integrated into a general framwork
Parameters
devicethe device
allocateFuncuser function used to allocate memory
Returns
the profile filename
Version
Oyranos: 0.1.10
Since
2009/02/08 (Oyranos: 0.1.10)
Date
2009/02/08

References OY_SLASH_C, oyDeviceProfileFromDB(), and oyProfile_s::oyProfile_Release().

int oySetMonitorProfile ( const char *  display_name,
const char *  profile_name 
)

set the monitor profile by filename

Function: oySetMonitorProfile

Deprecated:
because the functionality shall be integrated into a general framwork

The profile_name argument does two things. Set to zero the function solely unsets the graphic card luts and the server stored profile. So pretty all server side information should go away.
With a profile name given the function will lookup the monitor in the Oyranos device database and stores the given profile there.
To sum up, to set a new profile please call the following sequence:

// store new settings in the Oyranos data base
oySetMonitorProfile( display_name, profile_name );
// remove the server entries
oySetMonitorProfile( display_name, 0 );
// update the window server from the newly Oyranos data base settings
oyActivateMonitorProfiles( display_name );
Parameters
display_namethe display string
profile_namethe file to use as monitor profile or 0 to unset
Returns
error
Version
Oyranos: 0.1.8
Since
2005/00/00 (Oyranos: 0.1.x)
Date
2009/01/28
  1. obtain detailed and expensive device informations

1.1 add "properties" call to module arguments

1.2 get monitor device

  1. check for success of device detection

References OY_TYPE_STD, oyConfig_s::oyConfig_Release(), oyDeviceGet(), oyDeviceSetProfile(), oyDeviceUnset(), oyOptions_s::oyOptions_Release(), and oyOptions_s::oyOptions_SetFromText().