Commit 80464a35319fc5f153be284886f669919b7a7596
1 parent
cad15687
Exists in
master
and in
1 other branch
Adding some documentation for testing gtk-doc.
Showing
6 changed files
with
62 additions
and
41 deletions
Show diff stats
.gitignore
autogen.sh
@@ -6,6 +6,8 @@ test -n "$srcdir" || srcdir=. | @@ -6,6 +6,8 @@ test -n "$srcdir" || srcdir=. | ||
6 | olddir=`pwd` | 6 | olddir=`pwd` |
7 | cd "$srcdir" | 7 | cd "$srcdir" |
8 | 8 | ||
9 | +mkdir -p m4 | ||
10 | + | ||
9 | aclocal | 11 | aclocal |
10 | if test $? != 0 ; then | 12 | if test $? != 0 ; then |
11 | echo "aclocal failed." | 13 | echo "aclocal failed." |
configure.ac
@@ -36,6 +36,9 @@ AC_INIT([libv3270], [5.2], [perry.werneck@gmail.com]) | @@ -36,6 +36,9 @@ AC_INIT([libv3270], [5.2], [perry.werneck@gmail.com]) | ||
36 | dnl Place auxilliary scripts here. | 36 | dnl Place auxilliary scripts here. |
37 | AC_CONFIG_AUX_DIR([scripts]) | 37 | AC_CONFIG_AUX_DIR([scripts]) |
38 | 38 | ||
39 | +dnl Recommended for gtk-doc (https://developer.gnome.org/gtk-doc-manual/stable/settingup_autoconf.html.en) | ||
40 | +AC_CONFIG_MACRO_DIR(m4) | ||
41 | + | ||
39 | dnl Compute the canonical host-system type | 42 | dnl Compute the canonical host-system type |
40 | AC_CANONICAL_HOST | 43 | AC_CANONICAL_HOST |
41 | 44 | ||
@@ -234,36 +237,16 @@ AC_SUBST(GLIB_LIBS) | @@ -234,36 +237,16 @@ AC_SUBST(GLIB_LIBS) | ||
234 | AC_SUBST(GLIB_CFLAGS) | 237 | AC_SUBST(GLIB_CFLAGS) |
235 | 238 | ||
236 | dnl --------------------------------------------------------------------------- | 239 | dnl --------------------------------------------------------------------------- |
237 | -dnl Check for doxygen | 240 | +dnl Check for GTK DOC |
238 | dnl --------------------------------------------------------------------------- | 241 | dnl --------------------------------------------------------------------------- |
239 | 242 | ||
240 | -AC_PATH_TOOL([DOXYGEN], [doxygen]) | ||
241 | - | ||
242 | -dnl Help line for graphviz (optionally used by doxygen) | ||
243 | -AC_ARG_ENABLE(graphviz, | ||
244 | - AS_HELP_STRING([--disable-graphviz], [prevent doxygen from using dot]), | ||
245 | - [wantgraphviz=$enableval], [wantgraphviz=yes]) | ||
246 | - | ||
247 | -AC_CHECK_PROGS([GRAPHVIZDOT], [dot]) | ||
248 | -AC_MSG_CHECKING([whether doxygen should use graphviz]) | ||
249 | -if test "x$wantgraphviz" = "xyes" ; then | ||
250 | - if test $GRAPHVIZDOT ; then | ||
251 | - AC_MSG_RESULT([yes]) | ||
252 | - usegraphviz=yes | ||
253 | - else | ||
254 | - AC_MSG_RESULT([no, graphviz missing]) | ||
255 | - usegraphviz=no | ||
256 | - fi | ||
257 | -else | ||
258 | - AC_MSG_RESULT([no, disabled by configure]) | ||
259 | - usegraphviz=no | ||
260 | -fi | ||
261 | - | ||
262 | -AC_SUBST(HAVE_DOT,`echo $usegraphviz | tr yesno YESNO`) | 243 | +dnl https://developer.gnome.org/gtk-doc-manual/stable/settingup_autoconf.html.en |
263 | 244 | ||
264 | -if test "x$DOXYGEN" != "x"; then | ||
265 | - AC_CONFIG_FILES(doxygen/doxyfile) | ||
266 | -fi | 245 | +m4_ifdef([GTK_DOC_CHECK], [ |
246 | +GTK_DOC_CHECK([1.14],[--flavour no-tmpl]) | ||
247 | +],[ | ||
248 | +AM_CONDITIONAL([ENABLE_GTK_DOC], false) | ||
249 | +]) | ||
267 | 250 | ||
268 | dnl --------------------------------------------------------------------------- | 251 | dnl --------------------------------------------------------------------------- |
269 | dnl Check for pic | 252 | dnl Check for pic |
src/filetransfer/activity.c
@@ -27,6 +27,16 @@ | @@ -27,6 +27,16 @@ | ||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | +/** | ||
31 | + * SECTION:V3270FTActivity | ||
32 | + * @Short_description: A file transfer activity. | ||
33 | + * @Title: V3270FTActivity | ||
34 | + * | ||
35 | + * The #V3270FTActivity object represents a single file transfer operation | ||
36 | + * and contens the file names and the settings used for transfer. | ||
37 | + * | ||
38 | + */ | ||
39 | + | ||
30 | #include <internals.h> | 40 | #include <internals.h> |
31 | #include <stdlib.h> | 41 | #include <stdlib.h> |
32 | #include "private.h" | 42 | #include "private.h" |
@@ -143,17 +153,40 @@ | @@ -143,17 +153,40 @@ | ||
143 | widget->values[LIB3270_FT_VALUE_DFT] = 4096; | 153 | widget->values[LIB3270_FT_VALUE_DFT] = 4096; |
144 | } | 154 | } |
145 | 155 | ||
156 | + /** | ||
157 | + * v3270_ft_activity_new: | ||
158 | + * | ||
159 | + * Creates an empty file transfer activity. | ||
160 | + * | ||
161 | + * Returns: a new #V3270FTActivity. | ||
162 | + */ | ||
146 | LIB3270_EXPORT GObject * v3270_ft_activity_new() | 163 | LIB3270_EXPORT GObject * v3270_ft_activity_new() |
147 | { | 164 | { |
148 | return g_object_new(G_TYPE_V3270_FT_ACTIVITY, NULL); | 165 | return g_object_new(G_TYPE_V3270_FT_ACTIVITY, NULL); |
149 | } | 166 | } |
150 | 167 | ||
168 | + /** | ||
169 | + * v3270_ft_activity_get_local_filename: | ||
170 | + * @object: a #V3270FTActivity | ||
171 | + * | ||
172 | + * Get the full path of the local file. | ||
173 | + * | ||
174 | + * Returns: the local file path. | ||
175 | + */ | ||
151 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_local_filename(const GObject *object) | 176 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_local_filename(const GObject *object) |
152 | { | 177 | { |
153 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.local; | 178 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.local; |
154 | return (ptr ? ptr : ""); | 179 | return (ptr ? ptr : ""); |
155 | } | 180 | } |
156 | 181 | ||
182 | + /** | ||
183 | + * v3270_ft_activity_get_remote_filename: | ||
184 | + * @object: a #V3270FTActivity | ||
185 | + * | ||
186 | + * Get the host file name. | ||
187 | + * | ||
188 | + * Returns: the host file name. | ||
189 | + */ | ||
157 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_remote_filename(const GObject *object) | 190 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_remote_filename(const GObject *object) |
158 | { | 191 | { |
159 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.remote; | 192 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.remote; |
src/include/v3270/filetransfer.h
@@ -105,7 +105,7 @@ | @@ -105,7 +105,7 @@ | ||
105 | LIB3270_EXPORT void v3270_ft_settings_set_options(GtkWidget *widget, LIB3270_FT_OPTION options); | 105 | LIB3270_EXPORT void v3270_ft_settings_set_options(GtkWidget *widget, LIB3270_FT_OPTION options); |
106 | LIB3270_EXPORT gboolean v3270_ft_settings_equals(GtkWidget *widget, GObject *activity); | 106 | LIB3270_EXPORT gboolean v3270_ft_settings_equals(GtkWidget *widget, GObject *activity); |
107 | 107 | ||
108 | - // FT Activity widget | 108 | + // FT Activity object |
109 | #define G_TYPE_V3270_FT_ACTIVITY (V3270FTActivity_get_type ()) | 109 | #define G_TYPE_V3270_FT_ACTIVITY (V3270FTActivity_get_type ()) |
110 | #define G_V3270_FT_ACTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_V3270_FT_ACTIVITY, V3270FTActivity)) | 110 | #define G_V3270_FT_ACTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_V3270_FT_ACTIVITY, V3270FTActivity)) |
111 | #define G_V3270_FT_ACTIVITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_V3270_FT_ACTIVITY, V3270FTActivityClass)) | 111 | #define G_V3270_FT_ACTIVITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G_TYPE_V3270_FT_ACTIVITY, V3270FTActivityClass)) |
@@ -116,20 +116,20 @@ | @@ -116,20 +116,20 @@ | ||
116 | typedef struct _V3270FTActivity V3270FTActivity; | 116 | typedef struct _V3270FTActivity V3270FTActivity; |
117 | typedef struct _V3270FTActivityClass V3270FTActivityClass; | 117 | typedef struct _V3270FTActivityClass V3270FTActivityClass; |
118 | 118 | ||
119 | - LIB3270_EXPORT GObject * v3270_ft_activity_new(); | 119 | + LIB3270_EXPORT GObject * v3270_ft_activity_new(); |
120 | 120 | ||
121 | - LIB3270_EXPORT void v3270_ft_activity_set_from_context(GObject * activity, GMarkupParseContext * context); | 121 | + LIB3270_EXPORT void v3270_ft_activity_set_from_context(GObject * activity, GMarkupParseContext * context); |
122 | 122 | ||
123 | - LIB3270_EXPORT const gchar * v3270_ft_activity_get_local_filename(const GObject *object); | ||
124 | - LIB3270_EXPORT const gchar * v3270_ft_activity_get_remote_filename(const GObject *object); | ||
125 | - LIB3270_EXPORT LIB3270_FT_OPTION v3270_ft_activity_get_options(const GObject *object); | ||
126 | - LIB3270_EXPORT guint v3270_ft_activity_get_value(const GObject * object, LIB3270_FT_VALUE id); | 123 | + LIB3270_EXPORT const gchar * v3270_ft_activity_get_local_filename(const GObject *object); |
124 | + LIB3270_EXPORT const gchar * v3270_ft_activity_get_remote_filename(const GObject *object); | ||
125 | + LIB3270_EXPORT LIB3270_FT_OPTION v3270_ft_activity_get_options(const GObject *object); | ||
126 | + LIB3270_EXPORT guint v3270_ft_activity_get_value(const GObject * object, LIB3270_FT_VALUE id); | ||
127 | 127 | ||
128 | - LIB3270_EXPORT void v3270_ft_activity_set_local_filename(GObject *object, const gchar *filename); | ||
129 | - LIB3270_EXPORT void v3270_ft_activity_set_remote_filename(GObject *object, const gchar *filename); | ||
130 | - LIB3270_EXPORT void v3270_ft_activity_set_options(GObject * object, LIB3270_FT_OPTION options); | ||
131 | - LIB3270_EXPORT void v3270_ft_activity_set_value(GObject * object, LIB3270_FT_VALUE id, guint value); | ||
132 | - LIB3270_EXPORT H3270FT * v3270_ft_activity_begin_transfer(GObject * object, H3270 *hSession, const char **message); | 128 | + LIB3270_EXPORT void v3270_ft_activity_set_local_filename(GObject *object, const gchar *filename); |
129 | + LIB3270_EXPORT void v3270_ft_activity_set_remote_filename(GObject *object, const gchar *filename); | ||
130 | + LIB3270_EXPORT void v3270_ft_activity_set_options(GObject * object, LIB3270_FT_OPTION options); | ||
131 | + LIB3270_EXPORT void v3270_ft_activity_set_value(GObject * object, LIB3270_FT_VALUE id, guint value); | ||
132 | + LIB3270_EXPORT H3270FT * v3270_ft_activity_begin_transfer(GObject * object, H3270 *hSession, const char **message); | ||
133 | 133 | ||
134 | // FT Dialog widget | 134 | // FT Dialog widget |
135 | #define GTK_TYPE_V3270_FT_DIALOG (V3270FTDialog_get_type ()) | 135 | #define GTK_TYPE_V3270_FT_DIALOG (V3270FTDialog_get_type ()) |
v3270.cbp
@@ -42,6 +42,7 @@ | @@ -42,6 +42,7 @@ | ||
42 | <Add option="`pkg-config --libs gtk+-3.0 lib3270`" /> | 42 | <Add option="`pkg-config --libs gtk+-3.0 lib3270`" /> |
43 | <Add option="-fPIC" /> | 43 | <Add option="-fPIC" /> |
44 | </Linker> | 44 | </Linker> |
45 | + <Unit filename="configure.ac" /> | ||
45 | <Unit filename="src/dialogs/colors.c"> | 46 | <Unit filename="src/dialogs/colors.c"> |
46 | <Option compilerVar="CC" /> | 47 | <Option compilerVar="CC" /> |
47 | </Unit> | 48 | </Unit> |
@@ -185,7 +186,9 @@ | @@ -185,7 +186,9 @@ | ||
185 | <Unit filename="src/terminal/windows/iosource.c"> | 186 | <Unit filename="src/terminal/windows/iosource.c"> |
186 | <Option compilerVar="CC" /> | 187 | <Option compilerVar="CC" /> |
187 | </Unit> | 188 | </Unit> |
188 | - <Unit filename="src/terminal/windows/resources.rc" /> | 189 | + <Unit filename="src/terminal/windows/resources.rc"> |
190 | + <Option compilerVar="WINDRES" /> | ||
191 | + </Unit> | ||
189 | <Unit filename="src/testprogram/testprogram.c"> | 192 | <Unit filename="src/testprogram/testprogram.c"> |
190 | <Option compilerVar="CC" /> | 193 | <Option compilerVar="CC" /> |
191 | </Unit> | 194 | </Unit> |
@@ -196,7 +199,6 @@ | @@ -196,7 +199,6 @@ | ||
196 | <Option compilerVar="CC" /> | 199 | <Option compilerVar="CC" /> |
197 | </Unit> | 200 | </Unit> |
198 | <Unit filename="src/v3270/private.h" /> | 201 | <Unit filename="src/v3270/private.h" /> |
199 | - <Unit filename="src/v3270ft/private.h" /> | ||
200 | <Extensions> | 202 | <Extensions> |
201 | <code_completion /> | 203 | <code_completion /> |
202 | <envvars /> | 204 | <envvars /> |