Revision: 4128 http://geany.svn.sourceforge.net/geany/?rev=4128&view=rev Author: ntrel Date: 2009-08-26 14:56:05 +0000 (Wed, 26 Aug 2009)
Log Message: ----------- Use GEANY_PRIVATE to hide some fields from plugins.
Modified Paths: -------------- trunk/ChangeLog trunk/src/Makefile.am trunk/src/filetypes.h trunk/src/keybindings.h trunk/src/makefile.win32 trunk/src/project.h trunk/wscript
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/ChangeLog 2009-08-26 14:56:05 UTC (rev 4128) @@ -5,6 +5,9 @@ Add reference to HACKING for plugin API development. * HACKING: Add section 'Plugin API/ABI design'. + * src/keybindings.h, src/makefile.win32, src/project.h, + src/filetypes.h, src/Makefile.am, wscript: + Use GEANY_PRIVATE to hide some fields from plugins.
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/src/Makefile.am 2009-08-26 14:56:05 UTC (rev 4128) @@ -96,7 +96,8 @@ -DGEANY_DOCDIR="" \ -DGEANY_LIBDIR="" \ -DGEANY_LOCALEDIR="" \ - -DGEANY_PREFIX="" + -DGEANY_PREFIX="" \ + -DGEANY_PRIVATE
geany_LDFLAGS = -mwindows -mms-bitfields
@@ -119,7 +120,8 @@ -DGEANY_DOCDIR=""$(docdir)"" \ -DGEANY_LIBDIR=""$(libdir)"" \ -DGEANY_LOCALEDIR=""$(localedir)"" \ - -DGEANY_PREFIX=""$(prefix)"" + -DGEANY_PREFIX=""$(prefix)"" \ + -DGEANY_PRIVATE
clean-local:
Modified: trunk/src/filetypes.h =================================================================== --- trunk/src/filetypes.h 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/src/filetypes.h 2009-08-26 14:56:05 UTC (rev 4128) @@ -119,7 +119,7 @@ gchar *error_regex_string;
struct GeanyFiletypePrivate *priv; /* must be last, append fields before this item */ - +#ifdef GEANY_PRIVATE /* Do not use following fields in plugins */ GeanyBuildCommand *filecmds; /* these need to be visible since used in build.c so not in private part */ GeanyBuildCommand *ftdefcmds; /* filetype dependent defaults for non_ft commands */ @@ -130,6 +130,7 @@ gint project_list_entry; gchar *projerror_regex_string; gchar *homeerror_regex_string; +#endif };
extern GPtrArray *filetypes_array;
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/src/keybindings.h 2009-08-26 14:56:05 UTC (rev 4128) @@ -51,6 +51,7 @@ typedef struct GeanyKeyGroup GeanyKeyGroup;
/* Plugins should not set these fields. */ +#ifdef GEANY_PRIVATE struct GeanyKeyGroup { const gchar *name; /* Group name used in the configuration file, such as @c "html_chars" */ @@ -59,6 +60,7 @@ GeanyKeyBinding *keys; /* array of GeanyKeyBinding structs */ gboolean plugin; /* used by plugin */ }; +#endif
extern GPtrArray *keybinding_groups; /* array of GeanyKeyGroup pointers */
Modified: trunk/src/makefile.win32 =================================================================== --- trunk/src/makefile.win32 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/src/makefile.win32 2009-08-26 14:56:05 UTC (rev 4128) @@ -1,6 +1,7 @@ # Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
DEFINES = -DHAVE_CONFIG_H \ + -DGEANY_PRIVATE \ -DGEANY_DATADIR="data" \ -DGEANY_LOCALEDIR="" \ -DGEANY_LIBDIR="" \
Modified: trunk/src/project.h =================================================================== --- trunk/src/project.h 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/src/project.h 2009-08-26 14:56:05 UTC (rev 4128) @@ -41,9 +41,10 @@ gchar **file_patterns; /**< Array of filename extension patterns. */
struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */ - +#ifdef GEANY_PRIVATE /* Do not use following fields in plugins */ GPtrArray *build_filetypes_list; /* *< Project has custom filetype builds for these. */ +#endif } GeanyProject;
Modified: trunk/wscript =================================================================== --- trunk/wscript 2009-08-26 14:46:45 UTC (rev 4127) +++ trunk/wscript 2009-08-26 14:56:05 UTC (rev 4128) @@ -272,6 +272,8 @@ conf.env.append_value('CCFLAGS', '-g -DGEANY_DEBUG'.split())
conf.env.append_value('CCFLAGS', '-DHAVE_CONFIG_H') + # for now define GEANY_PRIVATE for all files, even though it should just be for src/*. + conf.env.append_value('CCFLAGS', '-DGEANY_PRIVATE') # Scintilla flags conf.env.append_value('CXXFLAGS', '-DNDEBUG -DGTK -DGTK2 -DSCI_LEXER -DG_THREADS_IMPL_NONE'.split())
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.