]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/html/forcelnk.h
in debug mode when clicking with the middle mouse button draw borders around all...
[wxWidgets.git] / include / wx / html / forcelnk.h
index 16485fdd57e755d70b6a5deef7fddfb6c29fc312..9b00b9a9e527ecfc45eecd7524045315b114484c 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        forcelnk.h
-// Purpose:     see bellow
+// Purpose:     macros which force the linker to link apparently unused code
 // Author:      Vaclav Slavik
 // RCS-ID:      $Id$
 // Copyright:   (c) Vaclav Slavik
@@ -40,21 +40,23 @@ See mod_*.cpp and htmlwin.cpp for example :-)
 #ifndef _WX_FORCELNK_H_
 #define _WX_FORCELNK_H_
 
-
-
-// This must be part of the module you want to force:
-#define FORCE_LINK_ME(module_name)                                    \
-                int _link_dummy_func_##module_name ()                 \
-                {                                                     \
-                    return 1;                                         \
-                }
-
-
-// And this must be somewhere where it certainly will be linked:
-#define FORCE_LINK(module_name)                                       \
-                extern int _link_dummy_func_##module_name ();         \
-                static int _link_dummy_var_##module_name =            \
-                               _link_dummy_func_##module_name ();
+#include "wx/link.h"
+
+// compatibility defines
+#define FORCE_LINK wxFORCE_LINK_MODULE
+#define FORCE_LINK_ME wxFORCE_LINK_THIS_MODULE
+
+#define FORCE_WXHTML_MODULES() \
+    FORCE_LINK(m_layout) \
+    FORCE_LINK(m_fonts) \
+    FORCE_LINK(m_image) \
+    FORCE_LINK(m_list) \
+    FORCE_LINK(m_dflist) \
+    FORCE_LINK(m_pre) \
+    FORCE_LINK(m_hline) \
+    FORCE_LINK(m_links) \
+    FORCE_LINK(m_tables) \
+    FORCE_LINK(m_style)
 
 
 #endif // _WX_FORCELNK_H_