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.

60 lines
1.3 KiB

  1. //
  2. // SpBtnCtrl.h
  3. //
  4. #ifndef SPBTNCTRL_H
  5. #define SPBTNCTRL_H
  6. #include "private.h"
  7. #include "globals.h"
  8. #include "sapilayr.h"
  9. #define PRESS_AND_HOLD 600
  10. #define DICTATION_BUTTON 0
  11. #define COMMANDING_BUTTON 1
  12. // class CSapiIMX;
  13. /////////////////////////////////////////////////////////////////////////////
  14. // SpButtonControl
  15. class SpButtonControl
  16. {
  17. public:
  18. SpButtonControl(CSapiIMX *pImx)
  19. {
  20. m_pimx = pImx;
  21. m_fPreviouslyOtherStateOn[0] = FALSE;
  22. m_fPreviouslyOtherStateOn[1] = FALSE;
  23. m_fMicrophoneOnAtDown[0] = FALSE;
  24. m_fMicrophoneOnAtDown[1] = FALSE;
  25. m_ulButtonDownTime[0] = 0;
  26. m_ulButtonDownTime[1] = 0;
  27. }
  28. ~SpButtonControl()
  29. {
  30. }
  31. public:
  32. HRESULT SetCommandingButton(BOOL fButtonDown, UINT uTimePressed);
  33. HRESULT SetDictationButton(BOOL fButtonDown, UINT uTimePressed);
  34. private:
  35. HRESULT _SetButtonDown(DWORD dwButton, BOOL fButtonDown, UINT uTimePressed);
  36. BOOL GetCommandingOn( );
  37. BOOL GetDictationOn( );
  38. HRESULT SetCommandingOn(void);
  39. HRESULT SetDictationOn(void);
  40. HRESULT SetState(DWORD dwState);
  41. BOOL GetMicrophoneOn( );
  42. void SetMicrophoneOn(BOOL fOn);
  43. CSapiIMX *m_pimx;
  44. BOOL m_fPreviouslyOtherStateOn[2];
  45. BOOL m_fMicrophoneOnAtDown[2];
  46. ULONG m_ulButtonDownTime[2];
  47. };
  48. #endif // SPBTNCTRL_H