summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_static_clui.h
blob: 3777e3b6e7668fe42eab2b4d4a8ec798b769c8f4 (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
/*

Miranda NG: the free IM client for Microsoft* Windows*

Copyright (C) 2012-24 Miranda NG team (https://miranda-ng.org),
Copyright (c) 2000-08 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.
*/

/************************************************************************/
/**     FILE CONTAINS HEADER PART FOR .../modernb/clui.c file          **/
/**                                                                    **/
/**         !!!  DO NOT INCLUDE IN TO OTHER FILES  !!!                 **/
/************************************************************************/

/* Definitions */
#pragma once

#define TM_AUTOALPHA                1
#define TM_DELAYEDSIZING            2
#define TM_BRINGOUTTIMEOUT          3
#define TM_BRINGINTIMEOUT           4
#define TM_UPDATEBRINGTIMER         5
#define TM_SMOTHALPHATRANSITION     20
#define TM_WINDOWUPDATE             100
#define TM_STATUSBARUPDATE          200

#define MS_CLUI_SHOWMAINMENU    "CList/ShowMainMenu"
#define MS_CLUI_SHOWSTATUSMENU  "CList/ShowStatusMenu"

#define AC_SRC_NO_PREMULT_ALPHA     0x01
#define AC_SRC_NO_ALPHA             0x02
#define AC_DST_NO_PREMULT_ALPHA     0x10
#define AC_DST_NO_ALPHA             0x20

#define ANIMATION_STEP              40

#define AEROGLASS_MINALPHA          24

/* Declaration of prototypes in other modules */

int ClcEnterDragToScroll(HWND hwnd, int Y);

int CListMod_ContactListShutdownProc(WPARAM wParam, LPARAM lParam);
int CListMod_HideWindow(HWND hwndContactList, int mode);

int CLUIServices_LoadModule(void);
INT_PTR CLUIServices_SortList(WPARAM wParam, LPARAM lParam);

void Docking_GetMonitorRectFromWindow(HWND hWnd, RECT *rc);

int EventArea_Create(HWND hCluiWnd);

int ExtraImage_ExtraIDToColumnNum(int extra);

int ModernSkinButtonLoadModule();
int ModernSkinButton_ReposButtons(HWND parent, uint8_t draw, RECT *r);

void ske_ApplyTranslucency();
HBITMAP ske_CreateDIB32(int cx, int cy);
HBITMAP ske_CreateDIB32Point(int cx, int cy, void ** bits);
int ske_JustUpdateWindowImage();
void ske_LoadSkinFromDB(void);
int ske_RedrawCompleteWindow();
int ske_UpdateWindowImage();
int ske_ValidateFrameImageProc(RECT *r);

HWND StatusBar_Create(HWND parent);

int UnhookAll();

/* Module function prototypes */

int CLUI_IsInMainWindow(HWND hwnd);
int CLUI_SizingOnBorder(POINT pt, int size);
int CLUI_SmoothAlphaTransition(HWND hwnd, uint8_t GoalAlpha, BOOL wParam);
int CLUI_TestCursorOnBorders();

static int CLUI_SmoothAlphaThreadTransition();

/*      structs         */

struct CHECKFILLING
{
	HDC hDC;
	RECT rcRect;
};

int CheckFramesPos(RECT *wr);			//cluiframes.c
int CLUIFrames_ApplyNewSizes(int mode); //cluiframes.c
int CLUIFrames_GetTotalHeight();		//cluiframes.c
int CLUIFrames_RepaintSubContainers();  //cluiframes.c
int CLUIFramesGetMinHeight();			//cluiframes.c

int SizeFramesByWindowRect(RECT *r, HDWP * PosBatch, int mode);	//cluiframes.c

int InitSkinHotKeys();
BOOL amWakeThread();
void CreateViewModeFrame();