From c720aae51515907ae82ee02df80bd084f291d4b1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 15 Mar 2022 06:42:06 +0100 Subject: Make hybrid Wayland/X11 platform. --- FL/win32.H | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'FL/win32.H') diff --git a/FL/win32.H b/FL/win32.H index 8ff136cb3..d7bfd5c18 100644 --- a/FL/win32.H +++ b/FL/win32.H @@ -18,7 +18,25 @@ // include this file if _WIN32 is defined. This is to encourage // portability of even the system-specific code... -#ifndef FL_DOXYGEN +#ifdef FL_DOXYGEN + +/** \file + Definitions of functions specific to the Windows platform. +*/ + +/** Returns the Windows-specific window reference corresponding to the given Fl_Window object */ +extern HWND fl_win32_xid(const Fl_Window *win); +/** Returns the Fl_Window corresponding to the given Windows-specific window reference */ +extern Fl_Window *fl_win32_find(HWND); +/** Returns the Windows-specific GL rendering context corresponding to the given GLContext */ +extern HGLRC fl_win32_glcontext(GLContext rc); +/** Returns the Windows-specific graphics context for the current window */ +extern HDC fl_win32_gc(); +/** Returns the Windows-specific display in use */ +extern HINSTANCE fl_win32_display(); + +#else + #ifndef FL_PLATFORM_H # error "Never use directly; include instead." #endif // !FL_PLATFORM_H @@ -26,6 +44,11 @@ #include typedef HWND Window; +typedef struct HGLRC__ *HGLRC; +extern FL_EXPORT HGLRC fl_win32_glcontext(GLContext rc); +extern FL_EXPORT HWND fl_win32_xid(const Fl_Window *win); +extern FL_EXPORT Fl_Window *fl_win32_find(HWND); + // this part is included only when compiling the FLTK library or if requested explicitly #if defined(FL_LIBRARY) || defined(FL_INTERNALS) @@ -60,7 +83,9 @@ FL_EXPORT HBRUSH fl_brush(); // allocates a brush if necessary FL_EXPORT HBRUSH fl_brush_action(int); // now does the real work extern FL_EXPORT HINSTANCE fl_display; +extern FL_EXPORT HINSTANCE fl_win32_display(); extern FL_EXPORT HDC fl_gc; +extern FL_EXPORT HDC fl_win32_gc(); extern FL_EXPORT MSG fl_msg; extern FL_EXPORT HDC fl_GetDC(Window); extern FL_EXPORT HDC fl_makeDC(HBITMAP); -- cgit v1.2.3