home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / xfld085s.zip / helpers / shapewin.h < prev    next >
C/C++ Source or Header  |  1999-02-09  |  3KB  |  102 lines

  1.  
  2. /*
  3.  * shapewin.h:
  4.  *      header file for shapewin.h. Please see the introductory
  5.  *      notes in that file for descriptions.
  6.  *
  7.  *      This file is new with V0.85.
  8.  *
  9.  *      Function prefixes:
  10.  *      --  shp*    shape window functions
  11.  *
  12.  *      Copyright (C) 1998-99
  13.  *                  Ulrich Möller,
  14.  *                  Akira Hatakeyama,
  15.  *                  Takayuki Suwa.
  16.  *      This file is part of the XFolder source package.
  17.  *      XFolder is free software; you can redistribute it and/or modify
  18.  *      it under the terms of the GNU General Public License as published
  19.  *      by the Free Software Foundation, in version 2 as it comes in the
  20.  *      "COPYING" file of the XFolder main distribution.
  21.  *      This program is distributed in the hope that it will be useful,
  22.  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
  23.  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24.  *      GNU General Public License for more details.
  25.  */
  26.  
  27. #if __cplusplus
  28. extern "C" {
  29. #endif
  30.  
  31. #ifndef SHAPEWIN_HEADER_INCLUDED
  32.     #define SHAPEWIN_HEADER_INCLUDED
  33.  
  34.     /*
  35.      * Name of Control
  36.      */
  37.  
  38.     #define SHAPE_WINDOW_CLASS    "ShapeWin"
  39.  
  40.     /*
  41.      * SHPCTLDATA:
  42.      *      shape window control data for use with
  43.      *      pCtlData of WinCreateWindow. This _must_
  44.      *      be initialized.
  45.      */
  46.  
  47.     typedef struct _SHPCTLDATA {
  48.         SHORT   cx, cy ;       // size of bitmap
  49.         HPS     hpsMask;       // HPS with bitmap selected into
  50.         HPS     hpsDraw;       // HPS used for drawing the bitmap;
  51.     } SHPCTLDATA, *PSHPCTLDATA;
  52.  
  53.     /*
  54.      * Window Procedure for "Shape window"
  55.      */
  56.  
  57.     MRESULT EXPENTRY fnwpShape(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  58.  
  59.     /*
  60.      * Window Messages Specific for Shape Window
  61.      */
  62.  
  63.     #define SHAPEWIN_MSG_UPDATE (WM_USER + 1)
  64.         /* SHAPEWIN_MSG_UPDATE          Update Drawing Image                    */
  65.         /*      MP1 PRECTL              Update Region, NULL for entire region   */
  66.         /*      MP2 NULL                not used                                */
  67.  
  68.     /*
  69.      * SHAPEFRAME:
  70.      *      common input/output structure for shape frame
  71.      *      windows below.
  72.      */
  73.  
  74.     typedef struct _SHAPEFRAME {
  75.         HDC             hdc;
  76.         HPS             hps;
  77.         HBITMAP         hbm;
  78.  
  79.         HWND            hwndShapeFrame;
  80.         HWND            hwndShape;
  81.         PFNWP           pfnFrame;
  82.         BITMAPINFOHEADER2   bmi;
  83.         SHPCTLDATA        shpctrl;
  84.     } SHAPEFRAME, *PSHAPEFRAME;
  85.  
  86.     BOOL shpLoadBitmap(HAB hab,
  87.                    PSZ pszBitmapFile,
  88.                    HMODULE hmodResource,
  89.                    ULONG idResource,
  90.                    PSHAPEFRAME psb);
  91.  
  92.     VOID shpFreeBitmap(PSHAPEFRAME psb);
  93.  
  94.     BOOL shpCreateWindows(HAB hab, PSHAPEFRAME psb);
  95.  
  96. #endif
  97.  
  98. #if __cplusplus
  99. }
  100. #endif
  101.  
  102.