diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-03-13 10:48:30 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2014-03-13 19:08:36 +0800 |
commit | 57fdd584dc099006a4f919183bba58b3064e4c4f (patch) | |
tree | 63fa3ded67aebd16d4746f103ef09a50770427ef | |
parent | b2f76883d390de6ab0ef5de678457dc4080bc35d (diff) | |
download | atk-57fdd584dc099006a4f919183bba58b3064e4c4f.tar.gz |
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
-rwxr-xr-x | atk/atkobject.c | 29 | ||||
-rw-r--r-- | 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) { |