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: #ifndef __GOBJECT_WSD_H__ sl@0: #define __GOBJECT_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: #include "gbsearcharray.h" sl@0: sl@0: /* --------------------------- MACRO DEFINATIONS --------------------------*/ sl@0: 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_MACRO(name,filename) s_##filename##_g__ ## name ## _lock sl@0: sl@0: #define FUNCTION_NAME_MACRO(name,filename) _s_##filename##_g__ ## name ## _lock 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_MACRO(name,filename,datatype) \ sl@0: datatype VARIABLE_NAME_MACRO(name,filename); sl@0: sl@0: #define VARIABLE_DECL(var,filename,datatype)\ sl@0: datatype VARIABLE_NAME(var,filename); sl@0: sl@0: #define VARIABLE_DECL_ARRAY(name,filename,datatype,size) \ sl@0: datatype VARIABLE_NAME(name,filename)[size]; sl@0: sl@0: #define RETURN_VAL(var,filename) (Gobject_ImpurePtr()->VARIABLE_NAME(var,filename)) sl@0: sl@0: #define RETURN_VAL_MACRO(var,filename) (Gobject_ImpurePtr()->VARIABLE_NAME_MACRO(var,filename)) sl@0: sl@0: #define PLS(var,filename,type) \ sl@0: type *FUNCTION_NAME(var,filename)() \ sl@0: { \ sl@0: return &RETURN_VAL(var,filename);\ sl@0: } sl@0: sl@0: #define PLS_MACRO(var,filename,type) \ sl@0: type *FUNCTION_NAME_MACRO(var,filename)() \ sl@0: { \ sl@0: return &RETURN_VAL_MACRO(var,filename);\ sl@0: } sl@0: sl@0: #define PLS_ARRAY(var,filename,type) \ sl@0: type *FUNCTION_NAME(var,filename)() \ sl@0: { \ sl@0: return RETURN_VAL(var,filename);\ sl@0: } sl@0: /* ------------------------ END MACRO DEFINATIONS --------------------------*/ sl@0: sl@0: typedef struct _GObjectNotifyContext GObjectNotifyContext; sl@0: typedef void (*GObjectNotifyQueueDispatcher) (GObject *object, sl@0: guint n_pspecs, sl@0: GParamSpec **pspecs); sl@0: sl@0: struct _GObjectNotifyContext sl@0: { sl@0: GQuark quark_notify_queue; sl@0: GObjectNotifyQueueDispatcher dispatcher; sl@0: GTrashStack *_nqueue_trash; /* unused */ sl@0: }; sl@0: sl@0: typedef guint (*function_type) (GObject*, gint); sl@0: #ifdef __cplusplus sl@0: extern "C" sl@0: #endif /* extern "C" */ sl@0: guint object_floating_flag_handler (GObject *object,gint job); sl@0: sl@0: typedef struct _Emission Emission; sl@0: typedef struct _SignalNode SignalNode; sl@0: sl@0: #define class class1 sl@0: sl@0: typedef struct _TypeNode TypeNode; sl@0: typedef struct _CommonData CommonData; sl@0: typedef struct _IFaceData IFaceData; sl@0: typedef struct _ClassData ClassData; sl@0: typedef struct _InstanceData InstanceData; sl@0: typedef union _TypeData TypeData; sl@0: typedef struct _IFaceEntry IFaceEntry; sl@0: sl@0: typedef struct { sl@0: gpointer cache_data; sl@0: GTypeClassCacheFunc cache_func; sl@0: } ClassCacheFunc; sl@0: typedef struct { sl@0: gpointer check_data; sl@0: GTypeInterfaceCheckFunc check_func; sl@0: } IFaceCheckFunc; sl@0: struct global_struct sl@0: { sl@0: //Global data of gboxed.c sl@0: VARIABLE_DECL(boxed_bsa,gboxed,GBSearchArray *) sl@0: VARIABLE_DECL(type_id,g_closure_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_value_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_value_array_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_date_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_strv_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_gstring_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_hash_table_get_type ,GType) sl@0: VARIABLE_DECL(type_id,g_regex_get_type ,GType) sl@0: sl@0: //Global data of genums.c sl@0: VARIABLE_DECL(initialized ,g_enum_types_init,gboolean) sl@0: VARIABLE_DECL(info,g_enum_types_init,GTypeInfo) sl@0: sl@0: //Global data of gobject.c sl@0: VARIABLE_DECL(quark_closure_array,gobject,GQuark) sl@0: VARIABLE_DECL(quark_weak_refs,gobject,GQuark) sl@0: VARIABLE_DECL(quark_toggle_refs,gobject,GQuark) sl@0: VARIABLE_DECL(pspec_pool,gobject,GParamSpecPool *) sl@0: VARIABLE_DECL(property_notify_context,gobject,GObjectNotifyContext) sl@0: VARIABLE_DECL_ARRAY(gobject_signals,gobject,gulong,1) sl@0: VARIABLE_DECL_MACRO(construction_mutex,gobject,GStaticMutex) sl@0: VARIABLE_DECL(construction_objects,gobject,GSList *) sl@0: #ifdef G_ENABLE_DEBUG sl@0: VARIABLE_DECL_MACRO(debug_objects,gobject,GStaticMutex) sl@0: VARIABLE_DECL(g_trap_object_ref,gobject,volatile GObject *) sl@0: VARIABLE_DECL(debug_objects_count,gobject,guint) sl@0: VARIABLE_DECL(debug_objects_ht,gobject,GHashTable *) sl@0: #endif /* G_ENABLE_DEBUG */ sl@0: VARIABLE_DECL(initialized ,g_object_type_init,gboolean) sl@0: VARIABLE_DECL(info,g_object_type_init,GTypeInfo) sl@0: VARIABLE_DECL(floating_flag_handler,gobject,function_type) sl@0: sl@0: //GLobal data of gparam.c sl@0: VARIABLE_DECL(init_smutex,g_param_spec_pool_new ,GStaticMutex) sl@0: sl@0: //Global data of gparamspec.c sl@0: VARIABLE_DECL(pspec_info,g_param_spec_types_init,GParamSpecTypeInfo) sl@0: VARIABLE_DECL(g_param_spec_types ,gparamspecs,GType *) sl@0: sl@0: //Global data of gsignal.c sl@0: #ifdef G_ENABLE_DEBUG sl@0: VARIABLE_DECL(g_trace_instance_signals,gsignal,volatile gpointer ) sl@0: VARIABLE_DECL(g_trap_instance_signals,gsignal,volatile gpointer ) sl@0: #endif /* G_ENABLE_DEBUG */ sl@0: sl@0: VARIABLE_DECL(g_signal_key_bsa,gsignal,GBSearchArray *) sl@0: VARIABLE_DECL(g_signal_hlbsa_bconfig,gsignal,GBSearchConfig) sl@0: VARIABLE_DECL(g_class_closure_bconfig,gsignal,GBSearchConfig) sl@0: VARIABLE_DECL(g_handler_list_bsa_ht,gsignal,GHashTable *) sl@0: VARIABLE_DECL(g_recursive_emissions,gsignal,Emission *) sl@0: VARIABLE_DECL(g_restart_emissions ,gsignal,Emission *) sl@0: VARIABLE_DECL(g_handler_sequential_number ,gsignal,gulong) sl@0: VARIABLE_DECL_MACRO(g_signal_mutex,gsignal,GStaticMutex) sl@0: VARIABLE_DECL(g_n_signal_nodes,gsignal,guint) sl@0: VARIABLE_DECL(g_signal_nodes ,gsignal,SignalNode **) sl@0: VARIABLE_DECL(seq_hook_id ,g_signal_add_emission_hook ,gulong) sl@0: sl@0: //Global data of gsourceclosure.c sl@0: VARIABLE_DECL(our_type ,g_io_channel_get_type ,GType) sl@0: VARIABLE_DECL(etype ,g_io_condition_get_type,GType) sl@0: VARIABLE_DECL(closure_callback_funcs,gsourceclosure,GSourceCallbackFuncs) sl@0: sl@0: //Global data of gtype.c sl@0: VARIABLE_DECL(type_rw_lock,gtype,GStaticRWLock) sl@0: VARIABLE_DECL(class_init_rec_mutex,gtype,GStaticRecMutex) sl@0: VARIABLE_DECL(static_n_class_cache_funcs,gtype,guint) sl@0: VARIABLE_DECL(static_class_cache_funcs ,gtype,ClassCacheFunc *) sl@0: VARIABLE_DECL(static_n_iface_check_funcs,gtype,guint) sl@0: VARIABLE_DECL(static_iface_check_funcs,gtype,IFaceCheckFunc *) sl@0: VARIABLE_DECL(static_quark_type_flags,gtype,GQuark) sl@0: VARIABLE_DECL(static_quark_iface_holder,gtype,GQuark) sl@0: VARIABLE_DECL(static_quark_dependants_array,gtype,GQuark) sl@0: VARIABLE_DECL(_g_type_debug_flags,gtype,GTypeDebugFlags) sl@0: VARIABLE_DECL(static_type_nodes_ht,gtype,GHashTable *) sl@0: VARIABLE_DECL_ARRAY(static_fundamental_type_nodes,gtype,TypeNode *,(G_TYPE_FUNDAMENTAL_MAX >> G_TYPE_FUNDAMENTAL_SHIFT) + 1) sl@0: VARIABLE_DECL(static_fundamental_next,gtype,GType) sl@0: VARIABLE_DECL_MACRO(instance_real_class,gtype,GStaticMutex) sl@0: VARIABLE_DECL(instance_real_class_bsa,gtype,GBSearchArray *) sl@0: VARIABLE_DECL(instance_real_class_bconfig,gtype,GBSearchConfig) sl@0: VARIABLE_DECL_ARRAY(debug_keys,g_type_init_with_debug_flags ,GDebugKey,2) sl@0: VARIABLE_DECL_MACRO(type_init_lock,g_type_init_with_debug_flags,GStaticMutex) sl@0: sl@0: //Global data of gtypemodule.c sl@0: VARIABLE_DECL(parent_class ,gtypemodule,gpointer) sl@0: VARIABLE_DECL(type_module_type,g_type_module_get_type ,GType) sl@0: sl@0: //Global data of gtypeplugin.c sl@0: VARIABLE_DECL(type_plugin_type ,g_type_plugin_get_type,GType) sl@0: sl@0: //Global data of gvalue.c sl@0: VARIABLE_DECL(transform_array,gvalue,GBSearchArray *) sl@0: VARIABLE_DECL(transform_bconfig,gvalue,GBSearchConfig) sl@0: sl@0: // Global data of gvaluetypes.c sl@0: VARIABLE_DECL(type ,g_gtype_get_type ,GType) sl@0: sl@0: }; sl@0: sl@0: #undef class sl@0: sl@0: __BEGIN_DECLS sl@0: struct global_struct *Gobject_ImpurePtr(); sl@0: __END_DECLS sl@0: #endif sl@0: sl@0: #endif /* __GOBJECT_WSD_H__ */