root/lang/objective-cplusplus/i3/trunk/src/os-windows/WindowsCommon.h @ 34447

Revision 34447, 2.1 kB (checked in by saturday06, 5 years ago)

iojasdfaodfd

Line 
1#pragma once
2
3#ifndef _ALLOCA_S_THRESHOLD
4#define _ALLOCA_S_THRESHOLD 1024
5#endif
6
7// dirty string classes ..orz
8namespace i3 {
9
10#if defined(UNICODE) || defined(_UNICODE)
11const size_t WINDOWS_MAX_PATH = 3000;
12#else
13const size_t WINDOWS_MAX_PATH = MAX_PATH;
14#endif
15
16}
17
18
19#ifdef __GNUC__
20
21#define MSFTEDIT_CLASS TEXT("RichEdit50W")
22typedef struct _MARGINS {
23    int cxLeftWidth;      // width of left border that retains its size
24    int cxRightWidth;     // width of right border that retains its size
25    int cyTopHeight;      // height of top border that retains its size
26    int cyBottomHeight;   // height of bottom border that retains its size
27} MARGINS, *PMARGINS;
28
29#endif
30
31#if defined(__GNUC__) || defined(_WIN32_WCE)
32// Blur behind data structures
33#define DWM_BB_ENABLE                 0x00000001  // fEnable has been specified
34#define DWM_BB_BLURREGION             0x00000002  // hRgnBlur has been specified
35#define DWM_BB_TRANSITIONONMAXIMIZED  0x00000004  // fTransitionOnMaximized has been specified
36
37typedef struct _DWM_BLURBEHIND {
38    DWORD dwFlags;
39    BOOL fEnable;
40    HRGN hRgnBlur;
41    BOOL fTransitionOnMaximized;
42} DWM_BLURBEHIND, *PDWM_BLURBEHIND;
43
44#define LWA_COLORKEY            0x00000001
45#define LWA_ALPHA               0x00000002
46
47
48#define ULW_COLORKEY            0x00000001
49#define ULW_ALPHA               0x00000002
50#define ULW_OPAQUE              0x00000004
51
52#define ULW_EX_NORESIZE         0x00000008
53
54#endif
55
56#ifdef _WIN32_WCE
57#ifndef SWP_NOREDRAW
58#define SWP_NOREDRAW 0
59#endif
60#endif
61
62namespace i3 {
63extern struct dll_ {
64        BOOL (WINAPI *dll_SetLayeredWindowAttributes)(COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
65
66        bool have_dwmapi_dll;
67        HRESULT (WINAPI *dll_DwmExtendFrameIntoClientArea)(HWND hWnd, const MARGINS *pMarInset);
68        HRESULT (WINAPI *dll_DwmIsCompositionEnabled)(BOOL *pfEnabled);
69        HRESULT (WINAPI *dll_DwmEnableBlurBehindWindow)(HWND hWnd, const DWM_BLURBEHIND *pBlurBehind);
70        HRESULT (WINAPI *dll_DwmGetColorizationColor)(DWORD *pcrColorization, BOOL *pfOpaqueBlend);
71    } dll;
72extern HINSTANCE hInstance;
73
74}
Note: See TracBrowser for help on using the browser.