00001 #ifndef __WGNUPLIB_H__
00002 #define __WGNUPLIB_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include <windows.h>
00029
00030 #ifdef __DLL__
00031
00032 #define EXPORT __declspec (dllexport)
00033 #else
00034 #define EXPORT
00035 #endif
00036
00038 #ifdef __DLL__
00039 #define MyGetProcAddress(strProc,Proc) GetProcAddress(hdllInstance,strProc);
00040 #else
00041 #define MyGetProcAddress(strProc,Proc) Proc
00042 #endif
00043
00044
00045
00046
00047
00048 typedef struct tagPRINT {
00049 HDC hdcPrn;
00050 HWND hDlgPrint;
00051 BOOL bUserAbort;
00052 POINT pdef;
00053 POINT psize;
00054 POINT poff;
00055 struct tagPRINT *next;
00056 } PRINT;
00057
00058 typedef PRINT * LP_PRINT;
00059
00060
00061
00062
00063
00064 #define BUTTONMAX 20
00065
00066 typedef struct tagMW
00067 {
00068 LPSTR szMenuName;
00069 HMENU hMenu;
00070 BYTE **macro;
00071 BYTE *macrobuf;
00072 int nCountMenu;
00073 DLGPROC lpProcInput;
00074 char *szPrompt;
00075 char *szAnswer;
00076 int nChar;
00077 int nButton;
00078 HWND hButton[BUTTONMAX];
00079 int hButtonID[BUTTONMAX];
00080 WNDPROC lpfnMenuButtonProc;
00081 WNDPROC lpfnButtonProc[BUTTONMAX];
00082 BOOL IsAIcon[BUTTONMAX];
00083 int PositionX[BUTTONMAX];
00084 BOOL ShowToolBar;
00085 BOOL LockToolBar;
00086 int CodeLanguage;
00087
00088 } MW;
00089 typedef MW *LPMW;
00090
00091
00092
00093
00094
00095
00096 #define SCI_DEFAULT_CHARSET ANSI_CHARSET
00097
00098 #define MAXFONTNAME 80
00099 typedef struct tagTW
00100 {
00101 LP_PRINT lpr;
00102 HINSTANCE hInstance;
00103 HINSTANCE hPrevInstance;
00104 LPSTR Title;
00105 LPMW lpmw;
00106 POINT ScreenSize;
00107 unsigned int KeyBufSize;
00108 int nCmdShow;
00109 HICON hIcon;
00110 HMENU hPopMenu;
00111 HWND hWndText;
00112 HWND hWndParent;
00113 POINT Origin;
00114 POINT Size;
00115 BYTE *ScreenBuffer;
00116 BYTE *AttrBuffer;
00117 BYTE *KeyBuf;
00118 BYTE *KeyBufIn;
00119 BYTE *KeyBufOut;
00120 BYTE Attr;
00121 BOOL bFocus;
00122 BOOL bGetCh;
00123 BOOL bSysColors;
00124 HBRUSH hbrBackground;
00125 char fontname[MAXFONTNAME];
00126 int fontsize;
00127 HFONT hfont;
00128 int CharAscent;
00129 int ButtonHeight;
00130 int CaretHeight;
00131 int CursorFlag;
00132 POINT CursorPos;
00133 POINT ClientSize;
00134 POINT CharSize;
00135 POINT ScrollPos;
00136 POINT ScrollMax;
00137 POINT MarkBegin;
00138 POINT MarkEnd;
00139 BOOL Marking;
00140 } TW;
00141 typedef TW * LPTW;
00142
00143
00144
00145
00146
00147
00148 EXPORT void WINAPI TextMessage(void);
00149 EXPORT void TextMessage1(int);
00150 EXPORT int WINAPI TextInit(LPTW lptw);
00151 EXPORT void WINAPI TextClose(LPTW lptw);
00152 EXPORT void WINAPI TextToCursor(LPTW lptw);
00153 EXPORT int WINAPI TextKBHit(LPTW);
00154 EXPORT int WINAPI TextGetCh(LPTW);
00155 EXPORT int WINAPI TextGetChE(LPTW);
00156 EXPORT LPSTR WINAPI TextGetS(LPTW lptw, LPSTR str, unsigned int size);
00157 EXPORT int WINAPI TextPutCh(LPTW, BYTE);
00158 EXPORT int WINAPI TextPutS(LPTW lptw, LPSTR str);
00159 EXPORT void WINAPI TextGotoXY(LPTW lptw, int x, int y);
00160 EXPORT int WINAPI TextWhereX(LPTW lptw);
00161 EXPORT int WINAPI TextWhereY(LPTW lptw);
00162 EXPORT void WINAPI TextCursorHeight(LPTW lptw, int height);
00163 EXPORT void WINAPI TextClearEOL(LPTW lptw);
00164 EXPORT void WINAPI TextClearEOS(LPTW lptw);
00165 EXPORT void WINAPI TextInsertLine(LPTW lptw);
00166 EXPORT void WINAPI TextDeleteLine(LPTW lptw);
00167 EXPORT void WINAPI TextScrollReverse(LPTW lptw);
00168 EXPORT void WINAPI TextAttr(LPTW lptw, BYTE attr);
00169 EXPORT void WINAPI AboutBox(HWND hwnd);
00170
00171
00172
00173
00174
00175 typedef struct tagGW {
00176 LP_PRINT lpr;
00177 HINSTANCE hInstance;
00178 HINSTANCE hPrevInstance;
00179 LPSTR Title;
00180 int xmax;
00181 int ymax;
00182 LPTW lptw;
00183 POINT Origin;
00184 POINT Size;
00185 HMENU hPopMenu;
00186 BOOL resized;
00187 BOOL graphtotop;
00188 BOOL locked;
00189 int ButtonHeight;
00190 LPSTR szMenuName;
00191 } GW;
00192
00193 typedef GW * LPGW;
00194
00195 #define SCILEX "scilex.exe"
00196 #define WSCILEX "wscilex.exe"
00197
00198
00199
00200
00201
00202 typedef struct tagLS
00203 {
00204 int colored;
00205 int land;
00206 int use_printer;
00207 int ps_type;
00208 }
00209 LS;
00210
00211
00212 #endif