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 = gtk 28 * outFile = WidgetClass 29 * strct = GtkWidgetClass 30 * realStrct= 31 * ctorStrct= 32 * clss = WidgetClass 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_widget_class_ 41 * omit structs: 42 * omit prefixes: 43 * omit code: 44 * omit signals: 45 * - accel-closures-changed 46 * - button-press-event 47 * - button-release-event 48 * - can-activate-accel 49 * - child-notify 50 * - composited-changed 51 * - configure-event 52 * - damage-event 53 * - delete-event 54 * - destroy 55 * - destroy-event 56 * - direction-changed 57 * - drag-begin 58 * - drag-data-delete 59 * - drag-data-get 60 * - drag-data-received 61 * - drag-drop 62 * - drag-end 63 * - drag-failed 64 * - drag-leave 65 * - drag-motion 66 * - draw 67 * - enter-notify-event 68 * - event 69 * - event-after 70 * - focus 71 * - focus-in-event 72 * - focus-out-event 73 * - grab-broken-event 74 * - grab-focus 75 * - grab-notify 76 * - hide 77 * - hierarchy-changed 78 * - key-press-event 79 * - key-release-event 80 * - keynav-failed 81 * - leave-notify-event 82 * - map 83 * - map-event 84 * - mnemonic-activate 85 * - motion-notify-event 86 * - move-focus 87 * - parent-set 88 * - popup-menu 89 * - property-notify-event 90 * - proximity-in-event 91 * - proximity-out-event 92 * - query-tooltip 93 * - realize 94 * - screen-changed 95 * - scroll-event 96 * - selection-clear-event 97 * - selection-get 98 * - selection-notify-event 99 * - selection-received 100 * - selection-request-event 101 * - show 102 * - show-help 103 * - size-allocate 104 * - state-changed 105 * - state-flags-changed 106 * - style-set 107 * - style-updated 108 * - unmap 109 * - unmap-event 110 * - unrealize 111 * - visibility-notify-event 112 * - window-state-event 113 * - touch-event 114 * imports: 115 * - glib.Str 116 * - glib.Bytes 117 * - gobject.ParamSpec 118 * - gtk.Widget 119 * structWrap: 120 * - GBytes* -> Bytes 121 * - GParamSpec* -> ParamSpec 122 * - GtkWidget* -> Widget 123 * module aliases: 124 * local aliases: 125 * overrides: 126 */ 127 128 module gtk.WidgetClass; 129 130 public import gtkc.gtktypes; 131 132 private import gtkc.gtk; 133 private import glib.ConstructionException; 134 private import gobject.ObjectG; 135 136 private import gobject.Signals; 137 public import gtkc.gdktypes; 138 139 private import glib.Str; 140 private import glib.Bytes; 141 private import gobject.ParamSpec; 142 private import gtk.Widget; 143 144 145 146 147 /** 148 * GtkWidget is the base class all widgets in GTK+ derive from. It manages the 149 * widget lifecycle, states and style. 150 * 151 * Height-for-width Geometry Management 152 * 153 * GTK+ uses a height-for-width (and width-for-height) geometry management 154 * system. Height-for-width means that a widget can change how much 155 * vertical space it needs, depending on the amount of horizontal space 156 * that it is given (and similar for width-for-height). The most common 157 * example is a label that reflows to fill up the available width, wraps 158 * to fewer lines, and therefore needs less height. 159 * 160 * Height-for-width geometry management is implemented in GTK+ by way 161 * of five virtual methods: 162 * 163 * GtkWidgetClass.get_request_mode() 164 * GtkWidgetClass.get_preferred_width() 165 * GtkWidgetClass.get_preferred_height() 166 * GtkWidgetClass.get_preferred_height_for_width() 167 * GtkWidgetClass.get_preferred_width_for_height() 168 * GtkWidgetClass.get_preferred_height_and_baseline_for_width() 169 * 170 * There are some important things to keep in mind when implementing 171 * height-for-width and when using it in container implementations. 172 * 173 * The geometry management system will query a widget hierarchy in 174 * only one orientation at a time. When widgets are initially queried 175 * for their minimum sizes it is generally done in two initial passes 176 * in the GtkSizeRequestMode chosen by the toplevel. 177 * 178 * For example, when queried in the normal 179 * GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH mode: 180 * First, the default minimum and natural width for each widget 181 * in the interface will be computed using gtk_widget_get_preferred_width(). 182 * Because the preferred widths for each container depend on the preferred 183 * widths of their children, this information propagates up the hierarchy, 184 * and finally a minimum and natural width is determined for the entire 185 * toplevel. Next, the toplevel will use the minimum width to query for the 186 * minimum height contextual to that width using 187 * gtk_widget_get_preferred_height_for_width(), which will also be a highly 188 * recursive operation. The minimum height for the minimum width is normally 189 * used to set the minimum size constraint on the toplevel 190 * (unless gtk_window_set_geometry_hints() is explicitly used instead). 191 * 192 * After the toplevel window has initially requested its size in both 193 * dimensions it can go on to allocate itself a reasonable size (or a size 194 * previously specified with gtk_window_set_default_size()). During the 195 * recursive allocation process it's important to note that request cycles 196 * will be recursively executed while container widgets allocate their children. 197 * Each container widget, once allocated a size, will go on to first share the 198 * space in one orientation among its children and then request each child's 199 * height for its target allocated width or its width for allocated height, 200 * depending. In this way a GtkWidget will typically be requested its size 201 * a number of times before actually being allocated a size. The size a 202 * widget is finally allocated can of course differ from the size it has 203 * requested. For this reason, GtkWidget caches a small number of results 204 * to avoid re-querying for the same sizes in one allocation cycle. 205 * 206 * See GtkContainer's 207 * geometry management section 208 * to learn more about how height-for-width allocations are performed 209 * by container widgets. 210 * 211 * If a widget does move content around to intelligently use up the 212 * allocated size then it must support the request in both 213 * GtkSizeRequestModes even if the widget in question only 214 * trades sizes in a single orientation. 215 * 216 * For instance, a GtkLabel that does height-for-width word wrapping 217 * will not expect to have GtkWidgetClass.get_preferred_height() called 218 * because that call is specific to a width-for-height request. In this 219 * case the label must return the height required for its own minimum 220 * possible width. By following this rule any widget that handles 221 * height-for-width or width-for-height requests will always be allocated 222 * at least enough space to fit its own content. 223 * 224 * Here are some examples of how a GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH widget 225 * generally deals with width-for-height requests, for GtkWidgetClass.get_preferred_height() 226 * it will do: 227 * 228 * static void 229 * foo_widget_get_preferred_height (GtkWidget *widget, gint *min_height, gint *nat_height) 230 * { 231 * if (i_am_in_height_for_width_mode) 232 * { 233 * gint min_width; 234 * 235 * GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, min_width, NULL); 236 * GTK_WIDGET_GET_CLASS (widget)->get_preferred_height_for_width (widget, min_width, 237 * min_height, nat_height); 238 * } 239 * else 240 * { 241 * ... some widgets do both. For instance, if a GtkLabel is rotated to 90 degrees 242 * it will return the minimum and natural height for the rotated label here. 243 * } 244 * } 245 * 246 * And in GtkWidgetClass.get_preferred_width_for_height() it will simply return 247 * the minimum and natural width: 248 * 249 * static void 250 * foo_widget_get_preferred_width_for_height (GtkWidget *widget, gint for_height, 251 * gint *min_width, gint *nat_width) 252 * { 253 * if (i_am_in_height_for_width_mode) 254 * { 255 * GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, min_width, nat_width); 256 * } 257 * else 258 * { 259 * ... again if a widget is sometimes operating in width-for-height mode 260 * (like a rotated GtkLabel) it can go ahead and do its real width for 261 * height calculation here. 262 * } 263 * } 264 * 265 * Often a widget needs to get its own request during size request or 266 * allocation. For example, when computing height it may need to also 267 * compute width. Or when deciding how to use an allocation, the widget 268 * may need to know its natural size. In these cases, the widget should 269 * be careful to call its virtual methods directly, like this: 270 * 271 * $(DDOC_COMMENT example) 272 * 273 * It will not work to use the wrapper functions, such as 274 * gtk_widget_get_preferred_width() inside your own size request 275 * implementation. These return a request adjusted by GtkSizeGroup 276 * and by the GtkWidgetClass.adjust_size_request() virtual method. If a 277 * widget used the wrappers inside its virtual method implementations, 278 * then the adjustments (such as widget margins) would be applied 279 * twice. GTK+ therefore does not allow this and will warn if you try 280 * to do it. 281 * 282 * Of course if you are getting the size request for 283 * another widget, such as a child of a 284 * container, you must use the wrapper APIs. 285 * Otherwise, you would not properly consider widget margins, 286 * GtkSizeGroup, and so forth. 287 * 288 * Since 3.10 Gtk+ also supports baseline vertical alignment of widgets. This 289 * means that widgets are positioned such that the typographical baseline of 290 * widgets in the same row are aligned. This happens if a widget supports baselines, 291 * has a vertical alignment of GTK_ALIGN_BASELINE, and is inside a container 292 * that supports baselines and has a natural "row" that it aligns to the baseline, 293 * or a baseline assigned to it by the grandparent. 294 * 295 * Baseline alignment support for a widget is done by the GtkWidgetClass.get_preferred_height_and_baseline_for_width() 296 * virtual function. It allows you to report a baseline in combination with the 297 * minimum and natural height. If there is no baseline you can return -1 to indicate 298 * this. The default implementation of this virtual function calls into the 299 * GtkWidgetClass.get_preferred_height() and GtkWidgetClass.get_preferred_height_for_width(), 300 * so if baselines are not supported it doesn't need to be implemented. 301 * 302 * If a widget ends up baseline aligned it will be allocated all the space in the parent 303 * as if it was GTK_ALIGN_FILL, but the selected baseline can be found via gtk_widget_get_allocated_baseline(). 304 * If this has a value other than -1 you need to align the widget such that the baseline 305 * appears at the position. 306 * 307 * <hr> 308 * 309 * Style Properties 310 * 311 * GtkWidget introduces style 312 * properties - these are basically object properties that are stored 313 * not on the object, but in the style object associated to the widget. Style 314 * properties are set in resource files. 315 * This mechanism is used for configuring such things as the location of the 316 * scrollbar arrows through the theme, giving theme authors more control over the 317 * look of applications without the need to write a theme engine in C. 318 * 319 * Use gtk_widget_class_install_style_property() to install style properties for 320 * a widget class, gtk_widget_class_find_style_property() or 321 * gtk_widget_class_list_style_properties() to get information about existing 322 * style properties and gtk_widget_style_get_property(), gtk_widget_style_get() or 323 * gtk_widget_style_get_valist() to obtain the value of a style property. 324 * 325 * <hr> 326 * 327 * GtkWidget as GtkBuildable 328 * 329 * The GtkWidget implementation of the GtkBuildable interface supports a 330 * custom <accelerator> element, which has attributes named key, 331 * modifiers and signal and allows to specify accelerators. 332 * 333 * $(DDOC_COMMENT example) 334 * 335 * In addition to accelerators, GtkWidget also support a 336 * custom <accessible> element, which supports actions and relations. 337 * Properties on the accessible implementation of an object can be set by accessing the 338 * internal child "accessible" of a GtkWidget. 339 * 340 * $(DDOC_COMMENT example) 341 * 342 * Finally, GtkWidget allows style information such as style classes to 343 * be associated with widgets, using the custom <style> element: 344 * 345 * $(DDOC_COMMENT example) 346 * 347 * <hr> 348 * 349 * Building composite widgets from template XML 350 * 351 * GtkWidget exposes some facilities to automate the proceedure 352 * of creating composite widgets using GtkBuilder interface description 353 * language. 354 * 355 * To create composite widgets with GtkBuilder XML, one must associate 356 * the interface description with the widget class at class initialization 357 * time using gtk_widget_class_set_template(). 358 * 359 * The interface description semantics expected in composite template descriptions 360 * is slightly different from regulare GtkBuilder XML. 361 * 362 * Unlike regular interface descriptions, gtk_widget_class_set_template() will expect a 363 * <template> tag as a direct child of the toplevel <interface> 364 * tag. The <template> tag must specify the "class" attribute which 365 * must be the type name of the widget. Optionally, the "parent" attribute 366 * may be specified to specify the direct parent type of the widget type, this 367 * is ignored by the GtkBuilder but required for Glade to introspect what kind 368 * of properties and internal children exist for a given type when the actual 369 * type does not exist. 370 * 371 * The XML which is contained inside the <template> tag behaves as if 372 * it were added to the <object> tag defining widget itself. You may set 373 * properties on widget by inserting <property> tags into the <template> 374 * tag, and also add <child> tags to add children and extend widget in the 375 * normal way you would with <object> tags. 376 * 377 * Additionally, <object> tags can also be added before and 378 * after the initial <template> tag in the normal way, allowing 379 * one to define auxilary objects which might be referenced by other 380 * widgets declared as children of the <template> tag. 381 * 382 * $(DDOC_COMMENT example) 383 */ 384 public class WidgetClass 385 { 386 387 /** the main Gtk struct */ 388 protected GtkWidgetClass* gtkWidgetClass; 389 390 391 public GtkWidgetClass* getWidgetClassStruct() 392 { 393 return gtkWidgetClass; 394 } 395 396 397 /** the main Gtk struct as a void* */ 398 protected void* getStruct() 399 { 400 return cast(void*)gtkWidgetClass; 401 } 402 403 /** 404 * Sets our main struct and passes it to the parent class 405 */ 406 public this (GtkWidgetClass* gtkWidgetClass) 407 { 408 this.gtkWidgetClass = gtkWidgetClass; 409 } 410 411 /** 412 */ 413 414 /** 415 * Warning 416 * gtk_widget_class_path has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_get_path() instead 417 * Same as gtk_widget_path(), but always uses the name of a widget's type, 418 * never uses a custom name set with gtk_widget_set_name(). 419 * Params: 420 * widget = a GtkWidget 421 * pathLength = location to store the length of the 422 * class path, or NULL. [out][allow-none] 423 * path = location to store the class path as an 424 * allocated string, or NULL. [out][allow-none] 425 * pathReversed = location to store the reverse 426 * class path as an allocated string, or NULL. [out][allow-none] 427 */ 428 public static void path(Widget widget, out uint pathLength, out string path, out string pathReversed) 429 { 430 // void gtk_widget_class_path (GtkWidget *widget, guint *path_length, gchar **path, gchar **path_reversed); 431 char* outpath = null; 432 char* outpathReversed = null; 433 434 gtk_widget_class_path((widget is null) ? null : widget.getWidgetStruct(), &pathLength, &outpath, &outpathReversed); 435 436 path = Str.toString(outpath); 437 pathReversed = Str.toString(outpathReversed); 438 } 439 440 /** 441 * Installs a style property on a widget class. The parser for the 442 * style property is determined by the value type of pspec. 443 * Params: 444 * pspec = the GParamSpec for the property 445 */ 446 public void installStyleProperty(ParamSpec pspec) 447 { 448 // void gtk_widget_class_install_style_property (GtkWidgetClass *klass, GParamSpec *pspec); 449 gtk_widget_class_install_style_property(gtkWidgetClass, (pspec is null) ? null : pspec.getParamSpecStruct()); 450 } 451 452 /** 453 * Installs a style property on a widget class. 454 * Params: 455 * pspec = the GParamSpec for the style property 456 * parser = the parser for the style property 457 */ 458 public void installStylePropertyParser(ParamSpec pspec, GtkRcPropertyParser parser) 459 { 460 // void gtk_widget_class_install_style_property_parser (GtkWidgetClass *klass, GParamSpec *pspec, GtkRcPropertyParser parser); 461 gtk_widget_class_install_style_property_parser(gtkWidgetClass, (pspec is null) ? null : pspec.getParamSpecStruct(), parser); 462 } 463 464 /** 465 * Finds a style property of a widget class by name. 466 * Since 2.2 467 * Params: 468 * propertyName = the name of the style property to find 469 * Returns: the GParamSpec of the style property or NULL if class has no style property with that name. [transfer none] 470 */ 471 public ParamSpec findStyleProperty(string propertyName) 472 { 473 // GParamSpec * gtk_widget_class_find_style_property (GtkWidgetClass *klass, const gchar *property_name); 474 auto p = gtk_widget_class_find_style_property(gtkWidgetClass, Str.toStringz(propertyName)); 475 476 if(p is null) 477 { 478 return null; 479 } 480 481 return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); 482 } 483 484 /** 485 * Returns all style properties of a widget class. 486 * Since 2.2 487 * Returns: a newly allocated array of GParamSpec*. The array must be freed with g_free(). [array length=n_properties][transfer container] 488 */ 489 public ParamSpec[] listStyleProperties() 490 { 491 // GParamSpec ** gtk_widget_class_list_style_properties (GtkWidgetClass *klass, guint *n_properties); 492 uint nProperties; 493 auto p = gtk_widget_class_list_style_properties(gtkWidgetClass, &nProperties); 494 495 if(p is null) 496 { 497 return null; 498 } 499 500 ParamSpec[] arr = new ParamSpec[nProperties]; 501 for(int i = 0; i < nProperties; i++) 502 { 503 arr[i] = ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p[i]); 504 } 505 506 return arr; 507 } 508 509 /** 510 * Sets the type to be used for creating accessibles for widgets of 511 * widget_class. The given type must be a subtype of the type used for 512 * accessibles of the parent class. 513 * This function should only be called from class init functions of widgets. 514 * Params: 515 * type = The object type that implements the accessible for widget_class 516 * Since 3.2 517 */ 518 public void setAccessibleType(GType type) 519 { 520 // void gtk_widget_class_set_accessible_type (GtkWidgetClass *widget_class, GType type); 521 gtk_widget_class_set_accessible_type(gtkWidgetClass, type); 522 } 523 524 /** 525 * Sets the default AtkRole to be set on accessibles created for 526 * widgets of widget_class. Accessibles may decide to not honor this 527 * setting if their role reporting is more refined. Calls to 528 * gtk_widget_class_set_accessible_type() will reset this value. 529 * In cases where you want more fine-grained control over the role of 530 * accessibles created for widget_class, you should provide your own 531 * accessible type and use gtk_widget_class_set_accessible_type() 532 * instead. 533 * If role is ATK_ROLE_INVALID, the default role will not be changed 534 * and the accessible's default role will be used instead. 535 * This function should only be called from class init functions of widgets. 536 * Params: 537 * role = The role to use for accessibles created for widget_class 538 * Since 3.2 539 */ 540 public void setAccessibleRole(AtkRole role) 541 { 542 // void gtk_widget_class_set_accessible_role (GtkWidgetClass *widget_class, AtkRole role); 543 gtk_widget_class_set_accessible_role(gtkWidgetClass, role); 544 } 545 546 /** 547 * This should be called at class initialization time to specify 548 * the GtkBuilder XML to be used to extend a widget. 549 * For convenience, gtk_widget_class_set_template_from_resource() is also provided. 550 * Note 551 * Any class that installs templates must call gtk_widget_init_template() 552 * in the widget's instance initializer 553 * Params: 554 * templateBytes = A GBytes holding the GtkBuilder XML 555 * Since 3.10 556 */ 557 public void setTemplate(Bytes templateBytes) 558 { 559 // void gtk_widget_class_set_template (GtkWidgetClass *widget_class, GBytes *template_bytes); 560 gtk_widget_class_set_template(gtkWidgetClass, (templateBytes is null) ? null : templateBytes.getBytesStruct()); 561 } 562 563 /** 564 * A convenience function to call gtk_widget_class_set_template(). 565 * Note 566 * Any class that installs templates must call gtk_widget_init_template() 567 * in the widget's instance initializer 568 * Params: 569 * resourceName = The name of the resource to load the template from 570 * Since 3.10 571 */ 572 public void setTemplateFromResource(string resourceName) 573 { 574 // void gtk_widget_class_set_template_from_resource (GtkWidgetClass *widget_class, const gchar *resource_name); 575 gtk_widget_class_set_template_from_resource(gtkWidgetClass, Str.toStringz(resourceName)); 576 } 577 578 /** 579 * Automatically assign an object declared in the class template XML to be set to a location 580 * on a freshly built instance's private data, or alternatively accessible via gtk_widget_get_automated_child(). 581 * The struct can point either into the public instance, then you should use G_STRUCT_OFFSET(WidgetType, member) 582 * for struct_offset, or in the private struct, then you should use G_PRIVATE_OFFSET(WidgetType, member). 583 * An explicit strong reference will be held automatically for the duration of your 584 * instance's life cycle, it will be released automatically when GObjectClass.dispose() runs 585 * on your instance and if a struct_offset that is >= 0 is specified, then the automatic location 586 * in your instance private data will be set to NULL. You can however access an automated child 587 * pointer the first time your classes GObjectClass.dispose() runs, or alternatively in 588 * GtkWidgetClass.destroy(). 589 * If internal_child is specified, GtkBuildableIface.get_internal_child() will be automatically 590 * implemented by the GtkWidget class so there is no need to implement it manually. 591 * The wrapper macros gtk_widget_class_bind_template_child(), gtk_widget_class_bind_template_child_internal(), 592 * gtk_widget_class_bind_template_child_private() and gtk_widget_class_bind_private_template_child_internal() 593 * might be more convenient to use. 594 * Note 595 * This must be called from a composite widget classes class 596 * initializer after calling gtk_widget_class_set_template() 597 * Params: 598 * name = The "id" of the child defined in the template XML 599 * internalChild = Whether the child should be accessible as an "internal-child" 600 * when this class is used in GtkBuilder XML 601 * structOffset = The structure offset into the composite widget's instance public or private structure 602 * where the automated child pointer should be set, or -1 to not assign the pointer. 603 * Since 3.10 604 */ 605 public void bindTemplateChildFull(string name, int internalChild, gssize structOffset) 606 { 607 // void gtk_widget_class_bind_template_child_full (GtkWidgetClass *widget_class, const gchar *name, gboolean internal_child, gssize struct_offset); 608 gtk_widget_class_bind_template_child_full(gtkWidgetClass, Str.toStringz(name), internalChild, structOffset); 609 } 610 611 /** 612 * Declares a callback_symbol to handle callback_name from the template XML 613 * defined for widget_type. See gtk_builder_add_callback_symbol(). 614 * Note 615 * This must be called from a composite widget classes class 616 * initializer after calling gtk_widget_class_set_template() 617 * Params: 618 * callbackName = The name of the callback as expected in the template XML 619 * callbackSymbol = The callback symbol. [scope async] 620 * Since 3.10 621 */ 622 public void bindTemplateCallbackFull(string callbackName, GCallback callbackSymbol) 623 { 624 // void gtk_widget_class_bind_template_callback_full (GtkWidgetClass *widget_class, const gchar *callback_name, GCallback callback_symbol); 625 gtk_widget_class_bind_template_callback_full(gtkWidgetClass, Str.toStringz(callbackName), callbackSymbol); 626 } 627 628 /** 629 * For use in lanuage bindings, this will override the default GtkBuilderConnectFunc to be 630 * used when parsing GtkBuilder xml from this class's template data. 631 * Note 632 * This must be called from a composite widget classes class 633 * initializer after calling gtk_widget_class_set_template() 634 * Params: 635 * connectFunc = The GtkBuilderConnectFunc to use when connecting signals in the class template 636 * connectData = The data to pass to connect_func 637 * connectDataDestroy = The GDestroyNotify to free connect_data, this will only be used at 638 * class finalization time, when no classes of type widget_type are in use anymore. 639 * Since 3.10 640 */ 641 public void setConnectFunc(GtkBuilderConnectFunc connectFunc, void* connectData, GDestroyNotify connectDataDestroy) 642 { 643 // void gtk_widget_class_set_connect_func (GtkWidgetClass *widget_class, GtkBuilderConnectFunc connect_func, gpointer connect_data, GDestroyNotify connect_data_destroy); 644 gtk_widget_class_set_connect_func(gtkWidgetClass, connectFunc, connectData, connectDataDestroy); 645 } 646 }