home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / header45.zip / sw.h < prev    next >
C/C++ Source or Header  |  1999-03-15  |  30KB  |  515 lines

  1. /****************************************************************************/
  2. /*                                                                          */
  3. /* Module Name: SW.H                                                        */
  4. /*                                                                          */
  5. /* This is the multimedia include file that has the typedefs, defines and   */
  6. /* function prototyes for Multimedia Applets.                               */
  7. /*                                                                          */
  8. /* Copyright (c) International Business Machines Corporation 1990, 1991     */
  9. /*                        All Rights Reserved                               */
  10. /*                                                                          */
  11. /****************************************************************************/
  12. /* The folowing symbols are used in this file for conditional sections.     */
  13. /*                                                                          */
  14. /*   #define:                To include:                                    */
  15. /*                                                                          */
  16. /*   INCL_SECONDARYWINDOW     Secondary Window                              */
  17. /*   INCL_GRAPHICBUTTON      Graphic Buttons                                */
  18. /*                                                                          */
  19. /*                                                                          */
  20. /****************************************************************************/
  21. #ifdef __cplusplus
  22.    extern "C" {
  23. #endif
  24.  
  25.  
  26. #ifndef __SW_H
  27.    #define __SW_H
  28.  
  29.    #ifdef INCL_SECONDARYWINDOW
  30.  
  31.       #define MAX_SMBDTEXT               35
  32.  
  33.       #define MB_ICONCUSTOM             0x0001
  34.  
  35.       #define SC_DEFAULTSIZE            0xc000          /* WM_COMMAND from SysMenu */
  36.  
  37.       #define WM_INITSECONDARYWINDOW    0x0519          /* MP1: NULL, MP2: CreateParams */
  38.  
  39.       #define QS_FRAME                  0x1             /* Flag set to query frame  */
  40.       #define QS_DIALOG                 0x2             /* Flag set to query dialog */
  41.  
  42.       #pragma pack(4)
  43.  
  44.       typedef struct _SMBD
  45.       {
  46.          CHAR   achText[MAX_SMBDTEXT + 1]; /* Text of the button. eg. "~Cancel"    */
  47.          ULONG  idButton;                  /* Button ID returned when user chooses */
  48.          /*  button                              */
  49.          LONG   flStyle;                   /* Button style or'ed with internal     */
  50.          /*  styles                              */
  51.       } SMBD;
  52.  
  53.       typedef SMBD * PSMBD;
  54.  
  55.       typedef struct _SMBINFO
  56.       {
  57.          HPOINTER hIcon;               /* Icon handle                              */
  58.          ULONG    cButtons;            /* Number of buttons                        */
  59.          ULONG    flStyle;             /* Icon style flags (MB_ICONQUESTION, etc...)*/
  60.          HWND     hwndNotify;          /* Reserved                                 */
  61.          PSMBD    psmbd;               /* Array of button definitions              */
  62.       } SMBINFO;
  63.  
  64.       typedef SMBINFO * PSMBINFO;
  65.  
  66.       #pragma pack()
  67.  
  68.       /* Analogous to WinDlgBox */
  69.  
  70.       ULONG EXPENTRY  WinSecondaryWindow(HWND    hwndParent,
  71.       HWND    hwndOwner,
  72.       PFNWP   pfnDlgProc,
  73.       HMODULE hmod,
  74.       ULONG  idDlg,
  75.       PVOID   pCreateParams);
  76.  
  77.       /* Analogous to WinLoadDlg */
  78.       HWND EXPENTRY  WinLoadSecondaryWindow(HWND    hwndParent,
  79.       HWND    hwndOwner,
  80.       PFNWP   pfnDlgProc,
  81.       HMODULE hmod,
  82.       ULONG   idDlg,
  83.       PVOID   pCreateParams);
  84.  
  85.       /* Analogous to WinProcessDlg */
  86.       ULONG EXPENTRY  WinProcessSecondaryWindow(HWND hwndSW);
  87.  
  88.       /* Analogous to WinCreateDlg  */
  89.       HWND EXPENTRY  WinCreateSecondaryWindow(HWND    hwndParent,
  90.       HWND    hwndOwner,
  91.       PFNWP   pfnDlgProc,
  92.       PDLGTEMPLATE pdlgt,                       /* requires INCL_WINDIALOGS */
  93.       PVOID   pCreateParams);
  94.  
  95.       BOOL EXPENTRY WinDefaultSize(HWND hwnd);
  96.  
  97.       BOOL EXPENTRY WinInsertDefaultSize(HWND hwnd, PSZ pszDefaultSize);
  98.  
  99.       HWND EXPENTRY WinQuerySecondaryHWND(HWND hwnd, ULONG ulFlag);
  100.  
  101.       /************************************************************************/
  102.       /* WinSecondaryMessageBox                                               */
  103.       /*                                                                      */
  104.       /* Parameters: HWND   hwndParent   - handle of the parent window.       */
  105.       /*             HWND   hwndOwner    - handle of the owner window.        */
  106.       /*             PSZ    pszText      - message text.                      */
  107.       /*             PSZ    pszCaption   - title of the message box.          */
  108.       /*             ULONG  idWindow     - Message box id                     */
  109.       /*             PSMBINFO psmbinfo   - pointer to button/icon info        */
  110.       /************************************************************************/
  111.       ULONG  EXPENTRY  WinSecondaryMessageBox(HWND     hwndParent,
  112.       HWND     hwndOwner,
  113.       PSZ      pszText,
  114.       PSZ      pszCaption,
  115.       ULONG    idWindow,
  116.       PSMBINFO psmbinfo);
  117.  
  118.       /************************************************************************/
  119.       /* WinDismissSecondaryWindow                                            */
  120.       /*                                                                      */
  121.       /* This function should be called from within the dlg proc. The hwnd    */
  122.       /* passed in MUST be the handle to the actual dialog.                   */
  123.       /************************************************************************/
  124.  
  125.       BOOL EXPENTRY WinDismissSecondaryWindow(HWND hwndDlg, ULONG ulResult);
  126.  
  127.       /************************************************************************/
  128.       /* The parameter hwnd can be either the secondary window or the actual  */
  129.       /* dialog.                                                              */
  130.       /************************************************************************/
  131.  
  132.       BOOL EXPENTRY WinDestroySecondaryWindow(HWND hwnd);
  133.  
  134.       MRESULT EXPENTRY WinDefSecondaryWindowProc(HWND hwnd, ULONG msg, MPARAM mp1,
  135.       MPARAM mp2);
  136.  
  137.  
  138.    #endif /* ifdef INCL_SECONDARYWINDOW */
  139.  
  140.    #ifdef INCL_GRAPHICBUTTON
  141.  
  142.       /************************************************************************/
  143.       /*                         Graphic Buttons                              */
  144.       /************************************************************************/
  145.  
  146.       /************************************************************************/
  147.       /* Notes on Using GraphicButtons                                        */
  148.       /*                                                                      */
  149.       /* GraphicButton CONTROL DATA                                           */
  150.       /*                                                                      */
  151.       /*  The format of the control data for GraphicButtons is                */
  152.       /*         "button Text, number of bitmaps, bitmap resource id's ..."   */
  153.       /*                                                                      */
  154.       /*                                                                      */
  155.       /*  Following are two example window templates of GraphicButtons:       */
  156.       /*                                                                      */
  157.       /*      1)  CONTROL  "", IDD_MP_REV, 120, 10, TS_PB_WIDTH, TS_PB_HEIGHT,*/
  158.       /*                 WC_GRAPHICBUTTON,                                    */
  159.       /*                 GBS_TWOSTATE | GBS_HILITEBITMAP |                    */
  160.       /*                 WS_VISIBLE | WS_TABSTOP                              */
  161.       /*                 CTLDATA GB_RESOURCE,"~REV", 2, ID_MP_REV1, ID_MP_REV0*/
  162.       /*                                                                      */
  163.       /*  The above graphicbutton has id IDD_MP_REV and is of type            */
  164.       /*  GBS_TWOSTATE and GBS_HILITEBITMAP.  The GBS_HILITEBITMAP allows     */
  165.       /*  a different bitmap to be displayed when the button is in the        */
  166.       /*  hilite state. The graphicbutton will be displayed with text         */
  167.       /*  "REV" and has "R" as the mnemonic.  It has 2 bitmaps associated     */
  168.       /*  with it.  Their resource id are ID_MP_REV1 and ID_MP_REV0.          */
  169.       /*                                                                      */
  170.       /*                                                                      */
  171.       /*      2)   CONTROL  "", IDD_MP_PLAY, 175, 10, TS_PB_WIDTH,            */
  172.       /*                        TS_PB_HEIGHT, WC_GRAPHICBUTTON,               */
  173.       /*                        GBS_AUTOTWOSTATE | GBS_AUTOANIMATION |        */
  174.       /*                        WS_VISIBLE | WS_TABSTOP                       */
  175.       /*                        CTLDATA GB_RESOURCE, "~PLAY", 9,              */
  176.       /*                                ID_MP_STOP0, ID_MP_PLAY1, ID_MP_PLAY2,*/
  177.       /*                                ID_MP_PLAY3, ID_MP_PLAY4, ID_MP_PLAY5,*/
  178.       /*                                ID_MP_PLAY6, ID_MP_PLAY7, ID_MP_REV1  */
  179.       /*                                                                      */
  180.       /*  The above graphicbutton has id IDD_MP_PLAY and is of type           */
  181.       /*  GBS_AUTOTWOSTATE and GBS_AUTOANIMATE.  When clicked upon,           */
  182.       /*  the button will automatically toggle the state and animation.       */
  183.       /*  The graphicbutton will be displayed with text "PLAY"                */
  184.       /*  and mnemonic "P".  It has 9 bitmaps associated with it.             */
  185.       /*                                                                      */
  186.       /*                                                                      */
  187.       /*                                                                      */
  188.       /*  GraphicButton Painting                                              */
  189.       /*                                                                      */
  190.       /*  Due to the PM design, whenever a graphicbutton is clicked,          */
  191.       /*  it is sent a BN_PAINT (to paint a non-hilite state) and then        */
  192.       /*  BN_CLICKED.  Thus, for GBS_AUTO* style graphicbuttons, a paint      */
  193.       /*  request is generated before the button has a chance to change       */
  194.       /*  its state (BN_CLICKED).  To avoid this premature painting,          */
  195.       /*  code was inserted to delay the painting of graphicbuttons           */
  196.       /*  GB_PAINT_RESOLUTION milliseconds whenever the button is switching   */
  197.       /*  FROM the hilite paint state.                                        */
  198.       /*                                                                      */
  199.       /************************************************************************/
  200.  
  201.       BOOL EXPENTRY WinRegisterGraphicButton(VOID);
  202.  
  203.       #define WC_GRAPHICBUTTON ((PSZ)0xffff0040L)
  204.  
  205.       /************************************************************************/
  206.       /*             GraphicButton Animation/TwoState constants               */
  207.       /************************************************************************/
  208.  
  209.       /************************************************************************/
  210.       /*                     Graphic Button Style bits                        */
  211.       /************************************************************************/
  212.  
  213.       #define GBS_TWOSTATE        0x1000  /* indicates TwoState button        */
  214.       #define GBS_AUTOTWOSTATE    0X2000  /* will auto toggle state up/down   */
  215.       #define GBS_ANIMATION       0x4000  /* indicates Animatable button      */
  216.       #define GBS_AUTOANIMATION   0x8000  /* will auto toggle anim. on/off    */
  217.       #define GBS_DISABLEBITMAP   0x0010  /* allows a diff. bitmap when       */
  218.       /* disabled                         */
  219.       #define GBS_HILITEBITMAP    0x0020  /* allows a diff. bitmap when       */
  220.       /* hilited                          */
  221.       #define GBS_3D_TEXTRECESSED 0x0040  /* display text in 3-D recessed     */
  222.       #define GBS_3D_TEXTRAISED   0x0080  /* display text in 3-D raised       */
  223.       #define GBS_MINIBUTTON      0x0001  /* mini button style                */
  224.  
  225.       /************************************************************************/
  226.       /*                     Graphic Button User Constants                    */
  227.       /************************************************************************/
  228.  
  229.       /************************************************************************/
  230.       /* Codes to reference allowed GraphicButton states (or paint states)    */
  231.       /************************************************************************/
  232.  
  233.       #define GB_ERROR           -1       /* GraphicButton Error              */
  234.       #define GB_UP               1       /* GraphicButton up (and paint)     */
  235.       /* state                            */
  236.       #define GB_DOWN             2       /* GraphicButton down (and paint)   */
  237.       /* state                            */
  238.       #define GB_DISABLE          3       /* GraphicButton disabled state     */
  239.       #define GB_HILITE           4       /* GraphicButton paint state only   */
  240.       #define GB_OUTOFHILITE      5       /* Changing out of hilite paint     */
  241.       /* state                            */
  242.  
  243.       /************************************************************************/
  244.       /* Codes for various GraphicButton message function parameters          */
  245.       /************************************************************************/
  246.  
  247.       #define GB_TOGGLE           10      /* GraphicButton toggle             */
  248.       #define GB_CURRENTSTATE     11      /* GraphicButton's current state    */
  249.       #define GB_ANIMATIONBEGIN   12      /* when refering to index of anim   */
  250.       /* start                            */
  251.       #define GB_ANIMATIONEND     13      /* when refering to index of anim   */
  252.       /* end                              */
  253.       #define GB_MAXINDEX         14      /* GraphicButton max. index         */
  254.  
  255.       /************************************************************************/
  256.       /* Codes to set/query text position relative to the bitmap              */
  257.       /************************************************************************/
  258.  
  259.       #define GB_TEXTBELOW        1       /* place text below bitmap          */
  260.       #define GB_TEXTABOVE        2       /* place text above bitmap          */
  261.  
  262.       /************************************************************************/
  263.       /* Codes used to set the animation frame with message GBM_SETBITMAPINDEX*/
  264.       /************************************************************************/
  265.  
  266.       #define GB_INDEX_FORWARD   -1       /* advance one frame foward         */
  267.       #define GB_INDEX_BACKWARD  -2       /* advance one frame backwards      */
  268.       #define GB_INDEX_FIRST     -3       /* set to first frame of sequence   */
  269.       #define GB_INDEX_LAST      -4       /* set to last frame of sequence    */
  270.  
  271.       #pragma pack(1)
  272.  
  273.       typedef struct _GBTNCDATA
  274.       {
  275.          USHORT  usReserved;
  276.          PSZ     pszText;
  277.          HMODULE hmod;
  278.          USHORT  cBitmaps;
  279.          USHORT  aidBitmap[1];
  280.       } GBTNCDATA;
  281.  
  282.       typedef GBTNCDATA *PGBTNCDATA;
  283.  
  284.       #pragma pack()
  285.  
  286.       #define GB_RESOURCE  1
  287.       #define GB_STRUCTURE 0
  288.  
  289.  
  290.       /************************************************************************/
  291.       /*          Notification Messages received by GraphicButton Parent      */
  292.       /***********************************************************************/
  293.       /************************************************************************/
  294.       /* GBN_BUTTONDOWN, GBN_BUTTONUP, and GBN_BUTTONHILITE                   */
  295.       /*                                                                      */
  296.       /* The notification messages are passed as part of the WM_CONTROL       */
  297.       /* message.                                                             */
  298.       /*                                                                      */
  299.       /* msg = WM_CONTROL                                                     */
  300.       /* mp1 = MPFROM2SHORT(gpb_id, button_state)                             */
  301.       /*         gpd_id       = identity of the displayed graphic pushbutton  */
  302.       /*         button_state = GBN_BUTTONUP, GBN_BUTTONDOWN, or              */
  303.       /*                        GBN_BUTTONHILITE                              */
  304.       /*                                                                      */
  305.       /************************************************************************/
  306.  
  307.       #define GBN_BUTTONUP     0x0524
  308.       #define GBN_BUTTONDOWN   0x0525
  309.       #define GBN_BUTTONHILITE 0x0526
  310.       #define GBN_SETFOCUS     0x0527   /* mp2 TRUE for gaining focus */
  311.  
  312.       /************************************************************************/
  313.       /*          Messages to GraphicButton Windows                           */
  314.       /************************************************************************/
  315.  
  316.       /************************************************************************/
  317.       /*                             GBM_SETGRAPHICDATA                       */
  318.       /************************************************************************/
  319.       /* mp1 = MPFROMP((PGBTNCDATA)&gbtncdata);    Graphic button control data*/
  320.       /* mp2 = NULL;                               not used                   */
  321.       /*                                                                      */
  322.       /* WARNING: This message resets all button parameters.                  */
  323.       /*                                                                      */
  324.       /************************************************************************/
  325.  
  326.       #define GBM_SETGRAPHICDATA   0x052A
  327.  
  328.  
  329.       /************************************************************************/
  330.       /*                             GBM_ANIMATE                              */
  331.       /************************************************************************/
  332.       /* mp1 = MPFROMSHORT(fStart)      TRUE to start animation, FALSE to stop*/
  333.       /* mp2 = MPFROMSHORT(fContinue)   TRUE continue anim. at currently      */
  334.       /*                                displayed bitmap, FALSE restart at    */
  335.       /*                                the beginning.                        */
  336.       /*                                                                      */
  337.       /* Returns TRUE on Success                                              */
  338.       /*         FALSE on Failure                                             */
  339.       /*                                                                      */
  340.       /************************************************************************/
  341.  
  342.       #define GBM_ANIMATE 0x052B
  343.  
  344.  
  345.       /************************************************************************/
  346.       /*                             GBM_SETANIMATIONRATE                     */
  347.       /************************************************************************/
  348.       /* mp1 = MPFROMSHORT(ULmIL);      Animation rate in milliseconds        */
  349.       /* mp2 = NULL                     not used                              */
  350.       /*                                                                      */
  351.       /*                                                                      */
  352.       /* Returns TRUE on Success                                              */
  353.       /*         FALSE on Failure                                             */
  354.       /*                                                                      */
  355.       /************************************************************************/
  356.  
  357.       #define GBM_SETANIMATIONRATE 0x052C
  358.  
  359.  
  360.       /************************************************************************/
  361.       /*                             GBM_QUERYANIMATIONACTIVE                 */
  362.       /************************************************************************/
  363.       /* mp1 = NULL;                    not used                              */
  364.       /* mp2 = NULL;                    not used                              */
  365.       /*                                                                      */
  366.       /*                                                                      */
  367.       /* Returns TRUE if animation is active, else GB_ERROR                   */
  368.       /*                                                                      */
  369.       /*                                                                      */
  370.       /************************************************************************/
  371.  
  372.       #define GBM_QUERYANIMATIONACTIVE 0x052D
  373.  
  374.  
  375.       /************************************************************************/
  376.       /*                             GBM_QUERYANIMATIONRATE                   */
  377.       /************************************************************************/
  378.       /* mp1 = NULL;                    not used                              */
  379.       /* mp2 = NULL;                    not used                              */
  380.       /*                                                                      */
  381.       /*                                                                      */
  382.       /* Returns ULONG sepcifying animation rate in milliseconds              */
  383.       /*                                                                      */
  384.       /*                                                                      */
  385.       /************************************************************************/
  386.  
  387.       #define GBM_QUERYANIMATIONRATE 0x052E
  388.  
  389.  
  390.       /************************************************************************/
  391.       /*                             GBM_SETBITMAPINDEX                       */
  392.       /************************************************************************/
  393.       /* mp1 = MPFROMSHORT(usGB_State)       Bitmap index to change           */
  394.       /*             GB_UP,                                                   */
  395.       /*             GB_DOWN,                                                 */
  396.       /*             GB_DISABLE,                                              */
  397.       /*             GB_HILITE,                                               */
  398.       /*             GB_ANIMATIONBEGIN,                                       */
  399.       /*             GB_ANIMATIONEND,                                         */
  400.       /*          or GB_CURRENTSTATE    chng current state (up or down) bitmap*/
  401.       /* mp2 = MPFROMSHORT(sFrameCode)  Set according to code or frame desire */
  402.       /*             GB_INDEX_FORWARD,  chng to next bitmap in circular array */
  403.       /*             GB_INDEX_BACKWARD, "   "  prev   "    "     "       "    */
  404.       /*             GB_INDEX_FIRST,    "   "  first  "    "     "       "    */
  405.       /*             GB_INDEX_LAST,     "   "  last   "    "     "       "    */
  406.       /*          or desired_bitmap     otherwise desired bmp index specified */
  407.       /*                                                                      */
  408.       /* Returns TRUE on Success, otherwise FALSE                             */
  409.       /*                                                                      */
  410.       /************************************************************************/
  411.  
  412.       #define GBM_SETBITMAPINDEX 0x052F
  413.  
  414.  
  415.       /************************************************************************/
  416.       /*                             GBM_QUERYBITMAPINDEX                     */
  417.       /************************************************************************/
  418.       /*  mp1 = MPFROMSHORT(usGB_State)       Query bitmap index              */
  419.       /*            GB_UP,                                                    */
  420.       /*            GB_DOWN,                                                  */
  421.       /*            GB_DISABLE,                                               */
  422.       /*            GB_HILITE,                                                */
  423.       /*            GB_ANIMATIONBEGIN,                                        */
  424.       /*            GB_ANIMATIONEND,                                          */
  425.       /*         or GB_CURRENTSTATE  query current state (up or down) bitmap  */
  426.       /*  mp2 = NULL;                    not used                             */
  427.       /*                                                                      */
  428.       /*  Returns USHORT specifying the index                                 */
  429.       /*                                                                      */
  430.       /*                                                                      */
  431.       /************************************************************************/
  432.  
  433.       #define GBM_QUERYBITMAPINDEX 0x0530
  434.  
  435.       /************************************************************************/
  436.       /*                             GBM_SETSTATE                             */
  437.       /************************************************************************/
  438.       /* mp1 = MPFROMSHORT(usStateCode)   Set twostate button to specified    */
  439.       /*                                  state                               */
  440.       /*             GB_UP,                                                   */
  441.       /*             GB_DOWN,                                                 */
  442.       /*          or GB_TOGGLE          toggle (up/down) to (down/up)         */
  443.       /* mp2 = MPFROMBOOL(fRepaint)     TRUE  - state changed and displayed   */
  444.       /*                                FALSE - state changed, not displayed  */
  445.       /*                                                                      */
  446.       /* Returns TRUE on Success                                              */
  447.       /*         FALSE on Failure                                             */
  448.       /*                                                                      */
  449.       /*                                                                      */
  450.       /************************************************************************/
  451.  
  452.       #define GBM_SETSTATE 0x0531
  453.  
  454.       /************************************************************************/
  455.       /*                             GBM_QUERYSTATE                           */
  456.       /************************************************************************/
  457.       /*                                                                      */
  458.       /* mp1 = NULL                        not used                           */
  459.       /* mp2 = NULL                        not used                           */
  460.       /*                                                                      */
  461.       /* Returns the state (GB_UP or GB_DOWN) else GB_ERROR.                  */
  462.       /*                                                                      */
  463.       /*                                                                      */
  464.       /************************************************************************/
  465.  
  466.       #define GBM_QUERYSTATE 0x0532
  467.  
  468.       /************************************************************************/
  469.       /*                             GBM_SETTEXTPOSITION                      */
  470.       /************************************************************************/
  471.       /* mp1 = MPFROMSHORT(usTextPos)   How to position text relative to      */
  472.       /*                                  bitmap                              */
  473.       /*               GB_TEXTBELOW,                                          */
  474.       /*            or GB_TEXTABOVE                                           */
  475.       /*   mp2 = NULL                     not used                            */
  476.       /*                                                                      */
  477.       /*   Returns TRUE on Success, otherwise FALSE                           */
  478.       /*                                                                      */
  479.       /************************************************************************/
  480.  
  481.       #define GBM_SETTEXTPOSITION 0x0533
  482.  
  483.       /************************************************************************/
  484.       /*                             GBM_QUERYTEXTPOSITION                    */
  485.       /************************************************************************/
  486.       /*                                                                      */
  487.       /*  mp1 = NULL                          not used                        */
  488.       /*  mp2 = NULL                          not used                        */
  489.       /*                                                                      */
  490.       /*  Returns GB_TEXTBELOW, GB_TEXTABOVE, GB_TEXTRIGHT, GB_TEXTLEFT       */
  491.       /*  on success, otherwise FALSE                                         */
  492.       /*                                                                      */
  493.       /************************************************************************/
  494.  
  495.       #define GBM_QUERYTEXTPOSITION 0x0534
  496.  
  497.  
  498.       /************************************************************************/
  499.       /*                             GraphicButton END                        */
  500.       /************************************************************************/
  501.  
  502.    #endif /* ifdef INCL_GRAPHICBUTTON  */
  503.  
  504.    #ifdef INCL_STPMPAGE
  505.       #define MM_TABHELP  0x054C
  506.    #endif /* INCL_STPMPAGE */
  507.  
  508.  
  509. #endif /* ifndef __SW_H  */
  510.  
  511. #ifdef __cplusplus
  512. }
  513. #endif
  514.  
  515.