修改了几个地方 (#139)
* merge 3 commits modify a few lines Update framelesshelper_windows.h * improve syntax
This commit is contained in:
parent
01828e086f
commit
b413d0b1e6
|
@ -159,6 +159,10 @@
|
||||||
|
|
||||||
using NTSTATUS = LONG;
|
using NTSTATUS = LONG;
|
||||||
|
|
||||||
|
#ifndef WINMMAPI
|
||||||
|
|
||||||
|
#define WINMMAPI EXTERN_C DECLSPEC_IMPORT
|
||||||
|
|
||||||
using MMRESULT = UINT;
|
using MMRESULT = UINT;
|
||||||
|
|
||||||
using TIMECAPS = struct TIMECAPS
|
using TIMECAPS = struct TIMECAPS
|
||||||
|
@ -170,6 +174,8 @@ using PTIMECAPS = TIMECAPS *;
|
||||||
using NPTIMECAPS = TIMECAPS NEAR *;
|
using NPTIMECAPS = TIMECAPS NEAR *;
|
||||||
using LPTIMECAPS = TIMECAPS FAR *;
|
using LPTIMECAPS = TIMECAPS FAR *;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
using PROCESS_DPI_AWARENESS = enum PROCESS_DPI_AWARENESS
|
using PROCESS_DPI_AWARENESS = enum PROCESS_DPI_AWARENESS
|
||||||
{
|
{
|
||||||
PROCESS_DPI_UNAWARE = 0,
|
PROCESS_DPI_UNAWARE = 0,
|
||||||
|
@ -284,18 +290,18 @@ using LPWINDOWCOMPOSITIONATTRIBDATA = WINDOWCOMPOSITIONATTRIBDATA FAR *;
|
||||||
using GetWindowCompositionAttributePtr = BOOL(WINAPI *)(HWND, PWINDOWCOMPOSITIONATTRIBDATA);
|
using GetWindowCompositionAttributePtr = BOOL(WINAPI *)(HWND, PWINDOWCOMPOSITIONATTRIBDATA);
|
||||||
using SetWindowCompositionAttributePtr = BOOL(WINAPI *)(HWND, PWINDOWCOMPOSITIONATTRIBDATA);
|
using SetWindowCompositionAttributePtr = BOOL(WINAPI *)(HWND, PWINDOWCOMPOSITIONATTRIBDATA);
|
||||||
|
|
||||||
EXTERN_C MMRESULT WINAPI
|
WINMMAPI MMRESULT WINAPI
|
||||||
timeGetDevCaps(
|
timeGetDevCaps(
|
||||||
_Out_writes_bytes_(cbtc) LPTIMECAPS ptc,
|
_Out_writes_bytes_(cbtc) LPTIMECAPS ptc,
|
||||||
_In_ UINT cbtc
|
_In_ UINT cbtc
|
||||||
);
|
);
|
||||||
|
|
||||||
EXTERN_C MMRESULT WINAPI
|
WINMMAPI MMRESULT WINAPI
|
||||||
timeBeginPeriod(
|
timeBeginPeriod(
|
||||||
_In_ UINT uPeriod
|
_In_ UINT uPeriod
|
||||||
);
|
);
|
||||||
|
|
||||||
EXTERN_C MMRESULT WINAPI
|
WINMMAPI MMRESULT WINAPI
|
||||||
timeEndPeriod(
|
timeEndPeriod(
|
||||||
_In_ UINT uPeriod
|
_In_ UINT uPeriod
|
||||||
);
|
);
|
||||||
|
@ -324,6 +330,11 @@ GetDpiForWindow(
|
||||||
_In_ HWND hwnd
|
_In_ HWND hwnd
|
||||||
);
|
);
|
||||||
|
|
||||||
|
WINUSERAPI UINT WINAPI
|
||||||
|
GetDpiForSystem(
|
||||||
|
VOID
|
||||||
|
);
|
||||||
|
|
||||||
WINUSERAPI UINT WINAPI
|
WINUSERAPI UINT WINAPI
|
||||||
GetSystemDpiForProcess(
|
GetSystemDpiForProcess(
|
||||||
_In_ HANDLE hProcess
|
_In_ HANDLE hProcess
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <QtCore/qhash.h>
|
#include <QtCore/qhash.h>
|
||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
FRAMELESSHELPER_BEGIN_NAMESPACE
|
FRAMELESSHELPER_BEGIN_NAMESPACE
|
||||||
|
|
||||||
class FRAMELESSHELPER_CORE_API SysApiLoader : public QObject
|
class FRAMELESSHELPER_CORE_API SysApiLoader : public QObject
|
||||||
|
|
|
@ -125,7 +125,12 @@ else()
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(UNIX AND NOT APPLE)
|
if (APPLE)
|
||||||
|
target_link_libraries(${SUB_PROJ_NAME} PRIVATE
|
||||||
|
"-framework Foundation"
|
||||||
|
"-framework Cocoa"
|
||||||
|
)
|
||||||
|
elseif (UNIX)
|
||||||
target_compile_definitions(${SUB_PROJ_NAME} PRIVATE
|
target_compile_definitions(${SUB_PROJ_NAME} PRIVATE
|
||||||
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
|
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
|
||||||
)
|
)
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "framelessmanager.h"
|
#include "framelessmanager.h"
|
||||||
#include "framelessmanager_p.h"
|
#include "framelessmanager_p.h"
|
||||||
#include <QtCore/qmutex.h>
|
#include <QtCore/qmutex.h>
|
||||||
|
#include <QtCore/qdebug.h>
|
||||||
#include <QtGui/qguiapplication.h>
|
#include <QtGui/qguiapplication.h>
|
||||||
#include <QtGui/qscreen.h>
|
#include <QtGui/qscreen.h>
|
||||||
#include <QtGui/qwindow.h>
|
#include <QtGui/qwindow.h>
|
||||||
|
|
Loading…
Reference in New Issue