mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-14 17:59:17 -05:00
Update win32_clipboard.h
This commit is contained in:
14
src/external/win32_clipboard.h
vendored
14
src/external/win32_clipboard.h
vendored
@ -124,7 +124,6 @@ WINBASEAPI LPVOID WINAPI GlobalLock (HGLOBAL hMem);
|
|||||||
WINBASEAPI WINBOOL WINAPI GlobalUnlock (HGLOBAL hMem);
|
WINBASEAPI WINBOOL WINAPI GlobalUnlock (HGLOBAL hMem);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if !defined(_WINGDI_) || !defined(WINGDI_ALREADY_INCLUDED)
|
#if !defined(_WINGDI_) || !defined(WINGDI_ALREADY_INCLUDED)
|
||||||
#ifndef BITMAPINFOHEADER_ALREADY_DEFINED
|
#ifndef BITMAPINFOHEADER_ALREADY_DEFINED
|
||||||
#define BITMAPINFOHEADER_ALREADY_DEFINED
|
#define BITMAPINFOHEADER_ALREADY_DEFINED
|
||||||
@ -183,7 +182,6 @@ typedef struct tagRGBQUAD {
|
|||||||
// Bitmap not compressed and that the color table consists of four DWORD color masks,
|
// Bitmap not compressed and that the color table consists of four DWORD color masks,
|
||||||
// that specify the red, green, blue, and alpha components of each pixel
|
// that specify the red, green, blue, and alpha components of each pixel
|
||||||
#define BI_ALPHABITFIELDS 0x0006
|
#define BI_ALPHABITFIELDS 0x0006
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// REF: https://learn.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats
|
// REF: https://learn.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats
|
||||||
@ -204,12 +202,15 @@ typedef struct tagRGBQUAD {
|
|||||||
// #define OCR_HAND 32649 // Link select
|
// #define OCR_HAND 32649 // Link select
|
||||||
// #define OCR_APPSTARTING 32650 //
|
// #define OCR_APPSTARTING 32650 //
|
||||||
|
|
||||||
static BOOL OpenClipboardRetrying(HWND handle); // Open clipboard with a number of retries
|
|
||||||
static int GetPixelDataOffset(BITMAPINFOHEADER bih);
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Module Internal Functions Declaration
|
// Module Internal Functions Declaration
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
|
static BOOL OpenClipboardRetrying(HWND handle); // Open clipboard with a number of retries
|
||||||
|
static int GetPixelDataOffset(BITMAPINFOHEADER bih); // Get pixel data offset from DIB image
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Module Functions Definition
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
unsigned char *Win32GetClipboardImageData(int *width, int *height, unsigned long long int *dataSize)
|
unsigned char *Win32GetClipboardImageData(int *width, int *height, unsigned long long int *dataSize)
|
||||||
{
|
{
|
||||||
unsigned char *bmpData = NULL;
|
unsigned char *bmpData = NULL;
|
||||||
@ -274,6 +275,9 @@ unsigned char *Win32GetClipboardImageData(int *width, int *height, unsigned long
|
|||||||
return bmpData;
|
return bmpData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
|
// Module Internal Functions Definition
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
// Open clipboard with several tries
|
// Open clipboard with several tries
|
||||||
// NOTE: If parameter is NULL, the open clipboard is associated with the current task
|
// NOTE: If parameter is NULL, the open clipboard is associated with the current task
|
||||||
static BOOL OpenClipboardRetrying(HWND hWnd)
|
static BOOL OpenClipboardRetrying(HWND hWnd)
|
||||||
|
|||||||
Reference in New Issue
Block a user