Silence some gir warnings by hiding stuff
* Hide gnt_text_format_flag_to_chtype.
It's not used downstream in Finch, and is an implementation detail.
* Make gnt_widget_get_window return a gpointer.
Returning a `WINDOW *` causes gir to complain about unknown types. I'd rather
just remove this function, but it appears to be used by the window manager
plugins.
Testing Done:
Compile tested only.
Reviewed at https://reviews.imfreedom.org/r/55/
--- a/gntlabel.c Thu Jul 02 03:19:08 2020 -0500
+++ b/gntlabel.c Thu Jul 30 05:15:53 2020 -0500
@@ -24,6 +24,7 @@
+#include "gnttextviewprivate.h" #include "gntwidgetprivate.h"
--- a/gnttextview.c Thu Jul 02 03:19:08 2020 -0500
+++ b/gnttextview.c Thu Jul 30 05:15:53 2020 -0500
@@ -28,6 +28,7 @@
+#include "gnttextviewprivate.h" #include "gntwidgetprivate.h"
--- a/gnttextview.h Thu Jul 02 03:19:08 2020 -0500
+++ b/gnttextview.h Thu Jul 30 05:15:53 2020 -0500
@@ -145,16 +145,6 @@
void gnt_text_view_next_line(GntTextView *view);
- * gnt_text_format_flag_to_chtype:
- * @flags: The GNT text format.
- * Convert GNT-text formats to ncurses-text attributes.
- * Returns: Nucrses text attribute.
-chtype gnt_text_format_flag_to_chtype(GntTextFormatFlags flags);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gnttextviewprivate.h Thu Jul 30 05:15:53 2020 -0500
@@ -0,0 +1,45 @@
+ * 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 + * 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 02110-1301, USA. +#ifndef GNT_TEXT_VIEW_PRIVATE_H +#define GNT_TEXT_VIEW_PRIVATE_H +#include "gnttextview.h" +/* Private access to some internals. Contact us if you need these. */ + * gnt_text_format_flag_to_chtype: + * @flags: The GNT text format. + * Convert GNT-text formats to ncurses-text attributes. + * Returns: Ncurses text attribute. +chtype gnt_text_format_flag_to_chtype(GntTextFormatFlags flags); +#endif /* GNT_TEXT_VIEW_PRIVATE_H */ --- a/gntwidget.c Thu Jul 02 03:19:08 2020 -0500
+++ b/gntwidget.c Thu Jul 30 05:15:53 2020 -0500
@@ -525,7 +525,7 @@
gnt_widget_set_mapped(widget, FALSE);
gnt_widget_get_window(GntWidget *widget)
GntWidgetPrivate *priv = NULL;
--- a/gntwidget.h Thu Jul 02 03:19:08 2020 -0500
+++ b/gntwidget.h Thu Jul 30 05:15:53 2020 -0500
@@ -156,13 +156,14 @@
- * Get the window of a widget.
+ * Get the Ncurses window of a widget. - * Returns: (transfer none) (nullable): The widget's window.
+ * Returns: (transfer none) (nullable): The widget's window, as a gpointer. + * Cast to WINDOW* for use. -WINDOW *gnt_widget_get_window(GntWidget *widget);
+gpointer gnt_widget_get_window(GntWidget *widget);