glibmm r497 - in trunk: . build_shared gio/giomm gio/src glib/glibmm glib/glibmm/private glib/src tests tests/giomm_simple tools/m4



Author: murrayc
Date: Thu Jan 10 14:25:46 2008
New Revision: 497
URL: http://svn.gnome.org/viewvc/glibmm?rev=497&view=rev

Log:
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.

Removed:
   trunk/build_shared/Makefile_build_extra.am_fragment
   trunk/build_shared/Makefile_gensrc_platform.am_fragment
   trunk/tests/giomm_simple/giomm_simple.cc
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/build_shared/Makefile_build.am_fragment
   trunk/build_shared/Makefile_build_gensrc.am_fragment
   trunk/build_shared/Makefile_gensrc.am_fragment
   trunk/gio/giomm/Makefile.am
   trunk/gio/giomm/init.cc
   trunk/gio/giomm/init.h
   trunk/gio/src/Makefile.am
   trunk/gio/src/Makefile_list_of_hg.am_fragment
   trunk/gio/src/asyncresult.ccg
   trunk/gio/src/drive.ccg
   trunk/gio/src/drive.hg
   trunk/gio/src/file.ccg
   trunk/gio/src/file.hg
   trunk/gio/src/fileattribute.ccg
   trunk/gio/src/fileinputstream.hg
   trunk/gio/src/fileoutputstream.hg
   trunk/gio/src/volume.ccg
   trunk/gio/src/volume.hg
   trunk/glib/glibmm/Makefile.am
   trunk/glib/glibmm/init.h
   trunk/glib/glibmm/private/Makefile.am
   trunk/glib/src/Makefile.am
   trunk/glib/src/Makefile_list_of_hg.am_fragment
   trunk/tests/Makefile.am
   trunk/tests/Makefile.am_fragment
   trunk/tests/giomm_simple/Makefile.am
   trunk/tests/giomm_simple/main.cc
   trunk/tools/m4/convert_glib.m4

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -6,8 +6,7 @@
 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
 
 

Modified: trunk/build_shared/Makefile_build.am_fragment
==============================================================================
--- trunk/build_shared/Makefile_build.am_fragment	(original)
+++ trunk/build_shared/Makefile_build.am_fragment	Thu Jan 10 14:25:46 2008
@@ -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 @@
 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))
+
 

Modified: trunk/build_shared/Makefile_build_gensrc.am_fragment
==============================================================================
--- trunk/build_shared/Makefile_build_gensrc.am_fragment	(original)
+++ trunk/build_shared/Makefile_build_gensrc.am_fragment	Thu Jan 10 14:25:46 2008
@@ -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
 ##
-##
-## 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)
-
-include $(srcdir)/../src/Makefile_list_of_hg.am_fragment
-include $(top_srcdir)/build_shared/Makefile_gensrc_platform.am_fragment
-
-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_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)
-
-include $(top_srcdir)/build_shared/Makefile_build_extra.am_fragment
-include $(top_srcdir)/build_shared/Makefile_build.am_fragment
-
-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
-
-.PHONY: cvsignore
-
+## 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]
+##
+## 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)
+
+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_cc = $(files_hg:.hg=.cc) wrap_init.cc
+files_built_h = $(files_hg:.hg=.h)
+
+files_all_built_cc = $(files_all_hg:.hg=.cc) wrap_init.cc
+files_all_built_h = $(files_all_hg:.hg=.h)
+
+# Extra files
+
+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)
+
+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

Modified: trunk/build_shared/Makefile_gensrc.am_fragment
==============================================================================
--- trunk/build_shared/Makefile_gensrc.am_fragment	(original)
+++ trunk/build_shared/Makefile_gensrc.am_fragment	Thu Jan 10 14:25:46 2008
@@ -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 @@
 
 maintainer-clean-local:
 	rm -rf $(stamp_dir)
-
-.PHONY: create-stamp-dir
-

Modified: trunk/gio/giomm/Makefile.am
==============================================================================
--- trunk/gio/giomm/Makefile.am	(original)
+++ trunk/gio/giomm/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -13,12 +13,12 @@
 
 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 @@
 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
 

Modified: trunk/gio/giomm/init.cc
==============================================================================
--- trunk/gio/giomm/init.cc	(original)
+++ trunk/gio/giomm/init.cc	Thu Jan 10 14:25:46 2008
@@ -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

Modified: trunk/gio/giomm/init.h
==============================================================================
--- trunk/gio/giomm/init.h	(original)
+++ trunk/gio/giomm/init.h	Thu Jan 10 14:25:46 2008
@@ -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

Modified: trunk/gio/src/Makefile.am
==============================================================================
--- trunk/gio/src/Makefile.am	(original)
+++ trunk/gio/src/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -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
 

Modified: trunk/gio/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- trunk/gio/src/Makefile_list_of_hg.am_fragment	(original)
+++ trunk/gio/src/Makefile_list_of_hg.am_fragment	Thu Jan 10 14:25:46 2008
@@ -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
+

Modified: trunk/gio/src/asyncresult.ccg
==============================================================================
--- trunk/gio/src/asyncresult.ccg	(original)
+++ trunk/gio/src/asyncresult.ccg	Thu Jan 10 14:25:46 2008
@@ -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>

Modified: trunk/gio/src/drive.ccg
==============================================================================
--- trunk/gio/src/drive.ccg	(original)
+++ trunk/gio/src/drive.ccg	Thu Jan 10 14:25:46 2008
@@ -48,8 +48,9 @@
 } // 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 @@
   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 @@
   SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
 
   g_drive_eject(gobj(),
+                flags, 
                 NULL, // cancellable
                 &SignalProxy_async_callback,
                 slot_copy);
 }
 
 } // namespace Gio
+

Modified: trunk/gio/src/drive.hg
==============================================================================
--- trunk/gio/src/drive.hg	(original)
+++ trunk/gio/src/drive.hg	Thu Jan 10 14:25:46 2008
@@ -61,17 +61,20 @@
   // 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),

Modified: trunk/gio/src/file.ccg
==============================================================================
--- trunk/gio/src/file.ccg	(original)
+++ trunk/gio/src/file.ccg	Thu Jan 10 14:25:46 2008
@@ -659,10 +659,8 @@
 
   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 @@
                          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 @@
                          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 @@
                          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 @@
   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 @@
   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 @@
   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 @@
   SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
 
   g_file_eject_mountable(gobj(),
+                         flags, 
                          NULL,
                          &SignalProxy_async_callback,
                          slot_copy);

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Thu Jan 10 14:25:46 2008
@@ -507,6 +507,7 @@
    *
    * 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 @@
    *
    * 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 @@
    *
    * 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 @@
    *
    * 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 @@
    *
    * 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 @@
    *
    * 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 @@
    *
    * 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),

Modified: trunk/gio/src/fileattribute.ccg
==============================================================================
--- trunk/gio/src/fileattribute.ccg	(original)
+++ trunk/gio/src/fileattribute.ccg	Thu Jan 10 14:25:46 2008
@@ -27,7 +27,7 @@
   :
   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 @@
   return m_type;
 }
 
-FileAttributeFlags
+FileAttributeInfoFlags
 FileAttributeInfo::get_flags() const
 {
   return m_flags;

Modified: trunk/gio/src/fileinputstream.hg
==============================================================================
--- trunk/gio/src/fileinputstream.hg	(original)
+++ trunk/gio/src/fileinputstream.hg	Thu Jan 10 14:25:46 2008
@@ -41,7 +41,7 @@
  */
 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),

Modified: trunk/gio/src/fileoutputstream.hg
==============================================================================
--- trunk/gio/src/fileoutputstream.hg	(original)
+++ trunk/gio/src/fileoutputstream.hg	Thu Jan 10 14:25:46 2008
@@ -32,7 +32,7 @@
 
 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

Modified: trunk/gio/src/volume.ccg
==============================================================================
--- trunk/gio/src/volume.ccg	(original)
+++ trunk/gio/src/volume.ccg	Thu Jan 10 14:25:46 2008
@@ -84,9 +84,7 @@
                  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 @@
   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 @@
   SlotAsyncReady* slot_copy = new SlotAsyncReady(slot);
 
   g_volume_eject(gobj(),
+                 flags, 
                  NULL,
                  &SignalProxy_async_callback,
                  slot_copy);

Modified: trunk/gio/src/volume.hg
==============================================================================
--- trunk/gio/src/volume.hg	(original)
+++ trunk/gio/src/volume.hg	Thu Jan 10 14:25:46 2008
@@ -69,10 +69,12 @@
                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,

Modified: trunk/glib/glibmm/Makefile.am
==============================================================================
--- trunk/glib/glibmm/Makefile.am	(original)
+++ trunk/glib/glibmm/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -5,8 +5,11 @@
 
 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 @@
   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)
 

Modified: trunk/glib/glibmm/init.h
==============================================================================
--- trunk/glib/glibmm/init.h	(original)
+++ trunk/glib/glibmm/init.h	Thu Jan 10 14:25:46 2008
@@ -26,7 +26,7 @@
 
 /** 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();

Modified: trunk/glib/glibmm/private/Makefile.am
==============================================================================
--- trunk/glib/glibmm/private/Makefile.am	(original)
+++ trunk/glib/glibmm/private/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -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)

Modified: trunk/glib/src/Makefile.am
==============================================================================
--- trunk/glib/src/Makefile.am	(original)
+++ trunk/glib/src/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -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

Modified: trunk/glib/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- trunk/glib/src/Makefile_list_of_hg.am_fragment	(original)
+++ trunk/glib/src/Makefile_list_of_hg.am_fragment	Thu Jan 10 14:25:46 2008
@@ -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 

Modified: trunk/tests/Makefile.am
==============================================================================
--- trunk/tests/Makefile.am	(original)
+++ trunk/tests/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -1,5 +1,4 @@
-test_dirs = glibmm_value 
-# giomm_simple
+test_dirs = glibmm_value giomm_simple
 
 SUBDIRS = $(test_dirs)
 EXTRA_DIST = Makefile.am_fragment

Modified: trunk/tests/Makefile.am_fragment
==============================================================================
--- trunk/tests/Makefile.am_fragment	(original)
+++ trunk/tests/Makefile.am_fragment	Thu Jan 10 14:25:46 2008
@@ -3,7 +3,7 @@
 	-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)
 

Modified: trunk/tests/giomm_simple/Makefile.am
==============================================================================
--- trunk/tests/giomm_simple/Makefile.am	(original)
+++ trunk/tests/giomm_simple/Makefile.am	Thu Jan 10 14:25:46 2008
@@ -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
 
 
 

Modified: trunk/tests/giomm_simple/main.cc
==============================================================================
--- trunk/tests/giomm_simple/main.cc	(original)
+++ trunk/tests/giomm_simple/main.cc	Thu Jan 10 14:25:46 2008
@@ -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;
 }
 

Modified: trunk/tools/m4/convert_glib.m4
==============================================================================
--- trunk/tools/m4/convert_glib.m4	(original)
+++ trunk/tools/m4/convert_glib.m4	Thu Jan 10 14:25:46 2008
@@ -114,7 +114,7 @@
 _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)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]