1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-02-21 10:00:09 +03:00

Include headers properly

This commit is contained in:
Davide Beatrici
2021-04-05 04:48:25 +02:00
parent 46b54f00be
commit a6ba9b8788
190 changed files with 1885 additions and 1850 deletions

View File

@ -6,7 +6,12 @@
// WinUi.h
// User interface code for Win32
#ifdef OS_WIN32
#ifdef OS_WIN32
#ifndef WINUI_H
#define WINUI_H
#include "Cedar.h"
#define WINUI_DEBUG_TEXT "@winui_debug.txt"
@ -17,24 +22,6 @@
#define WINUI_DEFAULT_DIALOG_UNIT_X 7
#define WINUI_DEFAULT_DIALOG_UNIT_Y 14
// Make available the types for Windows even if windows.h is not included
#ifndef _WINDEF_
typedef void *HWND;
typedef void *HFONT;
typedef void *HICON;
typedef void *HMENU;
typedef void *HINSTANCE;
#ifdef CPU_64
typedef unsigned __int64 *WPARAM;
typedef __int64 *LPARAM;
#else
typedef unsigned int *WPARAM;
typedef long *LPARAM;
#endif // CPU_64
#endif // _WINDEF_
// Constants
#define FREE_REGKEY "Software\\" GC_REG_COMPANY_NAME "\\" CEDAR_PRODUCT_STR " VPN Client\\Free Edition Info"
#define ONCE_MSG_REGKEY "Software\\" GC_REG_COMPANY_NAME "\\" CEDAR_PRODUCT_STR " VPN\\Common"
@ -130,7 +117,7 @@ typedef struct LVB
} LVB;
#ifdef CreateWindow
#ifdef WINUI_C
// Internal code
@ -241,6 +228,8 @@ typedef struct WINUI_REMOTE
LIST *CandidateList; // Candidate list
} WINUI_REMOTE;
#define CALLBACK __stdcall
void InitImageList();
void FreeImageList();
IMAGELIST_ICON *LoadIconForImageList(UINT id);
@ -345,7 +334,8 @@ typedef struct WINCONNECT_DLG_DATA
} WINCONNECT_DLG_DATA;
HBITMAP ResizeBitmap(HBITMAP hSrc, UINT src_x, UINT src_y, UINT dst_x, UINT dst_y);
#else
typedef struct FONT FONT;
#endif // WINUI_C
// The information screen about the free version
@ -376,19 +366,6 @@ typedef struct BAD_PROCESS
char *Title;
} BAD_PROCESS;
#ifdef WINUI_C
// Process name list of incompatible anti-virus software
static BAD_PROCESS bad_processes[] =
{
{"nod32krn.exe", "NOD32 Antivirus",},
{"avp.exe", "Kaspersky",},
};
static UINT num_bad_processes = sizeof(bad_processes) / sizeof(bad_processes[0]);
#endif // WINUI_C
// Page in the wizard
struct WIZARD_PAGE
{
@ -746,12 +723,12 @@ void FreeBitmapList(LIST *o);
bool GetBitmapSize(void *bmp, UINT *x, UINT *y);
bool GetFontParam(HFONT hFont, struct FONT *f);
bool GetFontParam(HFONT hFont, FONT *f);
void AdjustFontSize(HWND hWnd, UINT id);
bool IsFontFitInRect(struct FONT *f, UINT width, UINT height, wchar_t *text, UINT format, bool *aborted);
void ShowTextFile(HWND hWnd, char *filename, wchar_t *caption, UINT icon);
#endif // OS_WIN32
#endif // WINUI_H
#endif // OS_WIN32