Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

NVCtrl.c File Reference

#include <stdlib.h>
#include <X11/Xlibint.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#include "NVCtrlLib.h"
#include "nv_control.h"

Include dependency graph for NVCtrl.c:


Defines

#define XTHREADS
#define NEED_EVENTS
#define NEED_REPLIES
#define NVCTRL_EXT_NEED_CHECK   (XPointer)(~0)
#define NVCTRL_EXT_NEED_NOTHING   (XPointer)(0)
#define NVCTRL_EXT_NEED_TARGET_SWAP   (XPointer)(1)
#define XNVCTRLCheckExtension(dpy, i, val)   XextCheckExtension (dpy, i, nvctrl_extension_name, val)
#define XNVCTRLSimpleCheckExtension(dpy, i)   XextSimpleCheckExtension (dpy, i, nvctrl_extension_name)

Functions

static int close_display ()
static Bool wire_to_event ()
static XEXT_GENERATE_FIND_DISPLAY (find_display, nvctrl_ext_info, nvctrl_extension_name,&nvctrl_extension_hooks, NV_CONTROL_EVENTS, NVCTRL_EXT_NEED_CHECK) static XEXT_GENERATE_CLOSE_DISPLAY(close_display
static static nvctrl_ext_info
void 
XNVCTRLCheckTargetData (Display *dpy, XExtDisplayInfo *info, int *target_type, int *target_id)
Bool XNVCTRLQueryExtension (Display *dpy, int *event_basep, int *error_basep)
Bool XNVCTRLQueryVersion (Display *dpy, int *major, int *minor)
Bool XNVCTRLIsNvScreen (Display *dpy, int screen)
Bool XNVCTRLQueryTargetCount (Display *dpy, int target_type, int *value)
void XNVCTRLSetTargetAttribute (Display *dpy, int target_type, int target_id, unsigned int display_mask, unsigned int attribute, int value)
void XNVCTRLSetAttribute (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, int value)
Bool XNVCTRLSetAttributeAndGetStatus (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, int value)
Bool XNVCTRLQueryTargetAttribute (Display *dpy, int target_type, int target_id, unsigned int display_mask, unsigned int attribute, int *value)
Bool XNVCTRLQueryAttribute (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, int *value)
Bool XNVCTRLQueryTargetStringAttribute (Display *dpy, int target_type, int target_id, unsigned int display_mask, unsigned int attribute, char **ptr)
Bool XNVCTRLQueryStringAttribute (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, char **ptr)
Bool XNVCTRLSetStringAttribute (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, char *ptr)
Bool XNVCTRLQueryValidTargetAttributeValues (Display *dpy, int target_type, int target_id, unsigned int display_mask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values)
Bool XNVCTRLQueryValidAttributeValues (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, NVCTRLAttributeValidValuesRec *values)
void XNVCTRLSetGvoColorConversion (Display *dpy, int screen, float colorMatrix[3][3], float colorOffset[3], float colorScale[3])
Bool XNVCTRLQueryGvoColorConversion (Display *dpy, int screen, float colorMatrix[3][3], float colorOffset[3], float colorScale[3])
Bool XNVCtrlSelectTargetNotify (Display *dpy, int target_type, int target_id, int notify_type, Bool onoff)
Bool XNVCtrlSelectNotify (Display *dpy, int screen, int type, Bool onoff)
Bool XNVCTRLQueryDDCCILutSize (Display *dpy, int screen, unsigned int display_mask, unsigned int *red_entries, unsigned int *green_entries, unsigned int *blue_entries, unsigned int *red_bits_per_entries, unsigned int *green_bits_per_entries, unsigned int *blue_bits_per_entries)
Bool XNVCTRLQueryDDCCISinglePointLutOperation (Display *dpy, int screen, unsigned int display_mask, unsigned int offset, unsigned int *red_value, unsigned int *green_value, unsigned int *blue_value)
Bool XNVCTRLSetDDCCISinglePointLutOperation (Display *dpy, int screen, unsigned int display_mask, unsigned int offset, unsigned int red_value, unsigned int green_value, unsigned int blue_value)
Bool XNVCTRLQueryDDCCIBlockLutOperation (Display *dpy, int screen, unsigned int display_mask, unsigned int color, unsigned int offset, unsigned int size, unsigned int **value)
Bool XNVCTRLSetDDCCIBlockLutOperation (Display *dpy, int screen, unsigned int display_mask, unsigned int color, unsigned int offset, unsigned int size, unsigned int *value)
Bool XNVCTRLSetDDCCIRemoteProcedureCall (Display *dpy, int screen, unsigned int display_mask, unsigned int offset, unsigned int size, unsigned int *red_lut, unsigned int *green_lut, unsigned int *blue_lut, unsigned int *increment)
Bool XNVCTRLQueryDDCCIDisplayControllerType (Display *dpy, int screen, unsigned int display_mask, unsigned char **controller_manufacturer, unsigned int *controller_type)
Bool NVCTRLQueryDDCCICapabilities (Display *dpy, int screen, unsigned int display_mask, unsigned int **nvctrl_vcp_supported, unsigned int **possible_values_offset, unsigned int **possible_values_size, unsigned int **nvctrl_vcp_possible_values, unsigned int **nvctrl_string_vcp_supported)
Bool XNVCTRLQueryDDCCITimingReport (Display *dpy, int screen, unsigned int display_mask, unsigned int *sync_freq_out_range, unsigned int *unstable_count, unsigned int *positive_h_sync, unsigned int *positive_v_sync, unsigned int *h_freq, unsigned int *v_freq)
Bool XNVCTRLQueryTargetBinaryData (Display *dpy, int target_type, int target_id, unsigned int display_mask, unsigned int attribute, unsigned char **ptr, int *len)
Bool XNVCTRLQueryBinaryData (Display *dpy, int screen, unsigned int display_mask, unsigned int attribute, unsigned char **ptr, int *len)
static Bool wire_to_event (Display *dpy, XEvent *host, xEvent *wire)

Variables

static XExtensionInfo _nvctrl_ext_info_data
static XExtensionInfo * nvctrl_ext_info = &_nvctrl_ext_info_data
static char * nvctrl_extension_name = NV_CONTROL_NAME
static XExtensionHooks nvctrl_extension_hooks

Define Documentation

#define NEED_EVENTS
 

#define NEED_REPLIES
 

#define NVCTRL_EXT_NEED_CHECK   (XPointer)(~0)
 

#define NVCTRL_EXT_NEED_NOTHING   (XPointer)(0)
 

#define NVCTRL_EXT_NEED_TARGET_SWAP   (XPointer)(1)
 

#define XNVCTRLCheckExtension dpy,
i,
val   )     XextCheckExtension (dpy, i, nvctrl_extension_name, val)
 

#define XNVCTRLSimpleCheckExtension dpy,
 )     XextSimpleCheckExtension (dpy, i, nvctrl_extension_name)
 

#define XTHREADS
 


Function Documentation

static int close_display  )  [static]
 

Bool NVCTRLQueryDDCCICapabilities Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int **  nvctrl_vcp_supported,
unsigned int **  possible_values_offset,
unsigned int **  possible_values_size,
unsigned int **  nvctrl_vcp_possible_values,
unsigned int **  nvctrl_string_vcp_supported
 

static Bool wire_to_event Display *  dpy,
XEvent *  host,
xEvent *  wire
[static]
 

static Bool wire_to_event  )  [static]
 

static XEXT_GENERATE_FIND_DISPLAY find_display  ,
nvctrl_ext_info  ,
nvctrl_extension_name  ,
nvctrl_extension_hooks,
NV_CONTROL_EVENTS  ,
NVCTRL_EXT_NEED_CHECK 
[static]
 

static static nvctrl_ext_info void XNVCTRLCheckTargetData Display *  dpy,
XExtDisplayInfo *  info,
int *  target_type,
int *  target_id
[static]
 

Bool XNVCTRLIsNvScreen Display *  dpy,
int  screen
 

Bool XNVCTRLQueryAttribute Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
int *  value
 

Returns True if the attribute exists. Returns False otherwise. If XNVCTRLQueryAttribute returns True, value will contain the value of the specified attribute.

Not all attributes require the display_mask parameter; see NVCtrl.h for details.

Calling this function is equivalent to calling XNVCTRLQueryTargetAttribute() with the target_type set to NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.

Possible errors: BadValue - The screen doesn't exist. BadMatch - The NVIDIA driver is not present on that screen.

Bool XNVCTRLQueryBinaryData Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
unsigned char **  ptr,
int *  len
 

Bool XNVCTRLQueryDDCCIBlockLutOperation Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  color,
unsigned int  offset,
unsigned int  size,
unsigned int **  value
 

Bool XNVCTRLQueryDDCCIDisplayControllerType Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned char **  controller_manufacturer,
unsigned int *  controller_type
 

Bool XNVCTRLQueryDDCCILutSize Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int *  red_entries,
unsigned int *  green_entries,
unsigned int *  blue_entries,
unsigned int *  red_bits_per_entries,
unsigned int *  green_bits_per_entries,
unsigned int *  blue_bits_per_entries
 

Bool XNVCTRLQueryDDCCISinglePointLutOperation Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  offset,
unsigned int *  red_value,
unsigned int *  green_value,
unsigned int *  blue_value
 

Bool XNVCTRLQueryDDCCITimingReport Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int *  sync_freq_out_range,
unsigned int *  unstable_count,
unsigned int *  positive_h_sync,
unsigned int *  positive_v_sync,
unsigned int *  h_freq,
unsigned int *  v_freq
 

Bool XNVCTRLQueryExtension Display *  dpy,
int *  event_basep,
int *  error_basep
 

Returns True if the extension exists, returns False otherwise. event_basep and error_basep are the extension event and error bases. Currently, no extension specific errors or events are defined.

Bool XNVCTRLQueryGvoColorConversion Display *  dpy,
int  screen,
float  colorMatrix[3][3],
float  colorOffset[3],
float  colorScale[3]
 

Bool XNVCTRLQueryStringAttribute Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
char **  ptr
 

Bool XNVCTRLQueryTargetAttribute Display *  dpy,
int  target_type,
int  target_id,
unsigned int  display_mask,
unsigned int  attribute,
int *  value
 

Bool XNVCTRLQueryTargetBinaryData Display *  dpy,
int  target_type,
int  target_id,
unsigned int  display_mask,
unsigned int  attribute,
unsigned char **  ptr,
int *  len
 

Bool XNVCTRLQueryTargetCount Display *  dpy,
int  target_type,
int *  value
 

Bool XNVCTRLQueryTargetStringAttribute Display *  dpy,
int  target_type,
int  target_id,
unsigned int  display_mask,
unsigned int  attribute,
char **  ptr
 

Bool XNVCTRLQueryValidAttributeValues Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
NVCTRLAttributeValidValuesRec values
 

Bool XNVCTRLQueryValidTargetAttributeValues Display *  dpy,
int  target_type,
int  target_id,
unsigned int  display_mask,
unsigned int  attribute,
NVCTRLAttributeValidValuesRec values
 

Bool XNVCTRLQueryVersion Display *  dpy,
int *  major,
int *  minor
 

Bool XNVCtrlSelectNotify Display *  dpy,
int  screen,
int  type,
Bool  onoff
 

Bool XNVCtrlSelectTargetNotify Display *  dpy,
int  target_type,
int  target_id,
int  notify_type,
Bool  onoff
 

void XNVCTRLSetAttribute Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
int  value
 

Bool XNVCTRLSetAttributeAndGetStatus Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
int  value
 

Bool XNVCTRLSetDDCCIBlockLutOperation Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  color,
unsigned int  offset,
unsigned int  size,
unsigned int *  value
 

Bool XNVCTRLSetDDCCIRemoteProcedureCall Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  offset,
unsigned int  size,
unsigned int *  red_lut,
unsigned int *  green_lut,
unsigned int *  blue_lut,
unsigned int *  increment
 

Bool XNVCTRLSetDDCCISinglePointLutOperation Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  offset,
unsigned int  red_value,
unsigned int  green_value,
unsigned int  blue_value
 

void XNVCTRLSetGvoColorConversion Display *  dpy,
int  screen,
float  colorMatrix[3][3],
float  colorOffset[3],
float  colorScale[3]
 

Bool XNVCTRLSetStringAttribute Display *  dpy,
int  screen,
unsigned int  display_mask,
unsigned int  attribute,
char *  ptr
 

void XNVCTRLSetTargetAttribute Display *  dpy,
int  target_type,
int  target_id,
unsigned int  display_mask,
unsigned int  attribute,
int  value
 


Variable Documentation

XExtensionInfo _nvctrl_ext_info_data [static]
 

XExtensionInfo* nvctrl_ext_info = &_nvctrl_ext_info_data [static]
 

XExtensionHooks nvctrl_extension_hooks [static]
 

Initial value:

 {
    NULL,                               
    NULL,                               
    NULL,                               
    NULL,                               
    NULL,                               
    NULL,                               
    close_display,                      
    wire_to_event,                      
    NULL,                               
    NULL,                               
    NULL,                               
}

char* nvctrl_extension_name = NV_CONTROL_NAME [static]
 


Generated on Sat Aug 19 20:40:54 2006 for Renouveau by  doxygen 1.4.4