2025-09-28 21:15:34 +00:00
|
|
|
/* $Id$ */
|
2025-10-04 13:51:12 +00:00
|
|
|
#ifndef __GDI_H__
|
|
|
|
|
#define __GDI_H__
|
2025-09-28 21:15:34 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
#include <Mw/MachDep.h>
|
|
|
|
|
#include <Mw/TypeDefs.h>
|
|
|
|
|
#include <Mw/LowLevel.h>
|
2025-09-28 21:15:34 +00:00
|
|
|
|
|
|
|
|
#include <windows.h>
|
2025-10-08 11:15:48 +00:00
|
|
|
#ifndef GWLP_USERDATA
|
|
|
|
|
#define GWLP_USERDATA GWL_USERDATA
|
|
|
|
|
#define GWLP_WNDPROC GWL_WNDPROC
|
|
|
|
|
#define GCLP_HICON GCL_HICON
|
|
|
|
|
#define GCLP_HCURSOR GCL_HCURSOR
|
|
|
|
|
#define SetWindowLongPtr SetWindowLong
|
|
|
|
|
#define GetWindowLongPtr GetWindowLong
|
|
|
|
|
#define SetClassLongPtr SetClassLong
|
|
|
|
|
#define GetClassLongPtr GetClassLong
|
|
|
|
|
#endif
|
2025-10-12 09:12:58 +00:00
|
|
|
#ifndef WM_MOUSEWHEEL
|
|
|
|
|
#define WM_MOUSEWHEEL 0x020a
|
|
|
|
|
#define GET_WHEEL_DELTA_WPARAM(x) ((short)HIWORD(x))
|
|
|
|
|
#endif
|
2025-10-08 11:22:35 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
struct _MwLL {
|
2025-10-01 22:52:00 +00:00
|
|
|
HINSTANCE hInstance;
|
|
|
|
|
HWND hWnd;
|
|
|
|
|
HDC hDC;
|
|
|
|
|
void* user;
|
|
|
|
|
int copy_buffer;
|
2025-09-28 21:15:34 +00:00
|
|
|
|
2025-09-29 00:04:04 +00:00
|
|
|
MwLLHandler handler;
|
2025-10-17 19:11:32 +00:00
|
|
|
|
|
|
|
|
int grabbed;
|
2025-09-28 21:55:50 +00:00
|
|
|
};
|
2025-09-28 21:15:34 +00:00
|
|
|
|
2025-09-29 04:11:24 +00:00
|
|
|
struct _MwLLColor {
|
|
|
|
|
HBRUSH brush;
|
|
|
|
|
|
2025-09-28 21:55:50 +00:00
|
|
|
int red;
|
|
|
|
|
int green;
|
|
|
|
|
int blue;
|
|
|
|
|
};
|
2025-09-28 21:15:34 +00:00
|
|
|
|
2025-09-30 00:52:43 +00:00
|
|
|
struct _MwLLPixmap {
|
2025-11-02 19:15:38 +00:00
|
|
|
int width;
|
|
|
|
|
int height;
|
2025-11-02 20:43:55 +00:00
|
|
|
unsigned char* raw;
|
2025-09-30 00:52:43 +00:00
|
|
|
|
2025-11-02 20:42:06 +00:00
|
|
|
RGBQUAD* quad;
|
|
|
|
|
HBITMAP hBitmap;
|
|
|
|
|
HBITMAP hMask;
|
|
|
|
|
HBITMAP hMask2;
|
2025-09-30 00:52:43 +00:00
|
|
|
};
|
|
|
|
|
|
2025-09-28 21:15:34 +00:00
|
|
|
#endif
|