Branch: refs/heads/master
Author: Thomas Martitz <kugel(a)rockbox.org>
Committer: Thomas Martitz <kugel(a)rockbox.org>
Date: Thu, 17 Dec 2015 08:52:52 UTC
Commit: 302b40e9778ff49407902f3ef9f272ed202f4547
https://github.com/geany/geany/commit/302b40e9778ff49407902f3ef9f272ed202f4…
Log Message:
-----------
doxygen: various doxygen-related fixes in preparation for gtkdoc generation
Major changes are:
- Some types were accidentally documented, even though they couldn't be
accessed by any exported API functions. Those are removed (especially
from encodings.h).
- Some types were not documented where they should. Documentation is
added for them. Members are not necessarily documented separately if names
are self-explanatory.
- @a XXX refers to parameters of the function, it's inappropriate for
highlighting NULL (change to @c)
- As per consensus, build_info is removed from GeanyData (replaced by
pointer to avoid ABI break; added grep-able abi-todo tag so it doesn't get
forgotten)
Modified Paths:
--------------
doc/pluginsymbols.c
src/build.c
src/build.h
src/editor.c
src/editor.h
src/encodings.h
src/filetypes.h
src/keybindings.c
src/plugindata.h
src/plugins.c
src/search.h
src/utils.c
Modified: doc/pluginsymbols.c
14 lines changed, 8 insertions(+), 6 deletions(-)
===================================================================
@@ -37,8 +37,10 @@
*/
/** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany.
- * @return . */
-gint plugin_version_check(gint);
+ *
+ * @param abi ABI version Geany was compiled with
+ * @return The API version the plugin was compiled with, or -1 if the plugin is incompatible. */
+gint plugin_version_check(gint abi);
/** Use the PLUGIN_SET_INFO() macro to define it. Required by Geany.
* This function is called before the plugin is initialized, so Geany
@@ -46,8 +48,8 @@ gint plugin_version_check(gint);
* @param info The data struct which should be initialized by this function. */
void plugin_set_info(PluginInfo *info);
-/** @deprecated Use @ref GeanyPlugin.info instead.
- * Basic information about a plugin, which is set in plugin_set_info(). */
+/** Basic information about a plugin, which is set in plugin_set_info().
+ * @deprecated Use @ref GeanyPlugin.info instead.*/
const PluginInfo *plugin_info;
/** Basic information for the plugin and identification. */
@@ -64,8 +66,8 @@ const GeanyData *geany_data;
* This is equivalent of @c geany_functions->p_document->document_new_file(NULL, NULL, NULL); */
const GeanyFunctions *geany_functions;
-/** @deprecated Use @ref ui_add_document_sensitive() instead.
- * Plugin owned fields, including flags. */
+/** Plugin owned fields, including flags.
+ * @deprecated Use @ref ui_add_document_sensitive() instead.*/
PluginFields *plugin_fields;
/** An array for connecting GeanyObject events, which should be terminated with
Modified: src/build.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -524,7 +524,7 @@ void build_remove_menu_item(const GeanyBuildSource src, const GeanyBuildGroup gr
* @param grp the group of the specified menu item.
* @param cmd the index of the command within the group.
*
- * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
+ * @return a pointer to the @a GeanyBuildCommand structure or @c NULL if it doesn't exist.
* This is a pointer to an internal structure and must not be freed.
*
* @see build_menu_update
@@ -553,7 +553,7 @@ GeanyBuildCommand *build_get_menu_item(GeanyBuildSource src, GeanyBuildGroup grp
* @param cmd the index of the command within the group.
* @param fld the field to return
*
- * @return a pointer to the constant string or @a NULL if it doesn't exist.
+ * @return a pointer to the constant string or @c NULL if it doesn't exist.
* This is a pointer to an internal structure and must not be freed.
*
**/
Modified: src/build.h
30 lines changed, 15 insertions(+), 15 deletions(-)
===================================================================
@@ -34,31 +34,31 @@ G_BEGIN_DECLS
/** Groups of Build menu items. */
typedef enum
{
- GEANY_GBG_FT, /* *< filetype items */
- GEANY_GBG_NON_FT, /* *< non filetype items.*/
- GEANY_GBG_EXEC, /* *< execute items */
- GEANY_GBG_COUNT /* *< count of groups. */
+ GEANY_GBG_FT, /**< filetype items */
+ GEANY_GBG_NON_FT, /**< non filetype items.*/
+ GEANY_GBG_EXEC, /**< execute items */
+ GEANY_GBG_COUNT /**< count of groups. */
} GeanyBuildGroup;
/** Build menu item sources in increasing priority */
typedef enum
{
- GEANY_BCS_DEF, /* *< Default values. */
- GEANY_BCS_FT, /* *< System filetype values. */
- GEANY_BCS_HOME_FT, /* *< Filetypes in ~/.config/geany/filedefs */
- GEANY_BCS_PREF, /* *< Preferences file ~/.config/geany/geany.conf */
- GEANY_BCS_PROJ_FT, /* *< Project file filetype command */
- GEANY_BCS_PROJ, /* *< Project file if open. */
- GEANY_BCS_COUNT /* *< Count of sources. */
+ GEANY_BCS_DEF, /**< Default values. */
+ GEANY_BCS_FT, /**< System filetype values. */
+ GEANY_BCS_HOME_FT, /**< Filetypes in ~/.config/geany/filedefs */
+ GEANY_BCS_PREF, /**< Preferences file ~/.config/geany/geany.conf */
+ GEANY_BCS_PROJ_FT, /**< Project file filetype command */
+ GEANY_BCS_PROJ, /**< Project file if open. */
+ GEANY_BCS_COUNT /**< Count of sources. */
} GeanyBuildSource;
/** The entries of a command for a menu item */
typedef enum GeanyBuildCmdEntries
{
- GEANY_BC_LABEL, /* *< The menu item label, _ marks mnemonic */
- GEANY_BC_COMMAND, /* *< The command to run. */
- GEANY_BC_WORKING_DIR, /* *< The directory to run in */
- GEANY_BC_CMDENTRIES_COUNT /* *< Count of entries */
+ GEANY_BC_LABEL, /**< The menu item label, _ marks mnemonic */
+ GEANY_BC_COMMAND, /**< The command to run. */
+ GEANY_BC_WORKING_DIR, /**< The directory to run in */
+ GEANY_BC_CMDENTRIES_COUNT /**< Count of entries */
} GeanyBuildCmdEntries;
void build_activate_menu_item(const GeanyBuildGroup grp, const guint cmd);
Modified: src/editor.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1783,7 +1783,7 @@ static gint find_start_bracket(ScintillaObject *sci, gint pos)
}
-static gboolean append_calltip(GString *str, const TMTag *tag, filetype_id ft_id)
+static gboolean append_calltip(GString *str, const TMTag *tag, GeanyFiletypeID ft_id)
{
if (! tag->arglist)
return FALSE;
Modified: src/editor.h
9 lines changed, 5 insertions(+), 4 deletions(-)
===================================================================
@@ -50,12 +50,13 @@ typedef enum
}
GeanyIndentType;
+/** Modes for automatic indentation */
typedef enum
{
- GEANY_AUTOINDENT_NONE = 0,
- GEANY_AUTOINDENT_BASIC,
- GEANY_AUTOINDENT_CURRENTCHARS,
- GEANY_AUTOINDENT_MATCHBRACES
+ GEANY_AUTOINDENT_NONE = 0, /**< Autoindent Disabled */
+ GEANY_AUTOINDENT_BASIC, /**< Very basic mode */
+ GEANY_AUTOINDENT_CURRENTCHARS, /**< Autoindent based on the first char of the previous line */
+ GEANY_AUTOINDENT_MATCHBRACES /**< Autoindent based on the position of the opening brace */
}
GeanyAutoIndent;
Modified: src/encodings.h
5 lines changed, 1 insertions(+), 4 deletions(-)
===================================================================
@@ -46,10 +46,7 @@ G_BEGIN_DECLS
* Copyright (C) 2002 Red Hat, Inc.
*/
-/**
- * @enum GeanyEncodingIndex
- * List of known and supported encodings.
- **/
+/** List of known and supported encodings. */
typedef enum
{
GEANY_ENCODING_ISO_8859_1,
Modified: src/filetypes.h
20 lines changed, 14 insertions(+), 6 deletions(-)
===================================================================
@@ -38,7 +38,10 @@ G_BEGIN_DECLS
/* Forward-declared to avoid including document.h since it includes this header */
struct GeanyDocument;
-/* Do not change the order, only append. */
+/** IDs of known filetypes
+ *
+ * @ref filetypes_array will contain an item for each. Use filetypes_array->len to
+ * determine the number of known filetypes at runtime */
typedef enum
{
GEANY_FILETYPES_NONE = 0, /* first filetype is always None & must be 0 */
@@ -106,8 +109,13 @@ typedef enum
/* ^ append items here */
GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */
}
-filetype_id;
+GeanyFiletypeID;
+
+#define filetype_id GeanyFiletypeID /* compat define - should be removed in the future */
+/** Filetype categories
+ *
+ * These are used to provide submenus for each category in the GUI */
typedef enum
{
GEANY_FILETYPE_GROUP_NONE,
@@ -128,7 +136,7 @@ GeanyFiletypeGroupID;
/** Represents a filetype. */
typedef struct GeanyFiletype
{
- filetype_id id; /**< Index in @c filetypes_array. */
+ GeanyFiletypeID id; /**< Index in @c filetypes_array. */
/** Represents the langType of tagmanager (see the table
* in tagmanager/parsers.h), -1 represents all, -2 none. */
langType lang;
@@ -158,9 +166,7 @@ typedef struct GeanyFiletype
}
GeanyFiletype;
-extern GPtrArray *filetypes_array;
-
-/** Wraps filetypes_array so it can be used with C array syntax.
+/** Wraps @ref filetypes_array so it can be used with C array syntax.
* Example: filetypes[GEANY_FILETYPES_C]->name = ...;
* @see filetypes_index(). */
#define filetypes ((GeanyFiletype **)GEANY(filetypes_array)->pdata)
@@ -179,6 +185,8 @@ const GSList *filetypes_get_sorted_by_name(void);
#ifdef GEANY_PRIVATE
+extern GPtrArray *filetypes_array;
+
extern GSList *filetypes_by_title;
Modified: src/keybindings.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -158,7 +158,7 @@ GeanyKeyBinding *keybindings_get_item(GeanyKeyGroup *group, gsize key_id)
* @param key_id Keybinding index for the group.
* @param callback Function to call when activated, or @c NULL to use the group callback.
* Usually it's better to use the group callback instead - see plugin_set_key_group().
- * @param key (Lower case) default key, e.g. @c GDK_j, but usually 0 for unset.
+ * @param key Default key, e.g. @c GDK_j (must be lower case), but usually 0 for unset.
* @param mod Default modifier, e.g. @c GDK_CONTROL_MASK, but usually 0 for unset.
* @param kf_name Key name for the configuration file, such as @c "menu_new".
* @param label Label used in the preferences dialog keybindings tab. May contain
@@ -211,7 +211,7 @@ GeanyKeyBinding *keybindings_set_item(GeanyKeyGroup *group, gsize key_id,
*
* @param group Group.
* @param key_id Keybinding index for the group.
- * @param key (Lower case) default key, e.g. @c GDK_j, but usually 0 for unset.
+ * @param key Default key, e.g. @c GDK_j (must be lower case), but usually 0 for unset.
* @param mod Default modifier, e.g. @c GDK_CONTROL_MASK, but usually 0 for unset.
* @param kf_name Key name for the configuration file, such as @c "menu_new".
* @param label Label used in the preferences dialog keybindings tab. May contain
Modified: src/plugindata.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -232,7 +232,7 @@ typedef struct GeanyData
struct GeanySearchPrefs *search_prefs; /**< Search-related settings */
struct GeanyToolPrefs *tool_prefs; /**< Tool settings */
struct GeanyTemplatePrefs *template_prefs; /**< Template settings */
- struct GeanyBuildInfo *build_info; /**< Current build information */
+ gpointer *_compat; /* Remove field on next ABI break (abi-todo) */
GSList *filetypes_by_title; /**< See filetypes.h#filetypes_by_title. */
}
GeanyData;
Modified: src/plugins.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -119,7 +119,7 @@ geany_data_init(void)
&search_prefs,
&tool_prefs,
&template_prefs,
- &build_info,
+ NULL, /* Remove field on next ABI break (abi-todo) */
filetypes_by_title
};
Modified: src/search.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -54,7 +54,7 @@ enum GeanyFindSelOptions
typedef struct GeanySearchPrefs
{
gboolean always_wrap; /* don't ask whether to wrap search */
- gboolean use_current_word; /**< Use current word for default search text */
+ gboolean use_current_word; /* Use current word for default search text */
gboolean use_current_file_dir; /* find in files directory to use on showing dialog */
gboolean hide_find_dialog; /* hide the find dialog on next or previous */
gboolean replace_and_find_by_default; /* enter in replace window performs Replace & Find instead of Replace */
Modified: src/utils.c
20 lines changed, 10 insertions(+), 10 deletions(-)
===================================================================
@@ -1647,16 +1647,16 @@ const gchar *utils_get_default_dir_utf8(void)
/**
* Wraps @c spawn_sync(), which see.
*
- * @param dir The child's current working directory, or @a NULL to inherit parent's.
+ * @param dir The child's current working directory, or @c NULL to inherit parent's.
* @param argv The child's argument vector.
- * @param env The child's environment, or @a NULL to inherit parent's.
+ * @param env The child's environment, or @c NULL to inherit parent's.
* @param flags Ignored.
* @param child_setup Ignored.
* @param user_data Ignored.
- * @param std_out The return location for child output, or @a NULL.
- * @param std_err The return location for child error messages, or @a NULL.
- * @param exit_status The child exit status, as returned by waitpid(), or @a NULL.
- * @param error The return location for error or @a NULL.
+ * @param std_out The return location for child output, or @c NULL.
+ * @param std_err The return location for child error messages, or @c NULL.
+ * @param exit_status The child exit status, as returned by waitpid(), or @c NULL.
+ * @param error The return location for error or @c NULL.
*
* @return @c TRUE on success, @c FALSE if an error was set.
**/
@@ -1682,14 +1682,14 @@ gboolean utils_spawn_sync(const gchar *dir, gchar **argv, gchar **env, GSpawnFla
/**
* Wraps @c spawn_async(), which see.
*
- * @param dir The child's current working directory, or @a NULL to inherit parent's.
+ * @param dir The child's current working directory, or @c NULL to inherit parent's.
* @param argv The child's argument vector.
- * @param env The child's environment, or @a NULL to inherit parent's.
+ * @param env The child's environment, or @c NULL to inherit parent's.
* @param flags Ignored.
* @param child_setup Ignored.
* @param user_data Ignored.
* @param child_pid The return location for child process ID, or NULL.
- * @param error The return location for error or @a NULL.
+ * @param error The return location for error or @c NULL.
*
* @return @c TRUE on success, @c FALSE if an error was set.
**/
@@ -1959,7 +1959,7 @@ static gboolean str_in_array(const gchar **haystack, const gchar *needle)
* @param first_varname Name of the first variable to copy into the new array.
* @param ... Key-value pairs of variable names and values, @c NULL-terminated.
*
- * @return The new environment array.
+ * @return The new environment array. Use @c g_strfreev() to free it.
**/
GEANY_API_SYMBOL
gchar **utils_copy_environment(const gchar **exclude_vars, const gchar *first_varname, ...)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Mon, 18 Jan 2016 02:19:15 UTC
Commit: a7ce20dc5904cea701e59615fb747eb2f3731697
https://github.com/geany/geany/commit/a7ce20dc5904cea701e59615fb747eb2f3731…
Log Message:
-----------
Merge pull request #826 from kugel-/doxygen-fixes2
Doxygen API fixes and cleanup.
Modified Paths:
--------------
doc/pluginsymbols.c
src/Makefile.am
src/build.c
src/build.h
src/dialogs.c
src/document.c
src/editor.c
src/encodings.c
src/encodings.h
src/encodingsprivate.h
src/filetypes.h
src/keybindings.c
src/keybindings.h
src/keyfile.c
src/libmain.c
src/plugindata.h
src/plugins.c
src/prefs.c
src/search.c
src/templates.c
src/ui_utils.c
src/utils.c
Modified: doc/pluginsymbols.c
14 lines changed, 8 insertions(+), 6 deletions(-)
===================================================================
@@ -37,8 +37,10 @@
*/
/** Use the PLUGIN_VERSION_CHECK() macro instead. Required by Geany.
- * @return . */
-gint plugin_version_check(gint);
+ *
+ * @param abi ABI version Geany was compiled with
+ * @return The API version the plugin was compiled with, or -1 if the plugin is incompatible. */
+gint plugin_version_check(gint abi);
/** Use the PLUGIN_SET_INFO() macro to define it. Required by Geany.
* This function is called before the plugin is initialized, so Geany
@@ -46,8 +48,8 @@ gint plugin_version_check(gint);
* @param info The data struct which should be initialized by this function. */
void plugin_set_info(PluginInfo *info);
-/** @deprecated Use @ref GeanyPlugin.info instead.
- * Basic information about a plugin, which is set in plugin_set_info(). */
+/** Basic information about a plugin, which is set in plugin_set_info().
+ * @deprecated Use @ref GeanyPlugin.info instead.*/
const PluginInfo *plugin_info;
/** Basic information for the plugin and identification. */
@@ -64,8 +66,8 @@ const GeanyData *geany_data;
* This is equivalent of @c geany_functions->p_document->document_new_file(NULL, NULL, NULL); */
const GeanyFunctions *geany_functions;
-/** @deprecated Use @ref ui_add_document_sensitive() instead.
- * Plugin owned fields, including flags. */
+/** Plugin owned fields, including flags.
+ * @deprecated Use @ref ui_add_document_sensitive() instead.*/
PluginFields *plugin_fields;
/** An array for connecting GeanyObject events, which should be terminated with
Modified: src/Makefile.am
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -5,6 +5,7 @@ EXTRA_DIST = \
gb.c \
plugindata.h \
documentprivate.h \
+ encodingsprivate.h \
filetypesprivate.h \
keybindingsprivate.h \
pluginprivate.h \
Modified: src/build.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -524,7 +524,7 @@ void build_remove_menu_item(const GeanyBuildSource src, const GeanyBuildGroup gr
* @param grp the group of the specified menu item.
* @param cmd the index of the command within the group.
*
- * @return a pointer to the @a GeanyBuildCommand structure or @a NULL if it doesn't exist.
+ * @return a pointer to the @a GeanyBuildCommand structure or @c NULL if it doesn't exist.
* This is a pointer to an internal structure and must not be freed.
*
* @see build_menu_update
@@ -553,7 +553,7 @@ GeanyBuildCommand *build_get_menu_item(GeanyBuildSource src, GeanyBuildGroup grp
* @param cmd the index of the command within the group.
* @param fld the field to return
*
- * @return a pointer to the constant string or @a NULL if it doesn't exist.
+ * @return a pointer to the constant string or @c NULL if it doesn't exist.
* This is a pointer to an internal structure and must not be freed.
*
**/
Modified: src/build.h
30 lines changed, 15 insertions(+), 15 deletions(-)
===================================================================
@@ -34,31 +34,31 @@ G_BEGIN_DECLS
/** Groups of Build menu items. */
typedef enum
{
- GEANY_GBG_FT, /* *< filetype items */
- GEANY_GBG_NON_FT, /* *< non filetype items.*/
- GEANY_GBG_EXEC, /* *< execute items */
- GEANY_GBG_COUNT /* *< count of groups. */
+ GEANY_GBG_FT, /**< filetype items */
+ GEANY_GBG_NON_FT, /**< non filetype items.*/
+ GEANY_GBG_EXEC, /**< execute items */
+ GEANY_GBG_COUNT /**< count of groups. */
} GeanyBuildGroup;
/** Build menu item sources in increasing priority */
typedef enum
{
- GEANY_BCS_DEF, /* *< Default values. */
- GEANY_BCS_FT, /* *< System filetype values. */
- GEANY_BCS_HOME_FT, /* *< Filetypes in ~/.config/geany/filedefs */
- GEANY_BCS_PREF, /* *< Preferences file ~/.config/geany/geany.conf */
- GEANY_BCS_PROJ_FT, /* *< Project file filetype command */
- GEANY_BCS_PROJ, /* *< Project file if open. */
- GEANY_BCS_COUNT /* *< Count of sources. */
+ GEANY_BCS_DEF, /**< Default values. */
+ GEANY_BCS_FT, /**< System filetype values. */
+ GEANY_BCS_HOME_FT, /**< Filetypes in ~/.config/geany/filedefs */
+ GEANY_BCS_PREF, /**< Preferences file ~/.config/geany/geany.conf */
+ GEANY_BCS_PROJ_FT, /**< Project file filetype command */
+ GEANY_BCS_PROJ, /**< Project file if open. */
+ GEANY_BCS_COUNT /**< Count of sources. */
} GeanyBuildSource;
/** The entries of a command for a menu item */
typedef enum GeanyBuildCmdEntries
{
- GEANY_BC_LABEL, /* *< The menu item label, _ marks mnemonic */
- GEANY_BC_COMMAND, /* *< The command to run. */
- GEANY_BC_WORKING_DIR, /* *< The directory to run in */
- GEANY_BC_CMDENTRIES_COUNT /* *< Count of entries */
+ GEANY_BC_LABEL, /**< The menu item label, _ marks mnemonic */
+ GEANY_BC_COMMAND, /**< The command to run. */
+ GEANY_BC_WORKING_DIR, /**< The directory to run in */
+ GEANY_BC_CMDENTRIES_COUNT /**< Count of entries */
} GeanyBuildCmdEntries;
void build_activate_menu_item(const GeanyBuildGroup grp, const guint cmd);
Modified: src/dialogs.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -33,6 +33,7 @@
#include "build.h"
#include "document.h"
#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "main.h"
#include "support.h"
Modified: src/document.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -35,6 +35,7 @@
#include "dialogs.h"
#include "documentprivate.h"
#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypesprivate.h"
#include "geany.h" /* FIXME: why is this needed for DOC_FILENAME()? should come from documentprivate.h/document.h */
#include "geanyobject.h"
Modified: src/editor.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -1783,7 +1783,7 @@ static gint find_start_bracket(ScintillaObject *sci, gint pos)
}
-static gboolean append_calltip(GString *str, const TMTag *tag, filetype_id ft_id)
+static gboolean append_calltip(GString *str, const TMTag *tag, GeanyFiletypeID ft_id)
{
if (! tag->arglist)
return FALSE;
Modified: src/encodings.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -35,6 +35,7 @@
#endif
#include "encodings.h"
+#include "encodingsprivate.h"
#include "app.h"
#include "callbacks.h"
Modified: src/encodings.h
75 lines changed, 3 insertions(+), 72 deletions(-)
===================================================================
@@ -40,29 +40,13 @@
G_BEGIN_DECLS
-typedef enum
-{
- NONE = 0,
- WESTEUROPEAN,
- EASTEUROPEAN,
- EASTASIAN,
- ASIAN,
- MIDDLEEASTERN,
- UNICODE,
-
- GEANY_ENCODING_GROUPS_MAX
-} GeanyEncodingGroup;
-
/*
* The original versions of the following tables are taken from profterm
*
* Copyright (C) 2002 Red Hat, Inc.
*/
-/**
- * @enum GeanyEncodingIndex
- * List of known and supported encodings.
- **/
+/** List of known and supported encodings. */
typedef enum
{
GEANY_ENCODING_ISO_8859_1,
@@ -139,23 +123,8 @@ typedef enum
GEANY_ENCODING_CP_932,
GEANY_ENCODINGS_MAX
-} GeanyEncodingIndex;
-
-/** Structure to represent an encoding to be used in Geany. */
-typedef struct
-{
- /** The index of the encoding, must be one of GeanyEncodingIndex. */
- gint idx;
- /** Internally used member for grouping */
- gint order;
- /** Internally used member for grouping */
- GeanyEncodingGroup group;
- /** String representation of the encoding, e.g. "ISO-8859-3" */
- const gchar *charset;
- /** Translatable and descriptive name of the encoding, e.g. "South European" */
- const gchar *name;
-} GeanyEncoding;
-
+}
+GeanyEncodingIndex;
gchar *encodings_convert_to_utf8(const gchar *buffer, gssize size, gchar **used_encoding);
@@ -166,44 +135,6 @@ gchar *encodings_convert_to_utf8_from_charset(const gchar *buffer, gssize size,
const gchar* encodings_get_charset_from_index(gint idx);
-
-#ifdef GEANY_PRIVATE
-
-const GeanyEncoding* encodings_get_from_charset(const gchar *charset);
-const GeanyEncoding* encodings_get_from_index(gint idx);
-
-gchar* encodings_to_string(const GeanyEncoding* enc);
-const gchar* encodings_get_charset(const GeanyEncoding* enc);
-
-void encodings_select_radio_item(const gchar *charset);
-
-void encodings_init(void);
-void encodings_finalize(void);
-
-GtkTreeStore *encodings_encoding_store_new(gboolean has_detect);
-
-gint encodings_encoding_store_get_encoding(GtkTreeStore *store, GtkTreeIter *iter);
-
-gboolean encodings_encoding_store_get_iter(GtkTreeStore *store, GtkTreeIter *iter, gint enc);
-
-void encodings_encoding_store_cell_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell,
- GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
-
-gboolean encodings_is_unicode_charset(const gchar *string);
-
-gboolean encodings_convert_to_utf8_auto(gchar **buf, gsize *size, const gchar *forced_enc,
- gchar **used_encoding, gboolean *has_bom, gboolean *partial);
-
-
-extern GeanyEncoding encodings[GEANY_ENCODINGS_MAX];
-
-
-GeanyEncodingIndex encodings_scan_unicode_bom(const gchar *string, gsize len, guint *bom_len);
-
-GeanyEncodingIndex encodings_get_idx_from_charset(const gchar *charset);
-
-#endif /* GEANY_PRIVATE */
-
G_END_DECLS
#endif /* GEANY_ENCODINGS_H */
Modified: src/encodingsprivate.h
84 lines changed, 84 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,84 @@
+/*
+ * encodingsprivate.h - this file is part of Geany, a fast and lightweight IDE
+ *
+ * Copyright 2005-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+ * Copyright 2006-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+ *
+ * This program 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 ENCODINGSPRIVATE_H
+#define ENCODINGSPRIVATE_H
+
+#include "encodings.h"
+
+/* Groups of encodings */
+typedef enum
+{
+ NONE = 0,
+ WESTEUROPEAN,
+ EASTEUROPEAN,
+ EASTASIAN,
+ ASIAN,
+ MIDDLEEASTERN,
+ UNICODE,
+
+ GEANY_ENCODING_GROUPS_MAX
+}
+GeanyEncodingGroup;
+
+/* Structure to represent an encoding to be used in Geany. */
+typedef struct GeanyEncoding
+{
+ GeanyEncodingIndex idx; /* The index of the encoding inside globa encodes array.*/
+ gint order; /* Internally used member for grouping */
+ GeanyEncodingGroup group; /* Internally used member for grouping */
+ const gchar *charset; /* String representation of the encoding, e.g. "ISO-8859-3" */
+ const gchar *name; /* Translatable and descriptive name of the encoding, e.g. "South European" */
+}
+GeanyEncoding;
+
+const GeanyEncoding* encodings_get_from_charset(const gchar *charset);
+const GeanyEncoding* encodings_get_from_index(gint idx);
+
+gchar* encodings_to_string(const GeanyEncoding* enc);
+const gchar* encodings_get_charset(const GeanyEncoding* enc);
+
+void encodings_select_radio_item(const gchar *charset);
+
+void encodings_init(void);
+void encodings_finalize(void);
+
+GtkTreeStore *encodings_encoding_store_new(gboolean has_detect);
+
+gint encodings_encoding_store_get_encoding(GtkTreeStore *store, GtkTreeIter *iter);
+
+gboolean encodings_encoding_store_get_iter(GtkTreeStore *store, GtkTreeIter *iter, gint enc);
+
+void encodings_encoding_store_cell_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell,
+ GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data);
+
+gboolean encodings_is_unicode_charset(const gchar *string);
+
+gboolean encodings_convert_to_utf8_auto(gchar **buf, gsize *size, const gchar *forced_enc,
+ gchar **used_encoding, gboolean *has_bom, gboolean *partial);
+
+GeanyEncodingIndex encodings_scan_unicode_bom(const gchar *string, gsize len, guint *bom_len);
+
+GeanyEncodingIndex encodings_get_idx_from_charset(const gchar *charset);
+
+extern GeanyEncoding encodings[GEANY_ENCODINGS_MAX];
+
+#endif /* ENCODINGSPRIVATE_H */
Modified: src/filetypes.h
17 lines changed, 11 insertions(+), 6 deletions(-)
===================================================================
@@ -38,7 +38,10 @@ G_BEGIN_DECLS
/* Forward-declared to avoid including document.h since it includes this header */
struct GeanyDocument;
-/* Do not change the order, only append. */
+/** IDs of known filetypes
+ *
+ * @ref filetypes will contain an item for each. Use GeanyData::filetypes_array to
+ * determine the known filetypes at runtime */
typedef enum
{
GEANY_FILETYPES_NONE = 0, /* first filetype is always None & must be 0 */
@@ -106,7 +109,9 @@ typedef enum
/* ^ append items here */
GEANY_MAX_BUILT_IN_FILETYPES /* Don't use this, use filetypes_array->len instead */
}
-filetype_id;
+GeanyFiletypeID;
+
+#define filetype_id GeanyFiletypeID /* compat define - should be removed in the future */
typedef enum
{
@@ -128,7 +133,7 @@ GeanyFiletypeGroupID;
/** Represents a filetype. */
typedef struct GeanyFiletype
{
- filetype_id id; /**< Index in @c filetypes_array. */
+ GeanyFiletypeID id; /**< Index in @ref filetypes. */
/** Represents the langType of tagmanager (see the table
* in tagmanager/parsers.h), -1 represents all, -2 none. */
langType lang;
@@ -158,9 +163,7 @@ typedef struct GeanyFiletype
}
GeanyFiletype;
-extern GPtrArray *filetypes_array;
-
-/** Wraps filetypes_array so it can be used with C array syntax.
+/** Wraps @ref GeanyData::filetypes_array so it can be used with C array syntax.
* Example: filetypes[GEANY_FILETYPES_C]->name = ...;
* @see filetypes_index(). */
#define filetypes ((GeanyFiletype **)GEANY(filetypes_array)->pdata)
@@ -179,6 +182,8 @@ const GSList *filetypes_get_sorted_by_name(void);
#ifdef GEANY_PRIVATE
+extern GPtrArray *filetypes_array;
+
extern GSList *filetypes_by_title;
Modified: src/keybindings.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -158,7 +158,7 @@ GeanyKeyBinding *keybindings_get_item(GeanyKeyGroup *group, gsize key_id)
* @param key_id Keybinding index for the group.
* @param callback Function to call when activated, or @c NULL to use the group callback.
* Usually it's better to use the group callback instead - see plugin_set_key_group().
- * @param key (Lower case) default key, e.g. @c GDK_j, but usually 0 for unset.
+ * @param key Default key, e.g. @c GDK_j (must be lower case), but usually 0 for unset.
* @param mod Default modifier, e.g. @c GDK_CONTROL_MASK, but usually 0 for unset.
* @param kf_name Key name for the configuration file, such as @c "menu_new".
* @param label Label used in the preferences dialog keybindings tab. May contain
@@ -211,7 +211,7 @@ GeanyKeyBinding *keybindings_set_item(GeanyKeyGroup *group, gsize key_id,
*
* @param group Group.
* @param key_id Keybinding index for the group.
- * @param key (Lower case) default key, e.g. @c GDK_j, but usually 0 for unset.
+ * @param key Default key, e.g. @c GDK_j (must be lower case), but usually 0 for unset.
* @param mod Default modifier, e.g. @c GDK_CONTROL_MASK, but usually 0 for unset.
* @param kf_name Key name for the configuration file, such as @c "menu_new".
* @param label Label used in the preferences dialog keybindings tab. May contain
Modified: src/keybindings.h
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -55,7 +55,7 @@ typedef gboolean (*GeanyKeyGroupCallback) (guint key_id);
* with the same key combination to handle it).
*
* @since 1.26 (API 226) */
-typedef gboolean (*GeanyKeyGroupFunc)(GeanyKeyGroup *group, guint key_id, gpointer pdata);
+typedef gboolean (*GeanyKeyGroupFunc)(GeanyKeyGroup *group, guint key_id, gpointer user_data);
/** Function pointer type used for keybinding callbacks. */
typedef void (*GeanyKeyCallback) (guint key_id);
@@ -67,7 +67,7 @@ typedef void (*GeanyKeyCallback) (guint key_id);
* with the same key combination to handle it).
*
* @since 1.26 (API 226) */
-typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer pdata);
+typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer user_data);
/** Represents a single keybinding action.
*
Modified: src/keyfile.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -38,6 +38,7 @@
#include "build.h"
#include "document.h"
#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanyobject.h"
#include "main.h"
Modified: src/libmain.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -36,7 +36,7 @@
#include "callbacks.h"
#include "dialogs.h"
#include "document.h"
-#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanyobject.h"
#include "highlighting.h"
Modified: src/plugindata.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -232,7 +232,7 @@ typedef struct GeanyData
struct GeanySearchPrefs *search_prefs; /**< Search-related settings */
struct GeanyToolPrefs *tool_prefs; /**< Tool settings */
struct GeanyTemplatePrefs *template_prefs; /**< Template settings */
- struct GeanyBuildInfo *build_info; /**< Current build information */
+ gpointer *_compat; /* Remove field on next ABI break (abi-todo) */
GSList *filetypes_by_title; /**< See filetypes.h#filetypes_by_title. */
}
GeanyData;
Modified: src/plugins.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -119,7 +119,7 @@ geany_data_init(void)
&search_prefs,
&tool_prefs,
&template_prefs,
- &build_info,
+ NULL, /* Remove field on next ABI break (abi-todo) */
filetypes_by_title
};
Modified: src/prefs.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -39,7 +39,7 @@
#include "dialogs.h"
#include "documentprivate.h"
#include "editor.h"
-#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanywraplabel.h"
#include "keybindingsprivate.h"
Modified: src/search.c
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -33,6 +33,7 @@
#include "app.h"
#include "document.h"
#include "encodings.h"
+#include "encodingsprivate.h"
#include "keyfile.h"
#include "msgwindow.h"
#include "prefs.h"
Modified: src/templates.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -32,7 +32,7 @@
#include "app.h"
#include "document.h"
-#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "geany.h"
#include "geanymenubuttonaction.h"
Modified: src/ui_utils.c
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -34,7 +34,7 @@
#include "callbacks.h"
#include "dialogs.h"
#include "documentprivate.h"
-#include "encodings.h"
+#include "encodingsprivate.h"
#include "filetypes.h"
#include "geanymenubuttonaction.h"
#include "keyfile.h"
Modified: src/utils.c
20 lines changed, 10 insertions(+), 10 deletions(-)
===================================================================
@@ -1647,16 +1647,16 @@ const gchar *utils_get_default_dir_utf8(void)
/**
* Wraps @c spawn_sync(), which see.
*
- * @param dir The child's current working directory, or @a NULL to inherit parent's.
+ * @param dir The child's current working directory, or @c NULL to inherit parent's.
* @param argv The child's argument vector.
- * @param env The child's environment, or @a NULL to inherit parent's.
+ * @param env The child's environment, or @c NULL to inherit parent's.
* @param flags Ignored.
* @param child_setup Ignored.
* @param user_data Ignored.
- * @param std_out The return location for child output, or @a NULL.
- * @param std_err The return location for child error messages, or @a NULL.
- * @param exit_status The child exit status, as returned by waitpid(), or @a NULL.
- * @param error The return location for error or @a NULL.
+ * @param std_out The return location for child output, or @c NULL.
+ * @param std_err The return location for child error messages, or @c NULL.
+ * @param exit_status The child exit status, as returned by waitpid(), or @c NULL.
+ * @param error The return location for error or @c NULL.
*
* @return @c TRUE on success, @c FALSE if an error was set.
**/
@@ -1682,14 +1682,14 @@ gboolean utils_spawn_sync(const gchar *dir, gchar **argv, gchar **env, GSpawnFla
/**
* Wraps @c spawn_async(), which see.
*
- * @param dir The child's current working directory, or @a NULL to inherit parent's.
+ * @param dir The child's current working directory, or @c NULL to inherit parent's.
* @param argv The child's argument vector.
- * @param env The child's environment, or @a NULL to inherit parent's.
+ * @param env The child's environment, or @c NULL to inherit parent's.
* @param flags Ignored.
* @param child_setup Ignored.
* @param user_data Ignored.
* @param child_pid The return location for child process ID, or NULL.
- * @param error The return location for error or @a NULL.
+ * @param error The return location for error or @c NULL.
*
* @return @c TRUE on success, @c FALSE if an error was set.
**/
@@ -1959,7 +1959,7 @@ static gboolean str_in_array(const gchar **haystack, const gchar *needle)
* @param first_varname Name of the first variable to copy into the new array.
* @param ... Key-value pairs of variable names and values, @c NULL-terminated.
*
- * @return The new environment array.
+ * @return The new environment array. Use @c g_strfreev() to free it.
**/
GEANY_API_SYMBOL
gchar **utils_copy_environment(const gchar **exclude_vars, const gchar *first_varname, ...)
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
Branch: refs/heads/master
Author: Thomas Martitz <kugel(a)rockbox.org>
Committer: Thomas Martitz <kugel(a)rockbox.org>
Date: Sun, 17 Jan 2016 13:13:45 UTC
Commit: 9f6f6cfb78f8fce294751fa54c1a241ca803c046
https://github.com/geany/geany/commit/9f6f6cfb78f8fce294751fa54c1a241ca803c…
Log Message:
-----------
gir: keybindings: adhere to user_data naming convention
This helps g-ir-scanner recognizing the data parameter as context storage,
allowing object methods to be used as callback (via wrappers). It goes even
so far that g_object_unref is propery passed as destroy func to
keybindings_set_item_full() and plugin_set_key_group_full().
Modified Paths:
--------------
src/keybindings.h
Modified: src/keybindings.h
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -55,7 +55,7 @@ typedef gboolean (*GeanyKeyGroupCallback) (guint key_id);
* with the same key combination to handle it).
*
* @since 1.26 (API 226) */
-typedef gboolean (*GeanyKeyGroupFunc)(GeanyKeyGroup *group, guint key_id, gpointer pdata);
+typedef gboolean (*GeanyKeyGroupFunc)(GeanyKeyGroup *group, guint key_id, gpointer user_data);
/** Function pointer type used for keybinding callbacks. */
typedef void (*GeanyKeyCallback) (guint key_id);
@@ -67,7 +67,7 @@ typedef void (*GeanyKeyCallback) (guint key_id);
* with the same key combination to handle it).
*
* @since 1.26 (API 226) */
-typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer pdata);
+typedef gboolean (*GeanyKeyBindingFunc)(GeanyKeyBinding *key, guint key_id, gpointer user_data);
/** Represents a single keybinding action.
*
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).