diff options
| author | Pierre Ossman <ossman@cendio.se> | 2014-09-15 09:35:05 +0000 |
|---|---|---|
| committer | Pierre Ossman <ossman@cendio.se> | 2014-09-15 09:35:05 +0000 |
| commit | 61e1b18f7b45c1005581d600c10d55f82c21e92c (patch) | |
| tree | 76d7a2ded1a188346613a3a5c8d71bb36b98d5d1 /src/Fl.cxx | |
| parent | 53888cf06440f6f3b3d594e0dc80d120c77d2c53 (diff) | |
Consolidate the Win32 init and cleanup code in to one place so
it's easier to keep track of it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10312 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 2b637aa37..ecfbaaca6 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -590,45 +590,6 @@ int Fl::run() { return 0; } -#ifdef WIN32 - -// Function to initialize COM/OLE for usage. This must be done only once. -// We define a flag to register whether we called it: -static char oleInitialized = 0; - -// This calls the Windows function OleInitialize() exactly once. -void fl_OleInitialize() { - if (!oleInitialized) { - OleInitialize(0L); - oleInitialized = 1; - } -} - -// This calls the Windows function OleUninitialize() only, if -// OleInitialize has been called before. -void fl_OleUninitialize() { - if (oleInitialized) { - OleUninitialize(); - oleInitialized = 0; - } -} - -class Fl_Win32_At_Exit { -public: - Fl_Win32_At_Exit() { } - ~Fl_Win32_At_Exit() { - fl_free_fonts(); // do some WIN32 cleanup - fl_cleanup_pens(); - fl_OleUninitialize(); - fl_brush_action(1); - fl_cleanup_dc_list(); - } -}; -static Fl_Win32_At_Exit win32_at_exit; -#endif - - - /** Waits until "something happens" and then returns. Call this repeatedly to "run" your program. You can also check what happened |
