From 317c4c28fbbc5b4ac4d3891fa381842c02f13294 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 17 Jan 2008 09:05:13 -0600 Subject: [PATCH] Keep enums file in mercurial, for win32 --- .hgignore | 2 +- moo/mooedit/Makefile.am | 18 ++-- moo/mooedit/mooedit-enums.c | 172 ++++++++++++++++++++++++++++++++++++ moo/mooedit/mooedit-enums.h | 49 ++++++++++ 4 files changed, 228 insertions(+), 13 deletions(-) create mode 100644 moo/mooedit/mooedit-enums.c create mode 100644 moo/mooedit/mooedit-enums.h diff --git a/.hgignore b/.hgignore index 94b37022..4615371e 100644 --- a/.hgignore +++ b/.hgignore @@ -12,7 +12,7 @@ Makefile(\.in)?$ ^moo/moo(-config\.h|\.pc)$ ^moo/.*-glade\.h$ ^moo/mooedit/gtksourceview/.*-mangled\.[ch]$ -^moo/mooedit/(language-specs/moo\.xml|m(oo)?edit-ui\.h|(stamp-)?mooedit-enums\.[ch])$ +^moo/mooedit/(language-specs/moo\.xml|m(oo)?edit-ui\.h|stamp-mooedit-enums\.[ch])$ ^moo/mooedit/language-specs/testdir ^moo/moofileview/(moofileview-ui\.h|symlink\.h)$ ^moo/moopython/plugins/(pyproject/project-plugin|python|terminal)\.ini$ diff --git a/moo/mooedit/Makefile.am b/moo/mooedit/Makefile.am index e46f74f5..613c5b4b 100644 --- a/moo/mooedit/Makefile.am +++ b/moo/mooedit/Makefile.am @@ -21,6 +21,7 @@ mooedit_include_headers = \ mooedit-bookmarks.h \ mooedit.h \ mooeditconfig.h \ + mooedit-enums.h mooeditor.h \ mooeditprefs.h \ mooeditwindow.h \ @@ -68,6 +69,7 @@ mooedit_sources = \ mooeditconfig.c \ mooeditdialogs.c \ mooeditdialogs.h \ + mooedit-enums.c \ mooeditfileops.c \ mooeditfileops.h \ mooeditfiltersettings.c \ @@ -122,17 +124,9 @@ mooedit_printing_sources = \ mootextprint-private.h \ mootextprint.h -nodist_mooedit_sources = \ - mooedit-enums.c \ - mooedit-enums.h -nodist_mooedit_include_headers = \ - mooedit-enums.h BUILT_SOURCES = \ mooedit-enums.c \ mooedit-enums.h -CLEANFILES = \ - mooedit-enums.c \ - mooedit-enums.h mooedit_enums_headers = \ moocommand.h \ @@ -143,7 +137,7 @@ mooedit_enums_headers = \ mootextsearch.h \ mootextview.h -CLEANFILES += stamp-mooedit-enums.h stamp-mooedit-enums.c +CLEANFILES = stamp-mooedit-enums.h stamp-mooedit-enums.c mooedit-enums.h: stamp-mooedit-enums.h @true mooedit-enums.c: stamp-mooedit-enums.c @@ -156,7 +150,7 @@ stamp-mooedit-enums.h: $(mooedit_enums_headers) Makefile --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define MOO_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n\n" \ --ftail "\nG_END_DECLS\n\n#endif /* MOO_EDIT_ENUMS_H */" \ $(mooedit_enums_headers) ) > xgen-gtbh \ - && (cmp -s xgen-gtbh mooedit-enums.h || cp xgen-gtbh mooedit-enums.h ) \ + && (cmp -s xgen-gtbh $(srcdir)/mooedit-enums.h || cp xgen-gtbh $(srcdir)/mooedit-enums.h ) \ && rm -f xgen-gtbh \ && echo timestamp > $(@F) stamp-mooedit-enums.c: $(mooedit_enums_headers) Makefile @@ -167,7 +161,7 @@ stamp-mooedit-enums.c: $(mooedit_enums_headers) Makefile --vprod " { @VALUENAME@, (char*) \"@VALUENAME@\", (char*) \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n\n" \ $(mooedit_enums_headers) ) > xgen-gtbc \ - && (cmp -s xgen-gtbc mooedit-enums.c || cp xgen-gtbc mooedit-enums.c ) \ + && (cmp -s xgen-gtbc $(srcdir)/mooedit-enums.c || cp xgen-gtbc $(srcdir)/mooedit-enums.c ) \ && rm -f xgen-gtbc \ && echo timestamp > $(@F) @@ -188,7 +182,7 @@ glade_files = \ glade/moostatusbar.glade \ glade/mooprintpreview.glade glade_sources = $(patsubst glade/%.glade,%-glade.h,$(glade_files)) -nodist_mooedit_sources += $(glade_sources) +nodist_mooedit_sources = $(glade_sources) BUILT_SOURCES += $(glade_sources) CLEANFILES += $(glade_sources) EXTRA_DIST = $(glade_files) diff --git a/moo/mooedit/mooedit-enums.c b/moo/mooedit/mooedit-enums.c new file mode 100644 index 00000000..af7e1862 --- /dev/null +++ b/moo/mooedit/mooedit-enums.c @@ -0,0 +1,172 @@ + +/* Generated data (by glib-mkenums) */ + +#include "mooedit/mooedit-enums.h" + +#include "mooedit/moocommand.h" + +GType +moo_command_options_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_COMMAND_NEED_DOC, (char*) "MOO_COMMAND_NEED_DOC", (char*) "doc" }, + { MOO_COMMAND_NEED_FILE, (char*) "MOO_COMMAND_NEED_FILE", (char*) "file" }, + { MOO_COMMAND_NEED_SAVE, (char*) "MOO_COMMAND_NEED_SAVE", (char*) "save" }, + { MOO_COMMAND_NEED_SAVE_ALL, (char*) "MOO_COMMAND_NEED_SAVE_ALL", (char*) "save-all" }, + { MOO_COMMAND_NEED_WINDOW, (char*) "MOO_COMMAND_NEED_WINDOW", (char*) "window" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("MooCommandOptions", values); + } + return etype; +} + +#include "mooedit/mooeditconfig.h" + +GType +moo_edit_config_source_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_EDIT_CONFIG_SOURCE_USER, (char*) "MOO_EDIT_CONFIG_SOURCE_USER", (char*) "user" }, + { MOO_EDIT_CONFIG_SOURCE_FILE, (char*) "MOO_EDIT_CONFIG_SOURCE_FILE", (char*) "file" }, + { MOO_EDIT_CONFIG_SOURCE_FILENAME, (char*) "MOO_EDIT_CONFIG_SOURCE_FILENAME", (char*) "filename" }, + { MOO_EDIT_CONFIG_SOURCE_LANG, (char*) "MOO_EDIT_CONFIG_SOURCE_LANG", (char*) "lang" }, + { MOO_EDIT_CONFIG_SOURCE_AUTO, (char*) "MOO_EDIT_CONFIG_SOURCE_AUTO", (char*) "auto" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("MooEditConfigSource", values); + } + return etype; +} + +#include "mooedit/mooeditwindow.h" + +GType +moo_action_check_type_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_ACTION_CHECK_SENSITIVE, (char*) "MOO_ACTION_CHECK_SENSITIVE", (char*) "sensitive" }, + { MOO_ACTION_CHECK_VISIBLE, (char*) "MOO_ACTION_CHECK_VISIBLE", (char*) "visible" }, + { MOO_ACTION_CHECK_ACTIVE, (char*) "MOO_ACTION_CHECK_ACTIVE", (char*) "active" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("MooActionCheckType", values); + } + return etype; +} + +#include "mooedit/mooedit.h" + +GType +moo_edit_status_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_EDIT_MODIFIED_ON_DISK, (char*) "MOO_EDIT_MODIFIED_ON_DISK", (char*) "modified-on-disk" }, + { MOO_EDIT_DELETED, (char*) "MOO_EDIT_DELETED", (char*) "deleted" }, + { MOO_EDIT_CHANGED_ON_DISK, (char*) "MOO_EDIT_CHANGED_ON_DISK", (char*) "changed-on-disk" }, + { MOO_EDIT_MODIFIED, (char*) "MOO_EDIT_MODIFIED", (char*) "modified" }, + { MOO_EDIT_NEW, (char*) "MOO_EDIT_NEW", (char*) "new" }, + { MOO_EDIT_CLEAN, (char*) "MOO_EDIT_CLEAN", (char*) "clean" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("MooEditStatus", values); + } + return etype; +} + +GType +moo_edit_state_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_EDIT_STATE_NORMAL, (char*) "MOO_EDIT_STATE_NORMAL", (char*) "normal" }, + { MOO_EDIT_STATE_LOADING, (char*) "MOO_EDIT_STATE_LOADING", (char*) "loading" }, + { MOO_EDIT_STATE_SAVING, (char*) "MOO_EDIT_STATE_SAVING", (char*) "saving" }, + { MOO_EDIT_STATE_PRINTING, (char*) "MOO_EDIT_STATE_PRINTING", (char*) "printing" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("MooEditState", values); + } + return etype; +} + +#include "mooedit/mootextfind.h" + +GType +moo_find_flags_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_FIND_REGEX, (char*) "MOO_FIND_REGEX", (char*) "regex" }, + { MOO_FIND_CASELESS, (char*) "MOO_FIND_CASELESS", (char*) "caseless" }, + { MOO_FIND_IN_SELECTED, (char*) "MOO_FIND_IN_SELECTED", (char*) "in-selected" }, + { MOO_FIND_BACKWARDS, (char*) "MOO_FIND_BACKWARDS", (char*) "backwards" }, + { MOO_FIND_WHOLE_WORDS, (char*) "MOO_FIND_WHOLE_WORDS", (char*) "whole-words" }, + { MOO_FIND_FROM_CURSOR, (char*) "MOO_FIND_FROM_CURSOR", (char*) "from-cursor" }, + { MOO_FIND_DONT_PROMPT, (char*) "MOO_FIND_DONT_PROMPT", (char*) "dont-prompt" }, + { MOO_FIND_REPL_LITERAL, (char*) "MOO_FIND_REPL_LITERAL", (char*) "repl-literal" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("MooFindFlags", values); + } + return etype; +} + +#include "mooedit/mootextsearch.h" + +GType +moo_text_search_flags_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_TEXT_SEARCH_CASELESS, (char*) "MOO_TEXT_SEARCH_CASELESS", (char*) "caseless" }, + { MOO_TEXT_SEARCH_REGEX, (char*) "MOO_TEXT_SEARCH_REGEX", (char*) "regex" }, + { MOO_TEXT_SEARCH_WHOLE_WORDS, (char*) "MOO_TEXT_SEARCH_WHOLE_WORDS", (char*) "whole-words" }, + { MOO_TEXT_SEARCH_REPL_LITERAL, (char*) "MOO_TEXT_SEARCH_REPL_LITERAL", (char*) "repl-literal" }, + { 0, NULL, NULL } + }; + etype = g_flags_register_static ("MooTextSearchFlags", values); + } + return etype; +} + +#include "mooedit/mootextview.h" + +GType +moo_text_selection_type_get_type (void) +{ + static GType etype; + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_TEXT_SELECT_CHARS, (char*) "MOO_TEXT_SELECT_CHARS", (char*) "chars" }, + { MOO_TEXT_SELECT_WORDS, (char*) "MOO_TEXT_SELECT_WORDS", (char*) "words" }, + { MOO_TEXT_SELECT_LINES, (char*) "MOO_TEXT_SELECT_LINES", (char*) "lines" }, + { 0, NULL, NULL } + }; + etype = g_enum_register_static ("MooTextSelectionType", values); + } + return etype; +} + + +/* Generated data ends here */ + diff --git a/moo/mooedit/mooedit-enums.h b/moo/mooedit/mooedit-enums.h new file mode 100644 index 00000000..523c5a9c --- /dev/null +++ b/moo/mooedit/mooedit-enums.h @@ -0,0 +1,49 @@ + +/* Generated data (by glib-mkenums) */ + +#ifndef MOO_EDIT_ENUMS_H +#define MOO_EDIT_ENUMS_H + +#include + +G_BEGIN_DECLS + + +/* enumerations from "mooedit/moocommand.h" */ +GType moo_command_options_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_COMMAND_OPTIONS (moo_command_options_get_type()) + +/* enumerations from "mooedit/mooeditconfig.h" */ +GType moo_edit_config_source_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_CONFIG_SOURCE (moo_edit_config_source_get_type()) + +/* enumerations from "mooedit/mooeditwindow.h" */ +GType moo_action_check_type_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_ACTION_CHECK_TYPE (moo_action_check_type_get_type()) + +/* enumerations from "mooedit/mooedit.h" */ +GType moo_edit_status_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_STATUS (moo_edit_status_get_type()) + +GType moo_edit_state_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_STATE (moo_edit_state_get_type()) + +/* enumerations from "mooedit/mootextfind.h" */ +GType moo_find_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_FIND_FLAGS (moo_find_flags_get_type()) + +/* enumerations from "mooedit/mootextsearch.h" */ +GType moo_text_search_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_TEXT_SEARCH_FLAGS (moo_text_search_flags_get_type()) + +/* enumerations from "mooedit/mootextview.h" */ +GType moo_text_selection_type_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_TEXT_SELECTION_TYPE (moo_text_selection_type_get_type()) + + +G_END_DECLS + +#endif /* MOO_EDIT_ENUMS_H */ + +/* Generated data ends here */ +