Merge release-2.x.y into default.
--- a/doc/libgnt-docs.xml Tue Apr 16 21:10:29 2019 -0500
+++ b/doc/libgnt-docs.xml Sat Apr 20 02:29:16 2019 -0400
@@ -101,6 +101,10 @@
<title>Index of new symbols in 2.8.0</title>
<xi:include href="xml/api-index-2.8.0.xml"><xi:fallback /></xi:include>
+ <title>Index of new symbols in 2.7.2</title> + <xi:include href="xml/api-index-2.7.2.xml"><xi:fallback /></xi:include> <title>Index of new symbols in 2.4.0</title>
<xi:include href="xml/api-index-2.4.0.xml"><xi:fallback /></xi:include>
@@ -113,6 +117,10 @@
<title>Index of new symbols in 2.2.0</title>
<xi:include href="xml/api-index-2.2.0.xml"><xi:fallback /></xi:include>
+ <title>Index of new symbols in 2.1.0</title> + <xi:include href="xml/api-index-2.1.0.xml"><xi:fallback /></xi:include> <title>Index of new symbols in 2.0.0</title>
<xi:include href="xml/api-index-2.0.0.xml"><xi:fallback /></xi:include>
--- a/gnt.h.in Tue Apr 16 21:10:29 2019 -0500
+++ b/gnt.h.in Sat Apr 20 02:29:16 2019 -0400
@@ -37,6 +37,14 @@
#define NCURSES_WIDECHAR @NCURSES_WIDECHAR@
#include <@NCURSES_HEADER@>
+# if defined(GNTSEAL_ENABLE) +# define GNTSEAL(ident) _gnt_sealed__ ## ident +# define GNTSEAL(ident) ident #include "gntclipboard.h"
--- a/gntbox.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gntbox.c Sat Apr 20 02:29:16 2019 -0400
@@ -687,6 +687,14 @@
gnt_widget_set_take_focus(widget, set);
+gnt_box_get_children(GntBox *box) + g_return_val_if_fail(GNT_IS_BOX(box), NULL); + return g_list_copy(box->list); void gnt_box_sync_children(GntBox *box)
--- a/gntbox.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntbox.h Sat Apr 20 02:29:16 2019 -0400
@@ -55,21 +55,26 @@
+ * Access to any fields is deprecated. See inline comments for replacements.
- GList *list; /* List of widgets */
+ gboolean GNTSEAL(vertical); + gboolean GNTSEAL(homogeneous); + gboolean GNTSEAL(fill); + GList *GNTSEAL(list); /* Deprecated. Use gnt_box_get_children. */
- int pad; /* Number of spaces to use between widgets */
- GntAlignment alignment; /* How are the widgets going to be aligned? */
+ GntWidget *GNTSEAL(active); + int GNTSEAL(pad); /* Number of spaces to use between widgets */ + GntAlignment GNTSEAL(alignment); /* How are the widgets going to be aligned? */
- GList *focus; /* List of widgets to cycle focus (only valid for parent boxes) */
+ GList *GNTSEAL(focus); /* List of widgets to cycle focus (only valid for parent boxes) */ @@ -116,6 +121,19 @@
GntWidget * gnt_box_new(gboolean homo, gboolean vert);
+ * gnt_box_get_children: + * Returns a list of the children of the widget. + * Returns: (element-type GntWidget) (transfer container): A new list + * containing the children of the box. +GList *gnt_box_get_children(GntBox *box); * @widget: The widget to add
--- a/gntcheckbox.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntcheckbox.h Sat Apr 20 02:29:16 2019 -0400
@@ -30,8 +30,8 @@
--- a/gntcombobox.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gntcombobox.c Sat Apr 20 02:29:16 2019 -0400
@@ -335,6 +335,14 @@
+gnt_combo_box_get_dropdown(GntComboBox *box) + g_return_val_if_fail(GNT_IS_BOX(box), NULL); void gnt_combo_box_add_data(GntComboBox *box, gpointer key, const char *text)
gnt_tree_add_row_last(GNT_TREE(box->dropdown), key,
@@ -365,4 +373,3 @@
gnt_tree_remove_all(GNT_TREE(box->dropdown));
set_selection(box, NULL);
--- a/gntcombobox.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntcombobox.h Sat Apr 20 02:29:16 2019 -0400
@@ -55,6 +55,18 @@
GntWidget * gnt_combo_box_new(void);
+ * gnt_combo_box_get_dropdown: + * @box: The GntComboBox + * Get the dropdown GntTree that is shown when opened + * Returns: (transfer none): The dropdown for the combo box +GntWidget *gnt_combo_box_get_dropdown(GntComboBox *box); * gnt_combo_box_add_data:
--- a/gntentry.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntentry.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,10 +29,10 @@
* @short_description: A widget for entering text
#define GNT_TYPE_ENTRY (gnt_entry_get_type())
#define GNT_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_ENTRY, GntEntry))
@@ -59,32 +59,37 @@
#define GNT_ENTRY_FLAG_ALL (GNT_ENTRY_FLAG_ALPHA | GNT_ENTRY_FLAG_INT)
+ * Access to any fields is deprecated. See inline comments for replacements.
+ GntEntryFlag GNTSEAL(flag);
- char *scroll; /* Current scrolling position */
- char *cursor; /* Cursor location */
- /* 0 <= cursor - scroll < widget-width */
+ char *GNTSEAL(scroll); /* Current scrolling position */ + char *GNTSEAL(cursor); /* Cursor location */ + /* 0 <= cursor - scroll < widget-width */ - size_t buffer; /* Size of the buffer */
+ size_t GNTSEAL(buffer); /* Size of the buffer */ - int max; /* 0 means infinite */
+ int GNTSEAL(max); /* 0 means infinite */ + gboolean GNTSEAL(masked); - GList *history; /* History of the strings. User can use this by pressing ctrl+up/down */
- int histlength; /* How long can the history be? */
+ GList *GNTSEAL(history); /* History of the strings. User can use this by pressing ctrl+up/down */ + int GNTSEAL(histlength); /* How long can the history be? */ - GList *suggests; /* List of suggestions */
- gboolean word; /* Are the suggestions for only a word, or for the whole thing? */
- gboolean always; /* Should the list of suggestions show at all times, or only on tab-press? */
- GntWidget *ddown; /* The dropdown with the suggested list */
- GntEntryKillRing *killring; /* Since: 2.3.0 */
- GntEntrySearch *search; /* Since: 2.7.0 */
+ GList *GNTSEAL(suggests); /* List of suggestions */ + gboolean GNTSEAL(word); /* Are the suggestions for only a word, or for the whole thing? */ + gboolean GNTSEAL(always); /* Should the list of suggestions show at all times, or only on tab-press? */ + GntWidget *GNTSEAL(ddown); /* The dropdown with the suggested list */ + GntEntryKillRing *GNTSEAL(killring); /* Since: 2.3.0 */ + GntEntrySearch *GNTSEAL(search); /* Since: 2.7.0 */ --- a/gntfilesel.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gntfilesel.c Sat Apr 20 02:29:16 2019 -0400
@@ -41,6 +41,7 @@
@@ -49,6 +50,7 @@
static void (*orig_size_request)(GntWidget *widget);
static void select_activated_cb(GntWidget *button, GntFileSel *sel);
+static void cancel_activated_cb(GntWidget *button, GntFileSel *sel); G_DEFINE_TYPE(GntFileSel, gnt_file_sel, GNT_TYPE_WINDOW)
@@ -463,6 +465,16 @@
orig_size_request = widget_class->size_request;
widget_class->size_request = gnt_file_sel_size_request;
+ * GntFileSel::file-selected + * @widget: The file selection window that received the signal + * @path: The full path to the selected file + * @file: The name of the file only + * The ::file-selected signal is emitted when the Select button or the + * file tree on a #GntFileSel is activated. signals[SIG_FILE_SELECTED] =
g_signal_new("file_selected",
G_TYPE_FROM_CLASS(klass),
@@ -471,6 +483,24 @@
G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
+ * GntFileSel::cancelled + * @widget: The file selection window that received the signal + * The ::cancelled signal is emitted when the Cancel button on a + * #GntFileSel is activated. + signals[SIG_CANCELLED] = + g_signal_new("cancelled", + G_TYPE_FROM_CLASS(klass), + G_STRUCT_OFFSET(GntFileSelClass, cancelled), + g_cclosure_marshal_VOID__VOID, gnt_bindable_class_register_action(bindable, "toggle-tag", toggle_tag_selection, "t", NULL);
gnt_bindable_class_register_action(bindable, "clear-tags", clear_tags, "c", NULL);
gnt_bindable_class_register_action(bindable, "up-directory", up_directory, GNT_KEY_BACKSPACE, NULL);
@@ -505,6 +535,8 @@
g_signal_connect(G_OBJECT(sel->location), "key_pressed", G_CALLBACK(location_key_pressed), sel);
sel->cancel = gnt_button_new("Cancel");
+ g_signal_connect(G_OBJECT(sel->cancel), "activate", G_CALLBACK(cancel_activated_cb), sel); sel->select = gnt_button_new("Select");
g_signal_connect_swapped(G_OBJECT(sel->files), "activate", G_CALLBACK(gnt_widget_activate), sel->select);
@@ -524,6 +556,12 @@
+cancel_activated_cb(GntWidget *button, GntFileSel *sel) + g_signal_emit(sel, signals[SIG_CANCELLED], 0); GntWidget *gnt_file_sel_new(void)
GntWidget *widget = g_object_new(GNT_TYPE_FILE_SEL, NULL);
--- a/gntfilesel.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntfilesel.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,10 +29,10 @@
* @short_description: A widget for selecting a file or directory
#define GNT_TYPE_FILE_SEL (gnt_file_sel_get_type())
#define GNT_FILE_SEL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_FILE_SEL, GntFileSel))
@@ -47,26 +47,31 @@
typedef struct _GntFileSelClass GntFileSelClass;
typedef struct _GntFile GntFile;
+ * Access to any fields is deprecated. See inline comments for replacements. - GntWidget *dirs; /* list of files */
- GntWidget *files; /* list of directories */
- GntWidget *location; /* location entry */
+ GntWidget *GNTSEAL(dirs); /* list of files */ + GntWidget *GNTSEAL(files); /* list of directories */ + GntWidget *GNTSEAL(location); /* location entry */ - GntWidget *select; /* select button */
- GntWidget *cancel; /* cancel button */
+ GntWidget *GNTSEAL(select); /* select button */ + GntWidget *GNTSEAL(cancel); /* cancel button */ - char *current; /* Full path of the current location */
- char *suggest; /* Suggested filename */
+ char *GNTSEAL(current); /* Full path of the current location */ + char *GNTSEAL(suggest); /* Suggested filename */ /* XXX: someone should make these useful */
- gboolean must_exist; /* Make sure the selected file (the name entered in 'location') exists */
- gboolean dirsonly; /* Show only directories */
- GList *tags; /* List of tagged files when multiselect is set */
+ gboolean GNTSEAL(must_exist); /* Make sure the selected file (the name entered in 'location') exists */ + gboolean GNTSEAL(dirsonly); /* Show only directories */ + gboolean GNTSEAL(multiselect); + GList *GNTSEAL(tags); /* List of tagged files when multiselect is set */ - gboolean (*read_fn)(const char *path, GList **files, GError **error);
+ gboolean (*GNTSEAL(read_fn))(const char *path, GList **files, GError **error); @@ -74,6 +79,7 @@
void (*file_selected)(GntFileSel *sel, const char *path, const char *filename);
+ void (*cancelled)(GntFileSel *sel); void (*gnt_reserved1)(void);
--- a/gntline.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntline.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,10 +29,10 @@
* @short_description: A widget that draws a horizontal or vertical line
#define GNT_TYPE_LINE gnt_line_get_type()
--- a/gntmenu.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntmenu.h Sat Apr 20 02:29:16 2019 -0400
@@ -30,6 +30,7 @@
* @see_also: #GntMenuItem #GntMenuItemCheck
@@ -61,18 +62,23 @@
+ * Access to any fields is deprecated. See inline comments for replacements.
+ GntMenuType GNTSEAL(type);
+ guint GNTSEAL(selected); /* This will keep track of its immediate submenu which is visible so that
* keystrokes can be passed to it. */
+ GntMenu *GNTSEAL(submenu); + GntMenu *GNTSEAL(parentmenu); --- a/gntmenuitem.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntmenuitem.h Sat Apr 20 02:29:16 2019 -0400
@@ -46,34 +46,44 @@
+ * Access to any fields is deprecated. See inline comments for replacements. /* These will be used to determine the position of the submenu */
typedef void (*GntMenuItemCallback)(GntMenuItem *item, gpointer data);
+ * Access to any fields is deprecated. See inline comments for replacements.
+ GntMenuItemPriv GNTSEAL(priv);
/* A GntMenuItem can have a callback associated with it.
* The callback will be activated whenever the suer selects it and presses enter (or clicks).
* However, if the GntMenuItem has some child, then the callback and callbackdata will be ignored. */
- GntMenuItemCallback callback;
+ gpointer GNTSEAL(callbackdata); + GntMenuItemCallback GNTSEAL(callback);
+ GntMenu *GNTSEAL(submenu);
+ gboolean GNTSEAL(visible); --- a/gntslider.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntslider.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,9 +29,9 @@
* @short_description: A widget for selecting from a range of values
@@ -72,7 +72,7 @@
* Returns: The newly created slider
GntWidget * gnt_slider_new(gboolean orient, int max, int min);
@@ -96,7 +96,7 @@
* Set the range of the slider.
void gnt_slider_set_range(GntSlider *slider, int max, int min);
@@ -119,7 +119,7 @@
* Sets the amount of change at each step.
void gnt_slider_set_step(GntSlider *slider, int step);
@@ -183,15 +183,15 @@
* gnt_slider_advance_step:
- * @steps: The number of amounts to change, positive to change
- * forward, negative to change backward
+ * @steps: The number of amounts to change, positive to change forward, + * negative to change backward * Advance the slider forward or backward.
* Returns: The value of the slider after the change
int gnt_slider_advance_step(GntSlider *slider, int steps);
@@ -202,7 +202,7 @@
* Set the current value for the slider.
void gnt_slider_set_value(GntSlider *slider, int value);
@@ -212,7 +212,7 @@
* Get the current value for the slider.
int gnt_slider_get_value(GntSlider *slider);
@@ -223,7 +223,7 @@
* Update a label with the value of the slider whenever the value changes.
void gnt_slider_reflect_label(GntSlider *slider, GntLabel *label);
--- a/gntstyle.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gntstyle.c Sat Apr 20 02:29:16 2019 -0400
@@ -36,7 +36,6 @@
#define MAX_WORKSPACES 99
static char * str_styles[GNT_STYLES];
static int int_styles[GNT_STYLES];
static int bool_styles[GNT_STYLES];
--- a/gntstyle.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntstyle.h Sat Apr 20 02:29:16 2019 -0400
@@ -70,7 +70,7 @@
* Returns: The value of the setting as a string, or %NULL
char *gnt_style_get_from_name(const char *group, const char *key);
@@ -113,7 +113,7 @@
* Returns: The boolean value
gboolean gnt_style_parse_bool(const char *value);
--- a/gnttextview.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gnttextview.c Sat Apr 20 02:29:16 2019 -0400
@@ -601,6 +601,14 @@
+gnt_text_view_get_text(GntTextView *view) + g_return_val_if_fail(GNT_IS_TEXT_VIEW(view), NULL); + return view->string->str; void gnt_text_view_scroll(GntTextView *view, int scroll)
--- a/gnttextview.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gnttextview.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,10 +29,10 @@
* @short_description: A widget for displaying larger bodies of formatted text
#define GNT_TYPE_TEXT_VIEW gnt_text_view_get_type()
@@ -102,6 +102,18 @@
void gnt_text_view_append_text_with_tag(GntTextView *view, const char *text, GntTextFormatFlags flags, const char *tag);
+ * gnt_text_view_get_text: + * Get the text of the textview. +const gchar *gnt_text_view_get_text(GntTextView *view); * gnt_text_view_next_line:
@@ -219,7 +231,7 @@
* Set a GntTextViewFlag for the textview widget.
void gnt_text_view_set_flag(GntTextView *view, GntTextViewFlag flag);
--- a/gnttree.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gnttree.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,11 +29,11 @@
* @short_description: A widget that shows a tree of items
#define GNT_TYPE_TREE (gnt_tree_get_type())
#define GNT_TREE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_TREE, GntTree))
@@ -70,30 +70,35 @@
+ * Access to any fields is deprecated. See inline comments for replacements. - GntTreeRow *current; /* current selection */
+ GntTreeRow *GNTSEAL(current); /* current selection */ - GntTreeRow *top; /* The topmost visible item */
- GntTreeRow *bottom; /* The bottommost visible item */
+ GntTreeRow *GNTSEAL(top); /* The topmost visible item */ + GntTreeRow *GNTSEAL(bottom); /* The bottommost visible item */ - GntTreeRow *root; /* The root of all evil */
+ GntTreeRow *GNTSEAL(root); /* The root of all evil */ - GList *list; /* List of GntTreeRow s */
- GHashTable *hash; /* We need this for quickly referencing the rows */
- GntTreeHashFunc hash_func;
- GntTreeHashEqualityFunc hash_eq_func;
- GDestroyNotify key_destroy;
- GDestroyNotify value_destroy;
+ GList *GNTSEAL(list); /* List of GntTreeRow s */ + GHashTable *GNTSEAL(hash); /* We need this for quickly referencing the rows */ + GntTreeHashFunc GNTSEAL(hash_func); + GntTreeHashEqualityFunc GNTSEAL(hash_eq_func); + GDestroyNotify GNTSEAL(key_destroy); + GDestroyNotify GNTSEAL(value_destroy); - int ncol; /* No. of columns */
- GntTreeColInfo *columns; /* Would a GList be better? */
- gboolean show_separator; /* Whether to show column separators */
+ int GNTSEAL(ncol); /* No. of columns */ + GntTreeColInfo *GNTSEAL(columns); /* Would a GList be better? */ + gboolean GNTSEAL(show_title); + gboolean GNTSEAL(show_separator); /* Whether to show column separators */
+ GntTreePriv *GNTSEAL(priv); @@ -261,7 +266,7 @@
* Returns: (transfer none): The key of the row.
gpointer gnt_tree_row_get_key(GntTree *tree, GntTreeRow *row);
@@ -274,7 +279,7 @@
GntTreeRow * gnt_tree_row_get_next(GntTree *tree, GntTreeRow *row);
@@ -287,7 +292,7 @@
* Returns: The previous row.
GntTreeRow * gnt_tree_row_get_prev(GntTree *tree, GntTreeRow *row);
@@ -300,7 +305,7 @@
* Returns: The child row.
GntTreeRow * gnt_tree_row_get_child(GntTree *tree, GntTreeRow *row);
@@ -313,7 +318,7 @@
* Returns: The parent row.
GntTreeRow * gnt_tree_row_get_parent(GntTree *tree, GntTreeRow *row);
@@ -503,7 +508,7 @@
* See gnt_tree_set_column_titles(), gnt_tree_set_show_title().
void gnt_tree_set_column_title(GntTree *tree, int index, const char *title);
@@ -615,7 +620,7 @@
* See gnt_tree_set_col_width(), gnt_tree_set_column_width_ratio().
void gnt_tree_set_column_resizable(GntTree *tree, int col, gboolean res);
@@ -638,7 +643,7 @@
* Set whether text in a column should be right-aligned.
void gnt_tree_set_column_is_right_aligned(GntTree *tree, int col, gboolean right);
@@ -654,7 +659,7 @@
* See gnt_tree_set_col_width(), gnt_tree_set_column_resizable().
void gnt_tree_set_column_width_ratio(GntTree *tree, int cols[]);
@@ -665,7 +670,7 @@
* Set the column to use for typeahead searching.
void gnt_tree_set_search_column(GntTree *tree, int col);
@@ -677,7 +682,7 @@
* Returns: %TRUE if the user is searching, %FALSE otherwise.
gboolean gnt_tree_is_searching(GntTree *tree);
@@ -692,7 +697,7 @@
* Set a custom search function.
void gnt_tree_set_search_function(GntTree *tree,
gboolean (*func)(GntTree *tree, gpointer key, const char *search, const char *current));
--- a/gntutils.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntutils.h Sat Apr 20 02:29:16 2019 -0400
@@ -162,7 +162,7 @@
* Make some keypress activate a button when some key is pressed with 'wid' in focus.
void gnt_util_set_trigger_widget(GntWidget *widget, const char *key, GntWidget *button);
--- a/gntwidget.c Tue Apr 16 21:10:29 2019 -0500
+++ b/gntwidget.c Sat Apr 20 02:29:16 2019 -0400
@@ -374,6 +374,26 @@
gnt_widget_set_mapped(widget, FALSE);
+gnt_widget_get_parent(GntWidget *widget) + g_return_val_if_fail(GNT_IS_WIDGET(widget), NULL); +gnt_widget_get_toplevel(GntWidget *widget) + g_return_val_if_fail(GNT_IS_WIDGET(widget), NULL); + while (widget->parent) { + widget = widget->parent; gnt_widget_set_position(GntWidget *wid, int x, int y)
--- a/gntwidget.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntwidget.h Sat Apr 20 02:29:16 2019 -0400
@@ -32,6 +32,14 @@
+# if defined(GNTSEAL_ENABLE) +# define GNTSEAL(ident) _gnt_sealed__ ## ident +# define GNTSEAL(ident) ident #define GNT_TYPE_WIDGET (gnt_widget_get_type())
@@ -139,24 +147,34 @@
GNT_PARAM_SERIALIZABLE = 1 << G_PARAM_USER_SHIFT
+ * Access to any fields is deprecated. See inline comments for replacements.
+ int GNTSEAL(x), GNTSEAL(y); + int GNTSEAL(width), GNTSEAL(height); + GntWidgetFlags GNTSEAL(flags); - int minw, minh; /* Minimum size for the widget */
+ int GNTSEAL(minw), GNTSEAL(minh); /* Minimum size for the widget */ + * Access to any fields is deprecated. See inline comments for replacements.
+ GntWidget *GNTSEAL(parent); /* Deprecated. Use gnt_widget_get_parent. */
+ GntWidgetPriv GNTSEAL(priv); + WINDOW *GNTSEAL(window); @@ -248,6 +266,31 @@
void gnt_widget_hide(GntWidget *widget);
+ * gnt_widget_get_parent: + * Get the parent of a widget. + * Returns: (transfer none) (nullable): The parent widget. +GntWidget *gnt_widget_get_parent(GntWidget *widget); + * gnt_widget_get_toplevel: + * 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. +GntWidget *gnt_widget_get_toplevel(GntWidget *widget); * gnt_widget_get_position:
* @x: Location to store the x-coordinate of the widget.
--- a/gntwm.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntwm.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,6 +29,7 @@
* @short_description: A window manager
@@ -97,35 +98,38 @@
* @event_stack: Will be set to %TRUE when a user-event, ie. a mouse-click or a
* key-press is being processed. This variable will be used to
* determine whether to give focus to a new window.
+ * Access to any fields is deprecated. See inline comments for replacements.
+ GMainLoop *GNTSEAL(loop);
- GList *tagged; /* tagged windows */
+ GList *GNTSEAL(workspaces); + GList *GNTSEAL(tagged); /* tagged windows */
- GntListWindow *windows; /* Window-list window */
- GntListWindow *actions; /* Action-list window */
+ GntListWindow GNTSEAL(_list); + GntListWindow *GNTSEAL(windows); /* Window-list window */ + GntListWindow *GNTSEAL(actions); /* Action-list window */ - GHashTable *nodes; /* GntWidget -> GntNode */
- GHashTable *name_places; /* window name -> ws*/
- GHashTable *title_places; /* window title -> ws */
+ GHashTable *GNTSEAL(nodes); /* GntWidget -> GntNode */ + GHashTable *GNTSEAL(name_places); /* window name -> ws*/ + GHashTable *GNTSEAL(title_places); /* window title -> ws */
+ GntMenu *GNTSEAL(menu);
+ gboolean GNTSEAL(event_stack);
+ GntKeyPressMode GNTSEAL(mode);
+ GHashTable *GNTSEAL(positions); --- a/gntws.h Tue Apr 16 21:10:29 2019 -0500
+++ b/gntws.h Sat Apr 20 02:29:16 2019 -0400
@@ -29,6 +29,7 @@
* @short_description: Workspace API
@@ -41,18 +42,23 @@
typedef struct _GntWS GntWS;
+ * Access to any fields is deprecated. See inline comments for replacements.
+ GList *GNTSEAL(ordered); + gpointer GNTSEAL(ui_data);
typedef struct _GntWSClass GntWSClass;
@@ -76,7 +82,7 @@
* Returns: The GType for GntWS.
GType gnt_ws_get_type(void);
@@ -88,7 +94,7 @@
* Returns: The newly created workspace.
GntWS *gnt_ws_new(const char *name);
@@ -99,7 +105,7 @@
* Set the name of a workspace.
void gnt_ws_set_name(GntWS *ws, const gchar *name);
@@ -110,7 +116,7 @@
* Add a widget to a workspace.
void gnt_ws_add_widget(GntWS *ws, GntWidget *widget);
@@ -121,7 +127,7 @@
* Remove a widget from a workspace.
void gnt_ws_remove_widget(GntWS *ws, GntWidget *widget);
@@ -132,7 +138,7 @@
* Hide a widget in a workspace.
void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes);
@@ -143,7 +149,7 @@
* Show a widget in a workspace.
void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes);
@@ -154,7 +160,7 @@
* Draw the taskbar in a workspace.
void gnt_ws_draw_taskbar(GntWS *ws, gboolean reposition);
@@ -165,7 +171,7 @@
void gnt_ws_hide(GntWS *ws, GHashTable *table);
@@ -176,7 +182,7 @@
void gnt_ws_show(GntWS *ws, GHashTable *table);
@@ -188,7 +194,7 @@
* Returns: The name of the workspace (can be %NULL).
const char * gnt_ws_get_name(GntWS *ws);