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