1 | /* $Id: shapewin.h 14 2000-12-09 19:19:42Z umoeller $ */
|
---|
2 |
|
---|
3 |
|
---|
4 | /*
|
---|
5 | *@@sourcefile shapewin.h:
|
---|
6 | * header file for shapewin.h. See remarks there.
|
---|
7 | *
|
---|
8 | * Note: Version numbering in this file relates to XWorkplace version
|
---|
9 | * numbering.
|
---|
10 | *
|
---|
11 | *@@include #define INCL_GPIBITMAPS
|
---|
12 | *@@include #include <os2.h>
|
---|
13 | *@@include #include "shapewin.h"
|
---|
14 | */
|
---|
15 |
|
---|
16 | /* Copyright (C) 1998-2000
|
---|
17 | * Ulrich Mller,
|
---|
18 | * Akira Hatakeyama,
|
---|
19 | * Takayuki Suwa.
|
---|
20 | * This file is part of the "XWorkplace helpers" source package.
|
---|
21 | * This is free software; you can redistribute it and/or modify
|
---|
22 | * it under the terms of the GNU General Public License as published
|
---|
23 | * by the Free Software Foundation, in version 2 as it comes in the
|
---|
24 | * "COPYING" file of the XWorkplace main distribution.
|
---|
25 | * This program is distributed in the hope that it will be useful,
|
---|
26 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
27 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
28 | * GNU General Public License for more details.
|
---|
29 | */
|
---|
30 |
|
---|
31 | #if __cplusplus
|
---|
32 | extern "C" {
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | #ifndef SHAPEWIN_HEADER_INCLUDED
|
---|
36 | #define SHAPEWIN_HEADER_INCLUDED
|
---|
37 |
|
---|
38 | /*
|
---|
39 | * Name of Control
|
---|
40 | */
|
---|
41 |
|
---|
42 | #define WC_SHAPE_WINDOW "ShapeWin"
|
---|
43 | #define WC_SHAPE_REGION "ShapeWinRegion"
|
---|
44 |
|
---|
45 | /*
|
---|
46 | *@@ SHPCTLDATA:
|
---|
47 | * shape window control data for use with
|
---|
48 | * pCtlData of WinCreateWindow. This _must_
|
---|
49 | * be initialized.
|
---|
50 | */
|
---|
51 |
|
---|
52 | typedef struct _SHPCTLDATA
|
---|
53 | {
|
---|
54 | SHORT cx, cy ; // size of bitmap
|
---|
55 | HPS hpsMask; // HPS with bitmap selected into
|
---|
56 | HPS hpsDraw; // HPS used for drawing the bitmap;
|
---|
57 | } SHPCTLDATA, *PSHPCTLDATA;
|
---|
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 | {
|
---|
76 | HDC hdc;
|
---|
77 | HPS hps;
|
---|
78 | HBITMAP hbm;
|
---|
79 |
|
---|
80 | HAB hab;
|
---|
81 | HWND hwndShapeFrame;
|
---|
82 | HWND hwndShape;
|
---|
83 | PFNWP pfnFrame;
|
---|
84 | BITMAPINFOHEADER2 bmi;
|
---|
85 | SHPCTLDATA shpctrl;
|
---|
86 |
|
---|
87 | POINTL ptlLowerLeft; // added (V1.0)
|
---|
88 | } SHAPEFRAME, *PSHAPEFRAME;
|
---|
89 |
|
---|
90 | BOOL shpLoadBitmap(HAB hab,
|
---|
91 | PSZ pszBitmapFile,
|
---|
92 | HMODULE hmodResource,
|
---|
93 | ULONG idResource,
|
---|
94 | PSHAPEFRAME psb);
|
---|
95 |
|
---|
96 | VOID shpFreeBitmap(PSHAPEFRAME psb);
|
---|
97 |
|
---|
98 | BOOL shp2RegisterClasses(HAB hab);
|
---|
99 |
|
---|
100 | BOOL shpCreateWindows(PSHAPEFRAME psb);
|
---|
101 |
|
---|
102 | #endif
|
---|
103 |
|
---|
104 | #if __cplusplus
|
---|
105 | }
|
---|
106 | #endif
|
---|
107 |
|
---|