sl@0: /* sl@0: * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef __GMODULE_WSD_H__ sl@0: #define __GMODULE_WSD_H__ sl@0: sl@0: #if (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__))) sl@0: sl@0: #include <_ansi.h> sl@0: #include sl@0: #include sl@0: sl@0: /* -------------------------- MACRO DEFINATIONS ----------------------*/ sl@0: #ifndef EMULATOR sl@0: #define EMULATOR (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__))) sl@0: #endif /* EMULATOR */ sl@0: sl@0: #define VARIABLE_NAME(var,filename) s_##filename##_##var sl@0: sl@0: #define FUNCTION_NAME(var,filename) _s_##filename##_##var sl@0: sl@0: #define VARIABLE_DECL(var,filename,datatype)\ sl@0: datatype VARIABLE_NAME(var,filename); sl@0: sl@0: #define RETURN_VAL(var,filename) (Gmodule_ImpurePtr()->VARIABLE_NAME(var,filename)) sl@0: sl@0: #define PLS(var,filename,type) \ sl@0: type *_s_##filename##_##var() \ sl@0: { \ sl@0: return &RETURN_VAL(var,filename);\ sl@0: } sl@0: /* -------------------------- END MACRO DEFINATIONS ----------------------*/ sl@0: sl@0: sl@0: struct global_struct sl@0: { sl@0: VARIABLE_DECL(modules,gmodule,GModule *) sl@0: VARIABLE_DECL(main_module,gmodule,GModule *) sl@0: VARIABLE_DECL(module_error_private,gmodule,GStaticPrivate) sl@0: VARIABLE_DECL(g_module_global_lock,gmodule,GStaticRecMutex) sl@0: VARIABLE_DECL(module_debug_initialized,gmodule,gboolean) sl@0: VARIABLE_DECL(module_debug_flags,gmodule,guint) sl@0: }; sl@0: sl@0: __BEGIN_DECLS sl@0: struct global_struct *Gmodule_ImpurePtr(); sl@0: __END_DECLS sl@0: #endif sl@0: sl@0: #endif /* __GMODULE_WSD_H__ */