This repository has been archived by the owner on Oct 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui_main.h
251 lines (176 loc) · 5.67 KB
/
ui_main.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
/*
KONNEKT UI
Deklaracje klas, definicje, zmienne/funkcje globalne
*/
#pragma once
#ifndef UIMAINH
#define UIMAINH
// ------------------------------------------------------------------------------
// Wymagane include'y
#ifdef IN_UIMAIN_CPP
#define UIEXTERN
#else
#define UIEXTERN extern
#define MAKE_CTRL_EXTERN
#endif
#include "konnekt/plug_export.h"
#include "plug_sharedex.h"
#include "konnekt/ui.h"
#include "konnekt/plug_func.h" // chyba nie jest tu potrzebny
#include "konnekt/ui_message_controls.h" // chyba nie jest tu potrzebny
namespace Konnekt {
};
using namespace std;
using namespace Konnekt;
#include "include\func.h"
#include "include\time64.h"
#include "resource_ui.h"
#include "include\garbage.h"
#include "include\critical_section.h"
// ------------------------------------------------------------------------------
// DEFINE'y
#define __DEBUG
// NIE ZMIENIAÆ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#define HIST_XOR_KEY "\x40\x13\xf8\xb2\x84\x23\x04\xae\x6f\x3d"
#define UI_CERT "\x10\x20 a\x60\xf0\x15\xae_uiw98"
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#define MYWM_NOTIFYICON WM_USER+1086
#define MYWM_NOTIFYAPPBAR WM_USER+1087
#define MYWM_DLGLONGSET WM_USER+1088
#define EMSG_UI "UI.DLL - %s - "
#define MSGTITLE_CHAR '"'
#define MAINALPHA 191
#define BIG_STRING MAX_STRING
#define ANIM_INTERVAL GETINT(CFG_UIANIM) //500
#define AWAY_INTERVAL 2000
#define TIMEOUT_INTERVAL 5000
#define DOCK_SPACE 80
#define MIN_WIDTH 100
#define MIN_HEIGHT 200
#define TIMER_LISTTIP 111
#define MYWM_REFRESH WM_USER+18090
#define MYWM_CANAPPLY WM_USER+18091
#define MYWM_SETICON WM_USER+18092
#define FILE_ENTRYHISTORY "ehst.dtb"
#define PROPParent "UIAParent"
// ------------------------------------------------------------------------------
// STRUKTURY
class CRITICAL_SECTION_WRAPER {
private:
//CRITICAL_SECTION section;
cCriticalSection_WM section;
public:
/* void enter() {EnterCriticalSection(§ion);}
void leave(){LeaveCriticalSection(§ion);}
CRITICAL_SECTION_WRAPER() {InitializeCriticalSection(§ion);}
~CRITICAL_SECTION_WRAPER() {DeleteCriticalSection(§ion);}
*/
void enter() {section.lock();}
void leave() {section.unlock();}
CRITICAL_SECTION_WRAPER () : section(WMProcess) {
}
};
struct str_critical {
CRITICAL_SECTION_WRAPER action;
};
// ------------------------------------------------------------------------------
// Zmienne globalne
#ifdef GARBAGE_H
UIEXTERN cGarbageCollection Garbage;
#endif
UIEXTERN HWND hwndTop;
UIEXTERN HWND hwndMain;
UIEXTERN HWND hwndUp;
UIEXTERN HWND hwndDown;
UIEXTERN HWND hwndBar;
extern HWND hwndList;
extern HWND hwndGroups;
extern HWND hwndDock;
UIEXTERN HWND hwndConfig , hwndConfigTree;
extern HWND hwndSearch;
extern HWND hwndMsgEvent;
extern HWND hwndHistory;
extern HWND hwndDbgAct;
extern HINSTANCE hDll;
UIEXTERN bool isComCtl6;
extern bool cursorInList;
//bool isOpened=false;
UIEXTERN WNDPROC oldListControlProc;
UIEXTERN HMENU hmenuMain;
UIEXTERN HMENU hmenuStatus;
UIEXTERN HMENU hmenuCnt;
UIEXTERN HMENU hmenuTray;
extern HMENU hDestroyMenu;
extern HANDLE timerLong;
extern DWORD threadLong;
extern int longReference;
extern HANDLE timerAnim;
extern UINT timerHide;
extern UINT timerAway;
extern bool timerAnimOn;
extern bool canQuit;
extern int trayBitCount;
UIEXTERN HINSTANCE instRE;
extern HFONT font;
extern HFONT fontB;
extern HFONT fontBig;
extern HFONT fontNormal;
extern HFONT fontSmall;
extern HFONT fontSmallB;
extern HFONT fontLabel;
extern HFONT fontDing;
extern HFONT fontTip;
extern HFONT fontTipB;
extern HFONT fontMsgSend;
extern int fontHeight;
extern LOGFONTEX fontMenu;
extern LOGFONTEX fontMenuDefault;
extern LOGFONTEX fontMenuActive;
extern LOGFONTEX fontMenuDefaultActive;
extern int listSelNet;
extern int listSelScroll;
extern string listSelUID;
extern string listGroup;
extern bool wmSize;
UIEXTERN bool autostart; // czy zostal wystartowany automatycznie
extern int trayStatus;
extern string trayStatusDescr;
extern sUIAction trayAction;
extern int trayNotify;
extern int trayCnt;
//extern int trayNet;
extern int trayMsgID;
extern CStdString trayInfo;
extern int docked; // 1 - z hide'em , 2 - na sztywno
extern int docked_h;
extern bool docked_right;
UIEXTERN RECT docked_rect;
enum MenuType {
menuTypeNormal = 0,
menuTypeSmall = 1
};
extern MenuType menuType;
extern int lastUIdata [4]; // ostatnie - pozycja i aktywne okienka ...
extern bool away;
extern bool longOnly;
UIEXTERN CStdString profileDir;
UIEXTERN cCtrlEx * CtrlEx;
UIEXTERN str_critical critical; // Critical Sections
// -----------------------------------------------------------------------------
// FUNKCJE GLOBALNE
int CNotify(int pos);
int IPrepare();
int UISet();
void UISetAlpha();
int CALLBACK InfoDialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
int CALLBACK MsgDialogProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
int ActionProc(sUIActionNotify_base * anBase);
int ActionCntProc(sUIActionNotify_base * anBase);
int ActionCfgProc(sUIActionNotify_base * anBase);
int ActionProfileProc(sUIActionNotify_base * anBase);
int ActionMsgEditMenuProc(sUIActionNotify_base * anBase);
int IACntDel(int cnt);
void DebugIcons();
// -----------------------------------------------------------------------------
// ID akcji
#endif