diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-01-07 03:41:09 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-01-07 03:41:09 +0800 |
commit | 5e981603003e1cabbc0d9b0d0a0f37e04c0da998 (patch) | |
tree | 8a281d50594f6a219f3b7197c414c18222f5c591 /lib | |
parent | 7116e574da0fbe0c66c11e099996ad0f4c481035 (diff) | |
download | gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar.gz gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar.bz2 gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar.lz gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar.xz gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.tar.zst gsoc2013-epiphany-5e981603003e1cabbc0d9b0d0a0f37e04c0da998.zip |
More auto-generated types.
2005-01-06 Christian Persch <chpe@cvs.gnome.org>
* lib/Makefile.am:
* lib/ephy-state.c:
* lib/ephy-state.h:
More auto-generated types.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Makefile.am | 50 | ||||
-rw-r--r-- | lib/ephy-state.c | 22 | ||||
-rw-r--r-- | lib/ephy-state.h | 2 |
3 files changed, 45 insertions, 29 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am index 43e7de082..55312a398 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -3,7 +3,9 @@ SUBDIRS = widgets egg noinst_LTLIBRARIES = libephymisc.la headerdir = $(prefix)/include/epiphany-@EPIPHANY_MAJOR@/epiphany -header_DATA = $(INST_H_FILES) +header_DATA = \ + ephy-lib-type-builtins.h \ + $(INST_H_FILES) NOINST_H_FILES = \ eel-gconf-extensions.h \ @@ -14,7 +16,6 @@ NOINST_H_FILES = \ ephy-glade.h \ ephy-gui.h \ ephy-langs.h \ - ephy-marshal.h \ ephy-module.h \ ephy-node-filter.h \ ephy-node-common.h \ @@ -25,6 +26,9 @@ NOINST_H_FILES = \ ephy-stock-icons.h \ ephy-zoom.h +TYPES_H_FILES = \ + ephy-state.h + INST_H_FILES = \ ephy-dialog.h \ ephy-loader.h \ @@ -44,7 +48,6 @@ libephymisc_la_SOURCES = \ ephy-langs.c \ ephy-loader.c \ ephy-module.c \ - ephy-marshal.c \ ephy-node.c \ ephy-node.h \ ephy-node-filter.c \ @@ -58,7 +61,8 @@ libephymisc_la_SOURCES = \ ephy-stock-icons.c \ ephy-zoom.c \ $(INST_H_FILES) \ - $(NOINST_H_FILES) + $(NOINST_H_FILES) \ + $(BUILT_SOURCES) libephymisc_la_CPPFLAGS = \ -I$(top_builddir)/lib \ @@ -69,7 +73,11 @@ libephymisc_la_CFLAGS = \ $(EPIPHANY_DEPENDENCY_CFLAGS) \ $(AM_CFLAGS) -BUILT_SOURCES=ephy-marshal.c ephy-marshal.h +BUILT_SOURCES = \ + ephy-lib-type-builtins.c \ + ephy-lib-type-builtins.h \ + ephy-marshal.c \ + ephy-marshal.h CLEAN_FILES = $(BUILT_SOURCES) DISTCLEAN_FILES = $(BUILT_SOURCES) @@ -80,5 +88,37 @@ ephy-marshal.c: ephy-marshal.list ephy-marshal.h: ephy-marshal.list $(GLIB_GENMARSHAL) --prefix=ephy_marshal $(srcdir)/ephy-marshal.list --header > ephy-marshal.h +ephy-lib-type-builtins.c: $(TYPES_H_FILES) + ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#include \"ephy-lib-type-builtins.h\"\n\n" \ + --fprod "\n/* enumerations from \"@filename@\" */" \ + --fprod "\n#include \"@filename@\"" \ + --vhead "static const G@Type@Value _@enum_name@_values[] = {" \ + --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \ + --vtail " { 0, NULL, NULL }\n};\n\n" \ + --vtail "GType\n@enum_name@_get_type (void)\n{\n" \ + --vtail " static GType type = 0;\n\n" \ + --vtail " if (G_UNLIKELY (type == 0))\n" \ + --vtail " type = g_@type@_register_static (\"@EnumName@\", _@enum_name@_values);\n\n" \ + --vtail " return type;\n}\n\n" \ + $(^F) ) > xgen-$(@F) \ + && ( cmp -s xgen-$(@F) $(@F) || cp xgen-$(@F) $(@F) ) \ + && rm -f xgen-$(@F) + +ephy-lib-type-builtins.h: $(TYPES_H_FILES) + ( cd $(srcdir) && $(GLIB_MKENUMS) \ + --fhead "#ifndef EPHY_LIB_TYPE_BUILTINS_H\n" \ + --fhead "#define EPHY_LIB_TYPE_BUILTINS_H 1\n\n" \ + --fhead "#include <glib-object.h>\n\n" \ + --fhead "G_BEGIN_DECLS\n\n" \ + --ftail "G_END_DECLS\n\n" \ + --ftail "#endif /* EPHY_LIB_TYPE_BUILTINS_H */\n" \ + --fprod "\n/* --- @filename@ --- */" \ + --eprod "#define EPHY_TYPE_@ENUMSHORT@ @enum_name@_get_type()\n" \ + --eprod "GType @enum_name@_get_type (void);\n" \ + $(^F) ) > xgen-$(@F) \ + && ( cmp -s xgen-$(@F) $(@F) || cp xgen-$(@F) $(@F) ) \ + && rm -f xgen-$(@F) + EXTRA_DIST = \ ephy-marshal.list diff --git a/lib/ephy-state.c b/lib/ephy-state.c index 4871b2ea1..452d56b7b 100644 --- a/lib/ephy-state.c +++ b/lib/ephy-state.c @@ -513,25 +513,3 @@ ephy_state_save (void) states_db = NULL; } } - -GType -ephy_state_window_flags_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - static const GFlagsValue values[] = - { - { EPHY_STATE_WINDOW_SAVE_NONE, "EPHY_STATE_WINDOW_SAVE_NONE", "none" }, - { EPHY_STATE_WINDOW_SAVE_SIZE, "EPHY_STATE_WINDOW_SAVE_SIZE", "size" }, - { EPHY_STATE_WINDOW_SAVE_POSITION, "EPHY_STATE_WINDOW_SAVE_POSITION", "position" }, - - { 0, NULL, NULL } - }; - - type = g_flags_register_static ("EphyStateWindowFlags", values); - } - - return type; -} diff --git a/lib/ephy-state.h b/lib/ephy-state.h index 883c9b9db..6339a2d76 100644 --- a/lib/ephy-state.h +++ b/lib/ephy-state.h @@ -27,8 +27,6 @@ G_BEGIN_DECLS -#define EPHY_TYPE_STATE_WINDOW_FLAGS (ephy_state_window_flags_get_type ()) - typedef enum { EPHY_STATE_WINDOW_SAVE_NONE = 0, |