milsko/include/Mw/LowLevel/GDI.h
IoI_xD 9abdea2d2a
Some checks failed
pyrite-dev/milsko/pipeline/head There was a failure building this commit
started on win32 dnd
2026-07-21 19:37:57 -07:00

87 lines
1.7 KiB
C

/*!
* @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>
#ifdef __cplusplus
extern "C" {
#endif
struct _MwLLGDI {
struct _MwLLCommon common;
HINSTANCE hInstance;
HWND hWnd;
HDC hDC;
HCURSOR cursor;
HICON icon;
HRGN clip;
int grabbed;
int force_render;
int get_clipboard;
int get_darktheme;
/* 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;
COLORREF color;
HBRUSH brush;
};
struct _MwLLGDIPixmap {
struct _MwLLCommonPixmap common;
RGBQUAD* quad;
HBITMAP hBitmap;
HBITMAP hMask;
HBITMAP hMask2;
};
struct _MwLLGDIDropTarget{
struct IDropTargetVtbl *lpVtbl;
LONG refCount;
HWND hwnd;
MwLL handle;
};
typedef struct _MwLLGDIDropTarget MwLLGDIDropTarget;
MWDECL int MwLLGDICallInit(void);
MWDECL HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask);
#ifdef __cplusplus
}
#endif
#endif