From 639b81c552e063b1ed6a1a5b3a84b050c6c003d0 Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 10 Dec 2018 10:06:11 -0200 Subject: [PATCH] Working on gtk-doc support. --- gtkdoc.sh | 26 ++++++++++++++++++++++++++ src/include/v3270.h | 6 +----- src/v3270/accessible.c | 4 ++++ src/v3270/properties.c | 2 +- src/v3270/widget.c | 3 +-- 5 files changed, 33 insertions(+), 8 deletions(-) create mode 100755 gtkdoc.sh diff --git a/gtkdoc.sh b/gtkdoc.sh new file mode 100755 index 0000000..ee0bf1d --- /dev/null +++ b/gtkdoc.sh @@ -0,0 +1,26 @@ +#!/bin/bash -x +# https://wiki.gnome.org/DocumentationProject/GtkDoc + +MYDIR=${PWD} + +make Debug + +rm -fr gtkdoc +mkdir gtkdoc +cd gtkdoc + +gtkdoc-scan \ + --module=tn3270 \ + --source-dir ${MYDIR}/src/include + +LD_LIBRARY_PATH=${MYDIR}/.bin/Debug \ + gtkdoc-scangobj \ + --cflags "$(pkg-config --cflags gtk+-3.0 gmodule-2.0 glib-2.0)" \ + --ldflags "$(pkg-config --libs gtk+-3.0 gmodule-2.0 glib-2.0) -L../.bin/Debug -lv3270 -l3270" \ + --module tn3270 + +gtkdoc-mkdb \ + --module tn3270 \ + --output-format xml \ + --source-dir ${MYDIR}/src + diff --git a/src/include/v3270.h b/src/include/v3270.h index 32b2b5b..b8da75c 100644 --- a/src/include/v3270.h +++ b/src/include/v3270.h @@ -64,10 +64,6 @@ typedef struct _v3270 v3270; typedef struct _v3270Class v3270Class; - /** - * @brief Informações para desenho de fontes com o cairo. - * - */ typedef struct _v3270FontInfo { guint width; @@ -233,7 +229,7 @@ GtkIMContext * v3270_get_im_context(GtkWidget *widget); gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix); void v3270_popup_message(GtkWidget *widget, LIB3270_NOTIFY type, const gchar *title, const gchar *message, const gchar *text); - const gchar * v3270_get_session_name(GtkWidget *widget); + const gchar * v3270_get_session_name(GtkWidget *widget); void v3270_set_session_name(GtkWidget *widget, const gchar *name); int v3270_set_script(GtkWidget *widget, const gchar id, gboolean on); void v3270_set_scaled_fonts(GtkWidget *widget, gboolean on); diff --git a/src/v3270/accessible.c b/src/v3270/accessible.c index bcbb633..1ba388c 100644 --- a/src/v3270/accessible.c +++ b/src/v3270/accessible.c @@ -554,6 +554,10 @@ static AtkAttributeSet * v3270_accessible_get_default_attributes (AtkText *text) } /** + * v3270_accessible_get_run_attributes: + * + * @widget: V3270 widget. + * * Creates an AtkAttributeSet which consists of the attributes explicitly * set at the position offset in the text. start_offset and end_offset are set * to the start and end of the range around offset where the attributes are invariant. diff --git a/src/v3270/properties.c b/src/v3270/properties.c index 2567177..2fd9031 100644 --- a/src/v3270/properties.c +++ b/src/v3270/properties.c @@ -181,7 +181,7 @@ "url", "url", "Host URL", - getenv("LIB3270_DEFAULT_HOST"), + NULL, G_PARAM_READABLE|G_PARAM_WRITABLE); g_object_class_install_property(gobject_class,PROP_AUTO_DISCONNECT,v3270_properties[PROP_URL]); diff --git a/src/v3270/widget.c b/src/v3270/widget.c index e03049f..54c7ad1 100644 --- a/src/v3270/widget.c +++ b/src/v3270/widget.c @@ -1611,8 +1611,7 @@ gboolean v3270_get_toggle(GtkWidget *widget, LIB3270_TOGGLE ix) **/ const gchar * v3270_set_url(GtkWidget *widget, const gchar *uri) { - g_return_val_if_fail(GTK_IS_V3270(widget),""); - g_return_val_if_fail(uri != NULL,""); + g_return_val_if_fail(GTK_IS_V3270(widget),NULL); return lib3270_set_url(GTK_V3270(widget)->host,uri); } -- libgit2 0.21.2