diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-01-10 14:25:46 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-01-10 14:25:46 +0000 |
commit | 30d0830ca13a2f800dfbff7db8873d10b903bb96 (patch) | |
tree | feecaf19b03e4419c0b67a2633725236b44a27c7 | |
parent | 733e609fa9b2054010dd284d330672ccd4c89a8d (diff) | |
download | glibmm-30d0830ca13a2f800dfbff7db8873d10b903bb96.tar.gz |
Copy (and very slightly adjust) the build_shared/ files from gtkmm, which
2008-01-10 Murray Cumming <murrayc@murrayc.com>
* Makefile.am:
* build_shared/Makefile_build.am_fragment:
* build_shared/Makefile_build_extra.am_fragment:
* build_shared/Makefile_build_gensrc.am_fragment:
* build_shared/Makefile_gensrc.am_fragment:
* build_shared/Makefile_gensrc_platform.am_fragment:
Copy (and very slightly adjust) the build_shared/ files from
gtkmm, which has had multiple sub-libraries for a long time.
* gio/giomm/Makefile.am:
* gio/src/Makefile.am:
* gio/src/Makefile_list_of_hg.am_fragment:
* glib/glibmm/Makefile.am:
* glib/glibmm/private/Makefile.am:
* glib/src/Makefile.am:
* glib/src/Makefile_list_of_hg.am_fragment:
Adapt to the structure (variable names, mostly) needed by the
newer build_shared/ files, so that the giomm library is actually
built.
* tools/m4/convert_glib.m4:
* gio/giomm/init.cc:
* gio/giomm/init.h:
* gio/src/asyncresult.ccg:
* gio/src/drive.ccg:
* gio/src/drive.hg:
* gio/src/file.ccg:
* gio/src/file.hg:
* gio/src/fileattribute.ccg:
* gio/src/fileinputstream.hg:
* gio/src/fileoutputstream.hg:
* gio/src/volume.ccg:
* gio/src/volume.hg: Various build fixes, including adding a flags
parameter to unmount and eject methods.
svn path=/trunk/; revision=497
33 files changed, 256 insertions, 269 deletions
@@ -1,5 +1,41 @@ 2008-01-10 Murray Cumming <murrayc@murrayc.com> + * Makefile.am: + * build_shared/Makefile_build.am_fragment: + * build_shared/Makefile_build_extra.am_fragment: + * build_shared/Makefile_build_gensrc.am_fragment: + * build_shared/Makefile_gensrc.am_fragment: + * build_shared/Makefile_gensrc_platform.am_fragment: + Copy (and very slightly adjust) the build_shared/ files from + gtkmm, which has had multiple sub-libraries for a long time. + * gio/giomm/Makefile.am: + * gio/src/Makefile.am: + * gio/src/Makefile_list_of_hg.am_fragment: + * glib/glibmm/Makefile.am: + * glib/glibmm/private/Makefile.am: + * glib/src/Makefile.am: + * glib/src/Makefile_list_of_hg.am_fragment: + Adapt to the structure (variable names, mostly) needed by the + newer build_shared/ files, so that the giomm library is actually + built. + + * tools/m4/convert_glib.m4: + * gio/giomm/init.cc: + * gio/giomm/init.h: + * gio/src/asyncresult.ccg: + * gio/src/drive.ccg: + * gio/src/drive.hg: + * gio/src/file.ccg: + * gio/src/file.hg: + * gio/src/fileattribute.ccg: + * gio/src/fileinputstream.hg: + * gio/src/fileoutputstream.hg: + * gio/src/volume.ccg: + * gio/src/volume.hg: Various build fixes, including adding a flags + parameter to unmount and eject methods. + +2008-01-10 Murray Cumming <murrayc@murrayc.com> + * gio/giomm.h: Correct an include. * gio/src/asyncresult.hg: * gio/src/cancellable.hg: diff --git a/Makefile.am b/Makefile.am index dd409ef6..63c5263a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,8 +6,7 @@ DIST_SUBDIRS = $(SUBDIRS) EXTRA_DIST = build_shared/Makefile_build.am_fragment \ build_shared/Makefile_build_gensrc.am_fragment \ build_shared/Makefile_gensrc.am_fragment \ - build_shared/Makefile_gensrc_platform.am_fragment \ - build_shared/Makefile_build_extra.am_fragment \ + build_shared/Makefile_conditional.am_fragment \ CHANGES README.win32 diff --git a/build_shared/Makefile_build.am_fragment b/build_shared/Makefile_build.am_fragment index 7a8bef44..2707becf 100644 --- a/build_shared/Makefile_build.am_fragment +++ b/build_shared/Makefile_build.am_fragment @@ -2,36 +2,19 @@ ## The gtkmm development team. ## ## **** Common rules for inclusion in Makefile.am **** +## Included by Makefile_build_gensrc.am_fragment ## -## -## Used variable: Example content: -## -## sublib_name = glibmm -## sublib_cflags = $(GLIBMM_CFLAGS) -## files_built_*_cc = -## files_built_*_h = proxy.h -## files_extra_cc = array.cc class.cc closure.cc -## files_extra_h = array.h boxedtype.h class.h -## files_extra_all_cc = array.cc class.cc closure.cc -## files_extra_all_h = array.h boxedtype.h class.h -## -## Returned variable: Usage example: -## -## files_all_*_cc libglibmm_la_SOURCES = $(files_all_*_cc) -## common_ldflags libglibmm_la_LDFLAGS = $(common_ldflags) -files_all_general_cc = $(files_built_general_cc) $(files_extra_cc) -files_all_posix_cc = $(files_built_posix_cc) -files_all_win32_cc = $(files_built_win32_cc) +include $(srcdir)/../src/Makefile_list_of_hg.am_fragment # Support for DLL on mingw using libtool > 1.4 -# When creating DLLs on win32, we need to explicitly add a few extra +# When creating DLLs on win32, we need to explicitly add a few extra # libraries at link time to resolve symbols (remember a dll is like an # executable). if PLATFORM_WIN32 extra_win32_defines = \ -D$(shell echo $(sublib_name) | tr [:lower:] [:upper:])_BUILD -no_undefined = -no-undefined -Wl,--export-all-symbols +no_undefined = -no-undefined -Wl,--export-all-symbols win32_dlls_extra_libs = $(sublib_win32_dlls_libs) else extra_win32_defines = @@ -39,33 +22,29 @@ no_undefined = win32_dlls_extra_libs = endif -common_ldflags = -version-info $(LIBGLIBMM_SO_VERSION) $(no_undefined) +common_ldflags = -version-info $(sublib_libversion) $(no_undefined) -all_includes = -I$(top_builddir)/glib -I$(top_srcdir)/glib -I$(top_builddir) \ +# All modules can include all other modules, +# for instance, so that gdkmm can use headers in pangomm. +all_includes = -I$(top_builddir)/$(sublib_topdir) -I$(top_srcdir)/$(sublib_topdir) \ + -I$(top_builddir)/glib -I$(top_srcdir)/glib -I$(top_builddir) \ + -I$(top_builddir)/gio -I$(top_srcdir)/gio \ $(sublib_cflags) $(GTHREAD_CFLAGS) -extra_defines = -DG_LOG_DOMAIN=\"$(sublib_name)\" $(extra_win32_defines) \ - $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS) - -dist_sources = $(files_built_all_cc) $(files_extra_all_cc) \ - $(files_built_all_h) $(files_extra_all_h) +dist_sources = $(files_all_built_cc) $(files_all_extra_cc) $(files_all_built_h) $(files_all_extra_h) DISTFILES = $(DIST_COMMON) $(dist_sources) $(TEXINFOS) $(EXTRA_DIST) -DEFS = @DEFS@ $(strip $(extra_defines)) + +DEFS = @DEFS@ -DG_LOG_DOMAIN=\"$(sublib_name)\" $(extra_win32_defines) DEFAULT_INCLUDES = -INCLUDES = $(strip $(all_includes)) + +# DISABLE_DEPRECATED_CFLAGS and DISABLE_DEPRECATED_API_CFLAGS are empty unless the appropriate --enable-*=no options are specified to configure: +INCLUDES = $(strip $(all_includes)) $(DISABLE_DEPRECATED_CFLAGS) $(DISABLE_DEPRECATED_API_CFLAGS) sublib_includedir = $(includedir)/$(sublib_libname)/$(sublib_name) -if OS_WIN32 -sublib_include_HEADERS = $(files_built_general_h) \ - $(files_built_win32_h) \ - $(files_extra_h) -else -sublib_include_HEADERS = $(files_built_general_h) \ - $(files_built_posix_h) \ - $(files_extra_h) -endif +sublib_include_HEADERS = $(files_all_built_h) $(files_all_extra_h) maintainer-clean-local: - (cd $(srcdir) && rm -f $(files_built_all_cc) $(files_built_all_h)) + (cd $(srcdir) && rm -f $(files_all_built_cc) $(files_all_built_h)) + diff --git a/build_shared/Makefile_build_extra.am_fragment b/build_shared/Makefile_build_extra.am_fragment deleted file mode 100644 index b2a2c2e9..00000000 --- a/build_shared/Makefile_build_extra.am_fragment +++ /dev/null @@ -1,40 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## sublib_name = gtkmm -## sublib_cflags = $(GTKMM_CFLAGS) -## sublib_files_extra_*_cc = stock_id.cc -## sublib_files_extra_*_h = stock_id.h -## -## Returned variable: Usage example: -## -## files_extra_cc libgtkmm_la_SOURCES = $(files_all_cc) -## files_extra_h libgtkmm_la_SOURCES = $(files_all_general_cc) -## files_extra_all_cc libgtkmm_la_SOURCES = $(files_all_posix_cc) -## files_extra_all_h libgtkmm_la_SOURCES = $(files_all_win32_cc) - -## The temporary sublib_ variables are needed to workaround -## a nasty automake problem with escaped newlines and +=. - -if OS_WIN32 -files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_win32_cc) -files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_win32_h) -else -files_extra_cc_tmp = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) -files_extra_h_tmp = $(sublib_files_extra_general_h) $(sublib_files_extra_posix_h) -endif - -files_extra_cc = $(files_extra_cc_tmp) -files_extra_h = $(files_extra_h_tmp) - -files_extra_all_cc = $(sublib_files_extra_general_cc) $(sublib_files_extra_posix_cc) $(sublib_files_extra_win32_cc) -files_extra_all_h = $(sublib_files_extra_general_h) $(sublib_files_extra_posix_h) $(sublib_files_extra_win32_h) - -files_extra_h += wrap_init.h -files_extra_all_h += wrap_init.h - diff --git a/build_shared/Makefile_build_gensrc.am_fragment b/build_shared/Makefile_build_gensrc.am_fragment index 67bed45d..22ee8c45 100644 --- a/build_shared/Makefile_build_gensrc.am_fragment +++ b/build_shared/Makefile_build_gensrc.am_fragment @@ -1,66 +1,86 @@ -## Copyright (c) 2001 +## Copyright (c) 2001-2004 ## The gtkmm development team. ## -## **** Common rules for inclusion in Makefile.am **** +## Included by src/Makefile_list_of_hg.am_fragment ## +## This Makefile.am helper transforms lists of source files that are +## specific to a sublibrary (atkmm, pangomm, gdkmm or gtkmm) into more +## generic lists. These lists of files are processed by the automake +## rules contained in Makefile_build.am_fragment (sublib/sublibmm +## directory) and Makefile_gensrc.am_fragment (sublib/src directory). +## +## The input variables are: +## * defined in sublib/src/Makefile_list_of_hg.am_fragment: +## files_posix_hg, files_win32_hg, files_general_hg, +## files_general_deprecated_hg. +## * defined sublib/sublibmm/Makefile.am: +## sublib_files_extra_posix_[cc|h], +## sublib_files_extra_win32_[cc|h], +## sublib_files_extra_general_[cc|h], +## sublib_files_extra_general_deprecated_[cc|h] ## -## Used variable: Example content: -## -## sublib_name = gtkmm -## sublib_cflags = $(GTKMM_CFLAGS) -## files_extra_cc = stock_id.cc -## files_extra_h = base.h stock_id.h -## -## Returned variable: Usage example: -## -## files_all_general_cc libgtkmm_la_SOURCES = $(files_all_general_cc) -## files_all_posix_cc libgtkmm_la_SOURCES = $(files_all_posix_cc) -## files_all_win32_cc libgtkmm_la_SOURCES = $(files_all_win32_cc) -## common_ldflags libgtkmm_la_LDFLAGS = $(common_ldflags) +## The output variables are: +## files_all_hg: all .hg files (general, all platforms, deprecated) +## files_hg: general and platform-specific .hg files +## files_built_cc, files_built_h: generated source files that +## will be compiled on the target platform +## + corresponding headers. +## files_all_built_cc, files_all_built_h: all generated source +## files + corresponding headers. +## files_extra_cc, files_extra_h : general and platform-specific +## source files and corresponding headers +## files_all_extra_cc, files_all_extra_h: all extra source files +## and corresponding headers. +## !!! deprecated files not included !!! + +# Built files + +files_all_hg = \ + $(files_posix_hg) \ + $(files_win32_hg) \ + $(files_general_hg) \ + $(files_general_deprecated_hg) -include $(srcdir)/../src/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment +if OS_WIN32 +files_hg = $(files_general_hg) $(files_win32_hg) $(files_general_deprecated_hg) +else +files_hg = $(files_general_hg) $(files_posix_hg) $(files_general_deprecated_hg) +endif -files_built_general_cc = $(files_general_hg:.hg=.cc) wrap_init.cc -files_built_general_h = $(files_general_hg:.hg=.h) -files_built_posix_cc = $(files_posix_hg:.hg=.cc) -files_built_posix_h = $(files_posix_hg:.hg=.h) -files_built_win32_cc = $(files_win32_hg:.hg=.cc) -files_built_win32_h = $(files_win32_hg:.hg=.h) +files_built_cc = $(files_hg:.hg=.cc) wrap_init.cc +files_built_h = $(files_hg:.hg=.h) -files_built_all_cc = $(files_built_general_cc) \ - $(files_built_posix_cc) \ - $(files_built_win32_cc) -files_built_all_h = $(files_built_general_h) \ - $(files_built_posix_h) \ - $(files_built_win32_h) +files_all_built_cc = $(files_all_hg:.hg=.cc) wrap_init.cc +files_all_built_h = $(files_all_hg:.hg=.h) -include $(top_srcdir)/build_shared/Makefile_build_extra.am_fragment -include $(top_srcdir)/build_shared/Makefile_build.am_fragment +# Extra files -cvsignore: - ( \ - echo ".deps"; \ - echo ".libs"; \ - echo "*.la"; \ - echo "*.lo"; \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_built_all_cc) $(files_built_all_h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/.cvsignore - ( \ - echo "Makefile"; \ - echo "Makefile.in"; \ - echo; \ - list='$(strip $(files_all_hg:.hg=_p.h))'; \ - for file in $$list; do \ - echo "$$file"; \ - done \ - ) >$(srcdir)/private/.cvsignore +files_all_extra_cc = \ + $(sublib_files_extra_posix_cc) \ + $(sublib_files_extra_win32_cc) \ + $(sublib_files_extra_general_cc) \ + $(sublib_files_extra_general_deprecated_cc) -.PHONY: cvsignore +files_all_extra_h = \ + $(sublib_files_extra_posix_h) \ + $(sublib_files_extra_win32_h) \ + $(sublib_files_extra_general_h) \ + $(sublib_files_extra_general_deprecated_h) +files_all_extra_h += wrap_init.h +if OS_WIN32 +files_extra_cc = \ + $(sublib_files_extra_win32_cc) \ + $(sublib_files_extra_general_cc) +files_extra_h = \ + $(sublib_files_extra_win32_h) \ + $(sublib_files_extra_general_h) +else +files_extra_cc = \ + $(sublib_files_extra_posix_cc) \ + $(sublib_files_extra_general_cc) +files_extra_h = \ + $(sublib_files_extra_posix_h) \ + $(sublib_files_extra_general_h) +endif +files_extra_h += wrap_init.h diff --git a/build_shared/Makefile_gensrc.am_fragment b/build_shared/Makefile_gensrc.am_fragment index 4f561da4..fca2a5ff 100644 --- a/build_shared/Makefile_gensrc.am_fragment +++ b/build_shared/Makefile_gensrc.am_fragment @@ -2,50 +2,61 @@ ## The gtkmm development team. ## ## **** Common rules for inclusion in Makefile.am **** -## +## Included from something/src/Makefile.am ## ## Used variable: Example content: ## ## sublib_name = gdkmm -## sublib_namespace = Gdk +## sublib_namespace = Gdk + ## files_defs = gdk.defs gdk_pixbuf.defs -tools_dir_m4 = $(top_srcdir)/tools/m4 -tools_dir_pm = $(top_srcdir)/tools/pm +tools_dir = $(top_srcdir)/tools +tools_dir_m4= $(top_srcdir)/tools/m4 +tools_dir_pm= $(top_srcdir)/tools/pm -gensrc_destdir = $(srcdir)/../$(sublib_name) -stamp_dir = $(srcdir)/.stamps +gensrc_destdir = $(srcdir)/../$(sublib_name) +stamp_dir = $(srcdir)/.stamps include $(top_srcdir)/tools/Makefile_list_of_sources.am_fragment tools_m4 = $(files_tools_m4:%.m4=$(tools_dir_m4)/%.m4) -tools_pm = $(files_tools_pm:%.pm=$(tools_dir_pm)/%.pm) +# tools_pm = $(files_tools_pm:%.pm=$(tools_dir_pm)/%.pm) -include $(srcdir)/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment +include $(srcdir)/../src/Makefile_list_of_hg.am_fragment files_all_ccg = $(files_all_hg:%.hg=%.ccg) files_h = $(files_all_hg:%.hg=$(gensrc_destdir)/%.h) files_cc = $(files_all_hg:%.hg=$(gensrc_destdir)/%.cc) files_stamp = $(files_all_hg:%.hg=$(stamp_dir)/stamp-%) +#The gmmproc from this glibmm: gmmproc_in = $(top_srcdir)/tools/gmmproc.in gmmproc_path = $(top_builddir)/tools/gmmproc + + +# We use our own m4 and pm files as well as the ones installed by gtkmm: +# Our override m4 include seems to need to be before the default one. gmmproc_args = -I $(tools_dir_m4) --defs $(srcdir) -run_gmmproc = $(PERL_PATH) -I$(tools_dir_pm) $(gmmproc_path) $(gmmproc_args) +run_gmmproc = $(PERL_PATH) $(gmmproc_path) $(gmmproc_args) + gen_wrap_init_in = $(top_srcdir)/tools/generate_wrap_init.pl.in gen_wrap_init_path = $(top_builddir)/tools/generate_wrap_init.pl -gen_wrap_init_args = --namespace=$(sublib_namespace) +gen_wrap_init_args = --namespace=$(sublib_namespace) --parent_dir=$(sublib_parentdir) run_gen_wrap_init = $(PERL_PATH) $(gen_wrap_init_path) $(gen_wrap_init_args) -EXTRA_DIST = Makefile_list_of_hg.am_fragment $(files_defs) $(files_all_hg) $(files_all_ccg) +EXTRA_DIST = Makefile_list_of_hg.am_fragment \ + $(files_defs) $(files_all_hg) $(files_all_ccg) -$(stamp_dir)/stamp-%: %.hg %.ccg $(gmmproc_in) $(tools_m4) $(tools_pm) $(files_defs) +$(stamp_dir)/stamp-%: %.hg %.ccg $(tools_m4) $(files_defs) $(run_gmmproc) $(notdir $*) $(srcdir) $(gensrc_destdir) - @echo 'timestamp' >$@ + @echo 'timestamp' > $@ + +sublib_srcdir = $(srcdir)/../src +files_hg_with_path = $(patsubst %.hg,$(sublib_srcdir)/%.hg,$(files_all_hg)) -$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_in) $(files_all_hg) +$(gensrc_destdir)/wrap_init.cc: $(gen_wrap_init_path) $(files_hg_with_path) $(run_gen_wrap_init) $(files_all_hg:%.hg=$(srcdir)/%.hg) >$@ create-stamp-dir: @@ -57,6 +68,3 @@ endif maintainer-clean-local: rm -rf $(stamp_dir) - -.PHONY: create-stamp-dir - diff --git a/build_shared/Makefile_gensrc_platform.am_fragment b/build_shared/Makefile_gensrc_platform.am_fragment deleted file mode 100644 index 71c9cc4b..00000000 --- a/build_shared/Makefile_gensrc_platform.am_fragment +++ /dev/null @@ -1,25 +0,0 @@ -## Copyright (c) 2001 -## The gtkmm development team. -## -## **** Common rules for inclusion in Makefile.am **** -## -## -## Used variable: Example content: -## -## files_general_hg = button.hg -## files_posix_hg = socket.hg -## -## Returned variable: Usage example: -## -## files_all_hg EXTRA_DIST = $(files_all_hg) -## files_hg files_built_h = $(files_hg:.hg=_p.h) - - -files_all_hg = $(files_general_hg) $(files_posix_hg) $(files_win32_hg) - -if OS_WIN32 -files_hg = $(files_general_hg) $(files_win32_hg) -else -files_hg = $(files_general_hg) $(files_posix_hg) -endif - diff --git a/gio/giomm/Makefile.am b/gio/giomm/Makefile.am index e40fcb8d..bed9e690 100644 --- a/gio/giomm/Makefile.am +++ b/gio/giomm/Makefile.am @@ -13,12 +13,12 @@ sublib_win32_dlls_libs = sublib_files_extra_posix_cc = sublib_files_extra_win32_cc = -sublib_files_extra_general_cc = +sublib_files_extra_general_cc = init.cc sublib_files_extra_general_deprecated_cc = sublib_files_extra_posix_h = sublib_files_extra_win32_h = -sublib_files_extra_general_h = +sublib_files_extra_general_h = init.h sublib_files_extra_general_deprecated_h = include $(top_srcdir)/build_shared/Makefile_build.am_fragment @@ -26,5 +26,6 @@ include $(top_srcdir)/build_shared/Makefile_build.am_fragment lib_LTLIBRARIES = libgiomm-2.4.la libgiomm_2_4_la_SOURCES = $(files_built_cc) $(files_extra_cc) libgiomm_2_4_la_LDFLAGS = $(common_ldflags) -libgiomm_2_4_la_LIBADD = $(GIOMM_LIBS) +libgiomm_2_4_la_LIBADD = $(GIOMM_LIBS) \ + $(top_builddir)/glib/glibmm/libglibmm-2.4.la diff --git a/gio/giomm/init.cc b/gio/giomm/init.cc index 7d592836..4891cdbb 100644 --- a/gio/giomm/init.cc +++ b/gio/giomm/init.cc @@ -18,18 +18,19 @@ */ #include "init.h" + namespace Gio { -void -init () +void init() { - static bool s_init = false ; - if (!s_init) { - Glib::init () ; - Gio::wrap_init () ; - s_init = true ; - } + static bool s_init = false ; + if(!s_init) + { + Glib::init(); + Gio::wrap_init(); + s_init = true; + } } -} +} //namespace Gio diff --git a/gio/giomm/init.h b/gio/giomm/init.h index 8cca1ced..7cfddbf8 100644 --- a/gio/giomm/init.h +++ b/gio/giomm/init.h @@ -22,11 +22,14 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/// \file -/// \brief the library initialization routines + namespace Gio { - void init () ; + +/** Initialize giomm. + */ +void init(); + }//end namespace Gio #endif //_GIOMM_INIT_H diff --git a/gio/src/Makefile.am b/gio/src/Makefile.am index 7e717c8d..a27b91fe 100644 --- a/gio/src/Makefile.am +++ b/gio/src/Makefile.am @@ -3,7 +3,7 @@ sublib_name = giomm sublib_namespace = Gio -sublib_parentdir = gio +sublib_parentdir = giomm files_defs = gio.defs gio_methods.defs gio_signals.defs gio_enums.defs \ gio_docs.xml gio_docs_override.xml diff --git a/gio/src/Makefile_list_of_hg.am_fragment b/gio/src/Makefile_list_of_hg.am_fragment index 815dd303..c06f6410 100644 --- a/gio/src/Makefile_list_of_hg.am_fragment +++ b/gio/src/Makefile_list_of_hg.am_fragment @@ -6,3 +6,6 @@ files_posix_hg = files_win32_hg = files_general_hg = asyncresult.hg cancellable.hg drive.hg file.hg fileattribute.hg fileenumerator.hg fileicon.hg fileinfo.hg fileinputstream.hg fileoutputstream.hg icon.hg inputstream.hg loadableicon.hg mountoperation.hg outputstream.hg simpleasyncresult.hg volume.hg + +include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment + diff --git a/gio/src/asyncresult.ccg b/gio/src/asyncresult.ccg index 689e8cdf..81797bc0 100644 --- a/gio/src/asyncresult.ccg +++ b/gio/src/asyncresult.ccg @@ -17,4 +17,5 @@ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <gio/gasyncresult.h> +//#include <gio/gasyncresult.h> //We are not allowed to include individual headers. +#include <gio/gio.h> diff --git a/gio/src/drive.ccg b/gio/src/drive.ccg index 9f58e0b1..fb549ad1 100644 --- a/gio/src/drive.ccg +++ b/gio/src/drive.ccg @@ -48,8 +48,9 @@ SignalProxy_async_callback(GObject*, GAsyncResult* res, void* data) } // anonymous namespace namespace Gio -Drive::eject(const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot) +{ + +void Drive::eject(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -57,13 +58,13 @@ Drive::eject(const Glib::RefPtr<Cancellable>& cancellable, SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_drive_eject(gobj(), + flags, cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } -void -Drive::eject(const SlotAsyncReady& slot) +void Drive::eject(GMountUnmountFlags flags, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -71,9 +72,11 @@ Drive::eject(const SlotAsyncReady& slot) SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_drive_eject(gobj(), + flags, NULL, // cancellable &SignalProxy_async_callback, slot_copy); } } // namespace Gio + diff --git a/gio/src/drive.hg b/gio/src/drive.hg index 15020169..634a1bc1 100644 --- a/gio/src/drive.hg +++ b/gio/src/drive.hg @@ -61,17 +61,20 @@ public: // as these are owned by the volume monitor + //TODO: Use MountUnmountFlags instead of GMountUnmountFlags - we need to wrap some more stuff to see where this should best be declared. + /** Ejects the drive. + * @param flags Flags affecting the unmount if required for eject. * @param cancellable A cancellable object which can be used to cancel the eject. * @param slot A callback which will be called when the eject is completed or canceled. */ - void eject(const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot); + void eject(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); /** Ejects the drive. + * @param flags Flags affecting the unmount if required for eject. * @param slot A callback which will be called when the eject is completed. */ - void eject(const SlotAsyncReady& slot); + void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot); _IGNORE(g_drive_eject) _WRAP_METHOD(bool eject_finish(Glib::RefPtr<AsyncResult>& result), diff --git a/gio/src/file.ccg b/gio/src/file.ccg index 06a973ba..e9e5ba96 100644 --- a/gio/src/file.ccg +++ b/gio/src/file.ccg @@ -659,10 +659,8 @@ File::set_attributes_finish(const Glib::RefPtr<AsyncResult>& result, return res; } -void -File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, - const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot) + +void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -676,9 +674,7 @@ File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, slot_copy); } -void -File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, - const SlotAsyncReady& slot) +void File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -692,8 +688,7 @@ File::mount_mountable(const Glib::RefPtr<MountOperation>& mount_operation, slot_copy); } -void -File::mount_mountable(const SlotAsyncReady& slot) +void File::mount_mountable(const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -707,9 +702,7 @@ File::mount_mountable(const SlotAsyncReady& slot) slot_copy); } -void -File::unmount_mountable(const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot) +void File::unmount_mountable(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -717,13 +710,14 @@ File::unmount_mountable(const Glib::RefPtr<Cancellable>& cancellable, SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_unmount_mountable(gobj(), + flags, cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } void -File::unmount_mountable(const SlotAsyncReady& slot) +File::unmount_mountable(GMountUnmountFlags flags, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -731,14 +725,14 @@ File::unmount_mountable(const SlotAsyncReady& slot) SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_unmount_mountable(gobj(), + flags, NULL, &SignalProxy_async_callback, slot_copy); } void -File::eject_mountable(const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot) +File::eject_mountable(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -746,13 +740,14 @@ File::eject_mountable(const Glib::RefPtr<Cancellable>& cancellable, SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_eject_mountable(gobj(), + flags, cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } void -File::eject_mountable(const SlotAsyncReady& slot) +File::eject_mountable(GMountUnmountFlags flags, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -760,6 +755,7 @@ File::eject_mountable(const SlotAsyncReady& slot) SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_file_eject_mountable(gobj(), + flags, NULL, &SignalProxy_async_callback, slot_copy); diff --git a/gio/src/file.hg b/gio/src/file.hg index 6711192f..1b9b39e3 100644 --- a/gio/src/file.hg +++ b/gio/src/file.hg @@ -507,6 +507,7 @@ public: * * When the operation is finished, @a slot will be called. You can then call mount_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param mount_operation A MountOperation. * @param cancellable A Cancellable object which can be used to cancel the operation. * @param slot A callback slot which will be called when the request is satisfied. @@ -518,6 +519,7 @@ public: * * When the operation is finished, @a slot will be called. You can then call mount_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param mount_operation A MountOperation. * @param slot A callback slot which will be called when the request is satisfied. */ @@ -527,6 +529,7 @@ public: * * When the operation is finished, @a slot will be called. You can then call mount_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param slot A callback slot which will be called when the request is satisfied. */ void mount_mountable(const SlotAsyncReady& slot); @@ -543,10 +546,11 @@ public: * * When the operation is finished, @a slot will be called. You can then call unmount_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param cancellable A Cancellable object which can be used to cancel the operation. * @param slot A callback slot which will be called when the request is satisfied. */ - void unmount_mountable(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + void unmount_mountable(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); /** Unmounts a file of type FILE_TYPE_MOUNTABLE. * @@ -555,9 +559,10 @@ public: * * When the operation is finished, @a slot will be called. You can then call unmount_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param slot A callback slot which will be called when the request is satisfied. */ - void unmount_mountable(const SlotAsyncReady& slot); + void unmount_mountable(GMountUnmountFlags flags, const SlotAsyncReady& slot); _IGNORE(g_file_unmount_mountable) _WRAP_METHOD(bool unmount_mountable_finish(const Glib::RefPtr<AsyncResult>& result), @@ -571,10 +576,11 @@ public: * * When the operation is finished, @a slot will be called. You can then call eject_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param cancellable A Cancellable object which can be used to cancel the operation. * @param slot A callback slot which will be called when the request is satisfied. */ - void eject_mountable(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + void eject_mountable(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); /** Starts an asynchronous eject on a mountable. * @@ -583,9 +589,10 @@ public: * * When the operation is finished, @a slot will be called. You can then call eject_mountable_finish() to get the result of the operation. * + * @param flags Flags affecting the operation. * @param slot A callback slot which will be called when the request is satisfied. */ - void eject_mountable(const SlotAsyncReady& slot); + void eject_mountable(GMountUnmountFlags flags, const SlotAsyncReady& slot); _IGNORE(g_file_eject_mountable) _WRAP_METHOD(bool eject_mountable_finish(const Glib::RefPtr<AsyncResult>& result), diff --git a/gio/src/fileattribute.ccg b/gio/src/fileattribute.ccg index 376cfa9b..ad06bc14 100644 --- a/gio/src/fileattribute.ccg +++ b/gio/src/fileattribute.ccg @@ -27,7 +27,7 @@ FileAttributeInfo::FileAttributeInfo(const GFileAttributeInfo* ginfo) : m_name(ginfo->name), m_type(static_cast<FileAttributeType>(ginfo->type)), - m_flags(static_cast<FileAttributeFlags>(ginfo->flags)) + m_flags(static_cast<FileAttributeInfoFlags>(ginfo->flags)) { } @@ -61,7 +61,7 @@ FileAttributeInfo::get_type() const return m_type; } -FileAttributeFlags +FileAttributeInfoFlags FileAttributeInfo::get_flags() const { return m_flags; diff --git a/gio/src/fileinputstream.hg b/gio/src/fileinputstream.hg index 157122cc..1504e2d5 100644 --- a/gio/src/fileinputstream.hg +++ b/gio/src/fileinputstream.hg @@ -41,7 +41,7 @@ namespace Gio */ class FileInputStream : public InputStream { - _CLASS_GOBJECT(FileInputStream, GFileInputStream, G_FILE_INPUT_STREAM, Glib::InputStream, GInputStream) + _CLASS_GOBJECT(FileInputStream, GFileInputStream, G_FILE_INPUT_STREAM, Gio::InputStream, GInputStream) public: _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info(const std::string& attributes, const Glib::RefPtr<Cancellable>& cancellable), diff --git a/gio/src/fileoutputstream.hg b/gio/src/fileoutputstream.hg index 26c9fce4..e0afb665 100644 --- a/gio/src/fileoutputstream.hg +++ b/gio/src/fileoutputstream.hg @@ -32,7 +32,7 @@ namespace Gio class FileOutputStream : public OutputStream { - _CLASS_GOBJECT(FileOutputStream, GFileOutputStream, G_FILE_OUTPUT_STREAM, Glib::OutputStream, GOutputStream) + _CLASS_GOBJECT(FileOutputStream, GFileOutputStream, G_FILE_OUTPUT_STREAM, Gio::OutputStream, GOutputStream) public: //TODO: vfuncs and overloads without Cancellable diff --git a/gio/src/volume.ccg b/gio/src/volume.ccg index 5d606cae..4a07668b 100644 --- a/gio/src/volume.ccg +++ b/gio/src/volume.ccg @@ -84,9 +84,7 @@ Volume::mount(const Glib::RefPtr<MountOperation>& mount_operation, slot_copy); } -void -Volume::eject(const Glib::RefPtr<Cancellable>& cancellable, - const SlotAsyncReady& slot) +void Volume::eject(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -94,13 +92,13 @@ Volume::eject(const Glib::RefPtr<Cancellable>& cancellable, SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_volume_eject(gobj(), + flags, cancellable->gobj(), &SignalProxy_async_callback, slot_copy); } -void -Volume::eject(const SlotAsyncReady& slot) +void Volume::eject(GMountUnmountFlags flags, const SlotAsyncReady& slot) { // Create a copy of the slot. // A pointer to it will be passed through the callback's data parameter @@ -108,6 +106,7 @@ Volume::eject(const SlotAsyncReady& slot) SlotAsyncReady* slot_copy = new SlotAsyncReady(slot); g_volume_eject(gobj(), + flags, NULL, &SignalProxy_async_callback, slot_copy); diff --git a/gio/src/volume.hg b/gio/src/volume.hg index 9ad91caa..03c7cb5a 100644 --- a/gio/src/volume.hg +++ b/gio/src/volume.hg @@ -69,10 +69,12 @@ public: g_volume_mount_finish, errthrow) - _IGNORE(g_volume_eject) - void eject(const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); + //TODO: Documentation. + //TODO: Use MountUnmountFlags instead of GMountUnmountFlags. + void eject(GMountUnmountFlags flags, const Glib::RefPtr<Cancellable>& cancellable, const SlotAsyncReady& slot); - void eject(const SlotAsyncReady& slot); + void eject(GMountUnmountFlags flags, const SlotAsyncReady& slot); + _IGNORE(g_volume_eject) _WRAP_METHOD(bool eject_finish(Glib::RefPtr<AsyncResult>& result), g_volume_eject_finish, diff --git a/glib/glibmm/Makefile.am b/glib/glibmm/Makefile.am index e9ccf637..33465af5 100644 --- a/glib/glibmm/Makefile.am +++ b/glib/glibmm/Makefile.am @@ -5,8 +5,11 @@ SUBDIRS = private sublib_name = glibmm sublib_libname = glibmm-2.4 +sublib_libversion = $(LIBGLIBMM_SO_VERSION) sublib_namespace = Glib sublib_cflags = $(GLIBMM_CFLAGS) +sublib_topdir = glib +sublib_win32_dlls_libs = sublib_files_extra_posix_cc = sublib_files_extra_win32_cc = @@ -89,17 +92,13 @@ sublib_files_extra_general_h = \ value_custom.h \ wrap.h -include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment +include $(top_srcdir)/build_shared/Makefile_build.am_fragment -files_built_general_cc += value_basictypes.cc -files_built_general_h += signalproxy.h value_basictypes.h +sublib_files_extra_general_cc += value_basictypes.cc +sublib_files_extra_general_h += signalproxy.h value_basictypes.h lib_LTLIBRARIES = libglibmm-2.4.la -if OS_WIN32 -libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_win32_cc) -else -libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_posix_cc) -endif +libglibmm_2_4_la_SOURCES = $(files_built_cc) $(files_extra_cc) libglibmm_2_4_la_LDFLAGS = $(common_ldflags) libglibmm_2_4_la_LIBADD = $(GLIBMM_LIBS) diff --git a/glib/glibmm/init.h b/glib/glibmm/init.h index c913d379..4c4a545c 100644 --- a/glib/glibmm/init.h +++ b/glib/glibmm/init.h @@ -26,7 +26,7 @@ namespace Glib /** Initialize glibmm. * You may call this more than once. - * You do nott need to call this if you are using Glib::MainLoop or Gtk::Main, + * You do not need to call this if you are using Glib::MainLoop or Gtk::Main, * because they call it for you. */ void init(); diff --git a/glib/glibmm/private/Makefile.am b/glib/glibmm/private/Makefile.am index de70a5df..f97bf786 100644 --- a/glib/glibmm/private/Makefile.am +++ b/glib/glibmm/private/Makefile.am @@ -2,7 +2,6 @@ ## The gtkmm development team. include $(srcdir)/../../src/Makefile_list_of_hg.am_fragment -include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment files_built_h = $(files_hg:.hg=_p.h) files_built_all_h = $(files_all_hg:.hg=_p.h) diff --git a/glib/src/Makefile.am b/glib/src/Makefile.am index ae1b6ea2..13dc496d 100644 --- a/glib/src/Makefile.am +++ b/glib/src/Makefile.am @@ -3,6 +3,7 @@ sublib_name = glibmm sublib_namespace = Glib +sublib_parentdir = glibmm files_defs = glib.defs glib_enums.defs glib_functions.defs gobject.defs gobject_enums.defs gobject_functions.defs gmodule_enums.defs gmodule_functions.defs glib_docs.xml glib_docs_override.xml include $(top_srcdir)/build_shared/Makefile_gensrc.am_fragment diff --git a/glib/src/Makefile_list_of_hg.am_fragment b/glib/src/Makefile_list_of_hg.am_fragment index 4cc446de..2be07cf0 100644 --- a/glib/src/Makefile_list_of_hg.am_fragment +++ b/glib/src/Makefile_list_of_hg.am_fragment @@ -6,3 +6,5 @@ files_posix_hg = files_win32_hg = files_general_hg = convert.hg date.hg fileutils.hg iochannel.hg keyfile.hg markup.hg module.hg optioncontext.hg optionentry.hg optiongroup.hg regex.hg shell.hg spawn.hg thread.hg unicode.hg + +include $(top_srcdir)/build_shared/Makefile_build_gensrc.am_fragment diff --git a/tests/Makefile.am b/tests/Makefile.am index 9aaf40e8..809b6f73 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,5 +1,4 @@ -test_dirs = glibmm_value -# giomm_simple +test_dirs = glibmm_value giomm_simple SUBDIRS = $(test_dirs) EXTRA_DIST = Makefile.am_fragment diff --git a/tests/Makefile.am_fragment b/tests/Makefile.am_fragment index 491e0445..ef247243 100644 --- a/tests/Makefile.am_fragment +++ b/tests/Makefile.am_fragment @@ -3,7 +3,7 @@ INCLUDES = \ -I$(top_builddir)/gio -I$(top_srcdir)/gio \ $(GLIBMM_CFLAGS) $(GTHREAD_CFLAGS) -LIBS = $(top_builddir)/glib/glibmm/libglibmm-2.4.la - $(top_builddir)/gio/giomm/libgiomm-2.4.la +LIBS = $(top_builddir)/glib/glibmm/libglibmm-2.4.la \ + $(top_builddir)/gio/giomm/libgiomm-2.4.la \ $(GLIBMM_LIBS) diff --git a/tests/giomm_simple/Makefile.am b/tests/giomm_simple/Makefile.am index c1581f16..d0e58bd4 100644 --- a/tests/giomm_simple/Makefile.am +++ b/tests/giomm_simple/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/tests/Makefile.am_fragment noinst_PROGRAMS = test -test_SOURCES = main.cc giomm_simple.cc +test_SOURCES = main.cc diff --git a/tests/giomm_simple/giomm_simple.cc b/tests/giomm_simple/giomm_simple.cc deleted file mode 100644 index 1bde8efa..00000000 --- a/tests/giomm_simple/giomm_simple.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include <giomm.h> -#include <iostream> - - -int main(int argc, char** argv) -{ - Glib::init(); - Gio::init(); - - Glib::RefPtr<Gio::File> file = Gio::File::create_for_path("/home/murrayc/test.txt"); - - return 0; -} - diff --git a/tests/giomm_simple/main.cc b/tests/giomm_simple/main.cc index 1f318f05..e0062f25 100644 --- a/tests/giomm_simple/main.cc +++ b/tests/giomm_simple/main.cc @@ -1,8 +1,13 @@ +#include <giomm.h> +#include <iostream> -#include <glibmm.h> - -int main(int, char**) +int main(int argc, char** argv) { + Glib::init(); + Gio::init(); + + Glib::RefPtr<Gio::File> file = Gio::File::create_for_path("/home/murrayc/test.txt"); + return 0; } diff --git a/tools/m4/convert_glib.m4 b/tools/m4/convert_glib.m4 index bd2a9cda..4fd1ed02 100644 --- a/tools/m4/convert_glib.m4 +++ b/tools/m4/convert_glib.m4 @@ -114,7 +114,7 @@ _CONVERSION(`Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P) _CONVERSION(`const Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P) _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3)') _CONVERSION(`Glib::TimeVal&', `GTimeVal*', static_cast<$2>(&$3)) -_CONVERSION(`const Glib::TimeVal&', `GTimeVal*', const_cast<GTimeValue*>(static_cast<$2>(&$3))) +_CONVERSION(`const Glib::TimeVal&', `GTimeVal*', const_cast<GTimeVal*>(static_cast<const GTimeVal*>(&$3))) _CONVERSION(`const Glib::RefPtr<FileAttributeMatcher>&',`GFileAttributeMatcher*',__CONVERT_CONST_REFPTR_TO_P) _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<FileInfo> >',__FL2H_SHALLOW) |