+2006-04-15 Marius Vollmer <marius.vollmer@nokia.com>
+
+ From Murray Cummings (M#185 M#283), with slight changes:
+
+ * configure.ac: Add a --rebuilds option, defaulting to yes, so we
+ can disable the regeneration of hildon-libs-enum-types.[h|c], also
+ based on the gnome-vfs build.
+
+ * hildon-widgets/Makefile.am: Use glib-mkenums to generate
+ hildon-libs-enum-types.[h|c], and build them, based on the
+ gnome-vfs build. This adds GTypes for the enums, needed for
+ accurate signal registration, needed by bindings.
+
+ * hildon-widgets/hildon-number-editor.h: Rename the error_handler
+ default signal handler to range_error, so it has the same name as
+ the signal, as expected by bindings.
+
+ * hildon-widgets/hildon-marshalers.list: Change to the now-used
+ marshallers.
+
+ * hildon-widgets/hildon-note.h (HildonNodeType): Marked as 'skip'.
+ since hildon_note_type_get_type is defined manually and
+ glib-mkenums should ignore this enum.
+
+ * hildon-widgets/hildon-app.h (HildonZoomLevel): Likewise.
+ * hildon-widgets/hildon-caption.h (HildonCaptionStatus): Likewise.
+
+ Correct the signal registration for:
+
+ * hildon-widgets/hildon-app.c
+ (hildon_app_class_init):
+ "switch_to",
+ "clipboard_copy",
+ "clipboard_cut",
+ "clipboard_paste"
+
+ * hildon-widgets/hildon-date-editor.c
+ (hildon_date_editor_class_init):
+ "date_error"
+
+ * hildon-widgets/hildon-find-toolbar.c
+ (hildon_find_toolbar_class_init):
+ "search",
+ "close",
+ "invalid_input",
+ "history_append signals"
+
+ * hildon-widgets/hildon-grid.c
+ (hildon_grid_class_init):
+ "popup_context_menu"
+
+ * hildon-widgets/hildon-number-editor.c
+ (hildon_number_editor_class_init):
+ "range_error".
+
+
2006-04-13 Luc Pionchon <luc.pionchon@nokia.com>
M#90 - Use standard GLib macro names.
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+REBUILD = @REBUILD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG OUTO_CFLAGS OUTO_LIBS GTK_CFLAGS GTK_LIBS GTK_VERSION ESD_CFLAGS ESD_LIBS GNOME_VFS_CFLAGS GNOME_VFS_LIBS GCONF_CFLAGS GCONF_LIBS LIBMB_CFLAGS LIBMB_LIBS ALL_LINGUAS USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE DOXYGEN_FOUND HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE localedir outomoduledir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL PKG_CONFIG OUTO_CFLAGS OUTO_LIBS GTK_CFLAGS GTK_LIBS GTK_VERSION ESD_CFLAGS ESD_LIBS GNOME_VFS_CFLAGS GNOME_VFS_LIBS GCONF_CFLAGS GCONF_LIBS LIBMB_CFLAGS LIBMB_LIBS ALL_LINGUAS USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS HTML_DIR ENABLE_GTK_DOC_TRUE ENABLE_GTK_DOC_FALSE GTK_DOC_USE_LIBTOOL_TRUE GTK_DOC_USE_LIBTOOL_FALSE DOXYGEN_FOUND HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE localedir outomoduledir PERL REBUILD LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-gtk-doc use gtk-doc to build documentation default=no
+ --disable-rebuilds disable all source autogeneration rules
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 3956 "configure"' > conftest.$ac_ext
+ echo '#line 3957 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
# Provide some information about the compiler.
-echo "$as_me:5279:" \
+echo "$as_me:5280:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6311: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6312: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6315: \$? = $ac_status" >&5
+ echo "$as_me:6316: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6544: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6545: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6548: \$? = $ac_status" >&5
+ echo "$as_me:6549: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6604: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6605: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6608: \$? = $ac_status" >&5
+ echo "$as_me:6609: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8779 "configure"
+#line 8780 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8877 "configure"
+#line 8878 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11054: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11055: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11058: \$? = $ac_status" >&5
+ echo "$as_me:11059: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11114: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11115: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11118: \$? = $ac_status" >&5
+ echo "$as_me:11119: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12468 "configure"
+#line 12469 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 12566 "configure"
+#line 12567 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13393: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13394: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13397: \$? = $ac_status" >&5
+ echo "$as_me:13398: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13453: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13454: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13457: \$? = $ac_status" >&5
+ echo "$as_me:13458: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15485: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15486: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15489: \$? = $ac_status" >&5
+ echo "$as_me:15490: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15718: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15719: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15722: \$? = $ac_status" >&5
+ echo "$as_me:15723: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15778: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15779: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:15782: \$? = $ac_status" >&5
+ echo "$as_me:15783: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 17953 "configure"
+#line 17954 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 18051 "configure"
+#line 18052 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
+
+# Disable rebuild of glib-mkenum -generated source code:
+# Check whether --enable-rebuilds or --disable-rebuilds was given.
+if test "${enable_rebuilds+set}" = set; then
+ enableval="$enable_rebuilds"
+
+else
+ enable_rebuilds=yes
+fi;
+
+# define a MAINT-like variable REBUILD which is set if Perl
+# is found, so autogenerated sources can be rebuilt
+for ac_prog in perl5 perl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PERL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_PERL="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+PERL=$ac_cv_prog_PERL
+if test -n "$PERL"; then
+ echo "$as_me:$LINENO: result: $PERL" >&5
+echo "${ECHO_T}$PERL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$PERL" && break
+done
+
+
+REBUILD=\#
+if test "x$enable_rebuilds" = "xyes" && \
+ test -n "$PERL" && \
+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
+ REBUILD=
+fi
+
+
+
ac_config_files="$ac_config_files Makefile hildon-widgets/Makefile timer/Makefile ut/Makefile po/Makefile po/porules.mk doc/Makefile hildon-libs.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
s,@HAVE_DOXYGEN_FALSE@,$HAVE_DOXYGEN_FALSE,;t t
s,@localedir@,$localedir,;t t
s,@outomoduledir@,$outomoduledir,;t t
+s,@PERL@,$PERL,;t t
+s,@REBUILD@,$REBUILD,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
AC_SUBST(localedir)
AC_SUBST(outomoduledir)
+
+# Disable rebuild of glib-mkenum -generated source code:
+AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
+
+# define a MAINT-like variable REBUILD which is set if Perl
+# is found, so autogenerated sources can be rebuilt
+AC_CHECK_PROGS(PERL, perl5 perl)
+
+REBUILD=\#
+if test "x$enable_rebuilds" = "xyes" && \
+ test -n "$PERL" && \
+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
+ REBUILD=
+fi
+AC_SUBST(REBUILD)
+
+
AC_OUTPUT(Makefile \
hildon-widgets/Makefile \
timer/Makefile \
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+REBUILD = @REBUILD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
hildon-program.c \
hildon-program.h \
hildon-code-dialog.c \
- hildon-code-dialog.h
+ hildon-code-dialog.h \
+ $(hildonlibs_built_headers) \
+ $(hildonlibs_built_cfiles)
hildon-marshalers.h: hildon-marshalers.list
hildon-marshalers.list >hildon-marshalers.h
hildon-marshalers.c: hildon-marshalers.list hildon-marshalers.h
- echo '#include "hildon-marshalers.h"' >hildon-marshalers.c
+ echo '#include <hildon-widgets/hildon-marshalers.h>' >hildon-marshalers.c
glib-genmarshal --prefix _hildon_marshal --body \
hildon-marshalers.list >>hildon-marshalers.c
hildon-program.h \
hildon-window-private.h \
hildon-code-dialog.h
+
+headers_to_scan_for_enums = $(hildonwidgetsincludeinst_DATA)
+
+# Generate the enums source code, with glib-mkenums:
+# This is based on the same Makefile.am stuff in pango:
+hildonlibs_built_headers = hildon-libs-enum-types.h
+hildonlibs_built_cfiles = hildon-libs-enum-types.c
+
+# Don't build the library until we have built the header that it needs:
+$(OBJECTS) $(libhildonwidgets_la_OBJECTS): $(hildonlibs_built_headers)
+
+hildon-libs-enum-types.h: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#ifndef __HILDON_LIBS_ENUM_TYPES_H__\n#define __HILDON_LIBS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void);\n#define HILDON_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __HILDON_LIBS_ENUM_TYPES_H__ */" \
+ $(headers_to_scan_for_enums)) > $@
+
+#FIXME: This would be shorter if there was a hildon-libs.h file:
+hildon-libs-enum-types.c: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#include <hildon-widgets/hildon-app.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-input-mode-hint.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-caption.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-date-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-number-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-telephone-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-note.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-grid.h>\n" \
+ --fhead '#include "hildon-libs-enum-types.h"\n' \
+ --fhead "#include <glib-object.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(headers_to_scan_for_enums)) > $@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+REBUILD = @REBUILD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
hildon-program.c \
hildon-program.h \
hildon-code-dialog.c \
- hildon-code-dialog.h
+ hildon-code-dialog.h \
+ $(hildonlibs_built_headers) \
+ $(hildonlibs_built_cfiles)
hildonwidgetsincludeinstdir = $(includedir)/hildon-widgets
hildon-window-private.h \
hildon-code-dialog.h
+
+headers_to_scan_for_enums = $(hildonwidgetsincludeinst_DATA)
+
+# Generate the enums source code, with glib-mkenums:
+# This is based on the same Makefile.am stuff in pango:
+hildonlibs_built_headers = hildon-libs-enum-types.h
+hildonlibs_built_cfiles = hildon-libs-enum-types.c
subdir = hildon-widgets
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
LTLIBRARIES = $(lib_LTLIBRARIES)
libhildonwidgets_la_DEPENDENCIES =
+am__objects_1 =
+am__objects_2 = hildon-libs-enum-types.lo
am_libhildonwidgets_la_OBJECTS = hildon-marshalers.lo \
hildon-composite-widget.lo hildon-controlbar.lo \
hildon-seekbar.lo hildon-color-selector.lo hildon-note.lo \
hildon-color-button.lo hildon-system-sound.lo hildon-app.lo \
hildon-defines.lo hildon-appview.lo hildon-find-toolbar.lo \
gtk-infoprint.lo hildon-banner.lo hildon-caption.lo \
- hildon-window.lo hildon-program.lo hildon-code-dialog.lo
+ hildon-window.lo hildon-program.lo hildon-code-dialog.lo \
+ $(am__objects_1) $(am__objects_2)
libhildonwidgets_la_OBJECTS = $(am_libhildonwidgets_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-grid.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-hvolumebar.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-insert-object-dialog.Plo \
+@AMDEP_TRUE@ ./$(DEPDIR)/hildon-libs-enum-types.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-marshalers.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-name-password-dialog.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/hildon-note.Plo \
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-grid.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-hvolumebar.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-insert-object-dialog.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-libs-enum-types.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-marshalers.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-name-password-dialog.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hildon-note.Plo@am__quote@
hildon-marshalers.list >hildon-marshalers.h
hildon-marshalers.c: hildon-marshalers.list hildon-marshalers.h
- echo '#include "hildon-marshalers.h"' >hildon-marshalers.c
+ echo '#include <hildon-widgets/hildon-marshalers.h>' >hildon-marshalers.c
glib-genmarshal --prefix _hildon_marshal --body \
hildon-marshalers.list >>hildon-marshalers.c
+
+# Don't build the library until we have built the header that it needs:
+$(OBJECTS) $(libhildonwidgets_la_OBJECTS): $(hildonlibs_built_headers)
+
+hildon-libs-enum-types.h: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#ifndef __HILDON_LIBS_ENUM_TYPES_H__\n#define __HILDON_LIBS_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name@_get_type (void);\n#define HILDON_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __HILDON_LIBS_ENUM_TYPES_H__ */" \
+ $(headers_to_scan_for_enums)) > $@
+
+#This would be shorter if there was a hildon-libs.h file:
+hildon-libs-enum-types.c: @REBUILD@ $(headers_to_scan_for_enums) Makefile
+ (cd $(srcdir) && glib-mkenums \
+ --fhead "#include <hildon-widgets/hildon-app.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-input-mode-hint.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-caption.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-date-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-number-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-telephone-editor.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-note.h>\n" \
+ --fhead "#include <hildon-widgets/hildon-grid.h>\n" \
+ --fhead '#include "hildon-libs-enum-types.h"\n' \
+ --fhead "#include <glib-object.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $(headers_to_scan_for_enums)) > $@
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(HildonAppClass, switch_to),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
app_signals[IM_CLOSE] =
g_signal_new("im_close",
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(HildonAppClass, clipboard_copy),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
app_signals[CLIPBOARD_CUT] =
g_signal_new("clipboard_cut",
G_OBJECT_CLASS_TYPE(object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(HildonAppClass, clipboard_cut),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
app_signals[CLIPBOARD_PASTE] =
g_signal_new("clipboard_paste",
G_OBJECT_CLASS_TYPE(object_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET(HildonAppClass, clipboard_paste),
NULL, NULL,
- g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1,
- G_TYPE_POINTER);
+ g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1,
+ GTK_TYPE_WIDGET);
/* properties */
g_object_class_install_property(object_class, PROP_SCROLL_CONTROL,
* This enum is deprecated and should not be used. It's just
* lecagy stuff from ancient specs.
*/
-typedef enum {
+typedef enum /*< skip >*/
+{
HILDON_ZOOM_SMALL = 1,
HILDON_ZOOM_MEDIUM = 2,
HILDON_ZOOM_LARGE = 3
*
* Keys to set the #HildonCaption to be optional or mandatory.
*/
-typedef enum {
+typedef enum /*< skip >*/
+{
HILDON_CAPTION_OPTIONAL = 0,
HILDON_CAPTION_MANDATORY
} HildonCaptionStatus;
struct _HildonCaptionClass
{
GtkEventBoxClass parent_class;
- void (*activate) (GtkWidget *widget);
+ void (*activate) (HildonCaption *widget);
};
#include <hildon-widgets/hildon-input-mode-hint.h>
#include "hildon-composite-widget.h"
#include "hildon-marshalers.h"
+#include "hildon-libs-enum-types.h"
#ifdef HAVE_CONFIG_H
#include<config.h>
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(HildonDateEditorClass, date_error),
g_signal_accumulator_true_handled, NULL,
- _hildon_marshal_BOOLEAN__INT,
- G_TYPE_BOOLEAN, 1, G_TYPE_INT);
+ _hildon_marshal_BOOLEAN__ENUM,
+ G_TYPE_BOOLEAN, 1, HILDON_TYPE_DATE_EDITOR_ERROR_TYPE);
/**
* HildonDateEditor:year:
"search", HILDON_TYPE_FIND_TOOLBAR,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(HildonFindToolbarClass, search),
- NULL, NULL, gtk_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ NULL, NULL, gtk_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* HildonFindToolbar::close:
"close", HILDON_TYPE_FIND_TOOLBAR,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(HildonFindToolbarClass, close),
- NULL, NULL, gtk_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ NULL, NULL, gtk_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* HildonFindToolbar::invalid-input:
"invalid_input", HILDON_TYPE_FIND_TOOLBAR,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(HildonFindToolbarClass, invalid_input),
- NULL, NULL, gtk_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
+ NULL, NULL, gtk_marshal_VOID__POINTER,
+ G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* HildonFindToolbar::history-append:
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
(HildonFindToolbarClass, history_append),
g_signal_accumulator_true_handled, NULL,
- gtk_marshal_BOOLEAN__VOID,
- G_TYPE_BOOLEAN, 0);
+ gtk_marshal_BOOLEAN__POINTER,
+ G_TYPE_BOOLEAN, 1, G_TYPE_POINTER);
}
static void
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET(HildonGridClass, popup_context_menu),
g_signal_accumulator_true_handled, NULL,
- _hildon_marshal_BOOLEAN__INT_INT_INT,
- G_TYPE_BOOLEAN, 3,
- G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
+ _hildon_marshal_VOID__OBJECT,
+ G_TYPE_NONE, 1, HILDON_TYPE_GRID_ITEM);
}
-#include "hildon-marshalers.h"
+#include <hildon-widgets/hildon-marshalers.h>
#include <glib-object.h>
#endif /* !G_ENABLE_DEBUG */
-/* BOOLEAN:INT (hildon-marshalers.list:26) */
+/* BOOLEAN:ENUM (hildon-marshalers.list:26) */
void
-_hildon_marshal_BOOLEAN__INT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data)
+_hildon_marshal_BOOLEAN__ENUM (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data)
{
- typedef gboolean (*GMarshalFunc_BOOLEAN__INT) (gpointer data1,
- gint arg_1,
- gpointer data2);
- register GMarshalFunc_BOOLEAN__INT callback;
+ typedef gboolean (*GMarshalFunc_BOOLEAN__ENUM) (gpointer data1,
+ gint arg_1,
+ gpointer data2);
+ register GMarshalFunc_BOOLEAN__ENUM callback;
register GCClosure *cc = (GCClosure*) closure;
register gpointer data1, data2;
gboolean v_return;
data1 = g_value_peek_pointer (param_values + 0);
data2 = closure->data;
}
- callback = (GMarshalFunc_BOOLEAN__INT) (marshal_data ? marshal_data : cc->callback);
+ callback = (GMarshalFunc_BOOLEAN__ENUM) (marshal_data ? marshal_data : cc->callback);
v_return = callback (data1,
- g_marshal_value_peek_int (param_values + 1),
+ g_marshal_value_peek_enum (param_values + 1),
data2);
g_value_set_boolean (return_value, v_return);
g_value_set_boolean (return_value, v_return);
}
+/* VOID:OBJECT (hildon-marshalers.list:28) */
+
G_BEGIN_DECLS
-/* BOOLEAN:INT (hildon-marshalers.list:26) */
-extern void _hildon_marshal_BOOLEAN__INT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
+/* BOOLEAN:ENUM (hildon-marshalers.list:26) */
+extern void _hildon_marshal_BOOLEAN__ENUM (GClosure *closure,
+ GValue *return_value,
+ guint n_param_values,
+ const GValue *param_values,
+ gpointer invocation_hint,
+ gpointer marshal_data);
/* BOOLEAN:INT,INT,INT (hildon-marshalers.list:27) */
extern void _hildon_marshal_BOOLEAN__INT_INT_INT (GClosure *closure,
gpointer invocation_hint,
gpointer marshal_data);
+/* VOID:OBJECT (hildon-marshalers.list:28) */
+#define _hildon_marshal_VOID__OBJECT g_cclosure_marshal_VOID__OBJECT
+
G_END_DECLS
#endif /* ___hildon_marshal_MARSHAL_H__ */
# NONE deprecated alias for VOID
# BOOL deprecated alias for BOOLEAN
-BOOLEAN:INT
+BOOLEAN:ENUM
BOOLEAN:INT,INT,INT
+VOID:OBJECT
typedef struct _HildonNote HildonNote;
typedef struct _HildonNoteClass HildonNoteClass;
-typedef enum
+typedef enum /*< skip >*/
{
HILDON_NOTE_CONFIRMATION_TYPE = 0,
HILDON_NOTE_CONFIRMATION_BUTTON_TYPE,
#include "hildon-composite-widget.h"
#include <hildon-widgets/hildon-input-mode-hint.h>
#include <hildon-widgets/hildon-defines.h>
+#include "hildon-libs-enum-types.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
hildon_number_editor_finalize (GObject *self);
static gboolean
-hildon_number_editor_error_handler(HildonNumberEditor *editor,
+hildon_number_editor_range_error(HildonNumberEditor *editor,
HildonNumberEditorErrorType type);
static gboolean
widget_class->size_allocate = hildon_number_editor_size_allocate;
widget_class->focus = hildon_composite_widget_focus;
- editor_class->error_handler = hildon_number_editor_error_handler;
+ editor_class->range_error = hildon_number_editor_range_error;
/* Because we derived our widget from GtkContainer, we should override
forall method */
HildonNumberEditor_signal[RANGE_ERROR] =
g_signal_new("range_error", HILDON_TYPE_NUMBER_EDITOR,
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET
- (HildonNumberEditorClass, error_handler),
+ (HildonNumberEditorClass, range_error),
g_signal_accumulator_true_handled, NULL,
- _hildon_marshal_BOOLEAN__INT,
- G_TYPE_BOOLEAN, 1, G_TYPE_INT);
+ _hildon_marshal_BOOLEAN__ENUM,
+ G_TYPE_BOOLEAN, 1, HILDON_TYPE_NUMBER_EDITOR_ERROR_TYPE);
}
static void
}
static gboolean
-hildon_number_editor_error_handler(HildonNumberEditor *editor,
+hildon_number_editor_range_error(HildonNumberEditor *editor,
HildonNumberEditorErrorType type)
{
{
GtkContainerClass parent_class;
- gboolean (*error_handler) (HildonNumberEditor *editor,
+ gboolean (*range_error) (HildonNumberEditor *editor,
HildonNumberEditorErrorType type);
};
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+REBUILD = @REBUILD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
POSUB = @POSUB@
PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
RANLIB = @RANLIB@
+REBUILD = @REBUILD@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@