Since the HMODULE that is initialized by DllMain() is to be used to for
get_atk_locale_dir(), which was recently moved to atk/atkprivate.c, move
DllMain() and its related items to atk/atkprivate.c as well. This will fix
the ATK build on Windows.
https://bugzilla.gnome.org/show_bug.cgi?id=726216
#include <glib-object.h>
#include <glib/gi18n-lib.h>
-#ifdef G_OS_WIN32
-#define STRICT
-#include <windows.h>
-#undef STRICT
-#undef FOCUS_EVENT /* <windows.h> pollutes the namespace
- * like a six hundred pound gorilla */
-#endif
-
#include "atk.h"
#include "atkmarshal.h"
#include "atkprivate.h"
static const gchar* const atk_object_name_property_table_caption_object = "accessible-table-caption-object";
static const gchar* const atk_object_name_property_hypertext_num_links = "accessible-hypertext-nlinks";
-#ifdef G_OS_WIN32
-
-static HMODULE atk_dll;
-
-BOOL WINAPI
-DllMain (HINSTANCE hinstDLL,
- DWORD fdwReason,
- LPVOID lpvReserved)
-{
- switch (fdwReason)
- {
- case DLL_PROCESS_ATTACH:
- atk_dll = (HMODULE) hinstDLL;
- break;
- }
-
- return TRUE;
-}
-
-#endif
-
static void
initialize_role_names ()
{
#ifdef G_OS_WIN32
+#define STRICT
+#include <windows.h>
+#undef STRICT
+
+static HMODULE atk_dll;
+
+BOOL WINAPI
+DllMain(HINSTANCE hinstDLL,
+DWORD fdwReason,
+LPVOID lpvReserved)
+{
+ switch (fdwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ atk_dll = (HMODULE)hinstDLL;
+ break;
+ }
+
+ return TRUE;
+}
+
static const char *
get_atk_locale_dir (void)
{