Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
5.9 KiB

  1. /******************************************************************************
  2. *
  3. * Module: MODEMON.H Mode/Monitor Functions Header Module
  4. *
  5. * Revision: 1.00
  6. *
  7. * Date: April 8, 1994
  8. *
  9. * Author: Randy Spurlock
  10. *
  11. *******************************************************************************
  12. *
  13. * Module Description:
  14. *
  15. * This module contains the type declarations and function
  16. * prototypes for the mode/monitor functions.
  17. *
  18. *******************************************************************************
  19. *
  20. * Changes:
  21. *
  22. * DATE REVISION DESCRIPTION AUTHOR
  23. * -------- -------- -------------------------------------------------------
  24. * 04/08/94 1.00 Original Randy Spurlock
  25. *
  26. *
  27. *******************************************************************************
  28. * Modified for NT Laguna Mode Switch Library by Noel VanHook
  29. * Copyright (c) 1997 Cirrus Logic, Inc.
  30. *
  31. * $Log: X:/log/laguna/nt35/miniport/cl546x/modemon.h $
  32. *
  33. * Rev 1.6 22 Oct 1997 13:18:48 noelv
  34. * Added code to track the length of mode strings. Don't rely on _memsize().
  35. *
  36. * Rev 1.5 28 Aug 1997 14:25:00 noelv
  37. * Moved SetMode prototype
  38. *
  39. ******************************************************************************/
  40. /******************************************************************************
  41. * Type Definitions and Structures
  42. ******************************************************************************/
  43. typedef struct tagRange /* Range structure */
  44. {
  45. union tagMinimum /* Minimum value for the range */
  46. {
  47. int nMin;
  48. long lMin;
  49. float fMin;
  50. } Minimum;
  51. union tagMaximum /* Maximum value for the range */
  52. {
  53. int nMax;
  54. long lMax;
  55. float fMax;
  56. } Maximum;
  57. } Range;
  58. typedef struct tagMonListHeader /* Monitor list header structure */
  59. {
  60. int nMonitor; /* Number of monitors in the list */
  61. } MonListHeader;
  62. typedef struct tagMonListEntry /* Monitor list entry structure */
  63. {
  64. char *pszName; /* Pointer to monitor name string */
  65. char *pszDesc; /* Pointer to monitor description */
  66. } MonListEntry;
  67. typedef struct tagMonList /* Monitor list structure */
  68. {
  69. MonListHeader MonHeader; /* Monitor list header */
  70. MonListEntry MonEntry[]; /* Start of the monitor list entries */
  71. } MonList;
  72. typedef struct tagMonInfoHeader /* Monitor info. header structure */
  73. {
  74. int nMode; /* Number of monitor modes in list */
  75. } MonInfoHeader;
  76. typedef struct tagMonInfoEntry /* Monitor info. entry structure */
  77. {
  78. char *pszName; /* Pointer to monitor mode name */
  79. Range rHoriz; /* Horizontal range values */
  80. Range rVert; /* Vertical range values */
  81. int nSync; /* Horiz./Vert. sync. polarities */
  82. int nResX; /* Maximum suggested X resolution */
  83. int nResY; /* Maximum suggested Y resolution */
  84. } MonInfoEntry;
  85. typedef struct tagMonInfo /* Monitor information structure */
  86. {
  87. MonInfoHeader MonHeader; /* Monitor information header */
  88. MonInfoEntry MonEntry[]; /* Start of the monitor entries */
  89. } MonInfo;
  90. typedef struct tagModeInfoEntry /* Mode information entry structure */
  91. {
  92. char *pszName; /* Pointer to mode name string */
  93. float fHsync; /* Horizontal sync. frequency value */
  94. float fVsync; /* Vertical sync. frequency value */
  95. int nResX; /* Horizontal (X) resolution value */
  96. int nResY; /* Vertical (Y) resolution value */
  97. int nBPP; /* Pixel depth (Bits/Pixel) */
  98. int nMemory; /* Memory size (Kbytes) */
  99. int nPitch; /* Pitch value (Bytes) */
  100. unsigned int nAttr; /* Mode attribute value */
  101. BYTE * pModeTable; /* p Mode Table */
  102. } ModeInfoEntry;
  103. typedef struct tagModeListHeader /* Mode list header structure */
  104. {
  105. int nMode; /* Number of modes in the list */
  106. int nSize; /* Size of Entry in bytes */
  107. } ModeListHeader;
  108. typedef struct tagModeListEntry /* Mode list entry structure */
  109. {
  110. ModeInfoEntry ModeEntry; /* Mode information entry */
  111. MonInfoEntry *pMonEntry; /* Monitor mode index value */
  112. } ModeListEntry;
  113. typedef struct tagModeList /* Mode list structure */
  114. {
  115. ModeListHeader ModeHeader; /* Mode list header */
  116. ModeListEntry ModeEntry[]; /* Start of the mode list entries */
  117. } ModeList;
  118. typedef struct tagModeInfo /* Mode information structure */
  119. {
  120. ModeInfoEntry ModeEntry; /* Mode information entry */
  121. } ModeInfo;
  122. /******************************************************************************
  123. * Function Prototypes
  124. ******************************************************************************/
  125. MonList *GetMonitorList(void);
  126. MonInfo *GetMonitorInfo(char *);
  127. ModeList *GetModeList(MonInfo *, char *);
  128. ModeInfo *GetModeInfo(char *, char *);
  129. #if WIN_NT
  130. BYTE *GetModeTable(char *, char *, int *);
  131. #else
  132. BYTE *GetModeTable(char *, char *);
  133. #endif
  134.