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