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
configure.ac
| ... | ... | @@ -36,6 +36,9 @@ AC_INIT([libv3270], [5.2], [perry.werneck@gmail.com]) |
| 36 | 36 | dnl Place auxilliary scripts here. |
| 37 | 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 | 42 | dnl Compute the canonical host-system type |
| 40 | 43 | AC_CANONICAL_HOST |
| 41 | 44 | |
| ... | ... | @@ -234,36 +237,16 @@ AC_SUBST(GLIB_LIBS) |
| 234 | 237 | AC_SUBST(GLIB_CFLAGS) |
| 235 | 238 | |
| 236 | 239 | dnl --------------------------------------------------------------------------- |
| 237 | -dnl Check for doxygen | |
| 240 | +dnl Check for GTK DOC | |
| 238 | 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 | 251 | dnl --------------------------------------------------------------------------- |
| 269 | 252 | dnl Check for pic | ... | ... |
src/filetransfer/activity.c
| ... | ... | @@ -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 | 40 | #include <internals.h> |
| 31 | 41 | #include <stdlib.h> |
| 32 | 42 | #include "private.h" |
| ... | ... | @@ -143,17 +153,40 @@ |
| 143 | 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 | 163 | LIB3270_EXPORT GObject * v3270_ft_activity_new() |
| 147 | 164 | { |
| 148 | 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 | 176 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_local_filename(const GObject *object) |
| 152 | 177 | { |
| 153 | 178 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.local; |
| 154 | 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 | 190 | LIB3270_EXPORT const gchar * v3270_ft_activity_get_remote_filename(const GObject *object) |
| 158 | 191 | { |
| 159 | 192 | const gchar *ptr = G_V3270_FT_ACTIVITY(object)->file.remote; | ... | ... |
src/include/v3270/filetransfer.h
| ... | ... | @@ -105,7 +105,7 @@ |
| 105 | 105 | LIB3270_EXPORT void v3270_ft_settings_set_options(GtkWidget *widget, LIB3270_FT_OPTION options); |
| 106 | 106 | LIB3270_EXPORT gboolean v3270_ft_settings_equals(GtkWidget *widget, GObject *activity); |
| 107 | 107 | |
| 108 | - // FT Activity widget | |
| 108 | + // FT Activity object | |
| 109 | 109 | #define G_TYPE_V3270_FT_ACTIVITY (V3270FTActivity_get_type ()) |
| 110 | 110 | #define G_V3270_FT_ACTIVITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), G_TYPE_V3270_FT_ACTIVITY, V3270FTActivity)) |
| 111 | 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 | 116 | typedef struct _V3270FTActivity V3270FTActivity; |
| 117 | 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 | 134 | // FT Dialog widget |
| 135 | 135 | #define GTK_TYPE_V3270_FT_DIALOG (V3270FTDialog_get_type ()) | ... | ... |
v3270.cbp
| ... | ... | @@ -42,6 +42,7 @@ |
| 42 | 42 | <Add option="`pkg-config --libs gtk+-3.0 lib3270`" /> |
| 43 | 43 | <Add option="-fPIC" /> |
| 44 | 44 | </Linker> |
| 45 | + <Unit filename="configure.ac" /> | |
| 45 | 46 | <Unit filename="src/dialogs/colors.c"> |
| 46 | 47 | <Option compilerVar="CC" /> |
| 47 | 48 | </Unit> |
| ... | ... | @@ -185,7 +186,9 @@ |
| 185 | 186 | <Unit filename="src/terminal/windows/iosource.c"> |
| 186 | 187 | <Option compilerVar="CC" /> |
| 187 | 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 | 192 | <Unit filename="src/testprogram/testprogram.c"> |
| 190 | 193 | <Option compilerVar="CC" /> |
| 191 | 194 | </Unit> |
| ... | ... | @@ -196,7 +199,6 @@ |
| 196 | 199 | <Option compilerVar="CC" /> |
| 197 | 200 | </Unit> |
| 198 | 201 | <Unit filename="src/v3270/private.h" /> |
| 199 | - <Unit filename="src/v3270ft/private.h" /> | |
| 200 | 202 | <Extensions> |
| 201 | 203 | <code_completion /> |
| 202 | 204 | <envvars /> | ... | ... |