1 /* 2 * GNT - The GLib Ncurses Toolkit 3 * 4 * GNT is the legal property of its developers, whose names are too numerous 5 * to list here. Please refer to the COPYRIGHT file distributed with this 6 * source distribution. 7 * 8 * This library is free software; you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA 21 */ 22 23 #ifndef GNT_WIDGET_H 24 #define GNT_WIDGET_H 25 /** 26 * SECTION:gntwidget 27 * @section_id: libgnt-gntwidget 28 * @title: GntWidget 29 * @short_description: A general widget 30 */ 31 32 #include <stdio.h> 33 #include <glib.h> 34 #include <ncurses.h> 35 36 #ifndef GNTSEAL 37 # if defined(GNTSEAL_ENABLE) 38 # define GNTSEAL(ident) _gnt_sealed__ ## ident 39 # else 40 # define GNTSEAL(ident) ident 41 # endif 42 #endif /* !GNTSEAL */ 43 44 #include "gntbindable.h" 45 46 #define GNT_TYPE_WIDGET (gnt_widget_get_gtype()) 47 #define GNT_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WIDGET, GntWidget)) 48 #define GNT_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WIDGET, GntWidgetClass)) 49 #define GNT_IS_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WIDGET)) 50 #define GNT_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WIDGET)) 51 #define GNT_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WIDGET, GntWidgetClass)) 52 53 #ifndef GNT_DISABLE_DEPRECATED 54 /** 55 * GNT_WIDGET_FLAGS: 56 * Deprecated: 2.14.0: See #GntWidgetFlags for individual accessors instead. 57 */ 58 #define GNT_WIDGET_FLAGS(obj) (GNT_WIDGET(obj)->priv.flags) 59 /** 60 * GNT_WIDGET_SET_FLAGS: 61 * Deprecated: 2.14.0: See #GntWidgetFlags for individual accessors instead. 62 */ 63 #define GNT_WIDGET_SET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) |= flags) 64 /** 65 * GNT_WIDGET_UNSET_FLAGS: 66 * Deprecated: 2.14.0: See #GntWidgetFlags for individual accessors instead. 67 */ 68 #define GNT_WIDGET_UNSET_FLAGS(obj, flags) (GNT_WIDGET_FLAGS(obj) &= ~(flags)) 69 /** 70 * GNT_WIDGET_IS_FLAG_SET: 71 * Deprecated: 2.14.0: See #GntWidgetFlags for individual accessors instead. 72 */ 73 #define GNT_WIDGET_IS_FLAG_SET(obj, flags) (GNT_WIDGET_FLAGS(obj) & (flags)) 74 #endif 75 76 typedef struct _GntWidget GntWidget; 77 #ifndef GNT_DISABLE_DEPRECATED 78 typedef struct _GntWidgetPriv GntWidgetPriv; 79 #endif 80 typedef struct _GntWidgetClass GntWidgetClass; 81 82 /** 83 * GntWidgetFlags: 84 * @GNT_WIDGET_DESTROYING: Deprecated. Use gnt_widget_in_destruction() instead. 85 * You may not set this flag directly. 86 * @GNT_WIDGET_CAN_TAKE_FOCUS: Deprecated. Use gnt_widget_set_take_focus() and 87 * gnt_widget_get_take_focus() instead. 88 * @GNT_WIDGET_MAPPED: Deprecated. Use gnt_widget_set_mapped() and 89 * gnt_widget_get_mapped() instead. 90 * @GNT_WIDGET_NO_BORDER: Deprecated. Use gnt_widget_set_has_border() and 91 * gnt_widget_get_has_border() instead. 92 * @GNT_WIDGET_NO_SHADOW: Deprecated. Use gnt_widget_set_has_shadow() and 93 * gnt_widget_get_has_shadow() instead. 94 * @GNT_WIDGET_HAS_FOCUS: Deprecated. Use gnt_widget_set_has_focus() and 95 * gnt_widget_get_has_focus() instead. 96 * @GNT_WIDGET_DRAWING: Deprecated. Use gnt_widget_set_drawing() and 97 * gnt_widget_get_drawing() instead. 98 * @GNT_WIDGET_URGENT: Deprecated. Use gnt_widget_set_is_urgent() and 99 * gnt_widget_get_is_urgent() instead. 100 * @GNT_WIDGET_GROW_X: Deprecated. Use gnt_widget_set_grow_x() and 101 * gnt_widget_get_grow_x() instead. 102 * @GNT_WIDGET_GROW_Y: Deprecated. Use gnt_widget_set_grow_y() and 103 * gnt_widget_get_grow_y() instead. 104 * @GNT_WIDGET_INVISIBLE: Deprecated. Use gnt_widget_set_visible() and 105 * gnt_widget_get_visible() instead. 106 * @GNT_WIDGET_TRANSIENT: Deprecated. Use gnt_widget_set_transient() and 107 * gnt_widget_get_transient() instead. 108 * @GNT_WIDGET_DISABLE_ACTIONS: Deprecated. Use 109 * gnt_widget_set_disable_actions() and 110 * gnt_widget_get_disable_actions() instead. 111 * 112 * Deprecated: 2.14.0: Use the individual accessor functions documented below 113 * instead. 114 */ 115 #ifndef GNT_DISABLE_DEPRECATED 116 typedef enum _GntWidgetFlags 117 { 118 GNT_WIDGET_DESTROYING = 1 << 0, 119 GNT_WIDGET_CAN_TAKE_FOCUS = 1 << 1, 120 GNT_WIDGET_MAPPED = 1 << 2, 121 /* XXX: Need to set the following two as properties, and setup a callback whenever these 122 * get chnaged. */ 123 GNT_WIDGET_NO_BORDER = 1 << 3, 124 GNT_WIDGET_NO_SHADOW = 1 << 4, 125 GNT_WIDGET_HAS_FOCUS = 1 << 5, 126 GNT_WIDGET_DRAWING = 1 << 6, 127 GNT_WIDGET_URGENT = 1 << 7, 128 GNT_WIDGET_GROW_X = 1 << 8, 129 GNT_WIDGET_GROW_Y = 1 << 9, 130 GNT_WIDGET_INVISIBLE = 1 << 10, 131 GNT_WIDGET_TRANSIENT = 1 << 11, 132 GNT_WIDGET_DISABLE_ACTIONS = 1 << 12, 133 } GntWidgetFlags; 134 #else 135 typedef enum _GntWidgetFlags 136 { 137 GNT_WIDGET_FLAGS_SEALED__DO_NOT_USE 138 } GntWidgetFlags; 139 #endif 140 141 /* XXX: This will probably move elsewhere */ 142 typedef enum _GntMouseEvent 143 { 144 GNT_LEFT_MOUSE_DOWN = 1, 145 GNT_RIGHT_MOUSE_DOWN, 146 GNT_MIDDLE_MOUSE_DOWN, 147 GNT_MOUSE_UP, 148 GNT_MOUSE_SCROLL_UP, 149 GNT_MOUSE_SCROLL_DOWN 150 } GntMouseEvent; 151 152 /* XXX: I'll have to ask grim what he's using this for in guifications. */ 153 typedef enum _GntParamFlags 154 { 155 GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT 156 } GntParamFlags; 157 158 /** 159 * GntWidgetPriv: 160 * 161 * Access to any fields is deprecated. See inline comments for replacements. 162 */ 163 struct _GntWidgetPriv 164 { 165 int GNTSEAL(x), GNTSEAL(y); 166 int GNTSEAL(width), GNTSEAL(height); 167 GntWidgetFlags GNTSEAL(flags); 168 char *GNTSEAL(name); 169 170 int GNTSEAL(minw), GNTSEAL(minh); /* Minimum size for the widget */ 171 }; 172 173 /** 174 * GntWidget: 175 * 176 * Access to any fields is deprecated. See inline comments for replacements. 177 */ 178 struct _GntWidget 179 { 180 GntBindable inherit; 181 182 GntWidget *GNTSEAL(parent); /* Deprecated. Use gnt_widget_get_parent. */ 183 184 struct _GntWidgetPriv GNTSEAL(priv); 185 WINDOW *GNTSEAL(window); 186 187 /*< private >*/ 188 void (*gnt_reserved1)(void); 189 void (*gnt_reserved2)(void); 190 void (*gnt_reserved3)(void); 191 void (*gnt_reserved4)(void); 192 }; 193 194 struct _GntWidgetClass 195 { 196 GntBindableClass parent; 197 198 void (*map)(GntWidget *obj); 199 void (*show)(GntWidget *obj); /* This will call draw() and take focus (if it can take focus) */ 200 void (*destroy)(GntWidget *obj); 201 void (*draw)(GntWidget *obj); /* This will draw the widget */ 202 void (*hide)(GntWidget *obj); 203 void (*expose)(GntWidget *widget, int x, int y, int width, int height); 204 void (*gained_focus)(GntWidget *widget); 205 void (*lost_focus)(GntWidget *widget); 206 207 void (*size_request)(GntWidget *widget); 208 gboolean (*confirm_size)(GntWidget *widget, int x, int y); 209 void (*size_changed)(GntWidget *widget, int w, int h); 210 void (*set_position)(GntWidget *widget, int x, int y); 211 gboolean (*key_pressed)(GntWidget *widget, const char *key); 212 void (*activate)(GntWidget *widget); 213 gboolean (*clicked)(GntWidget *widget, GntMouseEvent event, int x, int y); 214 215 /*< private >*/ 216 void (*gnt_reserved1)(void); 217 void (*gnt_reserved2)(void); 218 void (*gnt_reserved3)(void); 219 void (*gnt_reserved4)(void); 220 }; 221 222 G_BEGIN_DECLS 223 224 /** 225 * gnt_widget_get_gtype: 226 * 227 * Returns: GType for GntWidget. 228 */ 229 GType gnt_widget_get_gtype(void); 230 231 /** 232 * gnt_widget_destroy: 233 * @widget: The widget to destroy. 234 * 235 * Destroy a widget. 236 * 237 * Emits the "destroy" signal notifying all reference holders that they 238 * should release @widget. 239 */ 240 void gnt_widget_destroy(GntWidget *widget); 241 242 /** 243 * gnt_widget_show: 244 * @widget: The widget to show. 245 * 246 * Show a widget. This should only be used for toplevel widgets. For the rest 247 * of the widgets, use #gnt_widget_draw instead. 248 */ 249 void gnt_widget_show(GntWidget *widget); 250 251 /** 252 * gnt_widget_draw: 253 * @widget: The widget to draw. 254 * 255 * Draw a widget. 256 */ 257 void gnt_widget_draw(GntWidget *widget); 258 259 #ifndef GNT_DISABLE_DEPRECATED 260 /** 261 * gnt_widget_expose: 262 * 263 * Expose part of a widget. 264 * 265 * Internal function -- do not use. 266 * 267 * Deprecated: 2.14.0 268 */ 269 void gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height) G_GNUC_DEPRECATED; 270 #endif 271 272 /** 273 * gnt_widget_hide: 274 * @widget: The widget to hide. 275 * 276 * Hide a widget. 277 */ 278 void gnt_widget_hide(GntWidget *widget); 279 280 /** 281 * gnt_widget_get_parent: 282 * @widget: The widget. 283 * 284 * Get the parent of a widget. 285 * 286 * Returns: (transfer none) (nullable): The parent widget. 287 * 288 * Since: 2.14.0 289 */ 290 GntWidget *gnt_widget_get_parent(GntWidget *widget); 291 292 /** 293 * gnt_widget_get_toplevel: 294 * @widget: The widget. 295 * 296 * Get the toplevel parent of a widget in the container hierarchy. If widget 297 * has no parent widgets, it will be returned as the topmost widget. 298 * 299 * Returns: (transfer none) (nullable): The toplevel parent widget. 300 * 301 * Since: 2.14.0 302 */ 303 GntWidget *gnt_widget_get_toplevel(GntWidget *widget); 304 305 /** 306 * gnt_widget_get_position: 307 * @widget: The widget. 308 * @x: Location to store the x-coordinate of the widget. 309 * @y: Location to store the y-coordinate of the widget. 310 * 311 * Get the position of a widget. 312 */ 313 void gnt_widget_get_position(GntWidget *widget, int *x, int *y); 314 315 /** 316 * gnt_widget_set_position: 317 * @widget: The widget to reposition. 318 * @x: The x-coordinate of the widget. 319 * @y: The x-coordinate of the widget. 320 * 321 * Set the position of a widget. 322 */ 323 void gnt_widget_set_position(GntWidget *widget, int x, int y); 324 325 /** 326 * gnt_widget_size_request: 327 * @widget: The widget. 328 * 329 * Request a widget to calculate its desired size. 330 */ 331 void gnt_widget_size_request(GntWidget *widget); 332 333 /** 334 * gnt_widget_get_size: 335 * @widget: The widget. 336 * @width: Location to store the width of the widget. 337 * @height: Location to store the height of the widget. 338 * 339 * Get the size of a widget. 340 */ 341 void gnt_widget_get_size(GntWidget *widget, int *width, int *height); 342 343 /** 344 * gnt_widget_set_size: 345 * @widget: The widget to resize. 346 * @width: The width of the widget. 347 * @height: The height of the widget. 348 * 349 * Set the size of a widget. 350 * 351 * Returns: If the widget was resized to the new size. 352 */ 353 gboolean gnt_widget_set_size(GntWidget *widget, int width, int height); 354 355 /** 356 * gnt_widget_confirm_size: 357 * @widget: The widget. 358 * @width: The requested width. 359 * @height: The requested height. 360 * 361 * Confirm a requested a size for a widget. 362 * 363 * Returns: %TRUE if the new size was confirmed, %FALSE otherwise. 364 */ 365 gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height); 366 367 /** 368 * gnt_widget_key_pressed: 369 * @widget: The widget. 370 * @keys: The keypress on the widget. 371 * 372 * Trigger the key-press callbacks for a widget. 373 * 374 * Returns: %TRUE if the key-press was handled, %FALSE otherwise. 375 */ 376 gboolean gnt_widget_key_pressed(GntWidget *widget, const char *keys); 377 378 /** 379 * gnt_widget_clicked: 380 * @widget: The widget. 381 * @event: The mouseevent. 382 * @x: The x-coordinate of the mouse. 383 * @y: The y-coordinate of the mouse. 384 * 385 * Trigger the 'click' callback of a widget. 386 * 387 * Returns: %TRUE if the event was handled, %FALSE otherwise. 388 */ 389 gboolean gnt_widget_clicked(GntWidget *widget, GntMouseEvent event, int x, int y); 390 391 /** 392 * gnt_widget_set_focus: 393 * @widget: The widget. 394 * @set: %TRUE of focus should be given to the widget, %FALSE if 395 * focus should be removed. 396 * 397 * Give or remove focus to a widget. 398 * 399 * Returns: %TRUE if the focus has been changed, %FALSE otherwise. 400 */ 401 gboolean gnt_widget_set_focus(GntWidget *widget, gboolean set); 402 403 /** 404 * gnt_widget_activate: 405 * @widget: The widget to activate. 406 * 407 * Activate a widget. This only applies to widgets that can be activated (eg. GntButton) 408 */ 409 void gnt_widget_activate(GntWidget *widget); 410 411 /** 412 * gnt_widget_set_name: 413 * @widget: The widget. 414 * @name: A new name for the widget. 415 * 416 * Set the name of a widget. 417 */ 418 void gnt_widget_set_name(GntWidget *widget, const char *name); 419 420 /** 421 * gnt_widget_get_name: 422 * @widget: The widget. 423 * 424 * Get the name of a widget. 425 * 426 * Returns: The name of the widget. 427 */ 428 const char *gnt_widget_get_name(GntWidget *widget); 429 430 #ifndef GNT_DISABLE_DEPRECATED 431 /** 432 * gnt_widget_queue_update: 433 * 434 * Internal function -- do not use. 435 * Use gnt_widget_draw() instead. 436 * 437 * Deprecated: 2.14.0: Use gnt_widget_draw() instead. 438 */ 439 void gnt_widget_queue_update(GntWidget *widget) G_GNUC_DEPRECATED; 440 #endif 441 442 /** 443 * gnt_widget_set_take_focus: 444 * @widget: The widget. 445 * @set: %TRUE if the widget can take focus. 446 * 447 * Set whether a widget can take focus or not. 448 */ 449 void gnt_widget_set_take_focus(GntWidget *widget, gboolean set); 450 451 /** 452 * gnt_widget_get_take_focus: 453 * @widget: The widget. 454 * 455 * Get whether a widget can take focus or not. 456 * 457 * Returns: %TRUE if the widget can take focus. 458 * 459 * Since: 2.14.0 460 */ 461 gboolean gnt_widget_get_take_focus(GntWidget *widget); 462 463 /** 464 * gnt_widget_set_visible: 465 * @widget: The widget. 466 * @set: Whether the widget is visible or not. 467 * 468 * Set the visibility of a widget. 469 */ 470 void gnt_widget_set_visible(GntWidget *widget, gboolean set); 471 472 /** 473 * gnt_widget_get_visible: 474 * @widget: The widget. 475 * 476 * Get the visibility of a widget. 477 * 478 * Returns: Whether the widget is visible or not. 479 * 480 * Since: 2.14.0 481 */ 482 gboolean gnt_widget_get_visible(GntWidget *widget); 483 484 /** 485 * gnt_widget_has_shadow: 486 * @widget: The widget. 487 * 488 * Check whether the widget has shadows. 489 * 490 * Returns: %TRUE if the widget has shadows. This checks both the user-setting 491 * and whether the widget can have shadows at all. 492 */ 493 gboolean gnt_widget_has_shadow(GntWidget *widget); 494 495 /** 496 * gnt_widget_in_destruction: 497 * @widget: The widget 498 * 499 * Returns whether the widget is currently being destroyed. 500 * 501 * This information can sometimes be used to avoid doing unnecessary work. 502 * 503 * Returns: %TRUE if the widget is being destroyed. 504 * 505 * Since: 2.14.0 506 */ 507 gboolean gnt_widget_in_destruction(GntWidget *widget); 508 509 /** 510 * gnt_widget_set_drawing: 511 * @widget: The widget 512 * @drawing: Whether or not the widget is being drawn 513 * 514 * Marks the widget as being drawn (or not). 515 * 516 * Since: 2.14.0 517 */ 518 void gnt_widget_set_drawing(GntWidget *widget, gboolean drawing); 519 520 /** 521 * gnt_widget_get_drawing: 522 * @widget: The widget 523 * 524 * Returns whether the widget is currently being drawn. 525 * 526 * This information can sometimes be used to avoid doing unnecessary work. 527 * 528 * Returns: %TRUE if the widget is being drawn. 529 * 530 * Since: 2.14.0 531 */ 532 gboolean gnt_widget_get_drawing(GntWidget *widget); 533 534 /** 535 * gnt_widget_set_mapped: 536 * @widget: The widget 537 * @mapped: Whether or not the widget is mapped 538 * 539 * Marks the widget as being mapped (or not). 540 * 541 * This should generally only be called from the widget's "map" or "unmap" 542 * implementation. 543 * 544 * Since: 2.14.0 545 */ 546 void gnt_widget_set_mapped(GntWidget *widget, gboolean mapped); 547 548 /** 549 * gnt_widget_get_mapped: 550 * @widget: The widget 551 * 552 * Whether widget is mapped or not. 553 * 554 * Returns: Whether the widget is mapped or not. 555 * 556 * Since: 2.14.0 557 */ 558 gboolean gnt_widget_get_mapped(GntWidget *widget); 559 560 /** 561 * gnt_widget_set_has_border: 562 * @widget: The widget 563 * @has_border: Whether or not the widget has a border 564 * 565 * Sets the has-border property on widget to @has_border. 566 * 567 * Since: 2.14.0 568 */ 569 void gnt_widget_set_has_border(GntWidget *widget, gboolean has_border); 570 571 /** 572 * gnt_widget_get_has_border: 573 * @widget: The widget 574 * 575 * Returns the has-border property on widget. 576 * 577 * Returns: Whether the widget has a border or not. 578 * 579 * Since: 2.14.0 580 */ 581 gboolean gnt_widget_get_has_border(GntWidget *widget); 582 583 /** 584 * gnt_widget_set_has_shadow: 585 * @widget: The widget 586 * @has_shadow: Whether or not the widget has a shadow 587 * 588 * Sets the has-shadow property on widget to has_shadow. Note, setting this 589 * property does not necessarily mean the widget will have a shadow, depending 590 * on its styling. 591 * 592 * Since: 2.14.0 593 */ 594 void gnt_widget_set_has_shadow(GntWidget *widget, gboolean has_shadow); 595 596 /** 597 * gnt_widget_get_has_shadow: 598 * @widget: The widget 599 * 600 * Returns the has-shadow property on widget. Note, this is a property of the 601 * widget, but does not necessarily mean the widget will have a shadow as that 602 * depends on its styling. Use gnt_widget_has_shadow() to determine whether the 603 * widget will actually have a shadow. 604 * 605 * Returns: Whether the widget has a shadow set or not. 606 * 607 * Since: 2.14.0 608 */ 609 gboolean gnt_widget_get_has_shadow(GntWidget *widget); 610 611 /** 612 * gnt_widget_set_has_focus: 613 * @widget: The widget 614 * @has_focus: Whether or not the widget has focus 615 * 616 * Sets the has-focus flag on a widget. Note, setting this flag does not 617 * necessarily mean the widget will have focus. 618 * 619 * This is mostly for internal use; you probably want to use 620 * gnt_widget_set_focus() instead. 621 * 622 * Since: 2.14.0 623 */ 624 void gnt_widget_set_has_focus(GntWidget *widget, gboolean has_focus); 625 626 /** 627 * gnt_widget_get_has_focus: 628 * @widget: The widget 629 * 630 * Check whether a widget has the focus flag. 631 * 632 * This is mostly for internal use; you probably want to use 633 * gnt_widget_has_focus() instead. 634 * 635 * Returns: %TRUE if the widget's focus flag is set, %FALSE otherwise. 636 */ 637 gboolean gnt_widget_get_has_focus(GntWidget *widget); 638 639 /** 640 * gnt_widget_set_is_urgent: 641 * @widget: The widget to set the URGENT hint for 642 * @urgent: Whether the URGENT hint should be set or not 643 * 644 * Set the URGENT hint for a widget. 645 * 646 * Since: 2.14.0 647 */ 648 void gnt_widget_set_is_urgent(GntWidget *widget, gboolean urgent); 649 650 /** 651 * gnt_widget_get_urgent: 652 * @widget: The widget 653 * 654 * Returns whether the widget has the URGENT hint set. 655 * 656 * Returns: Whether the URGENT hint is set or not. 657 * 658 * Since: 2.14.0 659 */ 660 gboolean gnt_widget_get_is_urgent(GntWidget *widget); 661 662 /** 663 * gnt_widget_set_grow_x: 664 * @widget: The widget 665 * @grow_x: Whether the widget should grow or not 666 * 667 * Whether widget should grow in the x direction. 668 * 669 * Since: 2.14.0 670 */ 671 void gnt_widget_set_grow_x(GntWidget *widget, gboolean grow_x); 672 673 /** 674 * gnt_widget_get_grow_x: 675 * @widget: The widget 676 * 677 * Returns whether the widget should grow in the x direction. 678 * 679 * Returns: Whether widget should grow in the x direction. 680 * 681 * Since: 2.14.0 682 */ 683 gboolean gnt_widget_get_grow_x(GntWidget *widget); 684 685 /** 686 * gnt_widget_set_grow_y: 687 * @widget: The widget 688 * @grow_y: Whether the widget should grow or not 689 * 690 * Whether widget should grow in the y direction. 691 * 692 * Since: 2.14.0 693 */ 694 void gnt_widget_set_grow_y(GntWidget *widget, gboolean grow_y); 695 696 /** 697 * gnt_widget_get_grow_y: 698 * @widget: The widget 699 * 700 * Returns whether the widget should grow in the y direction. 701 * 702 * Returns: Whether widget should grow in the y direction. 703 * 704 * Since: 2.14.0 705 */ 706 gboolean gnt_widget_get_grow_y(GntWidget *widget); 707 708 /** 709 * gnt_widget_set_transient: 710 * @widget: The widget 711 * @transient: Whether the widget is transient or not 712 * 713 * Whether the widget should be transient. 714 * 715 * Since: 2.14.0 716 */ 717 void gnt_widget_set_transient(GntWidget *widget, gboolean transient); 718 719 /** 720 * gnt_widget_get_transient: 721 * @widget: The widget 722 * 723 * Returns whether the widget is transient. 724 * 725 * Returns: Whether the widget should be transient. 726 * 727 * Since: 2.14.0 728 */ 729 gboolean gnt_widget_get_transient(GntWidget *widget); 730 731 /** 732 * gnt_widget_set_disable_actions: 733 * @widget: The widget 734 * @disable_actions: Whether the widget actions should be disabled or not 735 * 736 * Whether widget actions should be disabled. 737 * 738 * Since: 2.14.0 739 */ 740 void gnt_widget_set_disable_actions(GntWidget *widget, 741 gboolean disable_actions); 742 743 /** 744 * gnt_widget_get_disable_actions: 745 * @widget: The widget 746 * 747 * Returns whether the widget actions are disabled. 748 * 749 * Returns: Whether the widget actions are disabled. 750 * 751 * Since: 2.14.0 752 */ 753 gboolean gnt_widget_get_disable_actions(GntWidget *widget); 754 755 G_END_DECLS 756 757 #endif /* GNT_WIDGET_H */ 758