gio2 1.0.3-x86-mingw32 → 1.1.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. data/ext/gio2/extconf.rb +4 -42
  2. data/ext/gio2/gio2.c +18 -117
  3. data/ext/gio2/gio2.h +20 -339
  4. data/ext/gio2/rbgio.c +132 -0
  5. data/ext/gio2/rbgio2.h +156 -0
  6. data/ext/gio2/rbgio2conversions.h +154 -0
  7. data/ext/gio2/rbgio2private.h +147 -0
  8. data/ext/gio2/{gappinfo.c → rbgioappinfo.c} +81 -82
  9. data/ext/gio2/rbgioapplaunchcontext.c +81 -0
  10. data/ext/gio2/{gasyncinitable.c → rbgioasyncinitable.c} +33 -30
  11. data/ext/gio2/rbgioasyncresult.c +41 -0
  12. data/ext/gio2/{gbufferedinputstream.c → rbgiobufferedinputstream.c} +37 -35
  13. data/ext/gio2/rbgiobufferedoutputstream.c +50 -0
  14. data/ext/gio2/rbgiocancellable.c +180 -0
  15. data/ext/gio2/rbgiocharsetconverter.c +57 -0
  16. data/ext/gio2/rbgiocontenttype.c +131 -0
  17. data/ext/gio2/{gconverter.c → rbgioconverter.c} +24 -28
  18. data/ext/gio2/rbgioconverterinputstream.c +43 -0
  19. data/ext/gio2/rbgioconverteroutputstream.c +43 -0
  20. data/ext/gio2/{gdatainputstream.c → rbgiodatainputstream.c} +49 -58
  21. data/ext/gio2/{gdataoutputstream.c → rbgiodataoutputstream.c} +39 -37
  22. data/ext/gio2/rbgiodesktopappinfo.c +87 -0
  23. data/ext/gio2/{gdrive.c → rbgiodrive.c} +75 -76
  24. data/ext/gio2/rbgioemblem.c +52 -0
  25. data/ext/gio2/rbgioemblemedicon.c +65 -0
  26. data/ext/gio2/{gfile.c → rbgiofile.c} +256 -266
  27. data/ext/gio2/rbgiofileattribute.c +114 -0
  28. data/ext/gio2/rbgiofileattributeinfo.c +86 -0
  29. data/ext/gio2/rbgiofileattributeinfolist.c +106 -0
  30. data/ext/gio2/rbgiofileattributematcher.c +93 -0
  31. data/ext/gio2/rbgiofiledescriptorbased.c +45 -0
  32. data/ext/gio2/{gfileenumerator.c → rbgiofileenumerator.c} +42 -40
  33. data/ext/gio2/rbgiofileicon.c +41 -0
  34. data/ext/gio2/{gfileinfo.c → rbgiofileinfo.c} +159 -163
  35. data/ext/gio2/{gfileinputstream.c → rbgiofileinputstream.c} +26 -25
  36. data/ext/gio2/{gfileiostream.c → rbgiofileiostream.c} +28 -26
  37. data/ext/gio2/rbgiofilemonitor.c +46 -0
  38. data/ext/gio2/rbgiofilenamecompleter.c +74 -0
  39. data/ext/gio2/{gfileoutputstream.c → rbgiofileoutputstream.c} +28 -26
  40. data/ext/gio2/rbgiofilterinputstream.c +28 -0
  41. data/ext/gio2/rbgiofilteroutputstream.c +28 -0
  42. data/ext/gio2/rbgioicon.c +69 -0
  43. data/ext/gio2/rbgioinetaddress.c +118 -0
  44. data/ext/gio2/rbgioinetsocketaddress.c +41 -0
  45. data/ext/gio2/{ginitable.c → rbgioinitable.c} +29 -25
  46. data/ext/gio2/{ginputstream.c → rbgioinputstream.c} +50 -48
  47. data/ext/gio2/rbgioio.c +73 -0
  48. data/ext/gio2/rbgioiomodule.c +45 -0
  49. data/ext/gio2/rbgioiomodules.c +47 -0
  50. data/ext/gio2/rbgioioscheduler.c +102 -0
  51. data/ext/gio2/rbgioioschedulerjob.c +121 -0
  52. data/ext/gio2/rbgioiostream.c +108 -0
  53. data/ext/gio2/{gloadableicon.c → rbgioloadableicon.c} +26 -24
  54. data/ext/gio2/rbgiomemoryinputstream.c +67 -0
  55. data/ext/gio2/rbgiomemoryoutputstream.c +44 -0
  56. data/ext/gio2/{gmount.c → rbgiomount.c} +70 -68
  57. data/ext/gio2/rbgiomountoperation.c +53 -0
  58. data/ext/gio2/rbgionetworkaddress.c +59 -0
  59. data/ext/gio2/rbgionetworkservice.c +45 -0
  60. data/ext/gio2/{goutputstream.c → rbgiooutputstream.c} +61 -62
  61. data/ext/gio2/{gresolver.c → rbgioresolver.c} +50 -48
  62. data/ext/gio2/rbgioseekable.c +91 -0
  63. data/ext/gio2/rbgiosimpleasyncresult.c +155 -0
  64. data/ext/gio2/{gsocket.c → rbgiosocket.c} +74 -76
  65. data/ext/gio2/rbgiosocketaddress.c +34 -0
  66. data/ext/gio2/rbgiosocketaddressenumerator.c +83 -0
  67. data/ext/gio2/{gsocketclient.c → rbgiosocketclient.c} +41 -39
  68. data/ext/gio2/rbgiosocketconnectable.c +41 -0
  69. data/ext/gio2/rbgiosocketconnection.c +66 -0
  70. data/ext/gio2/rbgiosocketconnectionfactory.c +39 -0
  71. data/ext/gio2/rbgiosocketcontrolmessage.c +82 -0
  72. data/ext/gio2/{gsocketlistener.c → rbgiosocketlistener.c} +49 -47
  73. data/ext/gio2/rbgiosocketservice.c +66 -0
  74. data/ext/gio2/rbgiosrvtarget.c +76 -0
  75. data/ext/gio2/rbgiotcpconnection.c +28 -0
  76. data/ext/gio2/rbgiothemedicon.c +83 -0
  77. data/ext/gio2/rbgiothreadedsocketservice.c +43 -0
  78. data/ext/gio2/rbgiounixconnection.c +71 -0
  79. data/ext/gio2/rbgiounixfdlist.c +115 -0
  80. data/ext/gio2/rbgiounixfdmessage.c +74 -0
  81. data/ext/gio2/rbgiounixinputstream.c +51 -0
  82. data/ext/gio2/rbgiounixmount.c +164 -0
  83. data/ext/gio2/rbgiounixmountmonitor.c +66 -0
  84. data/ext/gio2/rbgiounixmountpoint.c +136 -0
  85. data/ext/gio2/rbgiounixmountpoints.c +58 -0
  86. data/ext/gio2/rbgiounixmounts.c +58 -0
  87. data/ext/gio2/rbgiounixoutputstream.c +51 -0
  88. data/ext/gio2/rbgiounixsocketaddress.c +69 -0
  89. data/ext/gio2/rbgiovfs.c +84 -0
  90. data/ext/gio2/rbgiovolume.c +193 -0
  91. data/ext/gio2/rbgiovolumemonitor.c +77 -0
  92. data/ext/gio2/rbgiozlibcompressor.c +52 -0
  93. data/ext/gio2/rbgiozlibdecompressor.c +45 -0
  94. data/ext/gio2/util.c +57 -60
  95. data/lib/1.8/gio2.so +0 -0
  96. data/lib/1.9/gio2.so +0 -0
  97. data/lib/gio2/deprecated.rb +102 -0
  98. data/lib/gio2.rb +14 -12
  99. metadata +100 -88
  100. data/ChangeLog +0 -129
  101. data/ext/gio2/gapplaunchcontext.c +0 -79
  102. data/ext/gio2/gasyncresult.c +0 -39
  103. data/ext/gio2/gbufferedoutputstream.c +0 -48
  104. data/ext/gio2/gcancellable.c +0 -177
  105. data/ext/gio2/gcharsetconverter.c +0 -55
  106. data/ext/gio2/gcontenttype.c +0 -128
  107. data/ext/gio2/gconverterinputstream.c +0 -41
  108. data/ext/gio2/gconverteroutputstream.c +0 -41
  109. data/ext/gio2/gdesktopappinfo.c +0 -88
  110. data/ext/gio2/gemblem.c +0 -52
  111. data/ext/gio2/gemblemedicon.c +0 -63
  112. data/ext/gio2/gfileattribute.c +0 -111
  113. data/ext/gio2/gfileattributeinfo.c +0 -89
  114. data/ext/gio2/gfileattributeinfolist.c +0 -109
  115. data/ext/gio2/gfileattributematcher.c +0 -90
  116. data/ext/gio2/gfiledescriptorbased.c +0 -42
  117. data/ext/gio2/gfileicon.c +0 -39
  118. data/ext/gio2/gfilemonitor.c +0 -44
  119. data/ext/gio2/gfilenamecompleter.c +0 -72
  120. data/ext/gio2/gfilterinputstream.c +0 -27
  121. data/ext/gio2/gfilteroutputstream.c +0 -27
  122. data/ext/gio2/gicon.c +0 -67
  123. data/ext/gio2/ginetaddress.c +0 -116
  124. data/ext/gio2/ginetsocketaddress.c +0 -38
  125. data/ext/gio2/gioerror.c +0 -70
  126. data/ext/gio2/giomodule.c +0 -63
  127. data/ext/gio2/gioscheduler.c +0 -193
  128. data/ext/gio2/giostream.c +0 -106
  129. data/ext/gio2/gmemoryinputstream.c +0 -65
  130. data/ext/gio2/gmemoryoutputstream.c +0 -41
  131. data/ext/gio2/gmountoperation.c +0 -66
  132. data/ext/gio2/gnetworkaddress.c +0 -57
  133. data/ext/gio2/gnetworkservice.c +0 -43
  134. data/ext/gio2/gseekable.c +0 -89
  135. data/ext/gio2/gsimpleasyncresult.c +0 -153
  136. data/ext/gio2/gsocketaddress.c +0 -33
  137. data/ext/gio2/gsocketconnectable.c +0 -97
  138. data/ext/gio2/gsocketconnection.c +0 -75
  139. data/ext/gio2/gsocketcontrolmessage.c +0 -80
  140. data/ext/gio2/gsocketservice.c +0 -64
  141. data/ext/gio2/gsrvtarget.c +0 -77
  142. data/ext/gio2/gtcpconnection.c +0 -27
  143. data/ext/gio2/gthemedicon.c +0 -81
  144. data/ext/gio2/gthreadedsocketservice.c +0 -40
  145. data/ext/gio2/gunixconnection.c +0 -69
  146. data/ext/gio2/gunixfdlist.c +0 -112
  147. data/ext/gio2/gunixfdmessage.c +0 -72
  148. data/ext/gio2/gunixinputstream.c +0 -49
  149. data/ext/gio2/gunixmounts.c +0 -343
  150. data/ext/gio2/gunixoutputstream.c +0 -49
  151. data/ext/gio2/gunixsocketaddress.c +0 -67
  152. data/ext/gio2/gvfs.c +0 -82
  153. data/ext/gio2/gvolume.c +0 -191
  154. data/ext/gio2/gvolumemonitor.c +0 -75
  155. data/ext/gio2/gzlibcompressor.c +0 -50
  156. data/ext/gio2/gzlibdecompressor.c +0 -43
data/ext/gio2/extconf.rb CHANGED
@@ -30,6 +30,10 @@ rescue LoadError
30
30
  require 'mkmf-gnome2'
31
31
  end
32
32
 
33
+ ruby_header = 'ruby.h'
34
+ have_func 'rb_exec_recursive', ruby_header
35
+ have_func 'rb_errinfo', ruby_header
36
+
33
37
  ["glib2"].each do |package|
34
38
  directory = "#{package}#{version_suffix}"
35
39
  build_dir = "#{directory}/tmp/#{RUBY_PLATFORM}/#{package}/#{RUBY_VERSION}"
@@ -49,48 +53,6 @@ unless win32
49
53
  end
50
54
  PKGConfig.have_package('gobject-2.0') or exit 1
51
55
 
52
- have_func('rb_exec_recursive')
53
-
54
- def try_compiler_option(opt, &block)
55
- checking_for "#{opt} option to compiler" do
56
- $CFLAGS += " #{opt}" if try_compile '', opt, &block
57
- end
58
- end
59
-
60
- try_compiler_option '-finline-functions'
61
- try_compiler_option '-fno-common'
62
- try_compiler_option '-Wall'
63
- try_compiler_option '-Waggregate-return'
64
- try_compiler_option '-Wcast-align'
65
- # NOTE: Generates way too many false positives.
66
- # try_compiler_option '-Wconversion'
67
- try_compiler_option '-Wextra'
68
- try_compiler_option '-Wformat=2'
69
- try_compiler_option '-Winit-self'
70
- try_compiler_option '-Winline'
71
- try_compiler_option '-Wlarger-than-65500'
72
- try_compiler_option '-Wmissing-declarations'
73
- try_compiler_option '-Wmissing-format-attribute'
74
- try_compiler_option '-Wmissing-include-dirs'
75
- try_compiler_option '-Wmissing-noreturn'
76
- try_compiler_option '-Wmissing-prototypes'
77
- try_compiler_option '-Wnested-externs'
78
- try_compiler_option '-Wold-style-definition'
79
- try_compiler_option '-Wpacked'
80
- try_compiler_option '-Wp,-D_FORTIFY_SOURCE=2'
81
- try_compiler_option '-Wpointer-arith'
82
- # NOTE: ruby.h and intern.h have too many of these.
83
- # try_compiler_option '-Wredundant-decls'
84
- # NOTE: Complains about index, for example.
85
- # try_compiler_option '-Wshadow'
86
- try_compiler_option '-Wswitch-default'
87
- try_compiler_option '-Wswitch-enum'
88
- try_compiler_option '-Wundef'
89
- # NOTE: Incredible amounts of false positives.
90
- #try_compiler_option '-Wunreachable-code'
91
- try_compiler_option '-Wunsafe-loop-optimizations'
92
- try_compiler_option '-Wwrite-strings'
93
-
94
56
  create_pkg_config_file("Ruby/GIO2", package_id)
95
57
 
96
58
  $defs << defines
data/ext/gio2/gio2.c CHANGED
@@ -1,130 +1,31 @@
1
- /* -*- c-file-style: "ruby" -*- */
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Ruby/GIO: a Ruby binding of gio-2.0.x.
4
- * Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
4
+ * Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
5
5
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License.
6
+ * This library is free software; you can redistribute it and/or
7
+ * modify it under the terms of the GNU Lesser General Public
8
+ * License as published by the Free Software Foundation; either
9
+ * version 2.1 of the License, or (at your option) any later version.
10
10
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
11
+ * This library is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ * Lesser General Public License for more details.
15
15
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
+ * You should have received a copy of the GNU Lesser General Public
17
+ * License along with this library; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ * MA 02110-1301 USA
19
20
  */
20
21
 
21
- #include "gio2.h"
22
+ #include "rbgio2private.h"
22
23
 
23
24
  void Init_gio2(void);
24
25
 
25
- static VALUE
26
- gio_has_unix(G_GNUC_UNUSED VALUE self)
27
- {
28
- #ifdef HAVE_GIO_UNIX
29
- return Qtrue;
30
- #else
31
- return Qfalse;
32
- #endif
33
- }
34
-
35
26
  void
36
27
  Init_gio2(void)
37
28
  {
38
- VALUE glib = mGLib;
39
-
40
- G_DEF_CLASS(G_TYPE_FILESYSTEM_PREVIEW_TYPE, "FilesystemPreviewType", glib);
41
- G_DEF_CONSTANTS(glib, G_TYPE_FILESYSTEM_PREVIEW_TYPE, "G_");
42
-
43
- G_DEF_CLASS(G_TYPE_DATA_STREAM_BYTE_ORDER, "DataStreamByteOrder", glib);
44
- G_DEF_CONSTANTS(glib, G_TYPE_DATA_STREAM_BYTE_ORDER, "G_");
45
-
46
- G_DEF_CLASS(G_TYPE_DATA_STREAM_NEWLINE_TYPE, "DataStreamNewlineType", glib);
47
- G_DEF_CONSTANTS(glib, G_TYPE_DATA_STREAM_NEWLINE_TYPE, "G_");
48
-
49
- rb_define_module_function(glib, "gio_has_unix?", gio_has_unix, 0);
50
-
51
- Init_util();
52
-
53
- Init_gappinfo(glib);
54
- Init_gapplaunchcontext(glib);
55
- Init_gasyncinitable(glib);
56
- Init_gasyncresult(glib);
57
- Init_gbufferedinputstream(glib);
58
- Init_gbufferedoutputstream(glib);
59
- Init_gcancellable(glib);
60
- Init_gcharsetconverter(glib);
61
- Init_gcontenttype(glib);
62
- Init_gconverter(glib);
63
- Init_gconverterinputstream(glib);
64
- Init_gconverteroutputstream(glib);
65
- Init_gdatainputstream(glib);
66
- Init_gdesktopappinfo(glib);
67
- Init_gdataoutputstream(glib);
68
- Init_gdrive(glib);
69
- Init_gemblem(glib);
70
- Init_gemblemedicon(glib);
71
- Init_gfile(glib);
72
- Init_gfileattribute(glib);
73
- Init_gfileattributeinfo(glib);
74
- Init_gfileattributematcher(glib);
75
- Init_gfiledescriptorbased(glib);
76
- Init_gfileenumerator(glib);
77
- Init_gfileicon(glib);
78
- Init_gfileinfo(glib);
79
- Init_gfileinputstream(glib);
80
- Init_gfileiostream(glib);
81
- Init_gfilemonitor(glib);
82
- Init_gfilenamecompleter(glib);
83
- Init_gfileoutputstream(glib);
84
- Init_gfilterinputstream(glib);
85
- Init_gfilteroutputstream(glib);
86
- Init_gicon(glib);
87
- Init_ginetaddress(glib);
88
- Init_ginetsocketaddress(glib);
89
- Init_ginitable(glib);
90
- Init_ginputstream(glib);
91
- Init_gioerror(glib);
92
- Init_giomodule(glib);
93
- Init_gioscheduler(glib);
94
- Init_giostream(glib);
95
- Init_gloadableicon(glib);
96
- Init_gmemoryinputstream(glib);
97
- Init_gmemoryoutputstream(glib);
98
- Init_gmount(glib);
99
- Init_gmountoperation(glib);
100
- Init_gnetworkaddress(glib);
101
- Init_gnetworkservice(glib);
102
- Init_goutputstream(glib);
103
- Init_gresolver(glib);
104
- Init_gseekable(glib);
105
- Init_gsimpleasyncresult(glib);
106
- Init_gsocket(glib);
107
- Init_gsocketaddress(glib);
108
- Init_gsocketclient(glib);
109
- Init_gsocketconnectable(glib);
110
- Init_gsocketconnection(glib);
111
- Init_gsocketcontrolmessage(glib);
112
- Init_gsocketlistener(glib);
113
- Init_gsocketservice(glib);
114
- Init_gsrvtarget(glib);
115
- Init_gtcpconnection(glib);
116
- Init_gthemedicon(glib);
117
- Init_gthreadedsocketservice(glib);
118
- Init_gunixconnection(glib);
119
- Init_gunixfdlist(glib);
120
- Init_gunixfdmessage(glib);
121
- Init_gunixinputstream(glib);
122
- Init_gunixmounts(glib);
123
- Init_gunixoutputstream(glib);
124
- Init_gunixsocketaddress(glib);
125
- Init_gvfs(glib);
126
- Init_gvolume(glib);
127
- Init_gvolumemonitor(glib);
128
- Init_gzlibcompressor(glib);
129
- Init_gzlibdecompressor(glib);
29
+ Init_util();
30
+ Init_gio();
130
31
  }
data/ext/gio2/gio2.h CHANGED
@@ -1,349 +1,30 @@
1
- /* -*- c-file-style: "ruby" -*- */
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Ruby/GIO: a Ruby binding of gio-2.0.x.
4
- * Copyright (C) 2008-2009 Ruby-GNOME2 Project Team
3
+ * Copyright (C) 2011 Ruby-GNOME2 Project Team
5
4
  *
6
- * This library is free software; you can redistribute it and/or
7
- * modify it under the terms of the GNU Lesser General Public
8
- * License as published by the Free Software Foundation; either
9
- * version 2.1 of the License.
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
10
9
  *
11
- * This library is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * Lesser General Public License for more details.
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
15
14
  *
16
- * You should have received a copy of the GNU Lesser General Public
17
- * License along with this library; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18
+ * MA 02110-1301 USA
19
19
  */
20
20
 
21
- #ifndef GIO2_H
22
- #define GIO2_H
21
+ #ifndef __GIO2_H__
22
+ #define __GIO2_H__
23
23
 
24
- #ifdef __cplusplus
25
- extern "C" {
26
- #endif /* __cplusplus */
27
-
28
- #include <ruby.h>
29
- #include <gio/gio.h>
30
-
31
- #include <rbglib.h>
32
- #include <rbgobject.h>
33
-
34
- /* Block Handling */
35
- #define SAVE_BLOCK(block) G_STMT_START { \
36
- if (!NIL_P(block)) \
37
- G_CHILD_ADD(mGLib, (block)); \
38
- } G_STMT_END
39
-
40
- #define USE_BLOCK(data) \
41
- rbgio_child_remove_and_return(mGLib, (VALUE)(data))
42
-
43
- #define USE_BLOCK_AND_SAVE(data) ((VALUE)data)
44
-
45
- /* Conversion Macros */
46
- #define RVAL2TYPE_WITH_DEFAULT(value, type, default_value) \
47
- (NIL_P(value) ? (default_value) : type(value))
48
-
49
- #define RVAL2ATTRIBUTESDEFAULT(value) \
50
- RVAL2TYPE_WITH_DEFAULT((value), RVAL2CSTR, "standard::*")
51
-
52
- #define RVAL2GAPPINFO(value) G_APP_INFO(RVAL2GOBJ(value))
53
-
54
- #define RVAL2GAPPLAUNCHCONTEXT(value) G_APP_LAUNCH_CONTEXT(RVAL2GOBJ(value))
55
-
56
- #define RVAL2GASYNCRESULT(value) G_ASYNC_RESULT(RVAL2GOBJ(value))
57
-
58
- #define RVAL2GCANCELLABLE(value) G_CANCELLABLE(RVAL2GOBJ(value))
59
-
60
- #define RVAL2GCONVERTER(value) G_CONVERTER(RVAL2GOBJ(value))
61
-
62
- #define GDATASTREAMBYTEORDER2RVAL(value) \
63
- RVAL2GENUM((value), G_TYPE_DATA_STREAM_BYTE_ORDER)
64
-
65
- #define RVAL2GDATASTREAMBYTEORDER(value) \
66
- GENUM2RVAL((value), G_TYPE_DATA_STREAM_BYTE_ORDER)
67
-
68
- #define RVAL2GDRIVESTARTFLAGS(value) \
69
- RVAL2GENUM((value), G_TYPE_DRIVE_START_FLAGS)
70
- #define RVAL2GDRIVESTARTFLAGSDEFAULT(value) \
71
- RVAL2TYPE_WITH_DEFAULT((value), \
72
- RVAL2GDRIVESTARTFLAGS, \
73
- G_DRIVE_START_NONE)
74
- #define RVAL2GEMBLEM(value) G_EMBLEM(RVAL2GOBJ(value))
75
-
76
- #define RVAL2GFILE(value) G_FILE(RVAL2GOBJ(value))
77
-
78
- #define G_TYPE_FILE_ATTRIBUTE_MATCHER (g_file_attribute_matcher_get_type())
79
- GType g_file_attribute_matcher_get_type(void);
80
-
81
- #define RVAL2GFILEATTRIBUTEMATCHER(value) \
82
- ((GFileAttributeMatcher *)(RVAL2BOXED(value, G_TYPE_FILE_ATTRIBUTE_MATCHER)))
83
-
84
- #define GFILEATTRIBUTETYPE2RVAL(value) \
85
- GENUM2RVAL((value), G_TYPE_FILE_ATTRIBUTE_TYPE)
86
-
87
- #define GFILEATTRIBUTEINFO2RVAL(object) \
88
- BOXED2RVAL(object, G_TYPE_FILE_ATTRIBUTE_INFO)
89
-
90
- #define G_TYPE_FILE_ATTRIBUTE_INFO (g_file_attribute_info_get_type())
91
- GType g_file_attribute_info_get_type(void);
92
-
93
- #define G_TYPE_FILE_ATTRIBUTE_INFO_LIST (g_file_attribute_info_list_get_type())
94
- GType g_file_attribute_info_list_get_type(void);
95
-
96
- #define GFILEATTRIBUTEINFOLIST2RVAL(object) \
97
- BOXED2RVAL(object, G_TYPE_FILE_ATTRIBUTE_INFO_LIST)
98
-
99
- #define RVAL2GFILEATTRIBUTETYPE(value) \
100
- RVAL2GENUM((value), G_TYPE_FILE_ATTRIBUTE_TYPE)
101
-
102
- #define RVAL2GFILEINFO(value) G_FILE_INFO(RVAL2GOBJ(value))
103
-
104
- #define GFILETYPE2RVAL(value) GENUM2RVAL((value), G_TYPE_FILE_TYPE)
105
- #define RVAL2GFILETYPE(value) RVAL2GENUM((value), G_TYPE_FILE_TYPE)
106
-
107
- #define RVAL2GICON(value) G_ICON(RVAL2GOBJ(value))
108
-
109
- #define RVAL2GINETADDRESS(value) G_INET_ADDRESS(RVAL2GOBJ(value))
110
-
111
- #define RVAL2GINPUTSTREAM(value) G_INPUT_STREAM(RVAL2GOBJ(value))
112
-
113
- #define RVAL2GMOUNT(value) G_MOUNT(RVAL2GOBJ(value))
114
-
115
- #define RVAL2GMOUNTMOUNTFLAGS(value) \
116
- RVAL2GENUM((value), G_TYPE_MOUNT_MOUNT_FLAGS)
117
- #define RVAL2GMOUNTMOUNTFLAGSDEFAULT(value) \
118
- RVAL2TYPE_WITH_DEFAULT((value), \
119
- RVAL2GMOUNTMOUNTFLAGS, \
120
- G_MOUNT_MOUNT_NONE)
121
-
122
- #define RVAL2GMOUNTUNMOUNTFLAGS(value) \
123
- RVAL2GFLAGS((value), G_TYPE_MOUNT_UNMOUNT_FLAGS)
124
- #define RVAL2GMOUNTUNMOUNTFLAGSDEFAULT(value) \
125
- RVAL2TYPE_WITH_DEFAULT((value), \
126
- RVAL2GMOUNTUNMOUNTFLAGS, \
127
- G_MOUNT_UNMOUNT_NONE)
128
-
129
- #define RVAL2GMOUNTOPERATION(value) G_MOUNT_OPERATION(RVAL2GOBJ(value))
130
-
131
- #define RVAL2GOUTPUTSTREAM(value) G_OUTPUT_STREAM(RVAL2GOBJ(value))
132
-
133
- #define RVAL2GSOCKET(value) G_SOCKET(RVAL2GOBJ(value))
134
-
135
- #define RVAL2GSOCKETADDRESS(value) G_SOCKET_ADDRESS(RVAL2GOBJ(value))
136
-
137
- #define RVAL2GSOCKETCONNECTABLE(value) G_SOCKET_CONNECTABLE(RVAL2GOBJ(value))
138
-
139
- #define GSOCKETFAMILY2RVAL(value) GENUM2RVAL((value), G_TYPE_SOCKET_FAMILY)
140
- #define RVAL2GSOCKETFAMILY(value) RVAL2GENUM((value), G_TYPE_SOCKET_FAMILY)
141
-
142
- #define GSOCKETPROTOCOL2RVAL(value) GENUM2RVAL((value), G_TYPE_SOCKET_PROTOCOL)
143
- #define RVAL2GSOCKETPROTOCOL(value) RVAL2GENUM((value), G_TYPE_SOCKET_PROTOCOL)
144
- #define RVAL2GSOCKETPROTOCOLDEFAULT(value) \
145
- RVAL2TYPE_WITH_DEFAULT((value), \
146
- RVAL2GSOCKETPROTOCOL, \
147
- G_SOCKET_PROTOCOL_DEFAULT)
148
-
149
- #define GSOCKETTYPE2RVAL(value) GENUM2RVAL((value), G_TYPE_SOCKET_TYPE)
150
- #define RVAL2GSOCKETTYPE(value) RVAL2GENUM((value), G_TYPE_SOCKET_TYPE)
151
-
152
- #define GTIMEVAL2RVAL(value) rb_time_new((value)->tv_sec, (value)->tv_usec)
153
-
154
- #define RVAL2GZLIBCOMPRESSORFORMAT(value) \
155
- RVAL2GFLAGS((value), G_TYPE_ZLIB_COMPRESSOR_FORMAT)
156
- #define RVAL2GZLIBCOMPRESSORFORMATDEFAULT(value) \
157
- RVAL2TYPE_WITH_DEFAULT((value), \
158
- RVAL2GZLIBCOMPRESSORFORMAT, \
159
- G_ZLIB_COMPRESSOR_FORMAT_ZLIB)
160
-
161
- #define RVAL2IOPRIORITYDEFAULT(value) \
162
- RVAL2TYPE_WITH_DEFAULT((value), NUM2INT, G_PRIORITY_DEFAULT)
163
-
164
- #ifdef HAVE_GIO_UNIX
165
- # define RVAL2GUNIXFDLIST(value) G_UNIX_FD_LIST(RVAL2GOBJ(value))
24
+ #ifdef __GNUC__
25
+ #warning "<gio2.h> has been deprecated. Use <rbgio2.h> instead."
166
26
  #endif
167
27
 
168
- /* Integer Type Conversion Macros */
169
- #define FD2RVAL(value) INT2FIX(value)
170
- #define RVAL2FD(value) FIX2INT(value)
171
-
172
- #define GINT2RVAL(value) INT2NUM(value)
173
- #define RVAL2GINT(value) NUM2INT(value)
174
-
175
- #define GINT162RVAL(value) INT2FIX(value)
176
- #define RVAL2GINT16(value) FIX2INT(value)
177
-
178
- #define GINT322RVAL(value) INT2NUM(value)
179
- #define RVAL2GINT32(value) NUM2INT(value)
180
-
181
- #define GINT642RVAL(value) rbglib_int64_to_num(value)
182
- #define RVAL2GINT64(value) rbglib_num_to_int64(value)
183
-
184
- #define GSIZE2RVAL(value) ULONG2NUM(value)
185
- #define RVAL2GSIZE(value) NUM2ULONG(value)
186
-
187
- #define GLONG2RVAL(value) LONG2NUM(value)
188
- #define RVAL2GLONG(value) NUM2LONG(value)
189
-
190
- #define GOFFSET2RVAL(value) rbglib_int64_to_num(value)
191
- #define RVAL2GOFFSET(value) rbglib_num_to_int64(value)
192
-
193
- #define GSSIZE2RVAL(value) LONG2NUM(value)
194
- #define RVAL2GSSIZE(value) NUM2LONG(value)
195
-
196
- /* TODO: Should we be zeroing out bits? */
197
- #define GUCHAR2RVAL(value) INT2FIX(value)
198
- #define RVAL2GUCHAR(value) FIX2INT(value)
199
-
200
- #define GUINT2RVAL(value) UINT2NUM(value)
201
- #define RVAL2GUINT(value) NUM2UINT(value)
202
-
203
- /* TODO: Should we be zeroing out bits? */
204
- #define GUINT162RVAL(value) INT2FIX(value)
205
- #define RVAL2GUINT16(value) FIX2INT(value)
206
-
207
- #define GUINT322RVAL(value) UINT2NUM(value)
208
- #define RVAL2GUINT32(value) NUM2UINT(value)
209
-
210
- #define GUINT642RVAL(value) rbglib_uint64_to_num(value)
211
- #define RVAL2GUINT64(value) rbglib_num_to_uint64(value)
212
-
213
- #define GULONG2RVAL(value) ULONG2NUM(value)
214
- #define RVAL2GULONG(value) NUM2ULONG(value)
215
-
216
- #define CSTR2RVAL_TAINTED(string, length) \
217
- rbgio_cstr_to_rval_tainted((string), (length))
218
- #define CSTR2RVAL_TAINTED_FREE(string, length) \
219
- rbgio_cstr_to_rval_tainted_free((string), (length))
220
-
221
- #define GLIST2ARY_UNREF_FREE(list) rbgio_glist_to_ary_unref_free(list)
222
-
223
- #define GFDS2ARY(fds) rbgio_fds_to_ary(fds)
224
- #define GFDS2ARY_FREE(fds) rbgio_fds_to_ary_free(fds)
225
-
226
- #define GFILEARY2GLIST(ary) rbgio_gfile_ary_to_glist(ary)
227
- #define GFILEARY2GLIST_ACCEPT_NIL(ary) rbgio_gfile_ary_to_glist_accept_nil(ary)
228
-
229
- #define STRVECTOR2ARY(vector) rbgio_str_vector_to_ary(vector)
230
- #define STRVECTOR2ARY_FREE(vector) rbgio_str_vector_to_ary_free(vector)
231
-
232
- G_GNUC_INTERNAL VALUE rbgio_cstr_to_rval_tainted(const char *string,
233
- gsize length);
234
- G_GNUC_INTERNAL VALUE rbgio_cstr_to_rval_tainted_free(char *string,
235
- gsize length);
236
- G_GNUC_INTERNAL VALUE rbgio_glist_to_ary_unref_free(GList *list);
237
- G_GNUC_INTERNAL VALUE rbgio_fds_to_ary(const gint *fds);
238
- G_GNUC_INTERNAL VALUE rbgio_fds_to_ary_free(gint *fds);
239
- G_GNUC_INTERNAL GList *rbgio_gfile_ary_to_glist(VALUE ary);
240
- G_GNUC_INTERNAL GList *rbgio_gfile_ary_to_glist_accept_nil(VALUE ary);
241
- G_GNUC_INTERNAL void rbgio_rval_to_gtimeval(VALUE value, GTimeVal *time);
242
- G_GNUC_INTERNAL VALUE rbgio_str_vector_to_ary(const gchar * const *vector);
243
- G_GNUC_INTERNAL VALUE rbgio_str_vector_to_ary_free(gchar **vector);
244
- G_GNUC_INTERNAL void rbgio_async_ready_callback(GObject *source,
245
- GAsyncResult *result,
246
- gpointer data);
247
- G_GNUC_INTERNAL VALUE rbgio_child_remove_and_return(VALUE parent, VALUE child);
248
- VALUE rbgio_define_domain_error(VALUE module,
249
- const char *name,
250
- GQuark domain,
251
- const char *enum_name,
252
- VALUE parent);
253
- VALUE rbgio_define_error(VALUE module,
254
- const char *name,
255
- gint code,
256
- VALUE domain_error);
257
- NORETURN(void rbgio_raise_error(GError *error));
258
- GObject *rbgio_ginitable_new(GType type, VALUE parameters, VALUE cancellable);
259
- void rbgio_gasyncinitable_new_async(GType type,
260
- VALUE parameters,
261
- VALUE io_priority,
262
- VALUE cancellable,
263
- VALUE block);
264
-
265
- G_GNUC_INTERNAL void Init_gappinfo(VALUE glib);
266
- G_GNUC_INTERNAL void Init_gapplaunchcontext(VALUE glib);
267
- G_GNUC_INTERNAL void Init_gasyncinitable(VALUE glib);
268
- G_GNUC_INTERNAL void Init_gasyncresult(VALUE glib);
269
- G_GNUC_INTERNAL void Init_gbufferedinputstream(VALUE glib);
270
- G_GNUC_INTERNAL void Init_gbufferedoutputstream(VALUE glib);
271
- G_GNUC_INTERNAL void Init_gcancellable(VALUE glib);
272
- G_GNUC_INTERNAL void Init_gcharsetconverter(VALUE glib);
273
- G_GNUC_INTERNAL void Init_gcontenttype(VALUE glib);
274
- G_GNUC_INTERNAL void Init_gconverter(VALUE glib);
275
- G_GNUC_INTERNAL void Init_gconverterinputstream(VALUE glib);
276
- G_GNUC_INTERNAL void Init_gconverteroutputstream(VALUE glib);
277
- G_GNUC_INTERNAL void Init_gdatainputstream(VALUE glib);
278
- G_GNUC_INTERNAL void Init_gdataoutputstream(VALUE glib);
279
- G_GNUC_INTERNAL void Init_gdesktopappinfo(VALUE glib);
280
- G_GNUC_INTERNAL void Init_gdrive(VALUE glib);
281
- G_GNUC_INTERNAL void Init_gemblem(VALUE glib);
282
- G_GNUC_INTERNAL void Init_gemblemedicon(VALUE glib);
283
- G_GNUC_INTERNAL void Init_gfile(VALUE glib);
284
- G_GNUC_INTERNAL void Init_gfileattribute(VALUE glib);
285
- G_GNUC_INTERNAL void Init_gfileattributeinfo(VALUE glib);
286
- G_GNUC_INTERNAL void Init_fileattributeinfolist(VALUE glib);
287
- G_GNUC_INTERNAL void Init_gfileattributematcher(VALUE glib);
288
- G_GNUC_INTERNAL void Init_gfiledescriptorbased(VALUE glib);
289
- G_GNUC_INTERNAL void Init_gfileenumerator(VALUE glib);
290
- G_GNUC_INTERNAL void Init_gfileicon(VALUE glib);
291
- G_GNUC_INTERNAL void Init_gfileinfo(VALUE glib);
292
- G_GNUC_INTERNAL void Init_gfileinputstream(VALUE glib);
293
- G_GNUC_INTERNAL void Init_gfileiostream(VALUE glib);
294
- G_GNUC_INTERNAL void Init_gfilemonitor(VALUE glib);
295
- G_GNUC_INTERNAL void Init_gfilenamecompleter(VALUE glib);
296
- G_GNUC_INTERNAL void Init_gfileoutputstream(VALUE glib);
297
- G_GNUC_INTERNAL void Init_gfilterinputstream(VALUE glib);
298
- G_GNUC_INTERNAL void Init_gfilteroutputstream(VALUE glib);
299
- G_GNUC_INTERNAL void Init_gicon(VALUE glib);
300
- G_GNUC_INTERNAL void Init_ginetaddress(VALUE glib);
301
- G_GNUC_INTERNAL void Init_ginetsocketaddress(VALUE glib);
302
- G_GNUC_INTERNAL void Init_ginitable(VALUE glib);
303
- G_GNUC_INTERNAL void Init_ginputstream(VALUE glib);
304
- G_GNUC_INTERNAL void Init_gioerror(VALUE glib);
305
- G_GNUC_INTERNAL void Init_giomodule(VALUE glib);
306
- G_GNUC_INTERNAL void Init_gioscheduler(VALUE glib);
307
- G_GNUC_INTERNAL void Init_giostream(VALUE glib);
308
- G_GNUC_INTERNAL void Init_gloadableicon(VALUE glib);
309
- G_GNUC_INTERNAL void Init_gmemoryinputstream(VALUE glib);
310
- G_GNUC_INTERNAL void Init_gmemoryoutputstream(VALUE glib);
311
- G_GNUC_INTERNAL void Init_gmount(VALUE glib);
312
- G_GNUC_INTERNAL void Init_gmountoperation(VALUE glib);
313
- G_GNUC_INTERNAL void Init_gnetworkaddress(VALUE glib);
314
- G_GNUC_INTERNAL void Init_gnetworkservice(VALUE glib);
315
- G_GNUC_INTERNAL void Init_goutputstream(VALUE glib);
316
- G_GNUC_INTERNAL void Init_gresolver(VALUE glib);
317
- G_GNUC_INTERNAL void Init_gseekable(VALUE glib);
318
- G_GNUC_INTERNAL void Init_gsimpleasyncresult(VALUE glib);
319
- G_GNUC_INTERNAL void Init_gsocket(VALUE glib);
320
- G_GNUC_INTERNAL void Init_gsocketaddress(VALUE glib);
321
- G_GNUC_INTERNAL void Init_gsocketclient(VALUE glib);
322
- G_GNUC_INTERNAL void Init_gsocketconnectable(VALUE glib);
323
- G_GNUC_INTERNAL void Init_gsocketconnection(VALUE glib);
324
- G_GNUC_INTERNAL void Init_gsocketcontrolmessage(VALUE glib);
325
- G_GNUC_INTERNAL void Init_gsocketlistener(VALUE glib);
326
- G_GNUC_INTERNAL void Init_gsocketservice(VALUE glib);
327
- G_GNUC_INTERNAL void Init_gsrvtarget(VALUE glib);
328
- G_GNUC_INTERNAL void Init_gtcpconnection(VALUE glib);
329
- G_GNUC_INTERNAL void Init_gthreadedsocketservice(VALUE glib);
330
- G_GNUC_INTERNAL void Init_gthemedicon(VALUE glib);
331
- G_GNUC_INTERNAL void Init_gunixconnection(VALUE glib);
332
- G_GNUC_INTERNAL void Init_gunixfdlist(VALUE glib);
333
- G_GNUC_INTERNAL void Init_gunixfdmessage(VALUE glib);
334
- G_GNUC_INTERNAL void Init_gunixinputstream(VALUE glib);
335
- G_GNUC_INTERNAL void Init_gunixmounts(VALUE glib);
336
- G_GNUC_INTERNAL void Init_gunixoutputstream(VALUE glib);
337
- G_GNUC_INTERNAL void Init_gunixsocketaddress(VALUE glib);
338
- G_GNUC_INTERNAL void Init_gvfs(VALUE glib);
339
- G_GNUC_INTERNAL void Init_gvolume(VALUE glib);
340
- G_GNUC_INTERNAL void Init_gvolumemonitor(VALUE glib);
341
- G_GNUC_INTERNAL void Init_gzlibcompressor(VALUE glib);
342
- G_GNUC_INTERNAL void Init_gzlibdecompressor(VALUE glib);
343
- G_GNUC_INTERNAL void Init_util(void);
344
-
345
- #ifdef __cplusplus
346
- }
347
- #endif /* __cplusplus */
28
+ #include "rbgio2.h"
348
29
 
349
- #endif /* GNOMEVFS_H */
30
+ #endif /* __GIO2_H__ */