mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-15 23:54:07 +00:00
Adding some proc bindings, struct definitions, and constant values.
This commit is contained in:
@@ -238,6 +238,7 @@ foreign kernel32 {
|
||||
bInitialState: BOOL,
|
||||
lpName: LPCWSTR,
|
||||
) -> HANDLE ---
|
||||
ResetEvent :: proc(hEvent: HANDLE) -> BOOL ---
|
||||
WaitForMultipleObjects :: proc(
|
||||
nCount: DWORD,
|
||||
lpHandles: ^HANDLE,
|
||||
@@ -266,6 +267,17 @@ foreign kernel32 {
|
||||
HeapReAlloc :: proc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID ---
|
||||
HeapFree :: proc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL ---
|
||||
|
||||
ReadDirectoryChangesW :: proc(
|
||||
hDirectory: HANDLE,
|
||||
lpBuffer: LPVOID,
|
||||
nBufferLength: DWORD,
|
||||
bWatchSubtree: BOOL,
|
||||
dwNotifyFilter: DWORD,
|
||||
lpBytesReturned: LPDWORD,
|
||||
lpOverlapped: LPOVERLAPPED,
|
||||
lpCompletionRoutine: LPOVERLAPPED_COMPLETION_ROUTINE,
|
||||
) -> BOOL ---
|
||||
|
||||
InitializeSRWLock :: proc(SRWLock: ^SRWLOCK) ---
|
||||
AcquireSRWLockExclusive :: proc(SRWLock: ^SRWLOCK) ---
|
||||
TryAcquireSRWLockExclusive :: proc(SRWLock: ^SRWLOCK) -> BOOL ---
|
||||
|
||||
@@ -164,6 +164,21 @@ FILE_GENERIC_ALL: DWORD : 0x10000000
|
||||
FILE_GENERIC_EXECUTE: DWORD : 0x20000000
|
||||
FILE_GENERIC_READ: DWORD : 0x80000000
|
||||
|
||||
FILE_ACTION_ADDED :: 0x00000001
|
||||
FILE_ACTION_REMOVED :: 0x00000002
|
||||
FILE_ACTION_MODIFIED :: 0x00000003
|
||||
FILE_ACTION_RENAMED_OLD_NAME :: 0x00000004
|
||||
FILE_ACTION_RENAMED_NEW_NAME :: 0x00000005
|
||||
|
||||
FILE_NOTIFY_CHANGE_FILE_NAME :: 0x00000001
|
||||
FILE_NOTIFY_CHANGE_DIR_NAME :: 0x00000002
|
||||
FILE_NOTIFY_CHANGE_ATTRIBUTES :: 0x00000004
|
||||
FILE_NOTIFY_CHANGE_SIZE :: 0x00000008
|
||||
FILE_NOTIFY_CHANGE_LAST_WRITE :: 0x00000010
|
||||
FILE_NOTIFY_CHANGE_LAST_ACCESS :: 0x00000020
|
||||
FILE_NOTIFY_CHANGE_CREATION :: 0x00000040
|
||||
FILE_NOTIFY_CHANGE_SECURITY :: 0x00000100
|
||||
|
||||
CREATE_NEW: DWORD : 1
|
||||
CREATE_ALWAYS: DWORD : 2
|
||||
OPEN_ALWAYS: DWORD : 4
|
||||
@@ -1365,6 +1380,13 @@ FILE_END_OF_FILE_INFO :: struct {
|
||||
EndOfFile: LARGE_INTEGER,
|
||||
}
|
||||
|
||||
FILE_NOTIFY_INFORMATION :: struct {
|
||||
next_entry_offset: DWORD,
|
||||
action: DWORD,
|
||||
file_name_length: DWORD,
|
||||
file_name: [1]WCHAR,
|
||||
}
|
||||
|
||||
REPARSE_DATA_BUFFER :: struct {
|
||||
ReparseTag: c_uint,
|
||||
ReparseDataLength: c_ushort,
|
||||
@@ -1509,6 +1531,12 @@ OVERLAPPED :: struct {
|
||||
hEvent: HANDLE,
|
||||
}
|
||||
|
||||
LPOVERLAPPED_COMPLETION_ROUTINE :: #type proc "stdcall" (
|
||||
dwErrorCode: DWORD,
|
||||
dwNumberOfBytesTransfered: DWORD,
|
||||
lpOverlapped: LPOVERLAPPED,
|
||||
)
|
||||
|
||||
ADDRESS_MODE :: enum c_int {
|
||||
AddrMode1616,
|
||||
AddrMode1632,
|
||||
|
||||
@@ -105,6 +105,7 @@ foreign user32 {
|
||||
GetWindowRect :: proc(hWnd: HWND, lpRect: LPRECT) -> BOOL ---
|
||||
GetClientRect :: proc(hWnd: HWND, lpRect: LPRECT) -> BOOL ---
|
||||
ClientToScreen :: proc(hWnd: HWND, lpPoint: LPPOINT) -> BOOL ---
|
||||
ScreenToClient :: proc(hWnd: HWND, lpPoint: LPPOINT) -> BOOL ---
|
||||
SetWindowPos :: proc(
|
||||
hWnd: HWND,
|
||||
hWndInsertAfter: HWND,
|
||||
@@ -155,6 +156,11 @@ foreign user32 {
|
||||
MessageBoxW :: proc(hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT) -> c_int ---
|
||||
MessageBoxExA :: proc(hWnd: HWND, lpText: LPCSTR, lpCaption: LPCSTR, uType: UINT, wLanguageId: WORD) -> c_int ---
|
||||
MessageBoxExW :: proc(hWnd: HWND, lpText: LPCWSTR, lpCaption: LPCWSTR, uType: UINT, wLanguageId: WORD) -> c_int ---
|
||||
|
||||
ClipCursor :: proc(lpRect: LPRECT) -> BOOL ---
|
||||
GetCursorPos :: proc(lpPoint: LPPOINT) -> BOOL ---
|
||||
SetCursorPos :: proc(X: c_int, Y: c_int) -> BOOL ---
|
||||
SetCursor :: proc(hCursor: HCURSOR) -> HCURSOR ---
|
||||
}
|
||||
|
||||
CreateWindowA :: #force_inline proc "stdcall" (
|
||||
|
||||
Reference in New Issue
Block a user