Shell_NotifyIconA.restype = BOOL Shell_NotifyIconA.argtypes = [DWORD, c_void_p] Shell_NotifyIconW = shell32.Shell_NotifyIconW Shell_NotifyIconW.restype = BOOL Shell_NotifyIconW.argtypes = [DWORD, c_void_p] Shell_NotifyIcon = Shell_NotifyIconA NOTIFYICONDATA = NOTIFYICONDATAA BI_RGB = 0 BI_BITFIELDS = 0x00000003 XPRA_GUID = GUID() XPRA_GUID.Data1 = XPRA_GUID1 XPRA_GUID.Data2 = XPRA_GUID2 XPRA_GUID.Data3 = XPRA_GUID3 XPRA_GUID.Data4 = XPRA_GUID4 FALLBACK_ICON = LoadIconA(0, win32con.IDI_APPLICATION) #constants found in win32gui: NIM_ADD = 0 NIM_MODIFY = 1 NIM_DELETE = 2 NIM_SETFOCUS = 3 NIM_SETVERSION = 4 NIF_MESSAGE = 1 NIF_ICON = 2 NIF_TIP = 4 NIF_STATE = 8
CreateDIBSection.restype = HBITMAP CreateDIBSection.argtypes = [ HANDLE, POINTER(BITMAPV5HEADER), UINT, POINTER(c_void_p), HANDLE, DWORD ] CreateBitmap.restype = HBITMAP CreateBitmap.argtypes = [INT, INT, UINT, UINT, POINTER(c_void_p)] XPRA_GUID = GUID() XPRA_GUID.Data1 = 0x67b3efa2 XPRA_GUID.Data2 = 0xe470 XPRA_GUID.Data3 = 0x4a5f XPRA_GUID.Data4 = (0xb6, 0x53, 0x6f, 0x6f, 0x98, 0xfe, 0x60, 0x81) FALLBACK_ICON = LoadIconA(0, win32con.IDI_APPLICATION) #constants found in win32gui: NIM_ADD = 0 NIM_MODIFY = 1 NIM_DELETE = 2 NIM_SETFOCUS = 3 NIM_SETVERSION = 4 NIF_MESSAGE = 1 NIF_ICON = 2 NIF_TIP = 4 NIF_STATE = 8