diff options
| author | Yong He <yonghe@outlook.com> | 2021-01-14 15:48:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-14 15:48:54 -0800 |
| commit | f834f25794cfb746079e92d58c7410b767c57208 (patch) | |
| tree | 583a86d4cb2e446c2c06f9d786996d10647baf84 /tools/graphics-app-framework/window.h | |
| parent | ac76997690a39605b2b8fbd63de9cbbbc2af2a73 (diff) | |
COM-ify all slang-gfx interfaces. (#1656)
* COM-ify all slang-gfx interfaces.
Diffstat (limited to 'tools/graphics-app-framework/window.h')
| -rw-r--r-- | tools/graphics-app-framework/window.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/graphics-app-framework/window.h b/tools/graphics-app-framework/window.h index e6f886f42..2e216aacf 100644 --- a/tools/graphics-app-framework/window.h +++ b/tools/graphics-app-framework/window.h @@ -57,6 +57,7 @@ struct WindowDesc }; Window* createWindow(WindowDesc const& desc); +void destroyWindow(Window* window); void showWindow(Window* window); void* getPlatformWindowHandle(Window* window); @@ -104,13 +105,23 @@ int runWindowsApplication( void* instance, int showCommand); +#ifdef _MSC_VER +#ifdef _DEBUG +# define GFX_DUMP_LEAK _CrtDumpMemoryLeaks(); +#endif +#endif +#ifndef GFX_DUMP_LEAK +#define GFX_DUMP_LEAK +#endif #define GFX_UI_MAIN(APPLICATION_ENTRY) \ int __stdcall WinMain( \ void* instance, \ void* /* prevInstance */, \ void* /* commandLine */, \ int showCommand) { \ - return gfx::runWindowsApplication(&(APPLICATION_ENTRY), instance, showCommand); \ + auto result = gfx::runWindowsApplication(&(APPLICATION_ENTRY), instance, showCommand); \ + GFX_DUMP_LEAK \ + return result; \ } #else |
