grim/libgnt
Clone
Summary
Browse
Changes
Graph
Hide GntAction.
2019-08-28, Elliott Sales de Andrade
91cedb5f5ff5
Parents
04d9c8e5cb95
Children
f8bee3b3600f
Hide GntAction.
It's only used internally. Also, switch to GCallback type instead of an
inline prototype.
4 files changed, 16 insertions(+), 15 deletions(-)
+3
-3
gnt.h.in
+1
-1
gntmain.c
+0
-11
gntwm.h
+12
-0
gntwmprivate.h
--- a/gnt.h.in Wed May 22 01:10:01 2019 -0500
+++ b/gnt.h.in Wed Aug 28 18:24:27 2019 -0400
@@ -138,12 +138,12 @@
/**
* gnt_register_action:
- * @label: The user-visible label for the action.
- * @callback: The callback function for the action.
+ * @label: The user-visible label for the action.
+ * @callback: (scope async): The callback function for the action.
*
* Register a global action.
*/
-void gnt_register_action(const char *label, void (*callback)(void));
+void gnt_register_action(const gchar *label, GCallback callback);
/**
* gnt_screen_menu_show:
--- a/gntmain.c Wed May 22 01:10:01 2019 -0500
+++ b/gntmain.c Wed Aug 28 18:24:27 2019 -0400
@@ -820,7 +820,7 @@
gnt_wm_update_window(wm, widget);
}
-void gnt_register_action(const char *label, void (*callback)(void))
+void gnt_register_action(const gchar *label, GCallback callback)
{
GntAction *action = g_new0(GntAction, 1);
action->label = g_strdup(label);
--- a/gntwm.h Wed May 22 01:10:01 2019 -0500
+++ b/gntwm.h Wed Aug 28 18:24:27 2019 -0400
@@ -49,17 +49,6 @@
GntWS *ws;
} GntNode;
-/**
- * GntAction:
- *
- * An application can register actions which will show up in a 'start-menu' like popup
- */
-typedef struct _GntAction
-{
- const char *label;
- void (*callback)(void);
-} GntAction;
-
G_BEGIN_DECLS
/**
--- a/gntwmprivate.h Wed May 22 01:10:01 2019 -0500
+++ b/gntwmprivate.h Wed Aug 28 18:24:27 2019 -0400
@@ -34,6 +34,18 @@
GNT_KP_MODE_WAIT_ON_CHILD
} GntKeyPressMode;
+/**
+ * GntAction:
+ *
+ * An application can register actions which will show up in a 'start-menu'
+ * like popup.
+ */
+typedef struct _GntAction
+{
+ const gchar *label;
+ GCallback callback;
+} GntAction;
+
G_BEGIN_DECLS
/* Private access to some internals. Contact us if you need these. */