1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = 27 * outPack = gobject 28 * outFile = CClosure 29 * strct = GCClosure 30 * realStrct= 31 * ctorStrct= 32 * clss = CClosure 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - g_cclosure_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * imports: 46 * - gobject.Closure 47 * - gobject.ObjectG 48 * - gobject.Value 49 * structWrap: 50 * - GClosure* -> Closure 51 * - GObject* -> ObjectG 52 * - GValue* -> Value 53 * module aliases: 54 * local aliases: 55 * overrides: 56 */ 57 58 module gobject.CClosure; 59 60 public import gtkc.gobjecttypes; 61 62 private import gtkc.gobject; 63 private import glib.ConstructionException; 64 private import gobject.ObjectG; 65 66 private import gobject.Closure; 67 private import gobject.ObjectG; 68 private import gobject.Value; 69 70 71 72 /** 73 * A GClosure represents a callback supplied by the programmer. It 74 * will generally comprise a function of some kind and a marshaller 75 * used to call it. It is the reponsibility of the marshaller to 76 * convert the arguments for the invocation from GValues into 77 * a suitable form, perform the callback on the converted arguments, 78 * and transform the return value back into a GValue. 79 * 80 * In the case of C programs, a closure usually just holds a pointer 81 * to a function and maybe a data argument, and the marshaller 82 * converts between GValue and native C types. The GObject 83 * library provides the GCClosure type for this purpose. Bindings for 84 * other languages need marshallers which convert between GValues and suitable representations in the runtime of the language in 85 * order to use functions written in that languages as callbacks. 86 * 87 * Within GObject, closures play an important role in the 88 * implementation of signals. When a signal is registered, the 89 * c_marshaller argument to g_signal_new() specifies the default C 90 * marshaller for any closure which is connected to this 91 * signal. GObject provides a number of C marshallers for this 92 * purpose, see the g_cclosure_marshal_*() functions. Additional C 93 * marshallers can be generated with the glib-genmarshal utility. Closures 94 * can be explicitly connected to signals with 95 * g_signal_connect_closure(), but it usually more convenient to let 96 * GObject create a closure automatically by using one of the 97 * g_signal_connect_*() functions which take a callback function/user 98 * data pair. 99 * 100 * Using closures has a number of important advantages over a simple 101 * callback function/data pointer combination: 102 * 103 * Closures allow the callee to get the types of the callback parameters, 104 * which means that language bindings don't have to write individual glue 105 * for each callback type. 106 * 107 * The reference counting of GClosure makes it easy to handle reentrancy 108 * right; if a callback is removed while it is being invoked, the closure 109 * and its parameters won't be freed until the invocation finishes. 110 * 111 * g_closure_invalidate() and invalidation notifiers allow callbacks to be 112 * automatically removed when the objects they point to go away. 113 */ 114 public class CClosure 115 { 116 117 /** the main Gtk struct */ 118 protected GCClosure* gCClosure; 119 120 121 /** Get the main Gtk struct */ 122 public GCClosure* getCClosureStruct() 123 { 124 return gCClosure; 125 } 126 127 128 /** the main Gtk struct as a void* */ 129 protected void* getStruct() 130 { 131 return cast(void*)gCClosure; 132 } 133 134 /** 135 * Sets our main struct and passes it to the parent class 136 */ 137 public this (GCClosure* gCClosure) 138 { 139 this.gCClosure = gCClosure; 140 } 141 142 /** 143 */ 144 145 /** 146 * Creates a new closure which invokes callback_func with user_data as 147 * the last parameter. 148 * Params: 149 * callbackFunc = the function to invoke 150 * userData = user data to pass to callback_func 151 * destroyData = destroy notify to be called when user_data is no longer used 152 * Returns: a new GCClosure 153 */ 154 public static Closure newCClosure(GCallback callbackFunc, void* userData, GClosureNotify destroyData) 155 { 156 // GClosure * g_cclosure_new (GCallback callback_func, gpointer user_data, GClosureNotify destroy_data); 157 auto p = g_cclosure_new(callbackFunc, userData, destroyData); 158 159 if(p is null) 160 { 161 return null; 162 } 163 164 return ObjectG.getDObject!(Closure)(cast(GClosure*) p); 165 } 166 167 /** 168 * Creates a new closure which invokes callback_func with user_data as 169 * the first parameter. 170 * Params: 171 * callbackFunc = the function to invoke 172 * userData = user data to pass to callback_func 173 * destroyData = destroy notify to be called when user_data is no longer used 174 * Returns: a new GCClosure. [transfer full] 175 */ 176 public static Closure newSwap(GCallback callbackFunc, void* userData, GClosureNotify destroyData) 177 { 178 // GClosure * g_cclosure_new_swap (GCallback callback_func, gpointer user_data, GClosureNotify destroy_data); 179 auto p = g_cclosure_new_swap(callbackFunc, userData, destroyData); 180 181 if(p is null) 182 { 183 return null; 184 } 185 186 return ObjectG.getDObject!(Closure)(cast(GClosure*) p); 187 } 188 189 /** 190 * A variant of g_cclosure_new() which uses object as user_data and 191 * calls g_object_watch_closure() on object and the created 192 * closure. This function is useful when you have a callback closely 193 * associated with a GObject, and want the callback to no longer run 194 * after the object is is freed. 195 * Params: 196 * callbackFunc = the function to invoke 197 * object = a GObject pointer to pass to callback_func 198 * Returns: a new GCClosure 199 */ 200 public static Closure newObject(GCallback callbackFunc, ObjectG object) 201 { 202 // GClosure * g_cclosure_new_object (GCallback callback_func, GObject *object); 203 auto p = g_cclosure_new_object(callbackFunc, (object is null) ? null : object.getObjectGStruct()); 204 205 if(p is null) 206 { 207 return null; 208 } 209 210 return ObjectG.getDObject!(Closure)(cast(GClosure*) p); 211 } 212 213 /** 214 * A variant of g_cclosure_new_swap() which uses object as user_data 215 * and calls g_object_watch_closure() on object and the created 216 * closure. This function is useful when you have a callback closely 217 * associated with a GObject, and want the callback to no longer run 218 * after the object is is freed. 219 * Params: 220 * callbackFunc = the function to invoke 221 * object = a GObject pointer to pass to callback_func 222 * Returns: a new GCClosure 223 */ 224 public static Closure newObjectSwap(GCallback callbackFunc, ObjectG object) 225 { 226 // GClosure * g_cclosure_new_object_swap (GCallback callback_func, GObject *object); 227 auto p = g_cclosure_new_object_swap(callbackFunc, (object is null) ? null : object.getObjectGStruct()); 228 229 if(p is null) 230 { 231 return null; 232 } 233 234 return ObjectG.getDObject!(Closure)(cast(GClosure*) p); 235 } 236 237 /** 238 * A generic marshaller function implemented via libffi. 239 * Since 2.30 240 * Params: 241 * closure = A GClosure. 242 * returnGvalue = A GValue to store the return value. May be NULL 243 * if the callback of closure doesn't return a value. 244 * paramValues = An array of GValues holding the arguments 245 * on which to invoke the callback of closure. 246 * invocationHint = The invocation hint given as the last argument to 247 * g_closure_invoke(). 248 * marshalData = Additional data specified when registering the 249 * marshaller, see g_closure_set_marshal() and 250 * g_closure_set_meta_marshal() 251 */ 252 public static void marshalGeneric(Closure closure, Value returnGvalue, GValue[] paramValues, void* invocationHint, void* marshalData) 253 { 254 // void g_cclosure_marshal_generic (GClosure *closure, GValue *return_gvalue, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 255 g_cclosure_marshal_generic((closure is null) ? null : closure.getClosureStruct(), (returnGvalue is null) ? null : returnGvalue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 256 } 257 258 /** 259 * A marshaller for a GCClosure with a callback of type 260 * void (*callback) (gpointer instance, gpointer user_data). 261 * Params: 262 * closure = the GClosure to which the marshaller belongs 263 * returnValue = ignored 264 * paramValues = a GValue array holding only the instance 265 * invocationHint = the invocation hint given as the last argument 266 * to g_closure_invoke() 267 * marshalData = additional data specified when registering the marshaller 268 */ 269 public static void marshalVOID__VOID(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 270 { 271 // void g_cclosure_marshal_VOID__VOID (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 272 g_cclosure_marshal_VOID__VOID((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 273 } 274 275 /** 276 * A marshaller for a GCClosure with a callback of type 277 * void (*callback) (gpointer instance, gboolean arg1, gpointer user_data). 278 * Params: 279 * closure = the GClosure to which the marshaller belongs 280 * returnValue = ignored 281 * paramValues = a GValue array holding the instance and the gboolean parameter 282 * invocationHint = the invocation hint given as the last argument 283 * to g_closure_invoke() 284 * marshalData = additional data specified when registering the marshaller 285 */ 286 public static void marshalVOID__BOOLEAN(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 287 { 288 // void g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 289 g_cclosure_marshal_VOID__BOOLEAN((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 290 } 291 292 /** 293 * A marshaller for a GCClosure with a callback of type 294 * void (*callback) (gpointer instance, gchar arg1, gpointer user_data). 295 * Params: 296 * closure = the GClosure to which the marshaller belongs 297 * returnValue = ignored 298 * paramValues = a GValue array holding the instance and the gchar parameter 299 * invocationHint = the invocation hint given as the last argument 300 * to g_closure_invoke() 301 * marshalData = additional data specified when registering the marshaller 302 */ 303 public static void marshalVOID__CHAR(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 304 { 305 // void g_cclosure_marshal_VOID__CHAR (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 306 g_cclosure_marshal_VOID__CHAR((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 307 } 308 309 /** 310 * A marshaller for a GCClosure with a callback of type 311 * void (*callback) (gpointer instance, guchar arg1, gpointer user_data). 312 * Params: 313 * closure = the GClosure to which the marshaller belongs 314 * returnValue = ignored 315 * paramValues = a GValue array holding the instance and the guchar parameter 316 * invocationHint = the invocation hint given as the last argument 317 * to g_closure_invoke() 318 * marshalData = additional data specified when registering the marshaller 319 */ 320 public static void marshalVOID__UCHAR(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 321 { 322 // void g_cclosure_marshal_VOID__UCHAR (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 323 g_cclosure_marshal_VOID__UCHAR((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 324 } 325 326 /** 327 * A marshaller for a GCClosure with a callback of type 328 * void (*callback) (gpointer instance, gint arg1, gpointer user_data). 329 * Params: 330 * closure = the GClosure to which the marshaller belongs 331 * returnValue = ignored 332 * paramValues = a GValue array holding the instance and the gint parameter 333 * invocationHint = the invocation hint given as the last argument 334 * to g_closure_invoke() 335 * marshalData = additional data specified when registering the marshaller 336 */ 337 public static void marshalVOID__INT(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 338 { 339 // void g_cclosure_marshal_VOID__INT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 340 g_cclosure_marshal_VOID__INT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 341 } 342 343 /** 344 * A marshaller for a GCClosure with a callback of type 345 * void (*callback) (gpointer instance, guint arg1, gpointer user_data). 346 * Params: 347 * closure = the GClosure to which the marshaller belongs 348 * returnValue = ignored 349 * paramValues = a GValue array holding the instance and the guint parameter 350 * invocationHint = the invocation hint given as the last argument 351 * to g_closure_invoke() 352 * marshalData = additional data specified when registering the marshaller 353 */ 354 public static void marshalVOID__UINT(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 355 { 356 // void g_cclosure_marshal_VOID__UINT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 357 g_cclosure_marshal_VOID__UINT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 358 } 359 360 /** 361 * A marshaller for a GCClosure with a callback of type 362 * void (*callback) (gpointer instance, glong arg1, gpointer user_data). 363 * Params: 364 * closure = the GClosure to which the marshaller belongs 365 * returnValue = ignored 366 * paramValues = a GValue array holding the instance and the glong parameter 367 * invocationHint = the invocation hint given as the last argument 368 * to g_closure_invoke() 369 * marshalData = additional data specified when registering the marshaller 370 */ 371 public static void marshalVOID__LONG(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 372 { 373 // void g_cclosure_marshal_VOID__LONG (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 374 g_cclosure_marshal_VOID__LONG((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 375 } 376 377 /** 378 * A marshaller for a GCClosure with a callback of type 379 * void (*callback) (gpointer instance, gulong arg1, gpointer user_data). 380 * Params: 381 * closure = the GClosure to which the marshaller belongs 382 * returnValue = ignored 383 * paramValues = a GValue array holding the instance and the gulong parameter 384 * invocationHint = the invocation hint given as the last argument 385 * to g_closure_invoke() 386 * marshalData = additional data specified when registering the marshaller 387 */ 388 public static void marshalVOID__ULONG(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 389 { 390 // void g_cclosure_marshal_VOID__ULONG (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 391 g_cclosure_marshal_VOID__ULONG((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 392 } 393 394 /** 395 * A marshaller for a GCClosure with a callback of type 396 * void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes an enumeration type.. 397 * Params: 398 * closure = the GClosure to which the marshaller belongs 399 * returnValue = ignored 400 * paramValues = a GValue array holding the instance and the enumeration parameter 401 * invocationHint = the invocation hint given as the last argument 402 * to g_closure_invoke() 403 * marshalData = additional data specified when registering the marshaller 404 */ 405 public static void marshalVOID__ENUM(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 406 { 407 // void g_cclosure_marshal_VOID__ENUM (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 408 g_cclosure_marshal_VOID__ENUM((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 409 } 410 411 /** 412 * A marshaller for a GCClosure with a callback of type 413 * void (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter denotes a flags type. 414 * Params: 415 * closure = the GClosure to which the marshaller belongs 416 * returnValue = ignored 417 * paramValues = a GValue array holding the instance and the flags parameter 418 * invocationHint = the invocation hint given as the last argument 419 * to g_closure_invoke() 420 * marshalData = additional data specified when registering the marshaller 421 */ 422 public static void marshalVOID__FLAGS(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 423 { 424 // void g_cclosure_marshal_VOID__FLAGS (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 425 g_cclosure_marshal_VOID__FLAGS((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 426 } 427 428 /** 429 * A marshaller for a GCClosure with a callback of type 430 * void (*callback) (gpointer instance, gfloat arg1, gpointer user_data). 431 * Params: 432 * closure = the GClosure to which the marshaller belongs 433 * returnValue = ignored 434 * paramValues = a GValue array holding the instance and the gfloat parameter 435 * invocationHint = the invocation hint given as the last argument 436 * to g_closure_invoke() 437 * marshalData = additional data specified when registering the marshaller 438 */ 439 public static void marshalVOID__FLOAT(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 440 { 441 // void g_cclosure_marshal_VOID__FLOAT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 442 g_cclosure_marshal_VOID__FLOAT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 443 } 444 445 /** 446 * A marshaller for a GCClosure with a callback of type 447 * void (*callback) (gpointer instance, gdouble arg1, gpointer user_data). 448 * Params: 449 * closure = the GClosure to which the marshaller belongs 450 * returnValue = ignored 451 * paramValues = a GValue array holding the instance and the gdouble parameter 452 * invocationHint = the invocation hint given as the last argument 453 * to g_closure_invoke() 454 * marshalData = additional data specified when registering the marshaller 455 */ 456 public static void marshalVOID__DOUBLE(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 457 { 458 // void g_cclosure_marshal_VOID__DOUBLE (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 459 g_cclosure_marshal_VOID__DOUBLE((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 460 } 461 462 /** 463 * A marshaller for a GCClosure with a callback of type 464 * void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data). 465 * Params: 466 * closure = the GClosure to which the marshaller belongs 467 * returnValue = ignored 468 * paramValues = a GValue array holding the instance and the gchar* parameter 469 * invocationHint = the invocation hint given as the last argument 470 * to g_closure_invoke() 471 * marshalData = additional data specified when registering the marshaller 472 */ 473 public static void marshalVOID__STRING(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 474 { 475 // void g_cclosure_marshal_VOID__STRING (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 476 g_cclosure_marshal_VOID__STRING((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 477 } 478 479 /** 480 * A marshaller for a GCClosure with a callback of type 481 * void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data). 482 * Params: 483 * closure = the GClosure to which the marshaller belongs 484 * returnValue = ignored 485 * paramValues = a GValue array holding the instance and the GParamSpec* parameter 486 * invocationHint = the invocation hint given as the last argument 487 * to g_closure_invoke() 488 * marshalData = additional data specified when registering the marshaller 489 */ 490 public static void marshalVOID__PARAM(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 491 { 492 // void g_cclosure_marshal_VOID__PARAM (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 493 g_cclosure_marshal_VOID__PARAM((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 494 } 495 496 /** 497 * A marshaller for a GCClosure with a callback of type 498 * void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data). 499 * Params: 500 * closure = the GClosure to which the marshaller belongs 501 * returnValue = ignored 502 * paramValues = a GValue array holding the instance and the GBoxed* parameter 503 * invocationHint = the invocation hint given as the last argument 504 * to g_closure_invoke() 505 * marshalData = additional data specified when registering the marshaller 506 */ 507 public static void marshalVOID__BOXED(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 508 { 509 // void g_cclosure_marshal_VOID__BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 510 g_cclosure_marshal_VOID__BOXED((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 511 } 512 513 /** 514 * A marshaller for a GCClosure with a callback of type 515 * void (*callback) (gpointer instance, gpointer arg1, gpointer user_data). 516 * Params: 517 * closure = the GClosure to which the marshaller belongs 518 * returnValue = ignored 519 * paramValues = a GValue array holding the instance and the gpointer parameter 520 * invocationHint = the invocation hint given as the last argument 521 * to g_closure_invoke() 522 * marshalData = additional data specified when registering the marshaller 523 */ 524 public static void marshalVOID__POINTER(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 525 { 526 // void g_cclosure_marshal_VOID__POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 527 g_cclosure_marshal_VOID__POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 528 } 529 530 /** 531 * A marshaller for a GCClosure with a callback of type 532 * void (*callback) (gpointer instance, GObject *arg1, gpointer user_data). 533 * Params: 534 * closure = the GClosure to which the marshaller belongs 535 * returnValue = ignored 536 * paramValues = a GValue array holding the instance and the GObject* parameter 537 * invocationHint = the invocation hint given as the last argument 538 * to g_closure_invoke() 539 * marshalData = additional data specified when registering the marshaller 540 */ 541 public static void marshalVOID__OBJECT(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 542 { 543 // void g_cclosure_marshal_VOID__OBJECT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 544 g_cclosure_marshal_VOID__OBJECT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 545 } 546 547 /** 548 * A marshaller for a GCClosure with a callback of type 549 * void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data). 550 * Since 2.26 551 * Params: 552 * closure = the GClosure to which the marshaller belongs 553 * returnValue = ignored 554 * paramValues = a GValue array holding the instance and the GVariant* parameter 555 * invocationHint = the invocation hint given as the last argument 556 * to g_closure_invoke() 557 * marshalData = additional data specified when registering the marshaller 558 */ 559 public static void marshalVOID__VARIANT(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 560 { 561 // void g_cclosure_marshal_VOID__VARIANT (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 562 g_cclosure_marshal_VOID__VARIANT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 563 } 564 565 /** 566 * A marshaller for a GCClosure with a callback of type 567 * gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data). 568 * Params: 569 * closure = the GClosure to which the marshaller belongs 570 * returnValue = a GValue, which can store the returned string 571 * paramValues = a GValue array holding instance, arg1 and arg2 572 * invocationHint = the invocation hint given as the last argument 573 * to g_closure_invoke() 574 * marshalData = additional data specified when registering the marshaller 575 */ 576 public static void marshalSTRING__OBJECT_POINTER(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 577 { 578 // void g_cclosure_marshal_STRING__OBJECT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 579 g_cclosure_marshal_STRING__OBJECT_POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 580 } 581 582 /** 583 * A marshaller for a GCClosure with a callback of type 584 * void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data). 585 * Params: 586 * closure = the GClosure to which the marshaller belongs 587 * returnValue = ignored 588 * paramValues = a GValue array holding instance, arg1 and arg2 589 * invocationHint = the invocation hint given as the last argument 590 * to g_closure_invoke() 591 * marshalData = additional data specified when registering the marshaller 592 */ 593 public static void marshalVOID__UINT_POINTER(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 594 { 595 // void g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 596 g_cclosure_marshal_VOID__UINT_POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 597 } 598 599 /** 600 * A marshaller for a GCClosure with a callback of type 601 * gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data) where the gint parameter 602 * denotes a flags type. 603 * Params: 604 * closure = the GClosure to which the marshaller belongs 605 * returnValue = a GValue which can store the returned gboolean 606 * paramValues = a GValue array holding instance and arg1 607 * invocationHint = the invocation hint given as the last argument 608 * to g_closure_invoke() 609 * marshalData = additional data specified when registering the marshaller 610 */ 611 public static void marshalBOOLEAN__FLAGS(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 612 { 613 // void g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 614 g_cclosure_marshal_BOOLEAN__FLAGS((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 615 } 616 617 /** 618 */ 619 public static void marshalBOOLEAN__BOXED_BOXED(Closure closure, Value returnValue, GValue[] paramValues, void* invocationHint, void* marshalData) 620 { 621 // void g_cclosure_marshal_BOOLEAN__BOXED_BOXED (GClosure *closure, GValue *return_value, guint n_param_values, const GValue *param_values, gpointer invocation_hint, gpointer marshal_data); 622 g_cclosure_marshal_BOOLEAN__BOXED_BOXED((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), cast(int) paramValues.length, paramValues.ptr, invocationHint, marshalData); 623 } 624 625 /** 626 */ 627 public static void marshalGenericVa(Closure closure, Value returnValue, void* instanc, void* argsList, void* marshalData, GType[] paramTypes) 628 { 629 // void g_cclosure_marshal_generic_va (GClosure *closure, GValue *return_value, gpointer instance, va_list args_list, gpointer marshal_data, int n_params, GType *param_types); 630 g_cclosure_marshal_generic_va((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, argsList, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 631 } 632 633 /** 634 */ 635 public static void marshalVOID__VOIDv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 636 { 637 // void g_cclosure_marshal_VOID__VOIDv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 638 g_cclosure_marshal_VOID__VOIDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 639 } 640 641 /** 642 */ 643 public static void marshalVOID__BOOLEANv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 644 { 645 // void g_cclosure_marshal_VOID__BOOLEANv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 646 g_cclosure_marshal_VOID__BOOLEANv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 647 } 648 649 /** 650 */ 651 public static void marshalVOID__CHARv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 652 { 653 // void g_cclosure_marshal_VOID__CHARv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 654 g_cclosure_marshal_VOID__CHARv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 655 } 656 657 /** 658 */ 659 public static void marshalVOID__UCHARv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 660 { 661 // void g_cclosure_marshal_VOID__UCHARv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 662 g_cclosure_marshal_VOID__UCHARv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 663 } 664 665 /** 666 */ 667 public static void marshalVOID__INTv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 668 { 669 // void g_cclosure_marshal_VOID__INTv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 670 g_cclosure_marshal_VOID__INTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 671 } 672 673 /** 674 */ 675 public static void marshalVOID__UINTv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 676 { 677 // void g_cclosure_marshal_VOID__UINTv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 678 g_cclosure_marshal_VOID__UINTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 679 } 680 681 /** 682 */ 683 public static void marshalVOID__LONGv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 684 { 685 // void g_cclosure_marshal_VOID__LONGv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 686 g_cclosure_marshal_VOID__LONGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 687 } 688 689 /** 690 */ 691 public static void marshalVOID__ULONGv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 692 { 693 // void g_cclosure_marshal_VOID__ULONGv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 694 g_cclosure_marshal_VOID__ULONGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 695 } 696 697 /** 698 */ 699 public static void marshalVOID__ENUMv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 700 { 701 // void g_cclosure_marshal_VOID__ENUMv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 702 g_cclosure_marshal_VOID__ENUMv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 703 } 704 705 /** 706 */ 707 public static void marshalVOID__FLAGSv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 708 { 709 // void g_cclosure_marshal_VOID__FLAGSv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 710 g_cclosure_marshal_VOID__FLAGSv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 711 } 712 713 /** 714 */ 715 public static void marshalVOID__FLOATv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 716 { 717 // void g_cclosure_marshal_VOID__FLOATv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 718 g_cclosure_marshal_VOID__FLOATv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 719 } 720 721 /** 722 */ 723 public static void marshalVOID__DOUBLEv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 724 { 725 // void g_cclosure_marshal_VOID__DOUBLEv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 726 g_cclosure_marshal_VOID__DOUBLEv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 727 } 728 729 /** 730 */ 731 public static void marshalVOID__STRINGv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 732 { 733 // void g_cclosure_marshal_VOID__STRINGv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 734 g_cclosure_marshal_VOID__STRINGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 735 } 736 737 /** 738 */ 739 public static void marshalVOID__PARAMv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 740 { 741 // void g_cclosure_marshal_VOID__PARAMv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 742 g_cclosure_marshal_VOID__PARAMv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 743 } 744 745 /** 746 */ 747 public static void marshalVOID__BOXEDv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 748 { 749 // void g_cclosure_marshal_VOID__BOXEDv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 750 g_cclosure_marshal_VOID__BOXEDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 751 } 752 753 /** 754 */ 755 public static void marshalVOID__POINTERv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 756 { 757 // void g_cclosure_marshal_VOID__POINTERv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 758 g_cclosure_marshal_VOID__POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 759 } 760 761 /** 762 */ 763 public static void marshalVOID__OBJECTv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 764 { 765 // void g_cclosure_marshal_VOID__OBJECTv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 766 g_cclosure_marshal_VOID__OBJECTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 767 } 768 769 /** 770 */ 771 public static void marshalVOID__VARIANTv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 772 { 773 // void g_cclosure_marshal_VOID__VARIANTv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 774 g_cclosure_marshal_VOID__VARIANTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 775 } 776 777 /** 778 */ 779 public static void marshalSTRING__OBJECT_POINTERv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 780 { 781 // void g_cclosure_marshal_STRING__OBJECT_POINTERv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 782 g_cclosure_marshal_STRING__OBJECT_POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 783 } 784 785 /** 786 */ 787 public static void marshalVOID__UINT_POINTERv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 788 { 789 // void g_cclosure_marshal_VOID__UINT_POINTERv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 790 g_cclosure_marshal_VOID__UINT_POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 791 } 792 793 /** 794 */ 795 public static void marshalBOOLEAN__FLAGSv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) 796 { 797 // void g_cclosure_marshal_BOOLEAN__FLAGSv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 798 g_cclosure_marshal_BOOLEAN__FLAGSv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, nParams, paramTypes); 799 } 800 801 /** 802 */ 803 public static void marshalBOOLEAN__BOXED_BOXEDv(Closure closure, Value returnValue, void* instanc, void* args, void* marshalData, GType[] paramTypes) 804 { 805 // void g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv (GClosure *closure, GValue *return_value, gpointer instance, va_list args, gpointer marshal_data, int n_params, GType *param_types); 806 g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), instanc, args, marshalData, cast(int) paramTypes.length, paramTypes.ptr); 807 } 808 }