milsko/include/Mw/LowLevel/GDI.h

87 lines
1.7 KiB
C
Raw Normal View History

/*!
* @file Mw/LowLevel/GDI.h
* @brief GDI Backend
* @warning This is used internally
*/
#ifndef __MW_LOWLEVEL_GDI_H__
#define __MW_LOWLEVEL_GDI_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#include <Mw/LowLevel.h>
2026-04-28 16:30:01 +00:00
#ifdef __cplusplus
extern "C" {
#endif
struct _MwLLGDI {
struct _MwLLCommon common;
HINSTANCE hInstance;
HWND hWnd;
HDC hDC;
HCURSOR cursor;
HICON icon;
2026-05-07 18:40:14 +09:00
HRGN clip;
int grabbed;
2025-12-07 07:10:20 +09:00
int force_render;
2025-12-31 04:29:04 +09:00
int get_clipboard;
2026-01-27 17:34:25 +09:00
int get_darktheme;
2026-07-21 19:37:57 -07:00
/* drag and drop */
void *shell32lib;
void *ole32lib;
void *urlmonlib;
UINT (*DragQueryFileW)(HDROP hDrop,UINT iFile,LPWSTR lpszFile,UINT cch);
void (*ReleaseStgMedium)(LPSTGMEDIUM unnamedParam1);
HRESULT (*OleInitialize)(LPVOID pvReserved);
HRESULT (*RegisterDragDrop)(HWND hwnd, LPDROPTARGET pDropTarget);
HRESULT (*FindMimeFromData)(
LPBC pBC,
LPCWSTR pwzUrl,
LPVOID pBuffer,
DWORD cbSize,
LPCWSTR pwzMimeProposed,
DWORD dwMimeFlags,
LPWSTR *ppwzMimeOut,
_Reserved_ DWORD dwReserved
);
struct _MwLLGDIDropTarget* dropTarget;
MwBool listening_for_drag_and_drop;
MwBool dnd_override;
};
struct _MwLLGDIColor {
struct _MwLLCommonColor common;
2026-07-19 21:04:33 +09:00
COLORREF color;
HBRUSH brush;
};
struct _MwLLGDIPixmap {
struct _MwLLCommonPixmap common;
RGBQUAD* quad;
HBITMAP hBitmap;
HBITMAP hMask;
HBITMAP hMask2;
};
2026-07-21 19:37:57 -07:00
struct _MwLLGDIDropTarget{
struct IDropTargetVtbl *lpVtbl;
LONG refCount;
HWND hwnd;
MwLL handle;
};
typedef struct _MwLLGDIDropTarget MwLLGDIDropTarget;
2025-12-08 14:42:16 +09:00
MWDECL int MwLLGDICallInit(void);
MWDECL HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask);
2026-04-28 16:30:01 +00:00
#ifdef __cplusplus
}
#endif
#endif