summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/globals.h
blob: 65ae3b87063cd0693eb148140b17fd888ffc3d5f (plain)
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
/*
Scriver

Copyright (c) 2000-12 Miranda ICQ/IM project,

all portions of this codebase are copyrighted to the people
listed in contributors.txt.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/
#ifndef SRMM_GLOBALS_H
#define SRMM_GLOBALS_H

#define SMF_AUTOPOPUP       		0x00000001
#define SMF_STAYMINIMIZED			0x00000002
#define SMF_CLOSEONSEND				0x00000004
#define SMF_MINIMIZEONSEND			0x00000008
#define SMF_SAVEDRAFTS				0x00000040
#define SMF_DELTEMP					0x00000080
#define SMF_SENDONENTER				0x00000100
#define SMF_SENDONDBLENTER			0x00000200
#define SMF_SHOWPROGRESS			0x00000400
#define SMF_AVATAR          		0x00000800
#define SMF_STATUSICON				0x00002000
#define SMF_RTL						0x00004000
#define SMF_USEIEVIEW				0x00010000
#define SMF_SHOWICONS       		0x00020000
#define SMF_HIDENAMES       		0x00040000
#define SMF_SHOWTIME        		0x00080000
#define SMF_SHOWDATE        		0x00100000
#define SMF_LONGDATE				0x00200000
#define SMF_RELATIVEDATE			0x00400000
#define SMF_SHOWSECONDS				0x00800000
#define SMF_GROUPMESSAGES			0x01000000
#define SMF_MARKFOLLOWUPS			0x02000000
#define SMF_MSGONNEWLINE			0x04000000
#define SMF_DRAWLINES				0x08000000
#define SMF_INDENTTEXT				0x10000000
#define SMF_ORIGINALAVATARH			0x20000000

#define SMF2_USETABS					0x00000001
#define SMF2_HIDEONETAB					0x00000002
#define SMF2_TABSATBOTTOM				0x00000004
#define SMF2_LIMITNAMES					0x00000008
#define SMF2_SWITCHTOACTIVE  			0x00000010
#define SMF2_SEPARATECHATSCONTAINERS 	0x00000020
#define SMF2_TABCLOSEBUTTON  			0x00000040
#define SMF2_LIMITTABS					0x00000080
#define SMF2_LIMITCHATSTABS				0x00000100
#define SMF2_HIDECONTAINERS         	0x00000200
#define SMF2_SHOWINFOBAR				0x00000400
#define SMF2_SHOWSTATUSBAR				0x00010000
#define SMF2_SHOWTITLEBAR				0x00020000
#define SMF2_SHOWTOOLBAR				0x00040000
#define SMF2_USETRANSPARENCY 			0x00080000
#define SMF2_SHOWTYPING      			0x01000000
#define SMF2_SHOWTYPINGWIN   			0x02000000
#define SMF2_SHOWTYPINGTRAY  			0x04000000
#define SMF2_SHOWTYPINGCLIST 			0x08000000
#define SMF2_SHOWTYPINGSWITCH			0x10000000

typedef struct ImageListUsageEntry_tag
{
	int		index;
	int		used;
} ImageListUsageEntry;


struct GlobalMessageData
{
	unsigned int flags;
	unsigned int flags2;
	HANDLE hMessageWindowList;
	DWORD openFlags;
	HANDLE hParentWindowList;
	ParentWindowData *lastParent;
	ParentWindowData *lastChatParent;
	int		limitNamesLength;
	int		activeAlpha;
	int		inactiveAlpha;
	HMENU	hMenuANSIEncoding;
	int     tabIconListUsageSize;
	ImageListUsageEntry     *tabIconListUsage;
	TCmdList *draftList;
	int		smileyAddInstalled;
	int 	popupInstalled;
	int		ieviewInstalled;
	int		buttonVisibility;
	int		chatBbuttonVisibility;
	int		limitTabsNum;
	int		limitChatsTabsNum;
	int		indentSize;
	HIMAGELIST hTabIconList;
	HIMAGELIST hButtonIconList;
	HIMAGELIST hChatButtonIconList;
	HIMAGELIST hHelperIconList;
	HIMAGELIST hSearchEngineIconList;
	HBRUSH	   hInfobarBrush;
	int		   toolbarPosition;
	HWND       hFocusWnd;
	DWORD      logLineColour;
	int        logPixelSX;
	int        logPixelSY;
	HICON      hMsgIcon;
	HICON      hMsgIconBig;
	HICON      hIconChatBig;
	int		   minInputAreaHeight;
};

int IconsChanged(WPARAM wParam, LPARAM lParam);
int SmileySettingsChanged(WPARAM wParam, LPARAM lParam);
void InitGlobals();
void FreeGlobals();
void ReloadGlobals();
void RegisterIcons();
void ReleaseIcons();
void LoadGlobalIcons();
HICON GetCachedIcon(const char *name);
void RegisterFontServiceFonts();
int ScriverRestoreWindowPosition(HWND hwnd,HCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);

int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id);
int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon);
int ImageList_ReplaceIcon_Ex(HIMAGELIST hIml, int nIndex, int id);
int ImageList_AddIcon_ProtoEx(HIMAGELIST hIml, const char* szProto, int status);

void StreamInTestEvents(HWND hEditWnd, GlobalMessageData *gdat);

#endif