AppleWin/source/linux/windows/bitmap.h
Andrea Odetti 7529f5c659 Reworked the entire wondows.h replacement.
wincompat.h is a stripped down version coming from linapple-pie with the bare minimum common types.
Each group of functions in its own file.

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2019-11-23 18:17:44 +00:00

44 lines
1,017 B
C++

#pragma once
#include "linux/windows/wincompat.h"
#include "linux/windows/handles.h"
#include <string>
typedef struct tagRGBQUAD {
BYTE rgbBlue;
BYTE rgbGreen;
BYTE rgbRed;
BYTE rgbReserved;
} RGBQUAD;
typedef struct tagBITMAPINFOHEADER {
DWORD biSize;
LONG biWidth;
LONG biHeight;
WORD biPlanes;
WORD biBitCount;
DWORD biCompression;
DWORD biSizeImage;
LONG biXPelsPerMeter;
LONG biYPelsPerMeter;
DWORD biClrUsed;
DWORD biClrImportant;
} BITMAPINFOHEADER, *LPBITMAPINFOHEADER, *PBITMAPINFOHEADER;
typedef struct tagBITMAPINFO {
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[1];
} BITMAPINFO, *LPBITMAPINFO, *PBITMAPINFO;
#define RGB(r,g,b) ((COLORREF)((BYTE)(r) | ((BYTE)(g) << 8) | ((BYTE)(b) << 16)))
#define BI_RGB 0
typedef HANDLE HBITMAP;
typedef HANDLE HGDIOBJ;
// Bitmap
HBITMAP LoadBitmap(HINSTANCE hInstance, const std::string & filename);
LONG GetBitmapBits(HBITMAP hbit, LONG cb, LPVOID lpvBits);
BOOL DeleteObject(HGDIOBJ ho);