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

NVCtrlLib.h

Go to the documentation of this file.
00001 #ifndef __NVCTRLLIB_H
00002 #define __NVCTRLLIB_H
00003 
00004 #include "NVCtrl.h"
00005 
00015 Bool XNVCTRLQueryExtension (
00016     Display *dpy,
00017     int *event_basep,
00018     int *error_basep
00019 );
00020 
00021 
00022 /*
00023  *  XNVCTRLQueryVersion -
00024  *
00025  *  Returns True if the extension exists, returns False otherwise.
00026  *  major and minor are the extension's major and minor version
00027  *  numbers.
00028  */
00029 
00030 Bool XNVCTRLQueryVersion (
00031     Display *dpy,
00032     int *major,
00033     int *minor
00034 );
00035 
00036 
00037 /*
00038  *  XNVCTRLIsNvScreen
00039  *
00040  *  Returns True is the specified screen is controlled by the NVIDIA
00041  *  driver.  Returns False otherwise.
00042  */
00043 
00044 Bool XNVCTRLIsNvScreen (
00045     Display *dpy,
00046     int screen
00047 );
00048 
00049 
00050 /*
00051  *  XNVCTRLQueryTargetCount -
00052  *
00053  *  Returns True if the target type exists.  Returns False otherwise.
00054  *  If XNVCTRLQueryTargetCount returns True, value will contain the
00055  *  count of existing targets on the server of the specified target
00056  *  type.
00057  *
00058  *  Please see "Attribute Targets" in NVCtrl.h for the list of valid
00059  *  target types.
00060  *
00061  *  Possible errors:
00062  *     BadValue - The target doesn't exist.
00063  */
00064 
00065 Bool XNVCTRLQueryTargetCount (
00066     Display *dpy,
00067     int target_type,
00068     int *value
00069 );
00070 
00071 
00072 /*
00073  *  XNVCTRLSetAttribute -
00074  *
00075  *  Sets the attribute to the given value.  The attributes and their
00076  *  possible values are listed in NVCtrl.h.
00077  *
00078  *  Not all attributes require the display_mask parameter; see
00079  *  NVCtrl.h for details.
00080  *
00081  *  Calling this function is equivalent to calling XNVCTRLSetTargetAttribute()
00082  *  with the target_type set to NV_CTRL_TARGET_TYPE_X_SCREEN and
00083  *  target_id set to 'screen'.
00084  *
00085  *  Possible errors:
00086  *     BadValue - The screen or attribute doesn't exist.
00087  *     BadMatch - The NVIDIA driver is not present on that screen.
00088  */
00089 
00090 void XNVCTRLSetAttribute (
00091     Display *dpy,
00092     int screen,
00093     unsigned int display_mask,
00094     unsigned int attribute,
00095     int value
00096 );
00097 
00098 
00099 /*
00100  *  XNVCTRLSetTargetAttribute -
00101  *
00102  *  Sets the attribute to the given value.  The attributes and their
00103  *  possible values are listed in NVCtrl.h.
00104  *
00105  *  Not all attributes require the display_mask parameter; see
00106  *  NVCtrl.h for details.
00107  *
00108  *  Possible errors:
00109  *     BadValue - The target or attribute doesn't exist.
00110  *     BadMatch - The NVIDIA driver is not present on that target.
00111  */
00112 
00113 void XNVCTRLSetTargetAttribute (
00114     Display *dpy,
00115     int target_type,
00116     int target_id,
00117     unsigned int display_mask,
00118     unsigned int attribute,
00119     int value
00120 );
00121 
00122 
00123 /*
00124  *  XNVCTRLSetAttributeAndGetStatus -
00125  *
00126  * Same as XNVCTRLSetAttribute().
00127  * In addition, XNVCTRLSetAttributeAndGetStatus() returns 
00128  * True if the operation succeeds, False otherwise.
00129  *
00130  */
00131 
00132 Bool XNVCTRLSetAttributeAndGetStatus (
00133     Display *dpy,
00134     int screen,
00135     unsigned int display_mask,
00136     unsigned int attribute,
00137     int value
00138 );
00139 
00140 
00160 Bool XNVCTRLQueryAttribute (
00161     Display *dpy,
00162     int screen,
00163     unsigned int display_mask,
00164     unsigned int attribute,
00165     int *value
00166 );
00167 
00168 
00169 /*
00170  * XNVCTRLQueryTargetAttribute -
00171  *
00172  *  Returns True if the attribute exists.  Returns False otherwise.
00173  *  If XNVCTRLQueryTargetAttribute returns True, value will contain the
00174  *  value of the specified attribute.
00175  *
00176  *  Not all attributes require the display_mask parameter; see
00177  *  NVCtrl.h for details.
00178  *
00179  *  Possible errors:
00180  *     BadValue - The target doesn't exist.
00181  *     BadMatch - The NVIDIA driver does not control the target.
00182  */
00183 
00184 Bool XNVCTRLQueryTargetAttribute (
00185     Display *dpy,
00186     int target_Type,
00187     int target_id,
00188     unsigned int display_mask,
00189     unsigned int attribute,
00190     int *value
00191 );
00192 
00193 
00194 /*
00195  *  XNVCTRLQueryStringAttribute -
00196  *
00197  *  Returns True if the attribute exists.  Returns False otherwise.
00198  *  If XNVCTRLQueryStringAttribute returns True, *ptr will point to an
00199  *  allocated string containing the string attribute requested.  It is
00200  *  the caller's responsibility to free the string when done.
00201  *
00202  *  Calling this function is equivalent to calling
00203  *  XNVCTRLQueryTargetStringAttribute() with the target_type set to
00204  *  NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
00205  *
00206  *  Possible errors:
00207  *     BadValue - The screen doesn't exist.
00208  *     BadMatch - The NVIDIA driver is not present on that screen.
00209  *     BadAlloc - Insufficient resources to fulfill the request.
00210  */
00211 
00212 Bool XNVCTRLQueryStringAttribute (
00213     Display *dpy,
00214     int screen,
00215     unsigned int display_mask,
00216     unsigned int attribute,
00217     char **ptr
00218 );
00219 
00220 
00221 /*
00222  *  XNVCTRLQueryTargetStringAttribute -
00223  *
00224  *  Returns True if the attribute exists.  Returns False otherwise.
00225  *  If XNVCTRLQueryTargetStringAttribute returns True, *ptr will point
00226  *  to an allocated string containing the string attribute requested.
00227  *  It is the caller's responsibility to free the string when done.
00228  *
00229  *  Possible errors:
00230  *     BadValue - The target doesn't exist.
00231  *     BadMatch - The NVIDIA driver does not control the target.
00232  *     BadAlloc - Insufficient resources to fulfill the request.
00233  */
00234 
00235 Bool XNVCTRLQueryTargetStringAttribute (
00236     Display *dpy,
00237     int target_type,
00238     int target_id,
00239     unsigned int display_mask,
00240     unsigned int attribute,
00241     char **ptr
00242 );
00243 
00244 
00245 /*
00246  *  XNVCTRLSetStringAttribute -
00247  *
00248  *  Returns True if the operation succeded.  Returns False otherwise.
00249  *
00250  *  Possible X errors:
00251  *     BadValue - The screen doesn't exist.
00252  *     BadMatch - The NVIDIA driver is not present on that screen.
00253  *     BadAlloc - Insufficient resources to fulfill the request.
00254  */
00255  
00256 Bool XNVCTRLSetStringAttribute (
00257     Display *dpy,
00258     int screen,
00259     unsigned int display_mask,
00260     unsigned int attribute,
00261     char *ptr
00262 );
00263 
00264 
00265 /*
00266  * XNVCTRLQueryValidAttributeValues -
00267  *
00268  * Returns True if the attribute exists.  Returns False otherwise.  If
00269  * XNVCTRLQueryValidAttributeValues returns True, values will indicate
00270  * the valid values for the specified attribute; see the description
00271  * of NVCTRLAttributeValidValues in NVCtrl.h.
00272  *
00273  *  Calling this function is equivalent to calling
00274  *  XNVCTRLQueryValidTargetAttributeValues() with the target_type set to
00275  *  NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
00276  */
00277 
00278 Bool XNVCTRLQueryValidAttributeValues (
00279     Display *dpy,
00280     int screen,
00281     unsigned int display_mask,
00282     unsigned int attribute,                                 
00283     NVCTRLAttributeValidValuesRec *values
00284 );
00285 
00286 
00287 
00288 /*
00289  * XNVCTRLQueryValidTargetAttributeValues -
00290  *
00291  * Returns True if the attribute exists.  Returns False otherwise.  If
00292  * XNVCTRLQueryValidTargetAttributeValues returns True, values will indicate
00293  * the valid values for the specified attribute.
00294  */
00295 
00296 Bool XNVCTRLQueryValidTargetAttributeValues (
00297     Display *dpy,
00298     int target_type,
00299     int target_id,
00300     unsigned int display_mask,
00301     unsigned int attribute,                                 
00302     NVCTRLAttributeValidValuesRec *values
00303 );
00304 
00305 
00306 /*
00307  *  XNVCTRLSetGvoColorConversion -
00308  *
00309  *  Sets the color conversion matrix, offset, and scale that should be
00310  *  used for GVO (Graphic to Video Out).
00311  *
00312  *  The Color Space Conversion data is ordered like this:
00313  *
00314  *   colorMatrix[0][0] // r.Y
00315  *   colorMatrix[0][1] // g.Y
00316  *   colorMatrix[0][2] // b.Y
00317  *
00318  *   colorMatrix[1][0] // r.Cr
00319  *   colorMatrix[1][1] // g.Cr
00320  *   colorMatrix[1][2] // b.Cr
00321  *
00322  *   colorMatrix[2][0] // r.Cb
00323  *   colorMatrix[2][1] // g.Cb
00324  *   colorMatrix[2][2] // b.Cb
00325  *
00326  *   colorOffset[0]    // Y
00327  *   colorOffset[1]    // Cr
00328  *   colorOffset[2]    // Cb
00329  *
00330  *   colorScale[0]     // Y
00331  *   colorScale[1]     // Cr
00332  *   colorScale[2]     // Cb
00333  *
00334  *  where the data is used according to the following formulae:
00335  *
00336  *   Y  =  colorOffset[0] + colorScale[0] *
00337  *           (R * colorMatrix[0][0] +
00338  *            G * colorMatrix[0][1] +
00339  *            B * colorMatrix[0][2]);
00340  *
00341  *   Cr =  colorOffset[1] + colorScale[1] *
00342  *           (R * colorMatrix[1][0] +
00343  *            G * colorMatrix[1][1] +
00344  *            B * colorMatrix[1][2]);
00345  *
00346  *   Cb =  colorOffset[2] + colorScale[2] *
00347  *           (R * colorMatrix[2][0] +
00348  *            G * colorMatrix[2][1] +
00349  *            B * colorMatrix[2][2]);
00350  *
00351  *  Possible errors:
00352  *     BadMatch - The NVIDIA driver is not present on that screen.
00353  *     BadImplementation - GVO is not available on that screen.
00354  */
00355 
00356 void XNVCTRLSetGvoColorConversion (
00357     Display *dpy,
00358     int screen,
00359     float colorMatrix[3][3],
00360     float colorOffset[3],
00361     float colorScale[3]
00362 );
00363 
00364 
00365 
00366 /*
00367  *  XNVCTRLQueryGvoColorConversion -
00368  *
00369  *  Retrieves the color conversion matrix and color offset
00370  *  that are currently being used for GVO (Graphic to Video Out).
00371  *
00372  *  The values are ordered within the arrays according to the comments
00373  *  for XNVCTRLSetGvoColorConversion().
00374  *
00375  *  Possible errors:
00376  *     BadMatch - The NVIDIA driver is not present on that screen.
00377  *     BadImplementation - GVO is not available on that screen.
00378  */
00379 
00380 Bool XNVCTRLQueryGvoColorConversion (
00381     Display *dpy,
00382     int screen,
00383     float colorMatrix[3][3],
00384     float colorOffset[3],
00385     float colorScale[3]
00386 );
00387 
00388 
00389 /* SPECIAL HANDLING OF VCP CODES 
00390  *
00391  * XNVCTRLQueryDDCCILutSize
00392  * XNVCTRLQueryDDCCISinglePointLutOperation
00393  * XNVCTRLSetDDCCISinglePointLutOperation
00394  * XNVCTRLQueryDDCCIBlockLutOperation
00395  * XNVCTRLSetDDCCIBlockLutOperation
00396  * XNVCTRLSetDDCCIRemoteProcedureCall
00397  * XNVCTRLQueryDDCCIDisplayControllerType
00398  
00399  * Some of DDC/CI VCP codes handle multiple values,
00400  * therefore they need their own NV_CONTROL structure 
00401  */
00402  
00403 /* XNVCTRLQueryDDCCILutSize
00404  * Provides the size (number of entries and number of bits / entry)
00405  * for the Red / Green and Blue LUT in the display
00406  *
00407  * red_entries: Number of Red LUT entries
00408  * green_entries: Number of Green LUT entries
00409  * blue_entries: Number of Blue LUT entries
00410  * red_bits_per_entries: Number of bits / entry in Red LUT
00411  * green_bits_per_entries: Number of bits / entry in Green LUT
00412  * blue_bits_per_entries: Number of bits / entry in Blue LUT
00413  * Returns TRUE on success
00414  */
00415 Bool XNVCTRLQueryDDCCILutSize (
00416     Display *dpy,
00417     int screen,
00418     unsigned int display_mask,
00419     unsigned int *red_entries,
00420     unsigned int *green_entries,
00421     unsigned int *blue_entries,
00422     unsigned int *red_bits_per_entries,
00423     unsigned int *green_bits_per_entries,
00424     unsigned int *blue_bits_per_entries
00425 );
00426 
00427 /* XNVCTRLQueryDDCCISinglePointLutOperation
00428  * Allows a single point within a display's color LUT to be read
00429  * Input:
00430  *  offset: Offset into the LUT
00431  * Output:
00432  *  red_value: Red LUT value read
00433  *  green_value: Green LUT value read
00434  *  blue_value: Blue LUT value read
00435  * Returns TRUE on success
00436  */
00437 Bool XNVCTRLQueryDDCCISinglePointLutOperation (
00438     Display *dpy,
00439     int screen,
00440     unsigned int display_mask,
00441     unsigned int offset,
00442     unsigned int *red_value,
00443     unsigned int *green_value,
00444     unsigned int *blue_value
00445 );
00446 
00447 /* XNVCTRLSetDDCCISinglePointLutOperation
00448  * Allows a single point within a display's color LUT (look up table)
00449  * to be loaded.
00450  * offset: Offset into the LUT
00451  * red_value: Red LUT value to be loaded
00452  * green_value: Green LUT value to be loaded
00453  * blue_value: Blue LUT value to be loaded
00454  * Note: If display LUT cannot store 16 bit values then least significant
00455  * bits are discarded
00456  * Returns TRUE on success
00457  */
00458 Bool XNVCTRLSetDDCCISinglePointLutOperation (
00459     Display *dpy,
00460     int screen,
00461     unsigned int display_mask,
00462     unsigned int offset,
00463     unsigned int red_value,
00464     unsigned int green_value,
00465     unsigned int blue_value
00466 );
00467 
00468 /* XNVCTRLQueryDDCCIBlockLutOperation
00469  * Provides an efficient method for reading multiple values from a display's LUT
00470  * color: is one of NV_CTRL_DDCCI_RED_LUT, NV_CTRL_DDCCI_GREEN_LUT, 
00471  *  NV_CTRL_DDCCI_BLUE_LUT. Color to be read.
00472  * size: Number of values to be read
00473  * offset: Offset into Red or Green or Blue LUT
00474  * value: Red or Green or Blue LUT contents. Needs to be freed when done.
00475  * Returns TRUE on success
00476  */           
00477 Bool XNVCTRLQueryDDCCIBlockLutOperation (
00478     Display *dpy,
00479     int screen,
00480     unsigned int display_mask,
00481     unsigned int color, 
00482     unsigned int size,
00483     unsigned int offset,
00484     unsigned int **value
00485 );
00486 
00487 /* XNVCTRLSetDDCCIBlockLutOperation
00488  * Provides an efficient method for loading multiple values into a display's LUT
00489  * size: Number of values to be loaded
00490  * offset: Offset into Red or Green or Blue LUT
00491  * value: R or G or B LUT values to be loaded
00492  * color: NV_CTRL_DDCCI_RED_LUT, NV_CTRL_DDCCI_GREEN_LUT, NV_CTRL_DDCCI_BLUE_LUT
00493  * Note: If display LUT cannot store 16 bit values then least significant
00494  * bits are discarded
00495  * Returns TRUE on success
00496  */   
00497 #define NV_CTRL_DDCCI_RED_LUT 1
00498 #define NV_CTRL_DDCCI_GREEN_LUT 2
00499 #define NV_CTRL_DDCCI_BLUE_LUT 3     
00500 Bool XNVCTRLSetDDCCIBlockLutOperation (
00501     Display *dpy,
00502     int screen,
00503     unsigned int display_mask,
00504     unsigned int color, 
00505     unsigned int offset,
00506     unsigned int size,
00507     unsigned int *value
00508 );
00509 
00510 /* XNVCTRLSetDDCCIRemoteProcedureCall
00511  * Allows initiation of a routine / macro resident in the display. Only
00512  * one RPC is defined at this time:
00513  * A spline curve routine applied to the data (supplied in format
00514  * below) and the resulting data used to derive a full set of values 
00515  * for the display color LUT which shall then be loaded.
00516  * offset: Offset into the LUT
00517  * size: Number of values to be loaded
00518  * red_lut: Red LUT values
00519  * green_lut: Green LUT value
00520  * blue_lut: Blue LUT value
00521  * increment: Increment to next LUT entry
00522  *  Values of E0h  FFh inclusive are reserved for manufacturer
00523  * specific routines / macros.
00524  * All other values are reserved and shall be ignored.
00525  * Returns TRUE on success
00526  */
00527 Bool XNVCTRLSetDDCCIRemoteProcedureCall (
00528     Display *dpy,
00529     int screen,
00530     unsigned int display_mask,
00531     unsigned int offset,
00532     unsigned int size,
00533     unsigned int *red_lut,
00534     unsigned int *green_lut,
00535     unsigned int *blue_lut,
00536     unsigned int *increment
00537 );
00538 
00539 /* XNVCTRLQueryDDCCIDisplayControllerType:
00540  * Provides the host with knowledge of the controller type being used by a 
00541  * particular display 
00542  * controller_manufacturer: Indicates controller manufacturer. (This string 
00543  * needs to be freed when done) (XXX This will be changed to a static string)
00544  * controller_type: Provide a numeric indication of controller type
00545  * Return TRUE on success
00546  */
00547 Bool XNVCTRLQueryDDCCIDisplayControllerType (
00548     Display *dpy,
00549     int screen,
00550     unsigned int display_mask,
00551     unsigned char **controller_manufacturer,
00552     unsigned int *controller_type
00553 );
00554 
00555 /* NVCTRLQueryDDCCICapabilities:
00556  * Gets the capabilities of the display as a VCP string
00557  * Returns :
00558  * nvctrl_vcp_supported: a table of 0 (not supported) and 1 (supported)
00559  *   which index is the NV_CTRL_DDCI* values 
00560  * possible_value_offset; contains the offsets in the table 
00561  *   nvctrl_vcp_possible_values. Index is the NV_CTRL_DDCI* values.
00562  *  -1 means no possible values are available.
00563  * possible_value_size; contains the count in the table 
00564  *  nvctrl_vcp_possible_values. Index is the NV_CTRL_DDCI* values.
00565  *  -1 means no possible values are available.
00566  * nvctrl_vcp_possible_values: a table of possible values for the non
00567  *   continuous values. 
00568  * nvctrl_string_vcp_supported: a table or 0 (not supported) and 1 (supported)
00569  *   which index is the NV_CTRL_STRING_DDCI* values.
00570  *
00571  * Returns TRUE on success
00572  */
00573 Bool NVCTRLQueryDDCCICapabilities (
00574     Display *dpy,
00575     int screen,
00576     unsigned int display_mask,
00577     unsigned int **nvctrl_vcp_supported,    // Size is NV_CTRL_DDCCI_LAST_VCP+1
00578     unsigned int **possible_values_offset,  // Size is NV_CTRL_DDCCI_LAST_VCP+1
00579     unsigned int **possible_values_size,    // Size is NV_CTRL_DDCCI_LAST_VCP+1
00580     unsigned int **nvctrl_vcp_possible_values, 
00581     unsigned int **nvctrl_string_vcp_supported // Size is NV_CTRL_STRING_LAST_ATTRIBUTE+1
00582 );
00583 
00584 /* XNVCTRLQueryDDCCITimingReport
00585  * Queries the currently operating video signal timing report data.
00586  * - is_sync_freq_out_range: Sync. Freq. out of range          (TRUE/FALSE)
00587  * - is_unstable_count:      Unstable Count                    (TRUE/FALSE)
00588  * - is_positive_h_sync:     Positive Horizontal sync polarity (TRUE/FALSE)
00589  * - is_positive_v_sync:     Positive Vertical sync polarity   (TRUE/FALSE)
00590  * - h_freq:                 Horizontal Frequency
00591  * - v_freq:                 Vertical Frequency.
00592  *
00593  * Returns TRUE on success
00594  */           
00595 Bool XNVCTRLQueryDDCCITimingReport (
00596     Display *dpy,
00597     int screen,
00598     unsigned int display_mask,
00599     unsigned int *sync_freq_out_range, 
00600     unsigned int *unstable_count,
00601     unsigned int *positive_h_sync,
00602     unsigned int *positive_v_sync,
00603     unsigned int *h_freq,
00604     unsigned int *v_freq
00605 );
00606 
00607 
00608 /*
00609  *  XNVCTRLQueryBinaryData -
00610  *
00611  *  Returns True if the attribute exists.  Returns False otherwise.
00612  *  If XNVCTRLQueryBinaryData returns True, *ptr will point to an
00613  *  allocated block of memory containing the binary data attribute
00614  *  requested.  It is the caller's responsibility to free the data
00615  *  when done.  len will list the length of the binary data.
00616  *
00617  *  Calling this function is equivalent to calling
00618  *  XNVCTRLQueryTargetBinaryData() with the target_type set to
00619  *  NV_CTRL_TARGET_TYPE_X_SCREEN and target_id set to 'screen'.
00620  *
00621  *  Possible errors:
00622  *     BadValue - The screen doesn't exist.
00623  *     BadMatch - The NVIDIA driver is not present on that screen.
00624  *     BadAlloc - Insufficient resources to fulfill the request.
00625  */
00626 
00627 Bool XNVCTRLQueryBinaryData (
00628     Display *dpy,
00629     int screen,
00630     unsigned int display_mask,
00631     unsigned int attribute,
00632     unsigned char **ptr,
00633     int *len
00634 );
00635 
00636 
00637 /*
00638  * XNVCTRLQueryTargetBinaryData -
00639  *
00640  *  Returns True if the attribute exists.  Returns False otherwise.
00641  *  If XNVCTRLQueryTargetBinaryData returns True, *ptr will point to an
00642  *  allocated block of memory containing the binary data attribute
00643  *  requested.  It is the caller's responsibility to free the data
00644  *  when done.  len will list the length of the binary data.
00645  *
00646  *  Possible errors:
00647  *     BadValue - The target doesn't exist.
00648  *     BadMatch - The NVIDIA driver does not control the target.
00649  *     BadAlloc - Insufficient resources to fulfill the request.
00650  */
00651 
00652 Bool XNVCTRLQueryTargetBinaryData (
00653     Display *dpy,
00654     int target_type,
00655     int target_id,
00656     unsigned int display_mask,
00657     unsigned int attribute,
00658     unsigned char **ptr,
00659     int *len
00660 );
00661 
00662 
00663 /*
00664  * XNVCtrlSelectNotify -
00665  *
00666  * This enables/disables receiving of NV-CONTROL events.  The type
00667  * specifies the type of event to enable (currently, the only
00668  * type that can be requested per-screen with XNVCtrlSelectNotify()
00669  * is ATTRIBUTE_CHANGED_EVENT); onoff controls whether receiving this
00670  * type of event should be enabled (True) or disabled (False).
00671  *
00672  * Returns True if successful, or False if the screen is not
00673  * controlled by the NVIDIA driver.
00674  */
00675 
00676 Bool XNVCtrlSelectNotify (
00677     Display *dpy,
00678     int screen,
00679     int type,
00680     Bool onoff
00681 );
00682 
00683 
00684 /*
00685  * XNVCtrlSelectTargetNotify -
00686  *
00687  * This enables/disables receiving of NV-CONTROL events that happen on
00688  * the specified target.  The notify_type specifies the type of event to
00689  * enable (currently, the only type that can be requested per-target with
00690  * XNVCtrlSelectTargetNotify() is TARGET_ATTRIBUTE_CHANGED_EVENT); onoff
00691  * controls whether receiving this type of event should be enabled (True)
00692  * or disabled (False).
00693  *
00694  * Returns True if successful, or False if the target is not
00695  * controlled by the NVIDIA driver.
00696  */
00697 
00698 Bool XNVCtrlSelectTargetNotify (
00699     Display *dpy,
00700     int target_type,
00701     int target_id,
00702     int notify_type,
00703     Bool onoff
00704 );
00705 
00706 
00707 /*
00708  * XNVCtrlEvent structure
00709  */
00710 
00711 typedef struct {
00712     int type;
00713     unsigned long serial;
00714     Bool send_event;  /* always FALSE, we don't allow send_events */
00715     Display *display;
00716     Time time;
00717     int screen;
00718     unsigned int display_mask;
00719     unsigned int attribute;
00720     int value;
00721 } XNVCtrlAttributeChangedEvent;
00722 
00723 typedef union {
00724     int type;
00725     XNVCtrlAttributeChangedEvent attribute_changed;
00726     long pad[24];
00727 } XNVCtrlEvent;
00728 
00729 
00730 /*
00731  * XNVCtrlEventTarget structure
00732  */
00733 
00734 typedef struct {
00735     int type;
00736     unsigned long serial;
00737     Bool send_event;  /* always FALSE, we don't allow send_events */
00738     Display *display;
00739     Time time;
00740     int target_type;
00741     int target_id;
00742     unsigned int display_mask;
00743     unsigned int attribute;
00744     int value;
00745 } XNVCtrlAttributeChangedEventTarget;
00746 
00747 typedef union {
00748     int type;
00749     XNVCtrlAttributeChangedEventTarget attribute_changed;
00750     long pad[24];
00751 } XNVCtrlEventTarget;
00752 
00753 
00754 #endif /* __NVCTRLLIB_H */

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