libgnt/libgnt

make gnt.h a single include file

2020-08-13, Gary Kramlich
23e34422bea8
Parents 44b7b395b11a
Children d67ecd2b2223
make gnt.h a single include file

Move the ncurses bits to a new gntncurses.h.in setup

Move all the function prototypes from gnt.h to gntmain.h since thats where they should be

Move the KEY_EVENT undef to gntncurses.h as that's where it is needed

create a global header file and don't let the library use it

Add the single include header guards and deal with fall out

Testing Done:
Compile testing and ran all of the manual tests.

Reviewed at https://reviews.imfreedom.org/r/62/
--- a/gnt-skel.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gnt-skel.h Thu Aug 13 18:23:33 2020 -0500
@@ -30,7 +30,6 @@
*/
#include "gntwidget.h"
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
--- a/gnt.h.in Thu Jul 30 05:15:53 2020 -0500
+++ b/gnt.h.in Thu Aug 13 18:23:33 2020 -0500
@@ -16,206 +16,20 @@
* 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 02110-1301, USA.
+ * this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GNT_H
#define GNT_H
-/**
- * SECTION:gnt
- * @section_id: libgnt-gnt
- * @title: General
- * @short_description: General API for managing GNT
- */
#include <glib.h>
-#ifdef _WIN32
-# undef KEY_EVENT
+#ifndef GNT_GLOBAL_HEADER_INSIDE
+# define GNT_GLOBAL_HEADER_INSIDE
#endif
-#define NCURSES_WIDECHAR @NCURSES_WIDECHAR@
-#include <@NCURSES_HEADER@>
-
-#include "gntwidget.h"
-#include "gntclipboard.h"
-#include "gntcolors.h"
-#include "gntkeys.h"
-
-/**
- * gnt_init:
- *
- * Initialize GNT.
- */
-void gnt_init(void);
-
-/**
- * gnt_set_config_dir:
- * @config_dir: the path to a configuration directory, may be %NULL.
- *
- * Change directory to store gnt configuration files (default is ~).
- *
- * You have to call this before #gnt_init. You might want to call this
- * with %NULL, to free the resources, but not before a call to #gnt_quit.
- *
- * Since: 3.0.0
- */
-void gnt_set_config_dir(const gchar *config_dir);
-
-/**
- * gnt_main:
- *
- * Start running the mainloop for gnt.
- */
-void gnt_main(void);
-
-/**
- * gnt_ascii_only:
- *
- * Check whether the terminal is capable of UTF8 display.
- *
- * Returns: %FALSE if the terminal is capable of drawing UTF-8, %TRUE otherwise.
- */
-gboolean gnt_ascii_only(void);
-
-/**
- * gnt_window_present:
- * @window: The window the present.
- *
- * Present a window. If the event was triggered because of user interaction,
- * the window is moved to the foreground. Otherwise, the Urgent hint is set.
- *
- * Since: 2.1.0
- */
-void gnt_window_present(GntWidget *window);
-
-/**
- * gnt_screen_resize_widget:
- * @widget: The widget to resize.
- * @width: The desired width.
- * @height: The desired height.
- *
- * Resize a widget.
- */
-void gnt_screen_resize_widget(GntWidget *widget, int width, int height);
-
-/**
- * gnt_screen_move_widget:
- * @widget: The widget to move.
- * @x: The desired x-coordinate.
- * @y: The desired y-coordinate.
- *
- * Move a widget.
- */
-void gnt_screen_move_widget(GntWidget *widget, int x, int y);
-
-/**
- * gnt_screen_rename_widget:
- * @widget: The widget to rename.
- * @text: The new name for the widget.
- *
- * Rename a widget.
- */
-void gnt_screen_rename_widget(GntWidget *widget, const char *text);
-/**
- * gnt_widget_has_focus:
- * @widget: The widget.
- *
- * Check whether a widget has focus.
- *
- * Returns: %TRUE if the widget has the current focus, %FALSE otherwise.
- */
-gboolean gnt_widget_has_focus(GntWidget *widget);
-
-/**
- * gnt_widget_set_urgent:
- * @widget: The widget to set the URGENT hint for.
- *
- * Set the URGENT hint for a widget.
- */
-void gnt_widget_set_urgent(GntWidget *widget);
-
-/**
- * gnt_register_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 gchar *label, GCallback callback);
-
-/**
- * gnt_screen_menu_show:
- * @menu: The menu to display.
- *
- * Show a menu.
- *
- * Returns: %TRUE if the menu is displayed, %FALSE otherwise (e.g., if another menu is currently displayed).
- */
-gboolean gnt_screen_menu_show(gpointer menu);
-
-/**
- * gnt_quit:
- *
- * Terminate the mainloop of gnt.
- */
-void gnt_quit(void);
+@GNT_H_INCLUDES@
-/**
- * gnt_get_clipboard:
- *
- * Get the global clipboard.
- *
- * Returns: (transfer none): The clipboard.
- */
-GntClipboard * gnt_get_clipboard(void);
-
-/**
- * gnt_get_clipboard_string:
- *
- * Get the string in the clipboard.
- *
- * Returns: A copy of the string in the clipboard. The caller
- * must g_free() the string.
- */
-gchar * gnt_get_clipboard_string(void);
-
-/**
- * gnt_set_clipboard_string:
- * @string: The new content of the new clipboard.
- *
- * Set the contents of the global clipboard.
- */
-void gnt_set_clipboard_string(const gchar *string);
-
-/**
- * gnt_giveup_console:
- * @wd: The working directory for the new application.
- * @argv: The argument vector.
- * @envp: The environment, or %NULL.
- * @stin: Location to store the child's stdin, or %NULL.
- * @stout: Location to store the child's stdout, or %NULL.
- * @sterr: Location to store the child's stderr, or %NULL.
- * @callback: The callback to call after the child exits.
- * @data: The data to pass to the callback.
- *
- * Spawn a different application that will consume the console.
- *
- * Returns: %TRUE if the child was successfully spawned, %FALSE otherwise.
- */
-gboolean gnt_giveup_console(const char *wd, char **argv, char **envp,
- gint *stin, gint *stout, gint *sterr,
- void (*callback)(int status, gpointer data), gpointer data);
-
-/**
- * gnt_is_refugee:
- *
- * Check whether a child process is in control of the current terminal.
- *
- * Returns: %TRUE if a child process (eg., PAGER) is occupying the current
- * terminal, %FALSE otherwise.
- */
-gboolean gnt_is_refugee(void);
+#undef GNT_GLOBAL_HEADER_INSIDE
#endif /* GNT_H */
--- a/gntbindable.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntbindable.c Thu Aug 13 18:23:33 2020 -0500
@@ -28,7 +28,6 @@
#include "gntbindable.h"
#include "gntstyle.h"
-#include "gnt.h"
#include "gntutils.h"
#include "gnttextview.h"
#include "gnttree.h"
--- a/gntbindable.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntbindable.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_BINDABLE_H
#define GNT_BINDABLE_H
/**
--- a/gntbox.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntbox.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_BOX_H
#define GNT_BOX_H
/**
@@ -29,7 +33,6 @@
* @short_description: A box for packing widgets in a single row or column
*/
-#include "gnt.h"
#include "gntwidget.h"
#define GNT_TYPE_BOX gnt_box_get_type()
--- a/gntboxprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntboxprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_BOX_PRIVATE_H
#define GNT_BOX_PRIVATE_H
-#include "gnt.h"
#include "gntbox.h"
G_BEGIN_DECLS
--- a/gntbutton.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntbutton.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_BUTTON_H
#define GNT_BUTTON_H
/**
@@ -32,7 +36,6 @@
#include <glib.h>
#include <glib-object.h>
-#include "gnt.h"
#include "gntwidget.h"
#define GNT_TYPE_BUTTON gnt_button_get_type()
--- a/gntcheckbox.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntcheckbox.c Thu Aug 13 18:23:33 2020 -0500
@@ -23,6 +23,7 @@
#include "gntinternal.h"
#include "gntcheckbox.h"
+#include "gntncurses.h"
#include "gntwidgetprivate.h"
typedef struct
--- a/gntcheckbox.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntcheckbox.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_CHECK_BOX_H
#define GNT_CHECK_BOX_H
/**
@@ -30,7 +34,6 @@
* @see_also: #GntButton
*/
-#include "gnt.h"
#include "gntbutton.h"
#include "gntcolors.h"
#include "gntkeys.h"
--- a/gntclipboard.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntclipboard.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_CLIPBOARD_H
#define GNT_CLIPBOARD_H
/**
--- a/gntcolors.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntcolors.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_COLORS_H
#define GNT_COLORS_H
/**
--- a/gntcombobox.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntcombobox.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_COMBO_BOX_H
#define GNT_COMBO_BOX_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget for selecting between multiple choices
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntwidget.h"
--- a/gntentry.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntentry.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_ENTRY_H
#define GNT_ENTRY_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget for entering text
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntwidget.h"
--- a/gntfilesel.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntfilesel.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_FILE_SEL_H
#define GNT_FILE_SEL_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget for selecting a file or directory
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntwindow.h"
--- a/gntinternal.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntinternal.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,8 +20,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "gnt.h"
-#include "gntconfig.h"
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
+#include <gntconfig.h>
+#include <gntmain.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "Gnt"
--- a/gntkeys.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntkeys.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_KEYS_H
#define GNT_KEYS_H
/**
--- a/gntlabel.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntlabel.c Thu Aug 13 18:23:33 2020 -0500
@@ -26,6 +26,7 @@
#include "gnttextviewprivate.h"
#include "gntwidgetprivate.h"
+#include "gntncurses.h"
#include <string.h>
--- a/gntlabel.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntlabel.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_LABEL_H
#define GNT_LABEL_H
/**
@@ -29,9 +33,9 @@
* @short_description: A widget that displays text
*/
-#include "gnt.h"
+#include "gntncurses.h"
+#include "gnttextview.h"
#include "gntwidget.h"
-#include "gnttextview.h"
#define GNT_TYPE_LABEL gnt_label_get_type()
--- a/gntline.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntline.c Thu Aug 13 18:23:33 2020 -0500
@@ -23,6 +23,7 @@
#include "gntinternal.h"
#include "gntline.h"
+#include "gntncurses.h"
#include "gntwidgetprivate.h"
struct _GntLine
--- a/gntline.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntline.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_LINE_H
#define GNT_LINE_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget that draws a horizontal or vertical line
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntwidget.h"
--- a/gntmain.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmain.c Thu Aug 13 18:23:33 2020 -0500
@@ -36,7 +36,6 @@
#undef GNT_LOG_DOMAIN
#define GNT_LOG_DOMAIN "Main"
-#include "gnt.h"
#include "gntbox.h"
#include "gntbutton.h"
#include "gntcolors.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gntmain.h Thu Aug 13 18:23:33 2020 -0500
@@ -0,0 +1,221 @@
+/*
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
+#ifndef GNT_MAIN_H
+#define GNT_MAIN_H
+
+/**
+ * SECTION:gnt
+ * @section_id: libgnt-gnt
+ * @title: General
+ * @short_description: General API for managing GNT
+ */
+
+#include <glib.h>
+
+#include <gntclipboard.h>
+#include <gntwidget.h>
+
+G_BEGIN_DECLS
+
+/**
+ * gnt_init:
+ *
+ * Initialize GNT.
+ */
+void gnt_init(void);
+
+/**
+ * gnt_main:
+ *
+ * Start running the mainloop for gnt.
+ */
+void gnt_main(void);
+
+/**
+ * gnt_quit:
+ *
+ * Terminate the mainloop of gnt.
+ */
+void gnt_quit(void);
+
+/**
+ * gnt_set_config_dir:
+ * @config_dir: the path to a configuration directory, may be %NULL.
+ *
+ * Change directory to store gnt configuration files (default is ~).
+ *
+ * You have to call this before #gnt_init. You might want to call this
+ * with %NULL, to free the resources, but not before a call to #gnt_quit.
+ *
+ * Since: 3.0.0
+ */
+void gnt_set_config_dir(const gchar *config_dir);
+
+/**
+ * gnt_ascii_only:
+ *
+ * Check whether the terminal is capable of UTF8 display.
+ *
+ * Returns: %FALSE if the terminal is capable of drawing UTF-8, %TRUE otherwise.
+ */
+gboolean gnt_ascii_only(void);
+
+/**
+ * gnt_window_present:
+ * @window: The window the present.
+ *
+ * Present a window. If the event was triggered because of user interaction,
+ * the window is moved to the foreground. Otherwise, the Urgent hint is set.
+ *
+ * Since: 2.1.0
+ */
+void gnt_window_present(GntWidget *window);
+
+/**
+ * gnt_screen_resize_widget:
+ * @widget: The widget to resize.
+ * @width: The desired width.
+ * @height: The desired height.
+ *
+ * Resize a widget.
+ */
+void gnt_screen_resize_widget(GntWidget *widget, int width, int height);
+
+/**
+ * gnt_screen_move_widget:
+ * @widget: The widget to move.
+ * @x: The desired x-coordinate.
+ * @y: The desired y-coordinate.
+ *
+ * Move a widget.
+ */
+void gnt_screen_move_widget(GntWidget *widget, int x, int y);
+
+/**
+ * gnt_screen_rename_widget:
+ * @widget: The widget to rename.
+ * @text: The new name for the widget.
+ *
+ * Rename a widget.
+ */
+void gnt_screen_rename_widget(GntWidget *widget, const char *text);
+
+/**
+ * gnt_widget_has_focus:
+ * @widget: The widget.
+ *
+ * Check whether a widget has focus.
+ *
+ * Returns: %TRUE if the widget has the current focus, %FALSE otherwise.
+ */
+gboolean gnt_widget_has_focus(GntWidget *widget);
+
+/**
+ * gnt_widget_set_urgent:
+ * @widget: The widget to set the URGENT hint for.
+ *
+ * Set the URGENT hint for a widget.
+ */
+void gnt_widget_set_urgent(GntWidget *widget);
+
+/**
+ * gnt_register_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 gchar *label, GCallback callback);
+
+/**
+ * gnt_screen_menu_show:
+ * @menu: The menu to display.
+ *
+ * Show a menu.
+ *
+ * Returns: %TRUE if the menu is displayed, %FALSE otherwise (e.g., if another menu is currently displayed).
+ */
+gboolean gnt_screen_menu_show(gpointer menu);
+
+/**
+ * gnt_get_clipboard:
+ *
+ * Get the global clipboard.
+ *
+ * Returns: (transfer none): The clipboard.
+ */
+GntClipboard * gnt_get_clipboard(void);
+
+/**
+ * gnt_get_clipboard_string:
+ *
+ * Get the string in the clipboard.
+ *
+ * Returns: A copy of the string in the clipboard. The caller
+ * must g_free() the string.
+ */
+gchar * gnt_get_clipboard_string(void);
+
+/**
+ * gnt_set_clipboard_string:
+ * @string: The new content of the new clipboard.
+ *
+ * Set the contents of the global clipboard.
+ */
+void gnt_set_clipboard_string(const gchar *string);
+
+/**
+ * gnt_giveup_console:
+ * @wd: The working directory for the new application.
+ * @argv: The argument vector.
+ * @envp: The environment, or %NULL.
+ * @stin: Location to store the child's stdin, or %NULL.
+ * @stout: Location to store the child's stdout, or %NULL.
+ * @sterr: Location to store the child's stderr, or %NULL.
+ * @callback: The callback to call after the child exits.
+ * @data: The data to pass to the callback.
+ *
+ * Spawn a different application that will consume the console.
+ *
+ * Returns: %TRUE if the child was successfully spawned, %FALSE otherwise.
+ */
+gboolean gnt_giveup_console(const char *wd, char **argv, char **envp,
+ gint *stin, gint *stout, gint *sterr,
+ void (*callback)(int status, gpointer data), gpointer data);
+
+/**
+ * gnt_is_refugee:
+ *
+ * Check whether a child process is in control of the current terminal.
+ *
+ * Returns: %TRUE if a child process (eg., PAGER) is occupying the current
+ * terminal, %FALSE otherwise.
+ */
+gboolean gnt_is_refugee(void);
+
+G_END_DECLS
+
+#endif /* GNT_MAIN_H */
--- a/gntmainprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmainprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,11 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MAIN_PRIVATE_H
#define GNT_MAIN_PRIVATE_H
-#include "gnt.h"
-
G_BEGIN_DECLS
/* Private access to some internals. Contact us if you need these. */
--- a/gntmenu.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenu.c Thu Aug 13 18:23:33 2020 -0500
@@ -22,9 +22,10 @@
#include "gntinternal.h"
#include "gntmenu.h"
+
#include "gntmenuitemcheck.h"
-
#include "gntmenuitemprivate.h"
+#include "gntncurses.h"
#include "gntwidgetprivate.h"
#include <ctype.h>
--- a/gntmenu.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenu.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MENU_H
#define GNT_MENU_H
/**
@@ -30,7 +34,6 @@
* @see_also: #GntMenuItem #GntMenuItemCheck
*/
-#include "gnt.h"
#include "gnttree.h"
#include "gntcolors.h"
#include "gntkeys.h"
--- a/gntmenuitem.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenuitem.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MENUITEM_H
#define GNT_MENUITEM_H
/**
--- a/gntmenuitemcheck.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenuitemcheck.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MENU_ITEM_CHECK_H
#define GNT_MENU_ITEM_CHECK_H
/**
@@ -30,7 +34,6 @@
* @see_also: #GntMenu #GntMenuItem
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntmenuitem.h"
--- a/gntmenuitemprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenuitemprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MENUITEM_PRIVATE_H
#define GNT_MENUITEM_PRIVATE_H
-#include "gnt.h"
#include "gntmenuitem.h"
G_BEGIN_DECLS
--- a/gntmenuprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntmenuprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_MENU_PRIVATE_H
#define GNT_MENU_PRIVATE_H
-#include "gnt.h"
#include "gntmenu.h"
G_BEGIN_DECLS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gntncurses.h.in Thu Aug 13 18:23:33 2020 -0500
@@ -0,0 +1,39 @@
+/*
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
+#ifndef GNT_NCURSES_H
+#define GNT_NCURSES_H
+
+/* ncurses defines KEY_EVENT which conflicts on windows some how, so undefine
+ * the windows constants.
+ */
+#ifdef _WIN32
+# undef KEY_EVENT
+#endif
+
+#define NCURSES_WIDECHAR @NCURSES_WIDECHAR@
+#include <@NCURSES_HEADER@>
+
+#endif /* GNT_NCURSES_H */
--- a/gntprogressbar.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntprogressbar.c Thu Aug 13 18:23:33 2020 -0500
@@ -22,8 +22,9 @@
#include "gntinternal.h"
#include "gntprogressbar.h"
+
+#include "gntncurses.h"
#include "gntutils.h"
-
#include "gntwidgetprivate.h"
#include <string.h>
--- a/gntprogressbar.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntprogressbar.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_PROGRESS_BAR_H
#define GNT_PROGRESS_BAR_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget that shows progress visually
*/
-#include "gnt.h"
#include "gntwidget.h"
#define GNT_TYPE_PROGRESS_BAR (gnt_progress_bar_get_type ())
--- a/gntslider.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntslider.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_SLIDER_H
#define GNT_SLIDER_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget for selecting from a range of values
*/
-#include "gnt.h"
#include "gntlabel.h"
#include "gntwidget.h"
--- a/gntstyle.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntstyle.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_STYLE_H
#define GNT_STYLE_H
/**
@@ -29,7 +33,6 @@
* @short_description: Styling from a configuration file
*/
-#include "gnt.h"
#include "gntwm.h"
/**
--- a/gntstyleprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntstyleprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_STYLE_PRIVATE_H
#define GNT_STYLE_PRIVATE_H
-#include "gnt.h"
#include "gntstyle.h"
G_BEGIN_DECLS
--- a/gnttextview.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gnttextview.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_TEXT_VIEW_H
#define GNT_TEXT_VIEW_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget for displaying larger bodies of formatted text
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gntwidget.h"
--- a/gnttextviewprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gnttextviewprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_TEXT_VIEW_PRIVATE_H
#define GNT_TEXT_VIEW_PRIVATE_H
-#include "gnt.h"
#include "gnttextview.h"
G_BEGIN_DECLS
--- a/gnttree.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gnttree.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_TREE_H
#define GNT_TREE_H
/**
@@ -29,7 +33,6 @@
* @short_description: A widget that shows a tree of items
*/
-#include "gnt.h"
#include "gntcolors.h"
#include "gntkeys.h"
#include "gnttextview.h"
--- a/gnttreeprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gnttreeprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_TREE_PRIVATE_H
#define GNT_TREE_PRIVATE_H
-#include "gnt.h"
#include "gnttree.h"
G_BEGIN_DECLS
--- a/gntutils.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntutils.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_UTILS_H
#define GNT_UTILS_H
/**
@@ -31,7 +35,6 @@
#include <glib.h>
-#include "gnt.h"
#include "gnttextview.h"
#include "gntwidget.h"
--- a/gntversion.h.in Thu Jul 30 05:15:53 2020 -0500
+++ b/gntversion.h.in Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_VERSION_H
#define GNT_VERSION_H
/**
--- a/gntwidget.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwidget.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_WIDGET_H
#define GNT_WIDGET_H
/**
--- a/gntwidgetprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwidgetprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_WIDGET_PRIVATE_H
#define GNT_WIDGET_PRIVATE_H
-#include "gnt.h"
#include "gntwidget.h"
G_BEGIN_DECLS
--- a/gntwindow.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwindow.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_WINDOW_H
#define GNT_WINDOW_H
/**
@@ -29,7 +33,6 @@
* @short_description: A toplevel window
*/
-#include "gnt.h"
#include "gntbox.h"
#include "gntcolors.h"
#include "gntkeys.h"
--- a/gntwm.c Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwm.c Thu Aug 13 18:23:33 2020 -0500
@@ -48,7 +48,6 @@
#include "gntwm.h"
#include "gntstyle.h"
-#include "gnt.h"
#include "gntbox.h"
#include "gntbutton.h"
#include "gntentry.h"
--- a/gntwm.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwm.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNTWM_H
#define GNTWM_H
/**
@@ -29,7 +33,6 @@
* @short_description: A window manager
*/
-#include "gnt.h"
#include "gntwidget.h"
#include "gntmenu.h"
#include "gntws.h"
--- a/gntwmprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwmprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_WM_PRIVATE_H
#define GNT_WM_PRIVATE_H
-#include "gnt.h"
#include "gntwm.h"
typedef enum
--- a/gntws.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntws.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,6 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNTWS_H
#define GNTWS_H
/**
@@ -29,7 +33,6 @@
* @short_description: Workspace API
*/
-#include "gnt.h"
#include "gntwidget.h"
#include <panel.h>
--- a/gntwsprivate.h Thu Jul 30 05:15:53 2020 -0500
+++ b/gntwsprivate.h Thu Aug 13 18:23:33 2020 -0500
@@ -20,10 +20,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#if !defined(GNT_GLOBAL_HEADER_INSIDE) && !defined(GNT_COMPILATION)
+# error "only <gnt.h> may be included directly"
+#endif
+
#ifndef GNT_WS_PRIVATE_H
#define GNT_WS_PRIVATE_H
-#include "gnt.h"
#include "gntws.h"
G_BEGIN_DECLS
--- a/meson.build Thu Jul 30 05:15:53 2020 -0500
+++ b/meson.build Thu Aug 13 18:23:33 2020 -0500
@@ -146,7 +146,6 @@
gnt_config.set10('NCURSES_WIDECHAR', ncurses_widechar)
libgnt_SOURCES = [
- 'gntwidget.c',
'gntbindable.c',
'gntbox.c',
'gntbutton.c',
@@ -159,6 +158,7 @@
'gntkeys.c',
'gntlabel.c',
'gntline.c',
+ 'gntmain.c',
'gntmenu.c',
'gntmenuitem.c',
'gntmenuitemcheck.c',
@@ -168,14 +168,13 @@
'gnttextview.c',
'gnttree.c',
'gntutils.c',
+ 'gntwidget.c',
'gntwindow.c',
'gntwm.c',
- 'gntws.c',
- 'gntmain.c'
+ 'gntws.c'
]
libgnt_headers = [
- 'gntwidget.h',
'gntbindable.h',
'gntbox.h',
'gntbutton.h',
@@ -188,6 +187,7 @@
'gntkeys.h',
'gntlabel.h',
'gntline.h',
+ 'gntmain.h',
'gntmenu.h',
'gntmenuitem.h',
'gntmenuitemcheck.h',
@@ -197,10 +197,10 @@
'gnttextview.h',
'gnttree.h',
'gntutils.h',
+ 'gntwidget.h',
'gntwindow.h',
'gntwm.h',
'gntws.h',
-# 'gnt.h'
]
# Check for Python headers
@@ -216,9 +216,19 @@
configuration : gnt_config,
install : true,
install_dir : get_option('includedir') / 'gnt3')
-# This is temporary until we can hide GObject internals:
+gntncurses_h = configure_file(input : 'gntncurses.h.in', output : 'gntncurses.h',
+ configuration : gnt_config,
+ install : true,
+ install_dir : get_option('includedir') / 'gnt3')
+
+GNT_H_INCLUDES = []
+foreach header : libgnt_headers + ['gntncurses.h', 'gntversion.h']
+ GNT_H_INCLUDES += '#include <@0@>'.format(header)
+endforeach
+gnt_h_config = configuration_data()
+gnt_h_config.set('GNT_H_INCLUDES', '\n'.join(GNT_H_INCLUDES))
gnt_h = configure_file(input : 'gnt.h.in', output : 'gnt.h',
- configuration : gnt_config,
+ configuration : gnt_h_config,
install : true,
install_dir : get_option('includedir') / 'gnt3')
@@ -238,6 +248,10 @@
libgnt_inc = include_directories('.')
libgnt = library('gnt',
libgnt_SOURCES,
+ libgnt_headers,
+ gnt_h,
+ gntncurses_h,
+ c_args : ['-DGNT_COMPILATION'],
install : true,
version : '@0@.@1@.@2@'.format(gnt_soversion,
gnt_minor_version,
@@ -267,7 +281,7 @@
identifier_prefix : 'Gnt',
nsversion : '@0@.@1@'.format(gnt_major_version, gnt_minor_version),
install : true,
- extra_args : ['--quiet'])
+ extra_args : ['-DGNT_COMPILATION', '--quiet'])
endif
subdir('wms')
--- a/test.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,5 +1,4 @@
#include "gntbutton.h"
-#include "gnt.h"
#include "gntkeys.h"
#include "gnttree.h"
#include "gntbox.h"
--- a/test/combo.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/combo.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,12 +1,4 @@
#include <gnt.h>
-#include <gntbox.h>
-#include <gntbutton.h>
-#include <gntcheckbox.h>
-#include <gntcombobox.h>
-#include <gntentry.h>
-#include <gntfilesel.h>
-#include <gntlabel.h>
-#include <gntslider.h>
static void
button_activated(GntWidget *b, GntComboBox *combo)
--- a/test/file.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/file.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,4 +1,3 @@
-#include "gnt.h"
#include "gntfilesel.h"
static void
--- a/test/focus.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/focus.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,10 +1,4 @@
-#include "gntbutton.h"
-#include "gnt.h"
-#include "gntkeys.h"
-#include "gnttree.h"
-#include "gntbox.h"
-#include "gntentry.h"
-#include "gntlabel.h"
+#include <gnt.h>
static void
toggled(GntWidget *tree, gpointer key, G_GNUC_UNUSED gpointer unused)
--- a/test/keys.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/keys.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,8 +1,6 @@
#include <string.h>
+
#include <gnt.h>
-#include <gntbox.h>
-#include <gntentry.h>
-#include <gntlabel.h>
static gboolean
print_keycode(GntEntry *entry, const char *text, G_GNUC_UNUSED gpointer unused)
--- a/test/menu.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/menu.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,9 +1,4 @@
-#include "gnt.h"
-#include "gntbox.h"
-#include "gntlabel.h"
-#include "gntmenu.h"
-#include "gntmenuitem.h"
-#include "gntwindow.h"
+#include <gnt.h>
void
dothis(G_GNUC_UNUSED GntMenuItem *item, G_GNUC_UNUSED gpointer unused)
--- a/test/multiwin.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/multiwin.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,10 +1,4 @@
-#include "gnt.h"
-#include "gntbutton.h"
-#include "gntentry.h"
-#include "gntkeys.h"
-#include "gntlabel.h"
-#include "gnttree.h"
-#include "gntbox.h"
+#include <gnt.h>
gboolean
show(G_GNUC_UNUSED GntWidget *w)
--- a/test/parse.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/parse.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,4 +1,4 @@
-#include "gntutils.h"
+#include <gnt.h>
int main()
{
--- a/test/tv.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/tv.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,14 +1,8 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include "gntbutton.h"
-#include "gnt.h"
-#include "gntkeys.h"
-#include "gnttree.h"
-#include "gntbox.h"
-#include "gntentry.h"
-#include "gnttextview.h"
-#include "gntutils.h"
+
+#include <gnt.h>
static gboolean
key_pressed(GntWidget *w, const char *key, GntWidget *view)
--- a/test/wm.c Thu Jul 30 05:15:53 2020 -0500
+++ b/test/wm.c Thu Aug 13 18:23:33 2020 -0500
@@ -1,9 +1,6 @@
#include <gmodule.h>
#include <gnt.h>
-#include <gntbox.h>
-#include <gntentry.h>
-#include <gntlabel.h>
static gboolean
key_pressed(GntEntry *entry, const char *text, G_GNUC_UNUSED gpointer unused)
--- a/wms/irssi.c Thu Jul 30 05:15:53 2020 -0500
+++ b/wms/irssi.c Thu Aug 13 18:23:33 2020 -0500
@@ -33,15 +33,7 @@
#include <string.h>
#include <sys/types.h>
-#include "gntinternal.h"
-
-#include "gnt.h"
-#include "gntbox.h"
-#include "gntmenu.h"
-#include "gntstyle.h"
-#include "gntwm.h"
-#include "gntwindow.h"
-#include "gntlabel.h"
+#include <gnt.h>
#define GNT_TYPE_IRSSI_WM gnt_irssi_wm_get_type()
G_DECLARE_FINAL_TYPE(GntIrssiWM, gnt_irssi_wm, GNT, IRSSI_WM, GntWM)
--- a/wms/s.c Thu Jul 30 05:15:53 2020 -0500
+++ b/wms/s.c Thu Aug 13 18:23:33 2020 -0500
@@ -20,18 +20,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "gntinternal.h"
-
#include <string.h>
#include <sys/types.h>
-#include "gnt.h"
-#include "gntbox.h"
-#include "gntmenu.h"
-#include "gntstyle.h"
-#include "gntwm.h"
-#include "gntwindow.h"
-#include "gntlabel.h"
+#include <gnt.h>
#define GNT_TYPE_S_WM gnt_s_wm_get_type()
G_DECLARE_FINAL_TYPE(GntSWM, gnt_s_wm, GNT, S_WM, GntWM)