qulogic/libgnt

Merged in default (pull request #13)

2019-04-05, Gary Kramlich
8116f04cfa87
Merged in default (pull request #13)

Add accessor functions for flag and drop useless flag macros

Approved-by: Gary Kramlich
--- a/gntcheckbox.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntcheckbox.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_CHECK_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_CHECK_BOX))
#define GNT_CHECK_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_CHECK_BOX, GntCheckBoxClass))
-#define GNT_CHECK_BOX_FLAGS(obj) (GNT_CHECK_BOX(obj)->priv.flags)
-#define GNT_CHECK_BOX_SET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) |= flags)
-#define GNT_CHECK_BOX_UNSET_FLAGS(obj, flags) (GNT_CHECK_BOX_FLAGS(obj) &= ~(flags))
-
typedef struct _GntCheckBox GntCheckBox;
typedef struct _GntCheckBoxPriv GntCheckBoxPriv;
typedef struct _GntCheckBoxClass GntCheckBoxClass;
--- a/gntcombobox.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntcombobox.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_COMBO_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_COMBO_BOX))
#define GNT_COMBO_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_COMBO_BOX, GntComboBoxClass))
-#define GNT_COMBO_BOX_FLAGS(obj) (GNT_COMBO_BOX(obj)->priv.flags)
-#define GNT_COMBO_BOX_SET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) |= flags)
-#define GNT_COMBO_BOX_UNSET_FLAGS(obj, flags) (GNT_COMBO_BOX_FLAGS(obj) &= ~(flags))
-
typedef struct _GntComboBox GntComboBox;
typedef struct _GntComboBoxPriv GntComboBoxPriv;
typedef struct _GntComboBoxClass GntComboBoxClass;
--- a/gntentry.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntentry.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_ENTRY))
#define GNT_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_ENTRY, GntEntryClass))
-#define GNT_ENTRY_FLAGS(obj) (GNT_ENTRY(obj)->priv.flags)
-#define GNT_ENTRY_SET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) |= flags)
-#define GNT_ENTRY_UNSET_FLAGS(obj, flags) (GNT_ENTRY_FLAGS(obj) &= ~(flags))
-
#define GNT_ENTRY_CHAR '_' /* The character to use to fill in the blank places */
typedef struct _GntEntry GntEntry;
--- a/gntfilesel.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntfilesel.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_FILE_SEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_FILE_SEL))
#define GNT_FILE_SEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_FILE_SEL, GntFileSelClass))
-#define GNT_FILE_SEL_FLAGS(obj) (GNT_FILE_SEL(obj)->priv.flags)
-#define GNT_FILE_SEL_SET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) |= flags)
-#define GNT_FILE_SEL_UNSET_FLAGS(obj, flags) (GNT_FILE_SEL_FLAGS(obj) &= ~(flags))
-
#define GNT_TYPE_FILE (gnt_file_get_type())
typedef struct _GntFileSel GntFileSel;
--- a/gntline.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntline.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_LINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_LINE))
#define GNT_LINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_LINE, GntLineClass))
-#define GNT_LINE_FLAGS(obj) (GNT_LINE(obj)->priv.flags)
-#define GNT_LINE_SET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) |= flags)
-#define GNT_LINE_UNSET_FLAGS(obj, flags) (GNT_LINE_FLAGS(obj) &= ~(flags))
-
typedef struct _GntLine GntLine;
typedef struct _GntLinePriv GntLinePriv;
typedef struct _GntLineClass GntLineClass;
--- a/gntmenu.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntmenu.h Fri Apr 05 01:34:59 2019 +0000
@@ -40,10 +40,6 @@
#define GNT_IS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU))
#define GNT_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU, GntMenuClass))
-#define GNT_MENU_FLAGS(obj) (GNT_MENU(obj)->priv.flags)
-#define GNT_MENU_SET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) |= flags)
-#define GNT_MENU_UNSET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) &= ~(flags))
-
typedef struct _GntMenu GntMenu;
typedef struct _GntMenuPriv GntMenuPriv;
typedef struct _GntMenuClass GntMenuClass;
--- a/gntmenuitem.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntmenuitem.h Fri Apr 05 01:34:59 2019 +0000
@@ -39,10 +39,6 @@
#define GNT_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM))
#define GNT_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM, GntMenuItemClass))
-#define GNT_MENU_ITEM_FLAGS(obj) (GNT_MENU_ITEM(obj)->priv.flags)
-#define GNT_MENU_ITEM_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) |= flags)
-#define GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags))
-
typedef struct _GntMenuItem GntMenuItem;
typedef struct _GntMenuItemPriv GntMenuItemPriv;
typedef struct _GntMenuItemClass GntMenuItemClass;
--- a/gntmenuitemcheck.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntmenuitemcheck.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_MENU_ITEM_CHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM_CHECK))
#define GNT_MENU_ITEM_CHECK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM_CHECK, GntMenuItemCheckClass))
-#define GNT_MENU_ITEM_CHECK_FLAGS(obj) (GNT_MENU_ITEM_CHECK(obj)->priv.flags)
-#define GNT_MENU_ITEM_CHECK_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_CHECK_FLAGS(obj) |= flags)
-#define GNT_MENU_ITEM_CHECK_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_CHECK_FLAGS(obj) &= ~(flags))
-
typedef struct _GntMenuItemCheck GntMenuItemCheck;
typedef struct _GntMenuItemCheckPriv GntMenuItemCheckPriv;
typedef struct _GntMenuItemCheckClass GntMenuItemCheckClass;
--- a/gntslider.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntslider.h Fri Apr 05 01:34:59 2019 +0000
@@ -40,10 +40,6 @@
#define GNT_IS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_SLIDER))
#define GNT_SLIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_SLIDER, GntSliderClass))
-#define GNT_SLIDER_FLAGS(obj) (GNT_SLIDER(obj)->priv.flags)
-#define GNT_SLIDER_SET_FLAGS(obj, flags) (GNT_SLIDER_FLAGS(obj) |= flags)
-#define GNT_SLIDER_UNSET_FLAGS(obj, flags) (GNT_SLIDER_FLAGS(obj) &= ~(flags))
-
typedef struct _GntSlider GntSlider;
typedef struct _GntSliderPriv GntSliderPriv;
typedef struct _GntSliderClass GntSliderClass;
--- a/gnttextview.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gnttextview.h Fri Apr 05 01:34:59 2019 +0000
@@ -41,10 +41,6 @@
#define GNT_IS_TEXT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_TEXT_VIEW))
#define GNT_TEXT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_TEXT_VIEW, GntTextViewClass))
-#define GNT_TEXT_VIEW_FLAGS(obj) (GNT_TEXT_VIEW(obj)->priv.flags)
-#define GNT_TEXT_VIEW_SET_FLAGS(obj, flags) (GNT_TEXT_VIEW_FLAGS(obj) |= flags)
-#define GNT_TEXT_VIEW_UNSET_FLAGS(obj, flags) (GNT_TEXT_VIEW_FLAGS(obj) &= ~(flags))
-
typedef struct _GntTextView GntTextView;
typedef struct _GntTextViewPriv GntTextViewPriv;
typedef struct _GntTextViewClass GntTextViewClass;
--- a/gntwidget.c Thu Apr 04 00:03:08 2019 -0400
+++ b/gntwidget.c Fri Apr 05 01:34:59 2019 +0000
@@ -561,3 +561,210 @@
gnt_style_get_bool(GNT_STYLE_SHADOW, FALSE));
}
+gboolean
+gnt_widget_in_destruction(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DESTROYING);
+}
+
+void
+gnt_widget_set_drawing(GntWidget *widget, gboolean drawing)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (drawing) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_DRAWING);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DRAWING);
+ }
+}
+
+gboolean
+gnt_widget_get_drawing(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DRAWING);
+}
+
+void
+gnt_widget_set_mapped(GntWidget *widget, gboolean mapped)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (mapped) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_MAPPED);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_MAPPED);
+ }
+}
+
+gboolean
+gnt_widget_get_mapped(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_MAPPED);
+}
+
+void
+gnt_widget_set_has_border(GntWidget *widget, gboolean has_border)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (has_border) {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_NO_BORDER);
+ } else {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_BORDER);
+ }
+}
+
+gboolean
+gnt_widget_get_has_border(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_BORDER);
+}
+
+void
+gnt_widget_set_has_shadow(GntWidget *widget, gboolean has_shadow)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (has_shadow) {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_NO_SHADOW);
+ } else {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_NO_SHADOW);
+ }
+}
+
+gboolean
+gnt_widget_get_has_shadow(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return !GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_NO_SHADOW);
+}
+
+void
+gnt_widget_set_has_focus(GntWidget *widget, gboolean has_focus)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (has_focus) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_HAS_FOCUS);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_HAS_FOCUS);
+ }
+}
+
+gboolean
+gnt_widget_get_has_focus(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_HAS_FOCUS);
+}
+
+void
+gnt_widget_set_is_urgent(GntWidget *widget, gboolean urgent)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (urgent) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_URGENT);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_URGENT);
+ }
+}
+
+gboolean
+gnt_widget_get_is_urgent(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_URGENT);
+}
+
+void
+gnt_widget_set_grow_x(GntWidget *widget, gboolean grow_x)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (grow_x) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_GROW_X);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_GROW_X);
+ }
+}
+
+gboolean
+gnt_widget_get_grow_x(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_X);
+}
+
+void
+gnt_widget_set_grow_y(GntWidget *widget, gboolean grow_y)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (grow_y) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_GROW_Y);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_GROW_Y);
+ }
+}
+
+gboolean
+gnt_widget_get_grow_y(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_GROW_Y);
+}
+
+void
+gnt_widget_set_transient(GntWidget *widget, gboolean transient)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (transient) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_TRANSIENT);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_TRANSIENT);
+ }
+}
+
+gboolean
+gnt_widget_get_transient(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_TRANSIENT);
+}
+
+void
+gnt_widget_set_disable_actions(GntWidget *widget, gboolean disable_actions)
+{
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+
+ if (disable_actions) {
+ GNT_WIDGET_SET_FLAGS(widget, GNT_WIDGET_DISABLE_ACTIONS);
+ } else {
+ GNT_WIDGET_UNSET_FLAGS(widget, GNT_WIDGET_DISABLE_ACTIONS);
+ }
+}
+
+gboolean
+gnt_widget_get_disable_actions(GntWidget *widget)
+{
+ g_return_val_if_fail(GNT_IS_WIDGET(widget), FALSE);
+
+ return GNT_WIDGET_IS_FLAG_SET(widget, GNT_WIDGET_DISABLE_ACTIONS);
+}
--- a/gntwidget.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntwidget.h Fri Apr 05 01:34:59 2019 +0000
@@ -283,8 +283,8 @@
/**
* gnt_widget_set_focus:
* @widget: The widget.
- * @set: %TRUE of focus should be given to the widget, %FALSE if
- * focus should be removed.
+ * @set: %TRUE if focus should be given to the widget, %FALSE if focus
+ * should be removed.
*
* Give or remove focus to a widget.
*
@@ -356,6 +356,266 @@
*/
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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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_set_has_shadow to determine
+ * whether the widget will actually have a shadow.
+ *
+ * Returns: Whether the widget has a shadow set or not.
+ *
+ * Since: 2.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.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.9.0
+ */
+gboolean gnt_widget_get_disable_actions(GntWidget *widget);
+
G_END_DECLS
#endif /* GNT_WIDGET_H */
--- a/gntwindow.h Thu Apr 04 00:03:08 2019 -0400
+++ b/gntwindow.h Fri Apr 05 01:34:59 2019 +0000
@@ -42,10 +42,6 @@
#define GNT_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WINDOW))
#define GNT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WINDOW, GntWindowClass))
-#define GNT_WINDOW_FLAGS(obj) (GNT_WINDOW(obj)->priv.flags)
-#define GNT_WINDOW_SET_FLAGS(obj, flags) (GNT_WINDOW_FLAGS(obj) |= flags)
-#define GNT_WINDOW_UNSET_FLAGS(obj, flags) (GNT_WINDOW_FLAGS(obj) &= ~(flags))
-
typedef struct _GntWindow GntWindow;
typedef struct _GntWindowPriv GntWindowPriv;
typedef struct _GntWindowClass GntWindowClass;