home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / devnews / vol2 / sample3 / sty_xtrn.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-05  |  3.7 KB  |  114 lines

  1. /*************************************************************************
  2. *
  3. *  File Name   : STY_XTRN.H
  4. *
  5. *  Description : This header file contains the application wide function
  6. *                declarations and global external variables.
  7. *
  8. *  Copyright (C) 1992 IBM Corporation
  9. *
  10. *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  11. *      sample code created by IBM Corporation. This sample code is not
  12. *      part of any standard or IBM product and is provided to you solely
  13. *      for  the purpose of assisting you in the development of your
  14. *      applications.  The code is provided "AS IS", without
  15. *      warranty of any kind.  IBM shall not be liable for any damages
  16. *      arising out of your use of the sample code, even if they have been
  17. *      advised of the possibility of such damages.                                                    *
  18. *
  19. ************************************************************************/
  20.  
  21. /*--------------------------------------------------------------*\
  22.  *  Global variables                                            *
  23. \*--------------------------------------------------------------*/
  24. extern HWND hwndMainFrame;
  25. extern HWND hwndMain;
  26. extern HAB hab;
  27. extern HMQ hmq;
  28. extern HDC hdcMain;
  29. extern CHAR szAppName[];
  30. extern CHAR szUntitled[];
  31. extern BOOL fHelpEnabled;
  32. extern HWND hwndMLE;
  33. extern BOOL fUseDeviceDriver;
  34.  
  35. typedef struct _messagebuffer
  36. {
  37.      ULONG ulMessageType;
  38.      ULONG ulMessageSubCommand;
  39.      ULONG ulBufferSize;
  40.      PVOID pvMessageData;
  41.      ULONG ulSrcSessionId;
  42. }MESSAGEBUFFER,*PMESSAGEBUFFER;
  43.  
  44. /*--------------------------------------------------------------*\
  45.  *  Entry point declarations                                    *
  46. \*--------------------------------------------------------------*/
  47.  
  48. BOOL ProcessCmdLine(SHORT sArgc,CHAR **ppArgv);
  49. /* from sample.c */
  50. MRESULT EXPENTRY MainWndProc(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);
  51. SHORT MessageBox(HWND hwndOwner, SHORT idMsg, SHORT fsStyle, BOOL fBeep);
  52. VOID MainCommand(MPARAM mp1, MPARAM mp2);
  53.  
  54. /* from init.c */
  55. BOOL Init(VOID);
  56. MRESULT InitMainWindow(HWND hwnd, MPARAM mp1, MPARAM mp2);
  57. VOID APIENTRY ExitProc(USHORT usTermCode);
  58.  
  59. /* from file.c */
  60. VOID FileNew(MPARAM mp2);
  61. VOID FileOpen(MPARAM mp2);
  62. VOID FileSave(MPARAM mp2);
  63. VOID FileSaveAs(MPARAM mp2);
  64. VOID WriteFileToDisk(HFILE hf);
  65. BOOL GetFileName(VOID);
  66. VOID UpdateTitleText(HWND hwnd);
  67. MRESULT APIENTRY OpenSaveFilterDlgProc(HWND hwnd, USHORT msg, MPARAM mp1,
  68.                                     MPARAM mp2);
  69.  
  70. /* from edit.c */
  71. VOID EditUndo(MPARAM mp2);
  72. VOID EditCut(MPARAM mp2);
  73. VOID EditCopy(MPARAM mp2);
  74. VOID EditPaste(MPARAM mp2);
  75. VOID EditClear(MPARAM mp2);
  76.  
  77. /* from user.c */
  78. VOID UserCommand(MPARAM mp1, MPARAM mp2);
  79. MRESULT UserWndProc(HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2);
  80. VOID InitMenu(MPARAM mp1, MPARAM mp2);
  81. VOID EnableMenuItem(HWND hwndMenu, SHORT idItem, BOOL fEnable);
  82.  
  83. /* from pnt.c */
  84. VOID MainPaint(HWND hwnd);
  85.  
  86. /* from help.c */
  87. VOID InitHelp(VOID);
  88. VOID HelpUsingHelp(MPARAM mp2);
  89. VOID HelpGeneral(MPARAM mp2);
  90. VOID HelpKeys(MPARAM mp2);
  91. VOID HelpIndex(MPARAM mp2);
  92. VOID HelpTutorial(MPARAM mp2);
  93. VOID HelpProdInfo(MPARAM mp2);
  94. VOID DisplayHelpPanel(SHORT nPanelId);
  95. VOID DestroyHelpInstance(VOID);
  96.  
  97. /* from os2thrd.c */
  98.  
  99. APIRET ProcessMessageData(MESSAGEBUFFER MessageBuffer);
  100. APIRET OpenVirtQueue(VOID);
  101. APIRET WriteVirtQueue(PVOID pvMessageToSend,
  102.                       ULONG ulCount,
  103.                       SGID  SessionId);
  104. VOID   ReadVirtQueue(VOID);
  105. APIRET StartReadThread(VOID);
  106. APIRET CloseVirtQueue(VOID);
  107.  
  108. /*
  109.  *sty_user.c
  110.  */
  111.  
  112. BOOL DisPlayInComingMessage(PSZ pszNewMessage);
  113.  
  114.