[pygobject] Add gio 2.20 API
- From: Gian Mario Tagliaretti <gianmt src gnome org>
- To: svn-commits-list gnome org
- Subject: [pygobject] Add gio 2.20 API
- Date: Sun, 24 May 2009 19:34:01 -0400 (EDT)
commit 8e40d71ac23deb7d91789486ee8cad440a6be1dd
Author: Gian Mario Tagliaretti <gianmt gnome org>
Date: Mon May 25 01:33:08 2009 +0200
Add gio 2.20 API
add the new API added in gio 2.20, some needs to be wrapped manually
---
gio/gio.defs | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
gio/unix.defs | 48 +++++++++++++++++++++----
2 files changed, 146 insertions(+), 8 deletions(-)
diff --git a/gio/gio.defs b/gio/gio.defs
index 033ed3e..ed22d88 100644
--- a/gio/gio.defs
+++ b/gio/gio.defs
@@ -267,6 +267,32 @@
)
)
+(define-function app_info_reset_type_associations
+ (c-name "g_app_info_reset_type_associations")
+ (return-type "none")
+ (parameters
+ '("const-char*" "content_type")
+ )
+)
+
+(define-method can_delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_can_delete")
+ (return-type "gboolean")
+)
+
+(define-method delete
+ (of-object "GAppInfo")
+ (c-name "g_app_info_delete")
+ (return-type "gboolean")
+)
+
+(define-method get_commandline
+ (of-object "GAppInfo")
+ (c-name "g_app_info_get_commandline")
+ (return-type "const-char*")
+)
+
;; From gasynchelper.h
@@ -801,6 +827,53 @@
)
)
+(define-method read_until_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_async")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "stop_chars")
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_until_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_until_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
+(define-method read_line_async
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_async")
+ (return-type "none")
+ (parameters
+ '("gint" "io_priority")
+ '("GCancellable*" "cancellable")
+ '("GAsyncReadyCallback" "callback")
+ '("gpointer" "user_data")
+ )
+)
+
+(define-method read_line_finish
+ (of-object "GDataInputStream")
+ (c-name "g_data_input_stream_read_line_finish")
+ (return-type "char*")
+ (parameters
+ '("GAsyncResult*" "result")
+ '("gsize*" "length")
+ '("GError**" "error")
+ )
+)
+
;; From gdataoutputstream.h
@@ -3540,6 +3613,21 @@
)
)
+(define-method to_string
+ (of-object "GIcon")
+ (c-name "g_icon_to_string")
+ (return-type "gchar*")
+)
+
+(define-function icon_new_for_string
+ (c-name "g_icon_new_for_string")
+ (return-type "GIcon*")
+ (parameters
+ '("const-gchar*" "str")
+ '("GError**" "error")
+ )
+)
+
;; From ginputstream.h
@@ -4332,6 +4420,24 @@
)
)
+(define-method is_shadowed
+ (of-object "GMount")
+ (c-name "g_mount_is_shadowed")
+ (return-type "gboolean")
+)
+
+(define-method shadow
+ (of-object "GMount")
+ (c-name "g_mount_shadow")
+ (return-type "none")
+)
+
+(define-method unshadow
+ (of-object "GMount")
+ (c-name "g_mount_unshadow")
+ (return-type "none")
+)
+
;; From gmountoperation.h
diff --git a/gio/unix.defs b/gio/unix.defs
index 2c0891c..018a351 100644
--- a/gio/unix.defs
+++ b/gio/unix.defs
@@ -300,6 +300,28 @@
)
)
+(define-method set_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+
+(define-method get_close_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_close_fd")
+ (return-type "gboolean")
+)
+
+(define-method get_fd
+ (of-object "GUnixInputStream")
+ (c-name "g_unix_input_stream_get_fd")
+ (return-type "gint")
+)
+
+
;; From gunixoutputstream.h
@@ -318,13 +340,23 @@
)
)
+(define-method set_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_set_close_fd")
+ (return-type "none")
+ (parameters
+ '("gboolean" "close_fd")
+ )
+)
+(define-method get_close_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_close_fd")
+ (return-type "gboolean")
+)
-;; From gunixvolume.h
-
-
-
-;; From gunixvolumemonitor.h
-
-
-
+(define-method get_fd
+ (of-object "GUnixOutputStream")
+ (c-name "g_unix_output_stream_get_fd")
+ (return-type "gint")
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]