Update contrib.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
19 #ifndef __GOBJECT_WSD_H__
20 #define __GOBJECT_WSD_H__
22 #if (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__)))
25 #include <sys/cdefs.h>
27 #include "gbsearcharray.h"
29 /* --------------------------- MACRO DEFINATIONS --------------------------*/
32 #define EMULATOR (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__)))
35 #define VARIABLE_NAME_MACRO(name,filename) s_##filename##_g__ ## name ## _lock
37 #define FUNCTION_NAME_MACRO(name,filename) _s_##filename##_g__ ## name ## _lock
39 #define VARIABLE_NAME(var,filename) s_##filename##_##var
41 #define FUNCTION_NAME(var,filename) _s_##filename##_##var
43 #define VARIABLE_DECL_MACRO(name,filename,datatype) \
44 datatype VARIABLE_NAME_MACRO(name,filename);
46 #define VARIABLE_DECL(var,filename,datatype)\
47 datatype VARIABLE_NAME(var,filename);
49 #define VARIABLE_DECL_ARRAY(name,filename,datatype,size) \
50 datatype VARIABLE_NAME(name,filename)[size];
52 #define RETURN_VAL(var,filename) (Gobject_ImpurePtr()->VARIABLE_NAME(var,filename))
54 #define RETURN_VAL_MACRO(var,filename) (Gobject_ImpurePtr()->VARIABLE_NAME_MACRO(var,filename))
56 #define PLS(var,filename,type) \
57 type *FUNCTION_NAME(var,filename)() \
59 return &RETURN_VAL(var,filename);\
62 #define PLS_MACRO(var,filename,type) \
63 type *FUNCTION_NAME_MACRO(var,filename)() \
65 return &RETURN_VAL_MACRO(var,filename);\
68 #define PLS_ARRAY(var,filename,type) \
69 type *FUNCTION_NAME(var,filename)() \
71 return RETURN_VAL(var,filename);\
73 /* ------------------------ END MACRO DEFINATIONS --------------------------*/
75 typedef struct _GObjectNotifyContext GObjectNotifyContext;
76 typedef void (*GObjectNotifyQueueDispatcher) (GObject *object,
80 struct _GObjectNotifyContext
82 GQuark quark_notify_queue;
83 GObjectNotifyQueueDispatcher dispatcher;
84 GTrashStack *_nqueue_trash; /* unused */
87 typedef guint (*function_type) (GObject*, gint);
90 #endif /* extern "C" */
91 guint object_floating_flag_handler (GObject *object,gint job);
93 typedef struct _Emission Emission;
94 typedef struct _SignalNode SignalNode;
98 typedef struct _TypeNode TypeNode;
99 typedef struct _CommonData CommonData;
100 typedef struct _IFaceData IFaceData;
101 typedef struct _ClassData ClassData;
102 typedef struct _InstanceData InstanceData;
103 typedef union _TypeData TypeData;
104 typedef struct _IFaceEntry IFaceEntry;
108 GTypeClassCacheFunc cache_func;
112 GTypeInterfaceCheckFunc check_func;
116 //Global data of gboxed.c
117 VARIABLE_DECL(boxed_bsa,gboxed,GBSearchArray *)
118 VARIABLE_DECL(type_id,g_closure_get_type ,GType)
119 VARIABLE_DECL(type_id,g_value_get_type ,GType)
120 VARIABLE_DECL(type_id,g_value_array_get_type ,GType)
121 VARIABLE_DECL(type_id,g_date_get_type ,GType)
122 VARIABLE_DECL(type_id,g_strv_get_type ,GType)
123 VARIABLE_DECL(type_id,g_gstring_get_type ,GType)
124 VARIABLE_DECL(type_id,g_hash_table_get_type ,GType)
125 VARIABLE_DECL(type_id,g_regex_get_type ,GType)
127 //Global data of genums.c
128 VARIABLE_DECL(initialized ,g_enum_types_init,gboolean)
129 VARIABLE_DECL(info,g_enum_types_init,GTypeInfo)
131 //Global data of gobject.c
132 VARIABLE_DECL(quark_closure_array,gobject,GQuark)
133 VARIABLE_DECL(quark_weak_refs,gobject,GQuark)
134 VARIABLE_DECL(quark_toggle_refs,gobject,GQuark)
135 VARIABLE_DECL(pspec_pool,gobject,GParamSpecPool *)
136 VARIABLE_DECL(property_notify_context,gobject,GObjectNotifyContext)
137 VARIABLE_DECL_ARRAY(gobject_signals,gobject,gulong,1)
138 VARIABLE_DECL_MACRO(construction_mutex,gobject,GStaticMutex)
139 VARIABLE_DECL(construction_objects,gobject,GSList *)
140 #ifdef G_ENABLE_DEBUG
141 VARIABLE_DECL_MACRO(debug_objects,gobject,GStaticMutex)
142 VARIABLE_DECL(g_trap_object_ref,gobject,volatile GObject *)
143 VARIABLE_DECL(debug_objects_count,gobject,guint)
144 VARIABLE_DECL(debug_objects_ht,gobject,GHashTable *)
145 #endif /* G_ENABLE_DEBUG */
146 VARIABLE_DECL(initialized ,g_object_type_init,gboolean)
147 VARIABLE_DECL(info,g_object_type_init,GTypeInfo)
148 VARIABLE_DECL(floating_flag_handler,gobject,function_type)
150 //GLobal data of gparam.c
151 VARIABLE_DECL(init_smutex,g_param_spec_pool_new ,GStaticMutex)
153 //Global data of gparamspec.c
154 VARIABLE_DECL(pspec_info,g_param_spec_types_init,GParamSpecTypeInfo)
155 VARIABLE_DECL(g_param_spec_types ,gparamspecs,GType *)
157 //Global data of gsignal.c
158 #ifdef G_ENABLE_DEBUG
159 VARIABLE_DECL(g_trace_instance_signals,gsignal,volatile gpointer )
160 VARIABLE_DECL(g_trap_instance_signals,gsignal,volatile gpointer )
161 #endif /* G_ENABLE_DEBUG */
163 VARIABLE_DECL(g_signal_key_bsa,gsignal,GBSearchArray *)
164 VARIABLE_DECL(g_signal_hlbsa_bconfig,gsignal,GBSearchConfig)
165 VARIABLE_DECL(g_class_closure_bconfig,gsignal,GBSearchConfig)
166 VARIABLE_DECL(g_handler_list_bsa_ht,gsignal,GHashTable *)
167 VARIABLE_DECL(g_recursive_emissions,gsignal,Emission *)
168 VARIABLE_DECL(g_restart_emissions ,gsignal,Emission *)
169 VARIABLE_DECL(g_handler_sequential_number ,gsignal,gulong)
170 VARIABLE_DECL_MACRO(g_signal_mutex,gsignal,GStaticMutex)
171 VARIABLE_DECL(g_n_signal_nodes,gsignal,guint)
172 VARIABLE_DECL(g_signal_nodes ,gsignal,SignalNode **)
173 VARIABLE_DECL(seq_hook_id ,g_signal_add_emission_hook ,gulong)
175 //Global data of gsourceclosure.c
176 VARIABLE_DECL(our_type ,g_io_channel_get_type ,GType)
177 VARIABLE_DECL(etype ,g_io_condition_get_type,GType)
178 VARIABLE_DECL(closure_callback_funcs,gsourceclosure,GSourceCallbackFuncs)
180 //Global data of gtype.c
181 VARIABLE_DECL(type_rw_lock,gtype,GStaticRWLock)
182 VARIABLE_DECL(class_init_rec_mutex,gtype,GStaticRecMutex)
183 VARIABLE_DECL(static_n_class_cache_funcs,gtype,guint)
184 VARIABLE_DECL(static_class_cache_funcs ,gtype,ClassCacheFunc *)
185 VARIABLE_DECL(static_n_iface_check_funcs,gtype,guint)
186 VARIABLE_DECL(static_iface_check_funcs,gtype,IFaceCheckFunc *)
187 VARIABLE_DECL(static_quark_type_flags,gtype,GQuark)
188 VARIABLE_DECL(static_quark_iface_holder,gtype,GQuark)
189 VARIABLE_DECL(static_quark_dependants_array,gtype,GQuark)
190 VARIABLE_DECL(_g_type_debug_flags,gtype,GTypeDebugFlags)
191 VARIABLE_DECL(static_type_nodes_ht,gtype,GHashTable *)
192 VARIABLE_DECL_ARRAY(static_fundamental_type_nodes,gtype,TypeNode *,(G_TYPE_FUNDAMENTAL_MAX >> G_TYPE_FUNDAMENTAL_SHIFT) + 1)
193 VARIABLE_DECL(static_fundamental_next,gtype,GType)
194 VARIABLE_DECL_MACRO(instance_real_class,gtype,GStaticMutex)
195 VARIABLE_DECL(instance_real_class_bsa,gtype,GBSearchArray *)
196 VARIABLE_DECL(instance_real_class_bconfig,gtype,GBSearchConfig)
197 VARIABLE_DECL_ARRAY(debug_keys,g_type_init_with_debug_flags ,GDebugKey,2)
198 VARIABLE_DECL_MACRO(type_init_lock,g_type_init_with_debug_flags,GStaticMutex)
200 //Global data of gtypemodule.c
201 VARIABLE_DECL(parent_class ,gtypemodule,gpointer)
202 VARIABLE_DECL(type_module_type,g_type_module_get_type ,GType)
204 //Global data of gtypeplugin.c
205 VARIABLE_DECL(type_plugin_type ,g_type_plugin_get_type,GType)
207 //Global data of gvalue.c
208 VARIABLE_DECL(transform_array,gvalue,GBSearchArray *)
209 VARIABLE_DECL(transform_bconfig,gvalue,GBSearchConfig)
211 // Global data of gvaluetypes.c
212 VARIABLE_DECL(type ,g_gtype_get_type ,GType)
219 struct global_struct *Gobject_ImpurePtr();
223 #endif /* __GOBJECT_WSD_H__ */