[atk] Move DllMain() to atkprivate.c



commit 57fdd584dc099006a4f919183bba58b3064e4c4f
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Mar 13 10:48:30 2014 +0800

    Move DllMain() to atkprivate.c
    
    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

 atk/atkobject.c  |   29 -----------------------------
 atk/atkprivate.c |   21 +++++++++++++++++++++
 2 files changed, 21 insertions(+), 29 deletions(-)
---
diff --git a/atk/atkobject.c b/atk/atkobject.c
index 8ef8967..f381df1 100755
--- a/atk/atkobject.c
+++ b/atk/atkobject.c
@@ -25,14 +25,6 @@
 #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"
@@ -280,27 +272,6 @@ static const gchar* const atk_object_name_property_table_summary = "accessible-t
 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 ()
 {
diff --git a/atk/atkprivate.c b/atk/atkprivate.c
index de60c2f..17e8d62 100644
--- a/atk/atkprivate.c
+++ b/atk/atkprivate.c
@@ -32,6 +32,27 @@
 
 #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)
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]