Logo

index : raylib-jai

Bindings from https://solarium.technology

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/raylib-jai.git/html/Raylib/raylib/src/external/fix_win32_compatibility.h blob: e103766961592ccd563478a2ad4e3fe366ef4cb5 [raw] [clear marker]

        
0/**********************************************************************************************
1*
2* fix_win32_compatibility.h Utility to help include windows.h with raylib projects
3*
4* Useage: #include "fix_win32_compatibility.h" any library that uses windows.h
5* order is critical, this must be done before raylib
6*
7* LICENSE: MIT
8*
9* Copyright (c) 2025 Jeffery Myers
10*
11* Permission is hereby granted, free of charge, to any person obtaining a copy
12* of this software and associated documentation files (the "Software"), to deal
13* in the Software without restriction, including without limitation the rights
14* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15* copies of the Software, and to permit persons to whom the Software is
16* furnished to do so, subject to the following conditions:
17*
18* The above copyright notice and this permission notice shall be included in all
19* copies or substantial portions of the Software.
20*
21* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27* SOFTWARE.
28*
29**********************************************************************************************/
30
31#pragma once
32
33// move the windows functions to new names
34// note that you can't call these functions or structures from your code, but you should not neeed to
35#define CloseWindow CloseWindowWin32
36#define Rectangle RectangleWin32
37#define ShowCursor ShowCursorWin32
38#define LoadImageA LoadImageAWin32
39#define LoadImageW LoadImageWin32
40#define DrawTextA DrawTextAWin32
41#define DrawTextW DrawTextWin32
42#define DrawTextExA DrawTextExAWin32
43#define DrawTextExW DrawTextExWin32
44#define PlaySoundA PlaySoundAWin32
45// include windows
46#define WIN32_LEAN_AND_MEAN
47#include <windows.h>
48
49// remove all our redfintions so that raylib can define them properly
50#undef CloseWindow
51#undef Rectangle
52#undef ShowCursor
53#undef LoadImage
54#undef LoadImageA
55#undef LoadImageW
56#undef DrawText
57#undef DrawTextA
58#undef DrawTextW
59#undef DrawTextEx
60#undef DrawTextExA
61#undef DrawTextExW
62#undef PlaySoundA
63
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit