Source code of Windows XP (NT5)
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.

113 lines
2.7 KiB

  1. //**************************************************************************
  2. //
  3. // Title : CTVCtrl.h
  4. //
  5. // Date : 1998.06.29 1st making
  6. //
  7. // Author : Toshiba [PCS](PSY) Hideki Yagi
  8. //
  9. // Copyright 1997-1998 Toshiba Corporation. All Rights Reserved.
  10. //
  11. // -------------------------------------------------------------------------
  12. //
  13. // Change log :
  14. //
  15. // Date Revision Description
  16. // ------------ ---------- -----------------------------------------------
  17. // 1998.06.29 000.0000 1st making.
  18. //
  19. //**************************************************************************
  20. #define TVCONTROL_LCD_BIT 0x0001
  21. #define TVCONTROL_CRT_BIT 0x0002
  22. #define TVCONTROL_TV_BIT 0x0004
  23. #define DISABLE_TV 0x0000
  24. #define ENABLE_TV 0x0001
  25. // add by do '98-07-13 ( from "tvaldctl.h")
  26. //
  27. // Device driver open name
  28. //
  29. //#define TVALDDRVR_DEVICE_OPEN_NAME "\\\\.\\TVALD"
  30. //#define TVALDDRVR_DEVICE_OPEN_NAME "TVALD.SYS"
  31. #define TVALDDRVR_DEVICE_OPEN_NAME "\\Device\\TVALD"
  32. //
  33. // IOCTL Code ...
  34. //
  35. #define IOCTL_TVALD_INFO \
  36. (ULONG)CTL_CODE( FILE_DEVICE_UNKNOWN, 0xA10, METHOD_BUFFERED, FILE_ANY_ACCESS )
  37. #define IOCTL_TVALD_CANCEL_INFO \
  38. (ULONG)CTL_CODE( FILE_DEVICE_UNKNOWN, 0xA11, METHOD_BUFFERED, FILE_ANY_ACCESS )
  39. #define IOCTL_TVALD_GHCI \
  40. (ULONG)CTL_CODE( FILE_DEVICE_UNKNOWN, 0xA20, METHOD_BUFFERED, FILE_ANY_ACCESS )
  41. //
  42. // GHCI Method Interfaces
  43. //
  44. typedef struct _GHCI_INTERFACE {
  45. ULONG GHCI_EAX;
  46. ULONG GHCI_EBX;
  47. ULONG GHCI_ECX;
  48. ULONG GHCI_EDX;
  49. ULONG GHCI_ESI;
  50. ULONG GHCI_EDI;
  51. } GHCI_INTERFACE, *PGHCI_INTERFACE;
  52. //
  53. // notification values
  54. //
  55. #define HOTKEY_INFO_CHANGE 0x80
  56. //
  57. // hot key methods
  58. //
  59. #define HOTKEY_INFO_METHOD 'OFNI'
  60. #define HOTKEY_GHCI_METHOD 'ICHG'
  61. #define HOTKEY_ENAB_METHOD 'BANE'
  62. //
  63. // ACPI.SYS control Method stract
  64. //
  65. typedef struct _ACPI_CTL_METHOD {
  66. union {
  67. UCHAR MethodName[4];
  68. ULONG MethodNameAsUlong;
  69. };
  70. } ACPI_CTL_METHOD, *PACPI_CTL_METHOD;
  71. // add end '98-07-13
  72. typedef struct tag_DisplayStatusStruc
  73. {
  74. DWORD SizeofStruc;
  75. DWORD AvailableDisplay;
  76. DWORD CurrentDisplay;
  77. } DisplayStatusStruc;
  78. class CTVControl
  79. {
  80. public:
  81. CTVControl( void );
  82. ~CTVControl( void );
  83. BOOL Initialize( void );
  84. BOOL Uninitialize( void );
  85. BOOL GetDisplayStatus( PVOID status );
  86. BOOL SetDisplayStatus( PVOID status );
  87. BOOL SetTVOutput( DWORD status );
  88. private:
  89. GHCI_INTERFACE inputreg; // add by do '98-07-13
  90. BOOL is_init_success; // add by do '98-08-04
  91. UNICODE_STRING UNameString;
  92. KEVENT event;
  93. PDEVICE_OBJECT TvaldDeviceObject;
  94. // void Tvald_GHCI( PGHCI_INTERFACE pinputreg );
  95. BOOL Tvald_GHCI( PGHCI_INTERFACE pinputreg );
  96. };