使用soui开发的mbc,只支持windows版本
w1146869587
2022-01-24 479b1995ef435713c2cf4f0da8de3a6af6c30922
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
#ifndef _BROWSER_UTIL_WIN_H_
#define _BROWSER_UTIL_WIN_H_
#pragma once
 
#include <windows.h>
#include <string>
 
#include "include/internal/cef_types_wrappers.h"
 
 
// Helper macros for splitting and combining the int64 frame ID value.
#define MAKE_INT64(int_low, int_high) \
    ((int64) (((int) (int_low)) | ((int64) ((int) (int_high))) << 32))
#define LOW_INT(int64_val) ((int) (int64_val))
#define HIGH_INT(int64_val) ((int) (((int64) (int64_val) >> 32) & 0xFFFFFFFFL))
 
namespace browser
{
 
// Set the window's user data pointer.
void SetUserDataPtr(HWND hWnd, void* ptr);
 
// Return the window's user data pointer.
template <typename T>
T GetUserDataPtr(HWND hWnd) {
  return reinterpret_cast<T>(GetWindowLongPtr(hWnd, GWLP_USERDATA));
}
 
// Set the window's window procedure pointer and return the old value.
WNDPROC SetWndProcPtr(HWND hWnd, WNDPROC wndProc);
 
// Return the resource string with the specified id.
std::wstring GetResourceString(UINT id);
 
int GetCefMouseModifiers(WPARAM wparam);
int GetCefKeyboardModifiers(WPARAM wparam, LPARAM lparam);
bool IsKeyDown(WPARAM wparam);
 
// Returns the device scale factor. For example, 200% display scaling will
// return 2.0.
float GetDeviceScaleFactor();
 
CefKeyEvent ToCefKeyEvent(UINT message, WPARAM wParam, LPARAM lParam);
 
}  // namespace browser
 
#endif  // _BROWSER_UTIL_WIN_H_