skunkworks/com/danitheskunk/skunkworks/os/windows/User32Extra.java

81 lines
2.6 KiB
Java

package com.danitheskunk.skunkworks.os.windows;
import com.sun.jna.Native;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef;
import com.sun.jna.win32.W32APIOptions;
public interface User32Extra extends User32 {
int HSHELL_WINDOWCREATED = 1;
User32Extra INSTANCE = Native.load("user32",
User32Extra.class,
W32APIOptions.DEFAULT_OPTIONS
);
int PM_NOREMOVE = 0x00;
int PM_NOYIELD = 0x02;
int PM_REMOVE = 0x01;
// States
int STATE_SYSTEM_FOCUSABLE = 0x00100000;
int STATE_SYSTEM_INVISIBLE = 0x00008000;
int STATE_SYSTEM_OFFSCREEN = 0x00010000;
int STATE_SYSTEM_PRESSED = 0x00000008;
int STATE_SYSTEM_UNAVAILABLE = 0x00000001;
// https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes
int VK_LBUTTON = 0x01;
int VK_MBUTTON = 0x04;
int VK_RBUTTON = 0x02;
int WH_SHELL = 10;
int WM_TIMER = 0x0113;
// Extended Styles
// https://docs.microsoft.com/en-gb/windows/desktop/winmsg/extended-window-styles
int WS_EX_ACCEPTFILES = 0x00000010;
int WS_EX_APPWINDOW = 0x00040000;
int WS_EX_CLIENTEDGE = 0x00000200;
int WS_EX_COMPOSITED = 0x02000000;
int WS_EX_CONTEXTHELP = 0x00000400;
int WS_EX_CONTROLPARENT = 0x00010000;
int WS_EX_DLGMODALFRAME = 0x00000001;
int WS_EX_LAYERED = 0x00080000;
int WS_EX_LAYOUTRTL = 0x00400000;
int WS_EX_LEFT = 0x00000000;
int WS_EX_LEFTSCROLLBAR = 0x00004000;
int WS_EX_LTRREADING = 0x00000000;
int WS_EX_MDICHILD = 0x00000040;
int WS_EX_NOACTIVATE = 0x08000000;
int WS_EX_NOINHERITLAYOUT = 0x00100000;
int WS_EX_NOPARENTNOTIFY = 0x00000004;
int WS_EX_NOREDIRECTIONBITMAP = 0x00200000;
int WS_EX_RIGHT = 0x00001000;
int WS_EX_RIGHTSCROLLBAR = 0x00000000;
int WS_EX_RTLREADING = 0x00002000;
int WS_EX_STATICEDGE = 0x00020000;
int WS_EX_TOOLWINDOW = 0x00000080;
int WS_EX_TOPMOST = 0x00000008;
int WS_EX_TRANSPARENT = 0x00000020;
int WS_EX_WINDOWEDGE = 0x00000100;
long WS_EX_OVERLAPPEDWINDOW = (
WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE
);
long WS_EX_PALETTEWINDOW = (
WS_EX_WINDOWEDGE |
WS_EX_TOOLWINDOW |
WS_EX_TOPMOST
);
HCURSOR GetCursor();
// https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getlastactivepopup
WinDef.HWND GetLastActivePopup(WinDef.HWND hwnd);
// https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-gettitlebarinfo
@SuppressWarnings("UnusedReturnValue")
boolean GetTitleBarInfo(WinDef.HWND hwnd, TITLEBARINFO titlebarinfo);
WinDef.HWND GetTopWindow(HWND hWnd);
WinDef.HWND GetWindow(HWND hWnd, int flag);
// https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-isiconic
boolean IsIconic(WinDef.HWND hwnd);
}