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.

441 lines
14 KiB

  1. /*
  2. * Windows Calendar
  3. * Copyright (c) 1985 by Microsoft Corporation, all rights reserved.
  4. * Written by Mark L. Chamberlin, consultant to Microsoft.
  5. *
  6. * ***** declare.h
  7. *
  8. */
  9. #define PT_LEN 50 /* Maximum of Page Setup strings in dialog. */
  10. /* From caldata.c : */
  11. extern BYTE fInitComplete;
  12. extern BYTE vrgcDaysMonth [];
  13. extern BOOL vfDayMode;
  14. extern HINSTANCE vhInstance;
  15. extern HBRUSH vhbrBorder;
  16. extern HBRUSH vhbrBackMain;
  17. extern HBRUSH vhbrBackSub;
  18. extern HCURSOR vhcsrArrow;
  19. extern HCURSOR vhcsrIbeam;
  20. extern HCURSOR vhcsrWait;
  21. extern INT vcxFont;
  22. extern INT vcxFontMax;
  23. extern INT vcyFont;
  24. extern INT vcyDescent;
  25. extern INT vcyExtLead;
  26. extern INT vcyLineToLine;
  27. extern INT vcxBorder;
  28. extern INT vcxVScrollBar;
  29. extern INT vcyBorder;
  30. extern INT vcxHScrollBar;
  31. extern INT vcyHScrollBar;
  32. extern INT vcyWnd1;
  33. extern INT vcyWnd2A;
  34. extern INT vcyWnd2BTop;
  35. extern INT vcyWnd2BBot;
  36. extern INT vcyWnd2B;
  37. extern INT vcxWnd1;
  38. extern INT vcxWnd2A;
  39. extern INT vcxWnd2B;
  40. extern INT vxcoBell;
  41. extern INT vcxBell;
  42. extern INT vcyBell;
  43. extern INT vxcoApptTime;
  44. extern INT vxcoAmPm;
  45. extern INT vxcoQdFirst;
  46. extern INT vxcoQdMax;
  47. extern INT vycoQdFirst;
  48. extern INT vycoQdMax;
  49. extern INT vxcoDate;
  50. extern INT vycoNotesBox;
  51. extern INT vxcoWnd2C;
  52. extern INT vycoWnd2C;
  53. extern INT vcln;
  54. extern INT vlnLast;
  55. extern LD vtld [];
  56. extern HWND vhwnd0;
  57. extern HWND vhwnd1;
  58. extern HWND vhwnd2A;
  59. extern HWND vhwnd2B;
  60. extern HWND vhwnd2C;
  61. extern HWND vhwnd3;
  62. #ifndef BUG_8560
  63. extern HWND vhScrollWnd;
  64. #endif
  65. extern D3 vd3Cur;
  66. extern FT vftCur;
  67. extern UINT vcMinEarlyRing;
  68. extern BOOL vfSound;
  69. extern BOOL vfHour24;
  70. extern INT vmdInterval;
  71. extern INT vcMinInterval;
  72. extern TM vtmStart;
  73. extern DLGPROC vrglpfnDialog [];
  74. extern INT vlnCur;
  75. extern FT vftAlarmNext;
  76. extern FT vftAlarmFirst;
  77. extern BOOL vfFlashing;
  78. extern INT vcAlarmBeeps;
  79. extern BOOL vfInsert;
  80. extern TM vtmSpecial;
  81. extern BOOL vfNoGrabFocus;
  82. extern HANDLE vhAccel;
  83. extern HWND vhwndDialog;
  84. extern BOOL vfMustSyncAlarm;
  85. extern INT viLeftMarginLen;
  86. extern INT viRightMarginLen;
  87. extern INT viTopMarginLen;
  88. extern INT viBotMarginLen;
  89. extern INT viCurrentPage;
  90. extern INT viAMorPM;
  91. extern CHAR chPageText[6][PT_LEN];
  92. extern CHAR szDec[5];
  93. extern CHAR szPrinter[128];
  94. extern BOOL bPrinterSetupDone;
  95. extern OPENFILENAME vOFN;
  96. extern PRINTDLG vPD;
  97. extern INT vFilterIndex;
  98. extern INT vHlpMsg;
  99. /* From caldata2.c : */
  100. extern CHAR *vrgsz [];
  101. extern D3 vd3Sel;
  102. extern WORD vwDaySticky;
  103. extern INT vrgbMonth [];
  104. extern INT vcDaysMonth;
  105. extern INT vcWeeksMonth;
  106. extern WORD vwWeekdayFirst;
  107. extern INT vrgxcoGrid [];
  108. extern INT vrgycoGrid [];
  109. extern WORD votqrPrev;
  110. extern WORD votqrCur;
  111. extern WORD votqrNext;
  112. extern WORD vidrCur;
  113. extern LOCALHANDLE vrghlmDr [];
  114. extern LOCALHANDLE vhlmTdd;
  115. extern INT vcddAllocated;
  116. extern INT vcddUsed;
  117. extern DT vdtFrom;
  118. extern D3 vd3To;
  119. extern DT vdtTo;
  120. extern INT vitddFirst;
  121. extern INT vitddMax;
  122. extern HWND vhwndFocus;
  123. extern INT hFile [];
  124. extern OFSTRUCT OFStruct [];
  125. extern BOOL vfChangeFile;
  126. extern INT vobkEODChange;
  127. extern CHAR vszFileSpec [];
  128. extern BOOL vfOriginalFile;
  129. extern INT vobkEODNew;
  130. extern BOOL vfDirty;
  131. extern BYTE vrgbMagic [];
  132. extern HDC vhDCMemory;
  133. extern HBITMAP vhbmLeftArrow;
  134. extern HBITMAP vhbmRightArrow;
  135. extern HBITMAP vhbmBell;
  136. extern INT vxcoLeftArrowFirst;
  137. extern INT vxcoLeftArrowMax;
  138. extern INT vxcoRightArrowFirst;
  139. extern INT vxcoRightArrowMax;
  140. extern char vszMergeStr [];
  141. extern INT vmScrollPos;
  142. extern INT vmScrollInc;
  143. extern INT vmScrollMax;
  144. extern INT hmScrollPos;
  145. extern INT hmScrollMax;
  146. extern INT hmScrollInc;
  147. extern INT viMarkSymbol;
  148. extern BOOL vfOpenFileReadOnly;
  149. extern CHAR vszFilterSpec [];
  150. extern CHAR vszCustFilterSpec [];
  151. /* From cal.c : */
  152. BOOL APIENTRY FCalSize (HWND, INT, INT, INT);
  153. LRESULT CALLBACK CalWndProc (HWND, UINT, WPARAM, LPARAM);
  154. INT APIENTRY XcoWnd1 (VOID);
  155. INT APIENTRY YcoWnd1 (VOID);
  156. VOID APIENTRY CalSetFocus (HWND);
  157. VOID APIENTRY InitMenuItems (VOID);
  158. VOID APIENTRY CalWinIniChange(VOID);
  159. /* From cal2.c : */
  160. VOID APIENTRY CalPaint (HWND, HDC);
  161. VOID APIENTRY DrawArrow (HBITMAP, INT);
  162. VOID APIENTRY DrawArrowBorder (INT);
  163. VOID APIENTRY DispTime (HDC);
  164. INT APIENTRY GetTimeSz (TM, CHAR *);
  165. VOID APIENTRY ByteTo2Digs (BYTE, CHAR *);
  166. CHAR * APIENTRY CopySz (CHAR *, CHAR *);
  167. VOID APIENTRY DispDate (HDC, D3 *);
  168. VOID APIENTRY GetDateDisp (D3 *, CHAR *);
  169. BYTE * APIENTRY FillBuf (BYTE *, INT, BYTE);
  170. CHAR * APIENTRY WordToASCII (WORD, CHAR *, BOOL);
  171. VOID APIENTRY GetDashDateSel (CHAR *);
  172. BOOL APIENTRY FGetTmFromTimeSz (CHAR *, TM *);
  173. VOID APIENTRY SkipSpace (CHAR **);
  174. BOOL APIENTRY FGetWord (CHAR **, WORD *);
  175. CHAR APIENTRY ChUpperCase (CHAR);
  176. BOOL APIENTRY FDigit (CHAR);
  177. BOOL APIENTRY FD3FromDateSz (CHAR *, D3 *);
  178. VOID APIENTRY GetD3FromDt (DT, D3 *);
  179. VOID APIENTRY SetEcText(HWND, CHAR *);
  180. /* From calcolor.c : */
  181. BOOL APIENTRY CreateBrushes (VOID);
  182. VOID APIENTRY DestroyBrushes (VOID);
  183. VOID APIENTRY PaintBack (HWND, HDC);
  184. HDC APIENTRY CalGetDC (HWND);
  185. VOID APIENTRY SetDefaultColors (HDC);
  186. VOID APIENTRY DrawAlarmBell (HDC, INT);
  187. /* From calmonth.c : */
  188. WORD APIENTRY GetWeekday (D3 *);
  189. INT APIENTRY CDaysMonth (D3 *);
  190. VOID APIENTRY SetUpMonth (VOID);
  191. VOID APIENTRY BuildMonthGrid (VOID);
  192. VOID APIENTRY PaintMonthGrid (HDC);
  193. VOID APIENTRY PaintMonth (HDC);
  194. VOID APIENTRY DrawMark (HDC, INT, INT, INT, INT);
  195. VOID APIENTRY ShowToday (HDC, INT, INT, INT);
  196. VOID APIENTRY InvertDay (HDC, WORD);
  197. VOID APIENTRY PositionCaret (VOID);
  198. VOID APIENTRY MapDayToRect (WORD, RECT *);
  199. BOOL APIENTRY FMapCoToIGrid (INT, INT *, INT, INT *);
  200. DT APIENTRY DtFromPd3 (D3 *);
  201. VOID APIENTRY GetMarkedDays (VOID);
  202. VOID APIENTRY MonthMode (VOID);
  203. /* From calmon2.c : */
  204. BOOL APIENTRY FMonthPrev (VOID);
  205. BOOL APIENTRY FMonthNext (VOID);
  206. VOID APIENTRY ShowMonthPrevNext (BOOL);
  207. VOID APIENTRY UpdateMonth (VOID);
  208. VOID APIENTRY MouseSelectDay (MPOINT, BOOL);
  209. VOID APIENTRY FScrollMonth (INT, UINT);
  210. VOID APIENTRY FHorizScrollMonth (INT, WORD); /* added 11/3/88 for hscroll */
  211. BOOL APIENTRY FCalKey (HWND, WPARAM);
  212. VOID APIENTRY MoveSelCurMonth (UINT);
  213. VOID APIENTRY InvalidateMonth (VOID);
  214. VOID APIENTRY MoveSelNewMonth (UINT);
  215. VOID APIENTRY JumpDate (D3 *);
  216. BOOL APIENTRY FFetchTargetDate (VOID);
  217. /* From calday.c : */
  218. VOID APIENTRY DayMode (D3 *);
  219. VOID APIENTRY SwitchToDate (D3 *);
  220. VOID APIENTRY DayPaint (HDC);
  221. VOID APIENTRY FillTld (TM);
  222. VOID APIENTRY ScrollDownTld (INT);
  223. BOOL APIENTRY FGetNextLd (TM, LD *);
  224. BOOL APIENTRY FGetPrevLd (TM, LD *);
  225. BOOL APIENTRY FScrollDay (INT, UINT);
  226. VOID APIENTRY ScrollUpDay (INT, BOOL);
  227. VOID APIENTRY ScrollDownDay (INT, BOOL, BOOL);
  228. VOID APIENTRY InvalidateParentQdEc (INT);
  229. INT APIENTRY YcoFromLn (INT);
  230. INT APIENTRY LnFromYco (INT);
  231. VOID APIENTRY SetQdEc (INT);
  232. /* From calday2.c : */
  233. VOID APIENTRY SetDayScrollRange (VOID);
  234. VOID APIENTRY AdjustDayScrollRange (INT);
  235. VOID APIENTRY SetDayScrollPos (INT);
  236. VOID APIENTRY AdjustDayScrollPos (INT);
  237. INT APIENTRY ItmFromTm (TM);
  238. TM APIENTRY TmFromItm (INT);
  239. VOID APIENTRY MapTmAndItm (TM *, INT *);
  240. TM APIENTRY TmFromQr (PQR*, PQR);
  241. TM APIENTRY TmNextRegular (TM);
  242. /* From caltqr.c : */
  243. BOOL APIENTRY FSearchTqr (TM);
  244. VOID APIENTRY StoreQd (VOID);
  245. VOID APIENTRY AdjustOtqr (INT, INT);
  246. VOID APIENTRY DeleteQr (WORD);
  247. BOOL APIENTRY FInsertQr (WORD, PQR);
  248. BYTE * APIENTRY PbTqrLock (VOID);
  249. DR * APIENTRY PdrLockCur (VOID);
  250. VOID APIENTRY DrUnlockCur (VOID);
  251. DR * APIENTRY PdrLock (UINT);
  252. VOID APIENTRY DrUnlock (UINT);
  253. BYTE * APIENTRY PbTqrFromPdr (DR *);
  254. VOID APIENTRY StoreNotes (VOID);
  255. VOID APIENTRY SetNotesEc (VOID);
  256. VOID APIENTRY EcNotification (WORD, WORD);
  257. VOID APIENTRY PruneEcText (VOID);
  258. /* From calrem.c : */
  259. INT_PTR CALLBACK FnRemove (HWND, UINT, WPARAM, LPARAM);
  260. VOID APIENTRY Remove (VOID);
  261. VOID APIENTRY HourGlassOn (VOID);
  262. VOID APIENTRY HourGlassOff (VOID);
  263. /* From calcmd.c : */
  264. VOID APIENTRY CalCommand (HWND, INT);
  265. BOOL APIENTRY FDoDialog (INT);
  266. /* From calcmd2.c : */
  267. INT_PTR CALLBACK FnSaveAs (HWND, UINT, WPARAM, LPARAM);
  268. VOID APIENTRY GetRangeOfDates (HWND);
  269. INT_PTR CALLBACK FnDate (HWND, UINT, WPARAM, LPARAM);
  270. INT_PTR CALLBACK FnControls (HWND, UINT, WPARAM, LPARAM);
  271. INT_PTR CALLBACK FnSpecialTime (HWND, UINT, WPARAM, LPARAM);
  272. INT_PTR CALLBACK FnPageSetup (HWND, UINT, WPARAM, LPARAM);
  273. BOOL APIENTRY ProcessDlgText(BOOL);
  274. INT APIENTRY ChangeToPM ( TM *);
  275. INT_PTR CALLBACK FnDaySettings (HWND, UINT, WPARAM, LPARAM);
  276. INT_PTR CALLBACK FnMarkDay ( HWND, UINT, WPARAM, LPARAM); /* added 11/8/88 */
  277. INT APIENTRY cDlgfnOpen ( HWND, UINT, WPARAM, LPARAM);
  278. INT APIENTRY cDlgOpenFile (HANDLE, HWND, INT, CHAR *, INT,
  279. CHAR *, CHAR * , INT);
  280. BOOL APIENTRY cDlgCheckFilename (CHAR *); /* removed from ..\common\dlgopen.c */
  281. VOID APIENTRY cDlgCheckOkEnable (HWND, INT, WORD);
  282. BOOL APIENTRY cIsChLegal (INT);
  283. BOOL APIENTRY cFSearchSpec (CHAR *);
  284. INT APIENTRY AlertBox (CHAR *, CHAR *, UINT);
  285. VOID APIENTRY ConvertUpperSz (CHAR *);
  286. VOID APIENTRY AddDefExt (LPSTR);
  287. VOID APIENTRY CheckButtonEnable (HWND, INT, WORD);
  288. BOOL APIENTRY FCheckSave (BOOL);
  289. VOID APIENTRY RecordEdits (VOID);
  290. VOID APIENTRY DateTimeAlert(BOOL, INT);
  291. BOOL APIENTRY MergeStrings();
  292. BOOL APIENTRY CallSaveAsDialog ();
  293. /* From calmark.c : */
  294. VOID APIENTRY CmdMark (VOID);
  295. /* From caltdd.c : */
  296. VOID APIENTRY InitTdd (VOID);
  297. BOOL APIENTRY FSearchTdd (DT, INT *);
  298. BOOL APIENTRY FGrowTdd (INT, INT);
  299. VOID APIENTRY ShrinkTdd (INT, INT);
  300. BYTE * APIENTRY BltByte (BYTE *, BYTE *, UINT);
  301. VOID APIENTRY DeleteEmptyDd (INT);
  302. DD * APIENTRY TddLock (VOID);
  303. VOID APIENTRY TddUnlock (VOID);
  304. /* From calfile.c : */
  305. VOID APIENTRY CreateChangeFile (VOID);
  306. VOID APIENTRY DeleteChangeFile (VOID);
  307. BOOL APIENTRY FCreateTempFile (INT, INT);
  308. BOOL APIENTRY FFreeUpDr (DR *, DL *);
  309. BOOL APIENTRY FWriteDrToFile (BOOL, INT, DR *);
  310. BOOL APIENTRY FReadDrFromFile (BOOL, DR *, DL);
  311. BOOL APIENTRY FGetDateDr (DT);
  312. /* From calfile2.c : */
  313. BOOL APIENTRY FCopyToNewFile (INT, DR *, DD *, DD *);
  314. BOOL APIENTRY FSaveFile (CHAR *, BOOL);
  315. VOID APIENTRY Reconnect (BOOL);
  316. INT APIENTRY GetDrive (CHAR *);
  317. CHAR * APIENTRY PchFileName (CHAR *);
  318. BOOL APIENTRY FFlushDr (VOID);
  319. BOOL APIENTRY FCloseFile (INT);
  320. BOOL APIENTRY FWriteHeader (DD *);
  321. BOOL APIENTRY FWriteFile (INT, BYTE *, UINT);
  322. BOOL APIENTRY FDeleteFile (INT);
  323. BOOL APIENTRY FReopenFile (INT, WORD);
  324. VOID APIENTRY SetTitle (CHAR *);
  325. BOOL APIENTRY FCondClose (BOOL, BOOL);
  326. VOID APIENTRY CleanSlate (BOOL);
  327. VOID APIENTRY OpenCal (VOID);
  328. VOID APIENTRY LoadCal (VOID);
  329. /* From calalarm.c : */
  330. BOOL APIENTRY FAlarm (INT);
  331. VOID APIENTRY AlarmToggle (VOID);
  332. VOID APIENTRY uProcessAlarms (VOID);
  333. INT_PTR CALLBACK FnAckAlarms (HWND, UINT, WPARAM, LPARAM);
  334. VOID APIENTRY GetNextAlarm (FT *, FT *, BOOL, HWND);
  335. WORD APIENTRY IdrFree (VOID);
  336. VOID APIENTRY ReadTempDr (WORD, DL);
  337. VOID APIENTRY StartStopFlash (BOOL);
  338. /* From calspecl.c : */
  339. VOID APIENTRY InsertSpecial (VOID);
  340. VOID APIENTRY DeleteSpecial (VOID);
  341. VOID APIENTRY SpecialTimeFin (VOID);
  342. /* From calprint.c : */
  343. INT_PTR CALLBACK FnPrint (HWND, UINT, WPARAM, LPARAM);
  344. VOID APIENTRY Print (VOID);
  345. BOOL APIENTRY PrintDate (INT, DT, BOOL);
  346. BOOL APIENTRY PrintHeading (DT);
  347. BOOL APIENTRY PrintBlankLn (INT);
  348. BOOL APIENTRY PrintLine (VOID);
  349. BOOL APIENTRY NewPage (VOID);
  350. BOOL APIENTRY PrintHeaderFooter(BOOL);
  351. INT APIENTRY BeginPrint (VOID);
  352. VOID APIENTRY EndPrint (VOID);
  353. INT APIENTRY FnProcAbortPrint (HDC, INT);
  354. INT_PTR CALLBACK FnDlgAbortPrint (HWND, UINT, WPARAM, LPARAM);
  355. VOID APIENTRY CalPrintAlert(INT);
  356. INT atopix(CHAR *, INT);
  357. /* From calinit.c : */
  358. BOOL APIENTRY CalInit (HANDLE, HANDLE, LPSTR, INT);
  359. BOOL APIENTRY AllocDr ();
  360. BOOL APIENTRY CalTerminate(INT);
  361. BOOL APIENTRY LoadBitmaps(HANDLE);
  362. VOID APIENTRY DeleteBitmaps(VOID);
  363. /* From calmain.c */
  364. BOOL APIENTRY FKeyFiltered (MSG *);
  365. VOID APIENTRY CalTimer (BOOL);
  366. VOID APIENTRY AlarmCheck (VOID);
  367. VOID APIENTRY AddMinsToFt (FT *, UINT);
  368. INT APIENTRY CompareFt (FT *, FT *);
  369. /* From callib.asm : */
  370. VOID APIENTRY ReadClock(D3 *pd3, TM *ptm);
  371. INT APIENTRY FDosDelete(LPSTR lpszFileToDelete);
  372. INT APIENTRY FDosRename(LPSTR lpszOrgFileName, LPSTR lpszNewFileName);
  373. INT APIENTRY GetCurDrive (VOID);
  374. LONG APIENTRY mylmul(INT, INT);
  375. /* From common.h */
  376. /* include file for common routines */
  377. INT APIENTRY cDlgOpen(HANDLE, HWND, INT, INT, INT, INT,
  378. CHAR *, INT, CHAR *, OFSTRUCT *, INT *);
  379. BOOL APIENTRY cDlgCheckFileName(CHAR *);
  380. VOID APIENTRY DlgCheckOkEnable(HWND, INT, WORD);
  381. HDC APIENTRY GetPrinterDC(VOID);
  382. VOID APIENTRY DlgInitSaveAs(HWND, INT, INT, INT, LPOFSTRUCT);
  383. CHAR * APIENTRY PFileInPath(CHAR *);
  384. CHAR * APIENTRY Int2Ascii (INT, CHAR *, BOOL);