Skip to content

Commit

Permalink
Merge branch 'gonutz:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hysuki authored Jan 23, 2024
2 parents f9f551b + cdce5ef commit b6b9f18
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 17 deletions.
40 changes: 33 additions & 7 deletions constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ const (
WS_TILED = 0x00000000
WS_ICONIC = 0x20000000
WS_SIZEBOX = 0x00040000
WS_OVERLAPPEDWINDOW = 0x00000000 | 0X00C00000 | 0X00080000 | 0X00040000 | 0X00020000 | 0X00010000
WS_POPUPWINDOW = 0x80000000 | 0X00800000 | 0X00080000
WS_OVERLAPPEDWINDOW = 0x00000000 | 0x00C00000 | 0x00080000 | 0x00040000 | 0x00020000 | 0x00010000
WS_POPUPWINDOW = 0x80000000 | 0x00800000 | 0x00080000
WS_CHILDWINDOW = 0x40000000
)

Expand All @@ -461,8 +461,8 @@ const (
WS_EX_CONTROLPARENT = 0x00010000
WS_EX_STATICEDGE = 0x00020000
WS_EX_APPWINDOW = 0x00040000
WS_EX_OVERLAPPEDWINDOW = 0x00000100 | 0X00000200
WS_EX_PALETTEWINDOW = 0x00000100 | 0X00000080 | 0X00000008
WS_EX_OVERLAPPEDWINDOW = 0x00000100 | 0x00000200
WS_EX_PALETTEWINDOW = 0x00000100 | 0x00000080 | 0x00000008
WS_EX_LAYERED = 0x00080000
WS_EX_NOINHERITLAYOUT = 0x00100000
WS_EX_LAYOUTRTL = 0x00400000
Expand Down Expand Up @@ -1168,7 +1168,7 @@ const (
OFN_SHOWHELP = 0x00000010
)

//SHBrowseForFolder flags
// SHBrowseForFolder flags
const (
BIF_RETURNONLYFSDIRS = 0x00000001
BIF_DONTGOBELOWDOMAIN = 0x00000002
Expand All @@ -1189,7 +1189,7 @@ const (
BIF_BROWSEFILEJUNCTIONS = 0x00010000
)

//MessageBox flags
// MessageBox flags
const (
MB_OK = 0x00000000
MB_OKCANCEL = 0x00000001
Expand Down Expand Up @@ -1217,7 +1217,7 @@ const (
MB_TASKMODAL = 0x00002000
)

//COM
// COM
const (
E_INVALIDARG = 0x80070057
E_OUTOFMEMORY = 0x8007000E
Expand Down Expand Up @@ -2050,6 +2050,32 @@ const (
VK_NONAME = 0xFC
VK_PA1 = 0xFD
VK_OEM_CLEAR = 0xFE
VK_A = 'A'
VK_B = 'B'
VK_C = 'C'
VK_D = 'D'
VK_E = 'E'
VK_F = 'F'
VK_G = 'G'
VK_H = 'H'
VK_I = 'I'
VK_J = 'J'
VK_K = 'K'
VK_L = 'L'
VK_M = 'M'
VK_N = 'N'
VK_O = 'O'
VK_P = 'P'
VK_Q = 'Q'
VK_R = 'R'
VK_S = 'S'
VK_T = 'T'
VK_U = 'U'
VK_V = 'V'
VK_W = 'W'
VK_X = 'X'
VK_Y = 'Y'
VK_Z = 'Z'
)

// Registry Value Types
Expand Down
9 changes: 9 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,15 @@ type KBDLLHOOKSTRUCT struct {
DwExtraInfo ULONG_PTR
}

// https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msllhookstruct
type MSLLHOOKSTRUCT struct {
Pt POINT
MouseData DWORD
Flags DWORD
Time DWORD
ExtraInfo ULONG_PTR
}

type HOOKPROC func(int, WPARAM, LPARAM) LRESULT

type WINDOWPLACEMENT struct {
Expand Down
32 changes: 29 additions & 3 deletions v2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ const (
OFN_SHOWHELP = 0x00000010
)

//SHBrowseForFolder flags
// SHBrowseForFolder flags
const (
BIF_RETURNONLYFSDIRS = 0x00000001
BIF_DONTGOBELOWDOMAIN = 0x00000002
Expand All @@ -1390,7 +1390,7 @@ const (
BIF_BROWSEFILEJUNCTIONS = 0x00010000
)

//MessageBox flags
// MessageBox flags
const (
MB_OK = 0x00000000
MB_OKCANCEL = 0x00000001
Expand Down Expand Up @@ -1419,7 +1419,7 @@ const (
MB_HELP = 0x00004000
)

//COM
// COM
const (
E_INVALIDARG = 0x80070057
E_OUTOFMEMORY = 0x8007000E
Expand Down Expand Up @@ -2256,6 +2256,32 @@ const (
VK_NONAME = 0xFC
VK_PA1 = 0xFD
VK_OEM_CLEAR = 0xFE
VK_A = 'A'
VK_B = 'B'
VK_C = 'C'
VK_D = 'D'
VK_E = 'E'
VK_F = 'F'
VK_G = 'G'
VK_H = 'H'
VK_I = 'I'
VK_J = 'J'
VK_K = 'K'
VK_L = 'L'
VK_M = 'M'
VK_N = 'N'
VK_O = 'O'
VK_P = 'P'
VK_Q = 'Q'
VK_R = 'R'
VK_S = 'S'
VK_T = 'T'
VK_U = 'U'
VK_V = 'V'
VK_W = 'W'
VK_X = 'X'
VK_Y = 'Y'
VK_Z = 'Z'
)

// Registry Value Types
Expand Down
23 changes: 16 additions & 7 deletions v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1284,14 +1284,23 @@ type WINDOWPOS struct {
}

type WINDOWINFO struct {
Cbsize uint32
RcWindow RECT
RcClient RECT
DwStyle uint32
DwExStyle uint32
DwWindowStatus uint32
Cbsize uint32
RcWindow RECT
RcClient RECT
DwStyle uint32
DwExStyle uint32
DwWindowStatus uint32
CxWindowBorders uint32
CyWindowBorders uint32
AtomWindowType uint16
AtomWindowType uint16
WCreatorVersion uint16
}

// https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msllhookstruct
type MSLLHOOKSTRUCT struct {
Pt POINT
MouseData DWORD
Flags DWORD
Time DWORD
ExtraInfo ULONG_PTR
}

0 comments on commit b6b9f18

Please sign in to comment.