Bug 1861709 replace AudioCallbackDriver::ThreadRunning() assertions that mean to...
[gecko.git] / widget / windows / nsToolkit.h
blob4be7bdb80a59005a83e16dbe84a862322fbe6819
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsToolkit_h__
7 #define nsToolkit_h__
9 #include "nsdefs.h"
11 #include "nsCOMPtr.h"
12 #include <windows.h>
14 // Avoid including windowsx.h to prevent macro pollution
15 #ifndef GET_X_LPARAM
16 # define GET_X_LPARAM(pt) (short(LOWORD(pt)))
17 #endif
18 #ifndef GET_Y_LPARAM
19 # define GET_Y_LPARAM(pt) (short(HIWORD(pt)))
20 #endif
22 /**
23 * Wrapper around the thread running the message pump.
24 * The toolkit abstraction is necessary because the message pump must
25 * execute within the same thread that created the widget under Win32.
28 class nsToolkit {
29 public:
30 nsToolkit();
32 private:
33 ~nsToolkit();
35 public:
36 static nsToolkit* GetToolkit();
38 static HINSTANCE mDllInstance;
40 static void Startup(HMODULE hModule);
41 static void Shutdown();
43 protected:
44 static nsToolkit* gToolkit;
47 #endif // TOOLKIT_H