-
Notifications
You must be signed in to change notification settings - Fork 1
/
hspwnd.h
154 lines (132 loc) · 3.99 KB
/
hspwnd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//
// hspwnd.cpp header
//
#ifndef __hspwnd_h
#define __hspwnd_h
// Window Object Info
//
#define HSPOBJ_OPTION_SETFONT 0x100
#define MESSAGE_HSPOBJ 0x4000
#define HSPOBJ_LIMIT_DEFAULT 1024
#define HSPOBJ_INPUT_STR 2
#define HSPOBJ_INPUT_DOUBLE 3
#define HSPOBJ_INPUT_INT 4
#define HSPOBJ_INPUT_MULTILINE 0x100
#define HSPOBJ_INPUT_READONLY 0x200
#define HSPOBJ_INPUT_HSCROLL 0x400
#define HSPOBJ_NONE 0
#define HSPOBJ_TAB_ENABLE 1
#define HSPOBJ_TAB_DISABLE 2
#define HSPOBJ_TAB_SKIP 3
typedef struct HSP3VARSET
{
// PVal entry structure
//
int type;
PVal *pval;
APTR aptr;
void *ptr;
} HSP3VARSET;
typedef struct HSPOBJINFO
{
// Object Info (3.0)
//
short owmode; // objectのmode
short option; // objectのoption(未使用・内部オブジェクトは0)
void *bm; // objectが配置されているBMSCR構造体のポインタ
HWND hCld; // objectのhandle
int owid; // objectのValue(汎用)
int owsize; // objectの使用サイズ(汎用)
HSP3VARSET varset; // objectから設定される変数の情報
// callback function
void (*func_notice)( struct HSPOBJINFO *, int );
void (*func_objprm)( struct HSPOBJINFO *, int, void * );
void (*func_delete)( struct HSPOBJINFO * );
} HSPOBJINFO;
#define BMSCR_FLAG_NOUSE 0
#define BMSCR_FLAG_INUSE 1
#define BMSCR_PALMODE_FULLCOLOR 0
#define BMSCR_PALMODE_PALETTECOLOR 1
#define HSPWND_TYPE_NONE 0
#define HSPWND_TYPE_BUFFER 1
#define HSPWND_TYPE_MAIN 2
#define HSPWND_TYPE_BGSCR 3
enum {
BMSCR_SAVEPOS_MOSUEX,
BMSCR_SAVEPOS_MOSUEY,
BMSCR_SAVEPOS_MOSUEZ,
BMSCR_SAVEPOS_MOSUEW,
BMSCR_SAVEPOS_MAX,
};
typedef struct BMSCR
{
//
// Window data structure
//
int flag; // used flag
int sx; // X-size
int sy; // Y-size
int palmode; // palmode
HDC hdc; // buffer HDC
BYTE *pBit; // bitmap pointer
BITMAPINFOHEADER *pbi; // infoheader
HBITMAP dib; // bitmap handle(DIB)
HBITMAP old; // bitmap handle(OLD)
RGBQUAD *pal; // palette table
HPALETTE hpal; // palette handle
HPALETTE holdpal; // palette handle (old)
int pals; // palette entries
HWND hwnd; // window handle
HINSTANCE hInst; // Instance of program
int infsize; // *pbi alloc memory size
int bmpsize; // *pBit alloc memory size
// Window object setting
//
int type; // setting type
int wid; // window ID
short fl_dispw; // display window flag
short fl_udraw; // update draw window
int wx,wy,wchg; // actual window size x,y
int viewx,viewy; // buffer view point x,y
int lx,ly; // buffer view size x,y
int cx,cy; // object cursor x,y
int ox,oy,py; // object size x,y,py
int texty; // text Y-axis size
int gx,gy,gmode; // gcopy size
HBRUSH hbr; // BRUSH handle
HPEN hpn; // PEN handle
HFONT hfont; // FONT handle
HFONT holdfon; // FONT handle (old)
COLORREF color; // text color code
int textspeed; // slow text speed
int cx2,cy2; // slow text cursor x,y
int tex,tey; // slow text limit x,y
char *prtmes; // slow message ptr
int focflg; // focus set flag
int objmode; // object set mode
LOGFONT logfont; // logical font
int style; // extra window style
int gfrate; // halftone copy rate
int tabmove; // object TAB move mode
int sx2; // actual bitmap X size
SIZE printsize; // print,mes extent size
// Class depend data
//
int objstyle; // objects style
HSPOBJINFO *mem_obj; // Window objects
int objmax; // Max number of obj
int objlimit; // Limit number of obj
short savepos[BMSCR_SAVEPOS_MAX]; // saved position
void *master_hspwnd; // Parent hspwnd class
short palcolor; // Palette color code
short textstyle; // Extra text style
short framesx, framesy; // Window frame xy-size
int imgbtn; // Custom Button Flag (-1=none)
short btn_x1, btn_y1; // Custom Button Image X,Y
short btn_x2, btn_y2; // Custom Button Image X,Y (press)
short btn_x3, btn_y3; // Custom Button Image X,Y (mouse over)
short divx, divy; // Divide value for CEL
short divsx, divsy; // CEL size
short celofsx, celofsy; // CEL center offset
} BMSCR;
#endif