glibmm r589 - in trunk: . gio/src glib/glibmm glib/src



Author: murrayc
Date: Thu Feb  7 22:49:51 2008
New Revision: 589
URL: http://svn.gnome.org/viewvc/glibmm?rev=589&view=rev

Log:
2008-02-07  Murray Cumming  <murrayc murrayc com>

* glib/glibmm/Makefile.am:
* glib/glibmm/main.h: Moved the Priorities enum into
* glib/glibmm/priorities.h:
Though all the giomm stuff seems to already include main.h anyway. 
It probably shouldn't, and then we can include priorities.h only.

* gio/src/bufferedinputstream.hg:
* gio/src/file.hg:
* gio/src/fileenumerator.hg:
* gio/src/fileinputstream.hg:
* gio/src/fileoutputstream.hg:
* gio/src/gio_methods.defs:
* gio/src/inputstream.hg:
* gio/src/outputstream.hg: Use Glib::PRIORITY_DEFAULT instead of 
G_PRIORITY_DEFAULT.

* glib/src/iochannel.ccg: Add some ifdefs to avoid unused parameter 
warnings when exceptions are disabled, because our current trick for 
that is now causing another warning instead.

Added:
   trunk/glib/glibmm/priorities.h
Modified:
   trunk/ChangeLog
   trunk/gio/src/bufferedinputstream.hg
   trunk/gio/src/file.hg
   trunk/gio/src/fileenumerator.hg
   trunk/gio/src/fileinputstream.hg
   trunk/gio/src/fileoutputstream.hg
   trunk/gio/src/gio_methods.defs
   trunk/gio/src/inputstream.hg
   trunk/gio/src/outputstream.hg
   trunk/glib/glibmm/Makefile.am
   trunk/glib/glibmm/main.h
   trunk/glib/src/iochannel.ccg

Modified: trunk/gio/src/bufferedinputstream.hg
==============================================================================
--- trunk/gio/src/bufferedinputstream.hg	(original)
+++ trunk/gio/src/bufferedinputstream.hg	Thu Feb  7 22:49:51 2008
@@ -63,7 +63,7 @@
   void fill_async(const SlotAsyncReady& slot,
                   gssize count,
                   const Glib::RefPtr<Cancellable>& cancellable,
-                  int io_priority = G_PRIORITY_DEFAULT);
+                  int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Reads data into the stream's buffer asynchronously, up to @a count size.
    * @ia o_priority can be used to prioritize reads. For the synchronous version of
@@ -75,7 +75,7 @@
    */
   void fill_async(const SlotAsyncReady& slot,
                   gssize count,
-                  int io_priority = G_PRIORITY_DEFAULT);
+                  int io_priority = Glib::PRIORITY_DEFAULT);
 
   _WRAP_METHOD(gssize fill_finish(const Glib::RefPtr<AsyncResult>& result), g_buffered_input_stream_fill_finish, errthrow)
 

Modified: trunk/gio/src/file.hg
==============================================================================
--- trunk/gio/src/file.hg	(original)
+++ trunk/gio/src/file.hg	Thu Feb  7 22:49:51 2008
@@ -195,7 +195,7 @@
    * @param cancellable A Cancellable object which can be used to cancel the operation.
    * @param io_priority The I/O priority of the request.
    */
-  void read_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void read_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously opens the file for reading.
    * For more details, see read() which is the synchronous version of this call.
@@ -204,7 +204,7 @@
    * @param slot A callback slot which will be called when the request is satisfied.
    * @param io_priority The I/O priority of the request.
    */
-  void read_async(const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void read_async(const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_read_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileInputStream> read_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -415,7 +415,7 @@
    * @param flags a set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void append_to_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void append_to_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously opens the file for appending.
    * For more details, see append_to() which is the synchronous version of this call.
@@ -425,7 +425,7 @@
    * @param flags a set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void append_to_async(const SlotAsyncReady& slot, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void append_to_async(const SlotAsyncReady& slot, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_append_to_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileOutputStream> append_to_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -446,7 +446,7 @@
    * @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 create_file_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void create_file_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously creates a new file and returns an output stream for writing to it. The file must not already exist.
    * For more details, see create_file() which is the synchronous version of this call.
@@ -457,7 +457,7 @@
    * @param io_priority The I/O priority of the request.
    * @param slot A callback slot which will be called when the request is satisfied.
    */
-  void create_file_async(const SlotAsyncReady& slot, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void create_file_async(const SlotAsyncReady& slot, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_create_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileOutputStream> create_file_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -475,7 +475,7 @@
    * @param flags A set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void replace_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& etag = std::string(), bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asyncronously overwrites the file, replacing the contents, possibly creating a backup copy of the file first.
    * For more details, see replace() which is the synchronous version of this call.
@@ -487,7 +487,7 @@
    * @param flags A set of FileCreateFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void replace_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void replace_async(const SlotAsyncReady& slot, const std::string& etag = std::string(), bool make_backup = false, FileCreateFlags flags = FILE_CREATE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_replace_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileOutputStream> replace_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -607,7 +607,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT) const;
+  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT) const;
 
   /** Asynchronously gets the requested information about specified file. The result is a FileInfo object that contains key-value attributes (such as type or size for the file).
    *
@@ -619,7 +619,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT) const;
+  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT) const;
   _IGNORE(g_file_query_info_async)
 
 
@@ -717,7 +717,7 @@
    * @param cancellable A Cancellable object.
    * @param io_priority The I/O priority of the request.
    */
-  void find_enclosing_mount_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void find_enclosing_mount_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously gets the mount for the file.
    *
@@ -730,7 +730,7 @@
    * @param slot A callback slot which will be called when the request is satisfied.
    * @param io_priority The I/O priority of the request.
    */
-  void find_enclosing_mount_async(const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void find_enclosing_mount_async(const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_find_enclosing_mount_async)
 
   _WRAP_METHOD(Glib::RefPtr<Mount> find_enclosing_mount_finish(const Glib::RefPtr<AsyncResult>& result), 
@@ -809,7 +809,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void enumerate_children_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void enumerate_children_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously gets the requested information about the files in a directory. The result is a GFileEnumerator object that will give out GFileInfo objects for all the files in the directory.
    *
@@ -821,7 +821,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void enumerate_children_async(const SlotAsyncReady& slot, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void enumerate_children_async(const SlotAsyncReady& slot, const std::string& attributes = "*", FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_enumerate_children_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileEnumerator> enumerate_children_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -864,7 +864,7 @@
    * @param cancellable A Cancellable object which can be used to cancel the operation.
    * @param io_priority The I/O priority of the request.
    */
-  void set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously sets the display name for a given Gio::File. For the synchronous version of this function, see set_display_name().
    * When the operation is finished, @a slot will be called. You can then call set_display_name_finish() to get the result of the operation.
@@ -873,7 +873,7 @@
    * @param slot A callback slot which will be called when the request is satisfied.
    * @param io_priority The I/O priority of the request.
    */
-  void set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void set_display_name_async(const Glib::ustring& display_name, const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_set_display_name_async)
 
   _WRAP_METHOD(Glib::RefPtr<File> set_display_name_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -976,7 +976,7 @@
    * @param flags Set of FileCopyFlags
    * @param io_priority The I/O priority of the request
    */
-  void copy_async(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot_progress, const SlotAsyncReady& slot_ready, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void copy_async(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot_progress, const SlotAsyncReady& slot_ready, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Copies the file to the location specified by @destination asynchronously.
    * For details of the behaviour, see copy().
@@ -990,7 +990,7 @@
    * @param flags Set of FileCopyFlags
    * @param io_priority The I/O priority of the request
    */
-  void copy_async(const Glib::RefPtr<File>& destination, const SlotAsyncReady& slot_ready, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void copy_async(const Glib::RefPtr<File>& destination, const SlotAsyncReady& slot_ready, const Glib::RefPtr<Cancellable>& cancellable, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Copies the file to the location specified by @destination asynchronously.
    * For details of the behaviour, see copy().
@@ -1008,7 +1008,7 @@
    * @param flags Set of FileCopyFlags
    * @param io_priority The I/O priority of the request
    */
-  void copy_async(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot_progress, const SlotAsyncReady& slot_ready, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void copy_async(const Glib::RefPtr<File>& destination, const SlotFileProgress& slot_progress, const SlotAsyncReady& slot_ready, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Copies the file to the location specified by @destination asynchronously.
    * For details of the behaviour, see copy().
@@ -1021,7 +1021,7 @@
    * @param flags Set of FileCopyFlags
    * @param io_priority The I/O priority of the request
    */
-  void copy_async(const Glib::RefPtr<File>& destination, const SlotAsyncReady& slot_ready, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void copy_async(const Glib::RefPtr<File>& destination, const SlotAsyncReady& slot_ready, FileCopyFlags flags = FILE_COPY_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_copy_async)
 
   _WRAP_METHOD(bool copy_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -1198,7 +1198,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Asynchronously sets the attributes of file with info.
    *
@@ -1210,7 +1210,7 @@
    * @param flags A set of FileQueryInfoFlags.
    * @param io_priority The I/O priority of the request.
    */
-  void set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void set_attributes_async(const Glib::RefPtr<FileInfo>& info, const SlotAsyncReady& slot, FileQueryInfoFlags flags = FILE_QUERY_INFO_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_set_attributes_async)
   _IGNORE(g_file_set_attributes_finish) // takes GFileInfo**
 

Modified: trunk/gio/src/fileenumerator.hg
==============================================================================
--- trunk/gio/src/fileenumerator.hg	(original)
+++ trunk/gio/src/fileenumerator.hg	Thu Feb  7 22:49:51 2008
@@ -98,7 +98,7 @@
    * @param num_files The number of file info objects to request.
    * @param io_priority The I/O priority of the request.
    */
-  void next_files_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int num_files = 1, int io_priority = G_PRIORITY_DEFAULT);
+  void next_files_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int num_files = 1, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Request information for a number of files from the enumerator asynchronously. 
    * When all I/O for the operation is finished the callback slot will be called with the requested information.
@@ -115,7 +115,7 @@
    * @param num_files The number of file info objects to request.
    * @param io_priority The I/O priority of the request.
    */
-  void next_files_async(const SlotAsyncReady& slot, int num_files = 1, int io_priority = G_PRIORITY_DEFAULT);
+  void next_files_async(const SlotAsyncReady& slot, int num_files = 1, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_enumerator_next_files_async)
 
 #m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<FileInfo> >',__FL2H_SHALLOW)

Modified: trunk/gio/src/fileinputstream.hg
==============================================================================
--- trunk/gio/src/fileinputstream.hg	(original)
+++ trunk/gio/src/fileinputstream.hg	Thu Feb  7 22:49:51 2008
@@ -91,7 +91,7 @@
    * @param attributes A file attribute query string.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Queries the stream information asynchronously. For the synchronous version of this function, see query_info().
    *
@@ -101,7 +101,7 @@
    * @param attributes A file attribute query string.
    * @param io_priority The I/O priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT);
 
   _IGNORE(g_file_input_stream_query_info_async)
 

Modified: trunk/gio/src/fileoutputstream.hg
==============================================================================
--- trunk/gio/src/fileoutputstream.hg	(original)
+++ trunk/gio/src/fileoutputstream.hg	Thu Feb  7 22:49:51 2008
@@ -126,7 +126,7 @@
    * @param attributes A file attribute query string.
    * @param io_priority The <io-priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Queries the stream information asynchronously.
    * When the operation is finished @a slot will be called. 
@@ -140,7 +140,7 @@
    * @param attributes A file attribute query string.
    * @param io_priority The <io-priority of the request.
    */
-  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = G_PRIORITY_DEFAULT);
+  void query_info_async(const SlotAsyncReady& slot, const std::string& attributes = "*", int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_file_input_stream_query_info_async)
 
   _WRAP_METHOD(Glib::RefPtr<FileInfo> query_info_finish(const Glib::RefPtr<AsyncResult>& result),

Modified: trunk/gio/src/gio_methods.defs
==============================================================================
--- trunk/gio/src/gio_methods.defs	(original)
+++ trunk/gio/src/gio_methods.defs	Thu Feb  7 22:49:51 2008
@@ -1,20 +1,20 @@
 ;; -*- scheme -*-
 ; object definitions ...
 (define-object Info
-  (in-module "GApp")
+  (in-module "G")
   (c-name "GAppInfo")
   (gtype-id "G_TYPE_APP_INFO")
 )
 
-(define-object LaunchContext
-  (in-module "GApp")
+(define-object AppLaunchContext
+  (in-module "G")
   (parent "GObject")
   (c-name "GAppLaunchContext")
   (gtype-id "G_TYPE_APP_LAUNCH_CONTEXT")
 )
 
-(define-object Result
-  (in-module "GAsync")
+(define-object AsyncResult
+  (in-module "G")
   (c-name "GAsyncResult")
   (gtype-id "G_TYPE_ASYNC_RESULT")
 )
@@ -231,7 +231,7 @@
 ;; Enumerations and flags ...
 
 (define-flags InfoCreateFlags
-  (in-module "GApp")
+  (in-module "G")
   (c-name "GAppInfoCreateFlags")
   (gtype-id "G_TYPE_APP_INFO_CREATE_FLAGS")
   (values

Modified: trunk/gio/src/inputstream.hg
==============================================================================
--- trunk/gio/src/inputstream.hg	(original)
+++ trunk/gio/src/inputstream.hg	Thu Feb  7 22:49:51 2008
@@ -181,7 +181,7 @@
    * @param cancellable A Cancellable object.
    * @param io_priority The I/O priority of the request. 
    */
-  void read_async(void* buffer, gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void read_async(void* buffer, gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Request an asynchronous read of @a count bytes from the stream into the buffer
    * starting at @a buffer. When the operation is finished @a slot will be called. 
@@ -212,7 +212,7 @@
    * @param slot Callback to call when the request is satisfied.
    * @param io_priority The I/O priority of the request. 
    */
-  void read_async(void* buffer, gsize count, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void read_async(void* buffer, gsize count, const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_input_stream_read_async)
 
   _WRAP_METHOD(gssize read_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -249,7 +249,7 @@
    * @param cancellable A Cancellable object.
    * @param io_priority The I/O priority of the request. 
    */
-  void skip_async(gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void skip_async(gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Request an asynchronous skip of @a count bytes from the stream into the buffer
    * starting at @a buffer. When the operation is finished @a slot will be called. 
@@ -278,7 +278,7 @@
    * @param slot Callback to call when the request is satisfied.
    * @param io_priority The I/O priority of the request. 
    */
-  void skip_async(gsize count, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void skip_async(gsize count, const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_input_stream_skip_async)
 
   _WRAP_METHOD(gssize skip_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -300,7 +300,7 @@
    * @param cancellable A Cancellable object.
    * @param io_priority The I/O priority of the request. 
    */
-  void close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Requests an asynchronous closes of the stream, releasing resources related to it.
    * When the operation is finished @a slot will be called. 
@@ -316,7 +316,7 @@
    * @param slot Callback to call when the request is satisfied.
    * @param io_priority The I/O priority of the request. 
    */
-  void close_async(const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void close_async(const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_input_stream_close_async)
 
   _WRAP_METHOD(gboolean close_finish(const Glib::RefPtr<AsyncResult>& result),

Modified: trunk/gio/src/outputstream.hg
==============================================================================
--- trunk/gio/src/outputstream.hg	(original)
+++ trunk/gio/src/outputstream.hg	Thu Feb  7 22:49:51 2008
@@ -298,7 +298,7 @@
    *
    * Any outstanding I/O request with higher priority (lower numerical 
    * value) will be executed before an outstanding request with lower 
-   * priority. Default priority is G_PRIORITY_DEFAULT.
+   * priority. Default priority is Glib::PRIORITY_DEFAULT.
    *
    * The asyncronous methods have a default fallback that uses threads 
    * to implement asynchronicity, so they are optional for inheriting 
@@ -313,7 +313,7 @@
    * @param cancellable Cancellable object.
    * @param io_priority The io priority of the request.
    */
-  void write_async(const void* buffer, gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void write_async(const void* buffer, gsize count, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Request an asynchronous write of @a count bytes from @a buffer into 
    * the stream. When the operation is finished @a slot will be called. 
@@ -333,7 +333,7 @@
    *
    * Any outstanding I/O request with higher priority (lower numerical 
    * value) will be executed before an outstanding request with lower 
-   * priority. Default priority is G_PRIORITY_DEFAULT.
+   * priority. Default priority is Glib::PRIORITY_DEFAULT.
    *
    * The asyncronous methods have a default fallback that uses threads 
    * to implement asynchronicity, so they are optional for inheriting 
@@ -347,7 +347,7 @@
    * @param slot Callback slot to call when the request is satisfied.
    * @param io_priority The io priority of the request.
    */
-  void write_async(const void* buffer, gsize count, const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void write_async(const void* buffer, gsize count, const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_output_stream_write_async)
 
   _WRAP_METHOD(gssize write_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -367,7 +367,7 @@
    * @param cancellable Cancellable object.
    * @param io_priority The io priority of the request.
    */
-  void splice_async(const Glib::RefPtr<InputStream>& source, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, OutputStreamSpliceFlags flags = OUTPUT_STREAM_SPLICE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void splice_async(const Glib::RefPtr<InputStream>& source, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, OutputStreamSpliceFlags flags = OUTPUT_STREAM_SPLICE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Splices a stream asynchronously.
    *  When the operation is finished @a slot will be called. 
@@ -381,7 +381,7 @@
    * @param slot Callback slot to call when the request is satisfied.
    * @param io_priority The io priority of the request.
    */
-  void splice_async(const Glib::RefPtr<InputStream>& source, const SlotAsyncReady& slot, OutputStreamSpliceFlags flags = OUTPUT_STREAM_SPLICE_NONE, int io_priority = G_PRIORITY_DEFAULT);
+  void splice_async(const Glib::RefPtr<InputStream>& source, const SlotAsyncReady& slot, OutputStreamSpliceFlags flags = OUTPUT_STREAM_SPLICE_NONE, int io_priority = Glib::PRIORITY_DEFAULT);
 
   _IGNORE(g_output_stream_splice_async)
 
@@ -398,7 +398,7 @@
    * @param cancellable Cancellable object.
    * @param io_priority The io priority of the request.
    */
-  void flush_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void flush_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Flushes a stream asynchronously.
    * When the operation is finished the @a slot will be called, giving the results.
@@ -408,7 +408,7 @@
    * @param slot Callback slot to call when the request is satisfied.
    * @param io_priority The io priority of the request.
    */
-  void flush_async(const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void flush_async(const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_output_stream_flush_async)
 
   _WRAP_METHOD(bool flush_finish(const Glib::RefPtr<AsyncResult>& result),
@@ -427,7 +427,7 @@
    * @param cancellable Cancellable object.
    * @param io_priority The io priority of the request.
    */
-  void close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = G_PRIORITY_DEFAULT);
+  void close_async(const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable, int io_priority = Glib::PRIORITY_DEFAULT);
 
   /** Requests an asynchronous close of the stream, releasing resources related to it. 
    * When the operation is finished the @a slot will be called, giving the results. 
@@ -440,7 +440,7 @@
    * @param slot Callback slot to call when the request is satisfied.
    * @param io_priority The io priority of the request.
    */
-  void close_async(const SlotAsyncReady& slot, int io_priority = G_PRIORITY_DEFAULT);
+  void close_async(const SlotAsyncReady& slot, int io_priority = Glib::PRIORITY_DEFAULT);
   _IGNORE(g_output_stream_close_async)
 
   _WRAP_METHOD(bool close_finish(const Glib::RefPtr<AsyncResult>& result),

Modified: trunk/glib/glibmm/Makefile.am
==============================================================================
--- trunk/glib/glibmm/Makefile.am	(original)
+++ trunk/glib/glibmm/Makefile.am	Thu Feb  7 22:49:51 2008
@@ -72,6 +72,7 @@
   object.h \
   objectbase.h \
   pattern.h \
+  priorities.h \
   property.h \
   propertyproxy.h \
   propertyproxy_base.h \

Modified: trunk/glib/glibmm/main.h
==============================================================================
--- trunk/glib/glibmm/main.h	(original)
+++ trunk/glib/glibmm/main.h	Thu Feb  7 22:49:51 2008
@@ -30,6 +30,7 @@
 #include <glibmmconfig.h>
 #include <glibmm/refptr.h>
 #include <glibmm/timeval.h>
+#include <glibmm/priorities.h>
 
 GLIBMM_USING_STD(vector)
 
@@ -47,41 +48,6 @@
  * @{
  */
 
-enum
-{
-  /*! Use this for high priority event sources.  It is not used within
-   * GLib or GTK+.<br><br>
-   */
-  PRIORITY_HIGH = -100,
-
-  /*! Use this for default priority event sources.  In glibmm this
-   * priority is used by default when installing timeout handlers with
-   * SignalTimeout::connect().  In GDK this priority is used for events
-   * from the X server.<br><br>
-   */
-  PRIORITY_DEFAULT = 0,
-
-  /*! Use this for high priority idle functions.  GTK+ uses
-   * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;10</tt> for resizing operations, and
-   * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;20</tt> for redrawing operations.
-   * (This is done to ensure that any pending resizes are processed before
-   * any pending redraws, so that widgets are not redrawn twice unnecessarily.)
-   * <br><br>
-   */
-  PRIORITY_HIGH_IDLE = 100,
-
-  /*! Use this for default priority idle functions.  In glibmm this priority is
-   * used by default when installing idle handlers with SignalIdle::connect().
-   * <br><br>
-   */
-  PRIORITY_DEFAULT_IDLE = 200,
-
-  /*! Use this for very low priority background tasks.  It is not used within
-   * GLib or GTK+.
-   */
-  PRIORITY_LOW = 300
-};
-
 
 /** A bitwise combination representing an I/O condition to watch for on an
  * event source.

Added: trunk/glib/glibmm/priorities.h
==============================================================================
--- (empty file)
+++ trunk/glib/glibmm/priorities.h	Thu Feb  7 22:49:51 2008
@@ -0,0 +1,65 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_PRIORITIES_H
+#define _GLIBMM_PRIORITIES_H
+
+/* $Id: priorities.h 420 2007-06-22 15:29:58Z murrayc $ */
+
+/* Copyright (C) 2002-2008 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Glib
+{
+
+enum
+{
+  /*! Use this for high priority event sources.  It is not used within
+   * GLib or GTK+.<br><br>
+   */
+  PRIORITY_HIGH = -100,
+
+  /*! Use this for default priority event sources.  In glibmm this
+   * priority is used by default when installing timeout handlers with
+   * SignalTimeout::connect().  In GDK this priority is used for events
+   * from the X server.<br><br>
+   */
+  PRIORITY_DEFAULT = 0,
+
+  /*! Use this for high priority idle functions.  GTK+ uses
+   * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;10</tt> for resizing operations, and
+   * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;20</tt> for redrawing operations.
+   * (This is done to ensure that any pending resizes are processed before
+   * any pending redraws, so that widgets are not redrawn twice unnecessarily.)
+   * <br><br>
+   */
+  PRIORITY_HIGH_IDLE = 100,
+
+  /*! Use this for default priority idle functions.  In glibmm this priority is
+   * used by default when installing idle handlers with SignalIdle::connect().
+   * <br><br>
+   */
+  PRIORITY_DEFAULT_IDLE = 200,
+
+  /*! Use this for very low priority background tasks.  It is not used within
+   * GLib or GTK+.
+   */
+  PRIORITY_LOW = 300
+};
+
+} //namespace Glib
+
+#endif //#ifndef _GLIBMM_PRIORITIES_H
+

Modified: trunk/glib/src/iochannel.ccg
==============================================================================
--- trunk/glib/src/iochannel.ccg	(original)
+++ trunk/glib/src/iochannel.ccg	Thu Feb  7 22:49:51 2008
@@ -443,12 +443,15 @@
 
 /**** Glib::GlibmmIOChannel ************************************************/
 
-// static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
 GIOStatus GlibmmIOChannel::io_read(GIOChannel* channel, char* buf, gsize count,
                                    gsize* bytes_read, GError** err)
+#else
+//Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
+GIOStatus GlibmmIOChannel::io_read(GIOChannel* channel, char* buf, gsize count,
+                                   gsize* bytes_read, GError** /* err */)
+#endif
 {
-  if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
-
   IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
 
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -471,12 +474,15 @@
   return G_IO_STATUS_ERROR;
 }
 
-// static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
 GIOStatus GlibmmIOChannel::io_write(GIOChannel* channel, const char* buf, gsize count,
                                     gsize* bytes_written, GError** err)
+#else
+//Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
+GIOStatus GlibmmIOChannel::io_write(GIOChannel* channel, const char* buf, gsize count,
+                                    gsize* bytes_written, GError** /* err */)
+#endif
 {
-  if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
-
   IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
 
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -499,11 +505,13 @@
   return G_IO_STATUS_ERROR;
 }
 
-// static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
 GIOStatus GlibmmIOChannel::io_seek(GIOChannel* channel, gint64 offset, GSeekType type, GError** err)
+#else
+//Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
+GIOStatus GlibmmIOChannel::io_seek(GIOChannel* channel, gint64 offset, GSeekType type, GError** /* err */)
+#endif
 {
-  if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
-
   IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
 
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -526,11 +534,13 @@
   return G_IO_STATUS_ERROR;
 }
 
-// static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
 GIOStatus GlibmmIOChannel::io_close(GIOChannel* channel, GError** err)
+#else
+//Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
+GIOStatus GlibmmIOChannel::io_close(GIOChannel* channel, GError** /* err */)
+#endif
 {
-  if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
-
   IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
 
   #ifdef GLIBMM_EXCEPTIONS_ENABLED
@@ -588,11 +598,13 @@
   g_free(channel);
 }
 
-// static
+#ifdef GLIBMM_EXCEPTIONS_ENABLED
 GIOStatus GlibmmIOChannel::io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err)
+#else
+//Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
+GIOStatus GlibmmIOChannel::io_set_flags(GIOChannel* channel, GIOFlags flags, GError** /* err */)
+#endif
 {
-  if(!&err) err = err; //Avoid an unused parameter warning when GLIBMM_EXCEPTIONS_ENABLED is used.
-
   IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
 
   #ifdef GLIBMM_EXCEPTIONS_ENABLED



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