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.

110 lines
4.7 KiB

  1. #ifndef __SCHEDUI_H__
  2. #define __SCHEDUI_H__
  3. /////////////////////////////////////////////////////////////////////////////
  4. // External functions
  5. /////////////////////////////////////////////////////////////////////////////
  6. HRESULT GetRunTimes(TASK_TRIGGER & jt, TASK_DATA * ptd, LPSYSTEMTIME pstBracketBegin, LPSYSTEMTIME pstBracketEnd, WORD * pCount, FILETIME * pRunList);
  7. typedef HRESULT (* GRTFUNCTION)(TASK_TRIGGER & jt, TASK_DATA * ptd, LPSYSTEMTIME pstBracketBegin, LPSYSTEMTIME pstBracketEnd, WORD * pCount, FILETIME * pRunList);
  8. /////////////////////////////////////////////////////////////////////////////
  9. // Structs
  10. /////////////////////////////////////////////////////////////////////////////
  11. struct SSUIDLGINFO
  12. {
  13. // Set outside ShowScheduleUIDlgProc
  14. DWORD dwFlags;
  15. // Used inside ShowScheduleUIDlgProc
  16. BOOL bScheduleChanged;
  17. BOOL bScheduleNameChanged;
  18. BOOL bDataChanged;
  19. BOOL bInitializing;
  20. TASK_TRIGGER ttTaskTrigger;
  21. PNOTIFICATIONCOOKIE pGroupCookie;
  22. HINSTANCE hinstURLMON;
  23. GRTFUNCTION pfnGetRunTimes;
  24. DWORD dwRepeatHrsAreMins;
  25. };
  26. struct CTLGRPITEM
  27. {
  28. int idContainer;
  29. int idFirst;
  30. int idLast;
  31. };
  32. /////////////////////////////////////////////////////////////////////////////
  33. // Functions
  34. /////////////////////////////////////////////////////////////////////////////
  35. HRESULT ScheduleSummaryFromGroup(
  36. /* [in] */ PNOTIFICATIONCOOKIE pGroupCookie,
  37. /* [in][out] */ LPTSTR pszSummary,
  38. /* [in] */ UINT cchSummary);
  39. HRESULT ScheduleSummaryFromTaskTrigger(
  40. /* [in] */ TASK_TRIGGER * pTaskTrigger,
  41. /* [in][out] */ LPTSTR pszSummary,
  42. /* [in] */ UINT cchSummary);
  43. #define SSUI_CREATENEWSCHEDULE 0x0001
  44. #define SSUI_EDITSCHEDULE 0x0002
  45. #define SSUI_INFLAGMASK 0x00FF
  46. #define SSUI_SCHEDULECREATED 0x1000
  47. #define SSUI_SCHEDULECHANGED 0x2000
  48. #define SSUI_SCHEDULEREMOVED 0x3000
  49. #define SSUI_SCHEDULELISTUPDATED (SSUI_SCHEDULECREATED | SSUI_SCHEDULECHANGED | SSUI_SCHEDULEREMOVED)
  50. #define SSUI_OUTFLAG_MASK 0xFF00
  51. HRESULT ShowScheduleUI(
  52. /* [in] */ HWND hwndParent,
  53. /* [in][out] */ PNOTIFICATIONCOOKIE pGroupCookie,
  54. /* [in][out] */ DWORD * pdwFlags);
  55. HRESULT CreateScheduleGroup(
  56. /* [in] */ PTASK_TRIGGER pTaskTrigger,
  57. /* [in] */ PTASK_DATA pTaskData,
  58. /* [in] */ PGROUPINFO pGroupInfo,
  59. /* [in] */ GROUPMODE grfGroupMode,
  60. /* [out] */ PNOTIFICATIONCOOKIE pGroupCookie);
  61. HRESULT ModifyScheduleGroup(
  62. /* [in] */ PNOTIFICATIONCOOKIE pGroupCookie,
  63. /* [in] */ PTASK_TRIGGER pTaskTrigger,
  64. /* [in] */ PTASK_DATA pTaskData,
  65. /* [in] */ PGROUPINFO pGroupInfo,
  66. /* [in] */ GROUPMODE grfGroupMode);
  67. HRESULT DeleteScheduleGroup(
  68. /* [in] */ PNOTIFICATIONCOOKIE pGroupCookie);
  69. BOOL ScheduleGroupExists(
  70. /* [in] */ LPCTSTR pszGroupName);
  71. /////////////////////////////////////////////////////////////////////////////
  72. // Schedule group combo box helpers
  73. /////////////////////////////////////////////////////////////////////////////
  74. HRESULT SchedGroupComboBox_Fill(HWND hwndCombo);
  75. HRESULT SchedGroupComboBox_Clear(HWND hwndCombo);
  76. HRESULT SchedGroupComboBox_AddGroup(HWND hwndCombo, LPCTSTR pszGroupName, PNOTIFICATIONCOOKIE pGroupCookie);
  77. HRESULT SchedGroupComboBox_RemoveGroup(HWND hwndCombo, PNOTIFICATIONCOOKIE pGroupCookie);
  78. HRESULT SchedGroupComboBox_SetCurGroup(HWND hwndCombo, PNOTIFICATIONCOOKIE pGroupCookie);
  79. HRESULT SchedGroupComboBox_GetCurGroup(HWND hwndCombo, PNOTIFICATIONCOOKIE pGroupCookie);
  80. //wrappers for SchedGrupComboBox functions (fill and setcurgroup) that need to peek at the OOEBuf
  81. HRESULT FillScheduleList (HWND hwndCombo, POOEBuf pBuf);
  82. HRESULT SetScheduleGroup (HWND hwndCombo, CLSID* pGroupCookie, POOEBuf pBuf);
  83. /////////////////////////////////////////////////////////////////////////////
  84. // Helper macros
  85. /////////////////////////////////////////////////////////////////////////////
  86. #define UpDown_GetRange(hwndCtl) ((DWORD)SendMessage((hwndCtl), UDM_GETRANGE, 0, 0))
  87. #define UpDown_SetRange(hwndCtl, posMin, posMax) ((int)(DWORD)SendMessage((hwndCtl), UDM_SETRANGE, 0, MAKELPARAM((posMax), (posMin))))
  88. #define UpDown_GetBuddy(hwndCtl) ((HWND)SendMessage((hwndCtl), UDM_GETBUDDY, 0, 0))
  89. #define UpDown_SetBuddy(hwndCtl, hwndBuddy) ((HWND)SendMessage((hwndCtl), UDM_SETBUDDY, (WPARAM)(hwndBuddy), 0))
  90. #define UpDown_SetAccel(hwndCtl, nAccels, aAccels) ((BOOL)SendMessage((hwndCtl), UDM_SETACCEL, nAccels, (LPARAM)(aAccels)))
  91. #endif // __SCHEDUI_H__