qulogic/libgnt

Make GntWidget internal API private or hidden.

2019-05-11, Elliott Sales de Andrade
ccbfc77c7da2
Parents b54ec8c74501
Children 719383e7d980
Make GntWidget internal API private or hidden.
--- a/gntwidget.c Sat May 11 02:01:11 2019 -0400
+++ b/gntwidget.c Sat May 11 02:01:40 2019 -0400
@@ -101,6 +101,12 @@
}
static void
+gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height)
+{
+ g_signal_emit(widget, signals[SIG_EXPOSE], 0, x, y, width, height);
+}
+
+static void
gnt_widget_map(GntWidget *widget)
{
/* Get some default size for the widget */
@@ -354,6 +360,42 @@
priv->minh = height;
}
+static gboolean
+update_queue_callback(gpointer data)
+{
+ GntWidget *widget = GNT_WIDGET(data);
+ GntWidgetPrivate *priv = gnt_widget_get_instance_private(widget);
+
+ if (priv->queue_update == 0) {
+ return FALSE;
+ }
+ if (gnt_widget_get_mapped(widget)) {
+ gnt_screen_update(widget);
+ }
+ priv->queue_update = 0;
+ return FALSE;
+}
+
+void
+gnt_widget_queue_update(GntWidget *widget)
+{
+ GntWidgetPrivate *priv = NULL;
+
+ g_return_if_fail(GNT_IS_WIDGET(widget));
+ priv = gnt_widget_get_instance_private(widget);
+
+ if (priv->window == NULL) {
+ return;
+ }
+
+ widget = gnt_widget_get_toplevel(widget);
+
+ if (priv->queue_update == 0) {
+ priv->queue_update =
+ g_timeout_add(0, update_queue_callback, widget);
+ }
+}
+
/******************************************************************************
* GntWidget API
*****************************************************************************/
@@ -462,12 +504,6 @@
}
void
-gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height)
-{
- g_signal_emit(widget, signals[SIG_EXPOSE], 0, x, y, width, height);
-}
-
-void
gnt_widget_hide(GntWidget *widget)
{
GntWidgetPrivate *priv = NULL;
@@ -731,41 +767,6 @@
g_signal_emit(widget, signals[SIG_ACTIVATE], 0);
}
-static gboolean
-update_queue_callback(gpointer data)
-{
- GntWidget *widget = GNT_WIDGET(data);
- GntWidgetPrivate *priv = gnt_widget_get_instance_private(widget);
-
- if (priv->queue_update == 0) {
- return FALSE;
- }
- if (gnt_widget_get_mapped(widget)) {
- gnt_screen_update(widget);
- }
- priv->queue_update = 0;
- return FALSE;
-}
-
-void gnt_widget_queue_update(GntWidget *widget)
-{
- GntWidgetPrivate *priv = NULL;
-
- g_return_if_fail(GNT_IS_WIDGET(widget));
- priv = gnt_widget_get_instance_private(widget);
-
- if (priv->window == NULL) {
- return;
- }
-
- widget = gnt_widget_get_toplevel(widget);
-
- if (priv->queue_update == 0) {
- priv->queue_update =
- g_timeout_add(0, update_queue_callback, widget);
- }
-}
-
gboolean gnt_widget_confirm_size(GntWidget *widget, int width, int height)
{
gboolean ret = FALSE;
--- a/gntwidget.h Sat May 11 02:01:11 2019 -0400
+++ b/gntwidget.h Sat May 11 02:01:40 2019 -0400
@@ -127,15 +127,6 @@
void gnt_widget_draw(GntWidget *widget);
/**
- * gnt_widget_expose:
- *
- * Expose part of a widget.
- *
- * Internal function -- do not use.
- */
-void gnt_widget_expose(GntWidget *widget, int x, int y, int width, int height);
-
-/**
* gnt_widget_hide:
* @widget: The widget to hide.
*
@@ -319,14 +310,6 @@
const gchar *gnt_widget_get_name(GntWidget *widget);
/**
- * gnt_widget_queue_update:
- *
- * Internal function -- do not use.
- * Use gnt_widget_draw() instead.
- */
-void gnt_widget_queue_update(GntWidget *widget);
-
-/**
* gnt_widget_set_take_focus:
* @widget: The widget.
* @set: %TRUE if the widget can take focus.
--- a/gntwidgetprivate.h Sat May 11 02:01:11 2019 -0400
+++ b/gntwidgetprivate.h Sat May 11 02:01:40 2019 -0400
@@ -33,6 +33,7 @@
void gnt_widget_set_minimum_size(GntWidget *widget, gint width, gint height);
void gnt_widget_get_internal_size(GntWidget *widget, gint *width, gint *height);
void gnt_widget_set_internal_size(GntWidget *widget, gint width, gint height);
+void gnt_widget_queue_update(GntWidget *widget);
G_END_DECLS