Use GEANY_PRIVATE to hide some fields from plugins.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4128 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
2955303eef
commit
1ec744da6c
@ -5,6 +5,9 @@
|
|||||||
Add reference to HACKING for plugin API development.
|
Add reference to HACKING for plugin API development.
|
||||||
* HACKING:
|
* HACKING:
|
||||||
Add section 'Plugin API/ABI design'.
|
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>
|
2009-08-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
|
||||||
|
@ -96,7 +96,8 @@ AM_CFLAGS = -DGEANY_DATADIR=\"data\" \
|
|||||||
-DGEANY_DOCDIR=\"\" \
|
-DGEANY_DOCDIR=\"\" \
|
||||||
-DGEANY_LIBDIR=\"\" \
|
-DGEANY_LIBDIR=\"\" \
|
||||||
-DGEANY_LOCALEDIR=\"\" \
|
-DGEANY_LOCALEDIR=\"\" \
|
||||||
-DGEANY_PREFIX=\"\"
|
-DGEANY_PREFIX=\"\" \
|
||||||
|
-DGEANY_PRIVATE
|
||||||
|
|
||||||
geany_LDFLAGS = -mwindows -mms-bitfields
|
geany_LDFLAGS = -mwindows -mms-bitfields
|
||||||
|
|
||||||
@ -119,7 +120,8 @@ AM_CFLAGS = -DGEANY_DATADIR=\""$(datadir)"\" \
|
|||||||
-DGEANY_DOCDIR=\""$(docdir)"\" \
|
-DGEANY_DOCDIR=\""$(docdir)"\" \
|
||||||
-DGEANY_LIBDIR=\""$(libdir)"\" \
|
-DGEANY_LIBDIR=\""$(libdir)"\" \
|
||||||
-DGEANY_LOCALEDIR=\""$(localedir)"\" \
|
-DGEANY_LOCALEDIR=\""$(localedir)"\" \
|
||||||
-DGEANY_PREFIX=\""$(prefix)"\"
|
-DGEANY_PREFIX=\""$(prefix)"\" \
|
||||||
|
-DGEANY_PRIVATE
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ struct GeanyFiletype
|
|||||||
gchar *error_regex_string;
|
gchar *error_regex_string;
|
||||||
|
|
||||||
struct GeanyFiletypePrivate *priv; /* must be last, append fields before this item */
|
struct GeanyFiletypePrivate *priv; /* must be last, append fields before this item */
|
||||||
|
#ifdef GEANY_PRIVATE
|
||||||
/* Do not use following fields in plugins */
|
/* 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 *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 */
|
GeanyBuildCommand *ftdefcmds; /* filetype dependent defaults for non_ft commands */
|
||||||
@ -130,6 +130,7 @@ struct GeanyFiletype
|
|||||||
gint project_list_entry;
|
gint project_list_entry;
|
||||||
gchar *projerror_regex_string;
|
gchar *projerror_regex_string;
|
||||||
gchar *homeerror_regex_string;
|
gchar *homeerror_regex_string;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
extern GPtrArray *filetypes_array;
|
extern GPtrArray *filetypes_array;
|
||||||
|
@ -51,6 +51,7 @@ GeanyKeyBinding;
|
|||||||
typedef struct GeanyKeyGroup GeanyKeyGroup;
|
typedef struct GeanyKeyGroup GeanyKeyGroup;
|
||||||
|
|
||||||
/* Plugins should not set these fields. */
|
/* Plugins should not set these fields. */
|
||||||
|
#ifdef GEANY_PRIVATE
|
||||||
struct GeanyKeyGroup
|
struct GeanyKeyGroup
|
||||||
{
|
{
|
||||||
const gchar *name; /* Group name used in the configuration file, such as @c "html_chars" */
|
const gchar *name; /* Group name used in the configuration file, such as @c "html_chars" */
|
||||||
@ -59,6 +60,7 @@ struct GeanyKeyGroup
|
|||||||
GeanyKeyBinding *keys; /* array of GeanyKeyBinding structs */
|
GeanyKeyBinding *keys; /* array of GeanyKeyBinding structs */
|
||||||
gboolean plugin; /* used by plugin */
|
gboolean plugin; /* used by plugin */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
extern GPtrArray *keybinding_groups; /* array of GeanyKeyGroup pointers */
|
extern GPtrArray *keybinding_groups; /* array of GeanyKeyGroup pointers */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
|
# Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
|
||||||
|
|
||||||
DEFINES = -DHAVE_CONFIG_H \
|
DEFINES = -DHAVE_CONFIG_H \
|
||||||
|
-DGEANY_PRIVATE \
|
||||||
-DGEANY_DATADIR=\"data\" \
|
-DGEANY_DATADIR=\"data\" \
|
||||||
-DGEANY_LOCALEDIR=\"\" \
|
-DGEANY_LOCALEDIR=\"\" \
|
||||||
-DGEANY_LIBDIR=\"\" \
|
-DGEANY_LIBDIR=\"\" \
|
||||||
|
@ -41,9 +41,10 @@ typedef struct GeanyProject
|
|||||||
gchar **file_patterns; /**< Array of filename extension patterns. */
|
gchar **file_patterns; /**< Array of filename extension patterns. */
|
||||||
|
|
||||||
struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
|
struct GeanyProjectPrivate *priv; /* must be last, append fields before this item */
|
||||||
|
#ifdef GEANY_PRIVATE
|
||||||
/* Do not use following fields in plugins */
|
/* Do not use following fields in plugins */
|
||||||
GPtrArray *build_filetypes_list; /* *< Project has custom filetype builds for these. */
|
GPtrArray *build_filetypes_list; /* *< Project has custom filetype builds for these. */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
GeanyProject;
|
GeanyProject;
|
||||||
|
|
||||||
|
2
wscript
2
wscript
@ -272,6 +272,8 @@ def configure(conf):
|
|||||||
conf.env.append_value('CCFLAGS', '-g -DGEANY_DEBUG'.split())
|
conf.env.append_value('CCFLAGS', '-g -DGEANY_DEBUG'.split())
|
||||||
|
|
||||||
conf.env.append_value('CCFLAGS', '-DHAVE_CONFIG_H')
|
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
|
# Scintilla flags
|
||||||
conf.env.append_value('CXXFLAGS',
|
conf.env.append_value('CXXFLAGS',
|
||||||
'-DNDEBUG -DGTK -DGTK2 -DSCI_LEXER -DG_THREADS_IMPL_NONE'.split())
|
'-DNDEBUG -DGTK -DGTK2 -DSCI_LEXER -DG_THREADS_IMPL_NONE'.split())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user