gio2 0.90.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. data/ChangeLog +60 -0
  2. data/README +34 -0
  3. data/Rakefile +76 -0
  4. data/ext/gio2/depend +5 -0
  5. data/ext/gio2/extconf.rb +91 -0
  6. data/ext/gio2/gappinfo.c +318 -0
  7. data/ext/gio2/gapplaunchcontext.c +79 -0
  8. data/ext/gio2/gasyncinitable.c +244 -0
  9. data/ext/gio2/gasyncresult.c +39 -0
  10. data/ext/gio2/gbufferedinputstream.c +184 -0
  11. data/ext/gio2/gbufferedoutputstream.c +82 -0
  12. data/ext/gio2/gcancellable.c +177 -0
  13. data/ext/gio2/gcharsetconverter.c +72 -0
  14. data/ext/gio2/gcontenttype.c +135 -0
  15. data/ext/gio2/gconverter.c +117 -0
  16. data/ext/gio2/gconverterinputstream.c +48 -0
  17. data/ext/gio2/gconverteroutputstream.c +48 -0
  18. data/ext/gio2/gdatainputstream.c +341 -0
  19. data/ext/gio2/gdataoutputstream.c +202 -0
  20. data/ext/gio2/gdesktopappinfo.c +90 -0
  21. data/ext/gio2/gdrive.c +267 -0
  22. data/ext/gio2/gemblem.c +71 -0
  23. data/ext/gio2/gemblemedicon.c +63 -0
  24. data/ext/gio2/gfile.c +2058 -0
  25. data/ext/gio2/gfileattribute.c +263 -0
  26. data/ext/gio2/gfileattributematcher.c +90 -0
  27. data/ext/gio2/gfiledescriptorbased.c +42 -0
  28. data/ext/gio2/gfileenumerator.c +167 -0
  29. data/ext/gio2/gfileicon.c +46 -0
  30. data/ext/gio2/gfileinfo.c +641 -0
  31. data/ext/gio2/gfileinputstream.c +92 -0
  32. data/ext/gio2/gfileiostream.c +98 -0
  33. data/ext/gio2/gfilemonitor.c +63 -0
  34. data/ext/gio2/gfilenamecompleter.c +72 -0
  35. data/ext/gio2/gfileoutputstream.c +100 -0
  36. data/ext/gio2/gfilterinputstream.c +56 -0
  37. data/ext/gio2/gfilteroutputstream.c +56 -0
  38. data/ext/gio2/gicon.c +69 -0
  39. data/ext/gio2/ginetaddress.c +188 -0
  40. data/ext/gio2/ginetsocketaddress.c +54 -0
  41. data/ext/gio2/ginitable.c +195 -0
  42. data/ext/gio2/ginputstream.c +341 -0
  43. data/ext/gio2/gio2.c +120 -0
  44. data/ext/gio2/gio2.def +2 -0
  45. data/ext/gio2/gio2.h +343 -0
  46. data/ext/gio2/gioerror.c +67 -0
  47. data/ext/gio2/giomodule.c +63 -0
  48. data/ext/gio2/gioscheduler.c +195 -0
  49. data/ext/gio2/giostream.c +129 -0
  50. data/ext/gio2/gloadableicon.c +91 -0
  51. data/ext/gio2/gmemoryinputstream.c +65 -0
  52. data/ext/gio2/gmemoryoutputstream.c +65 -0
  53. data/ext/gio2/gmount.c +283 -0
  54. data/ext/gio2/gmountoperation.c +168 -0
  55. data/ext/gio2/gnetworkaddress.c +71 -0
  56. data/ext/gio2/gnetworkservice.c +64 -0
  57. data/ext/gio2/goutputstream.c +343 -0
  58. data/ext/gio2/gresolver.c +230 -0
  59. data/ext/gio2/gseekable.c +89 -0
  60. data/ext/gio2/gsimpleasyncresult.c +153 -0
  61. data/ext/gio2/gsocket.c +451 -0
  62. data/ext/gio2/gsocketaddress.c +45 -0
  63. data/ext/gio2/gsocketclient.c +273 -0
  64. data/ext/gio2/gsocketconnectable.c +97 -0
  65. data/ext/gio2/gsocketconnection.c +82 -0
  66. data/ext/gio2/gsocketcontrolmessage.c +82 -0
  67. data/ext/gio2/gsocketlistener.c +239 -0
  68. data/ext/gio2/gsocketservice.c +64 -0
  69. data/ext/gio2/gsrvtarget.c +77 -0
  70. data/ext/gio2/gtcpconnection.c +48 -0
  71. data/ext/gio2/gthemedicon.c +86 -0
  72. data/ext/gio2/gthreadedsocketservice.c +39 -0
  73. data/ext/gio2/gunixconnection.c +69 -0
  74. data/ext/gio2/gunixfdlist.c +112 -0
  75. data/ext/gio2/gunixfdmessage.c +81 -0
  76. data/ext/gio2/gunixinputstream.c +73 -0
  77. data/ext/gio2/gunixmounts.c +346 -0
  78. data/ext/gio2/gunixoutputstream.c +73 -0
  79. data/ext/gio2/gunixsocketaddress.c +79 -0
  80. data/ext/gio2/gvfs.c +84 -0
  81. data/ext/gio2/gvolume.c +191 -0
  82. data/ext/gio2/gvolumemonitor.c +77 -0
  83. data/ext/gio2/gzlibcompressor.c +47 -0
  84. data/ext/gio2/gzlibdecompressor.c +43 -0
  85. data/ext/gio2/util.c +323 -0
  86. data/extconf.rb +49 -0
  87. data/lib/gio2.rb +141 -0
  88. metadata +184 -0
@@ -0,0 +1,49 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'pathname'
4
+ require 'mkmf'
5
+ require 'rbconfig'
6
+ require 'fileutils'
7
+
8
+ package = "gio2"
9
+
10
+ base_dir = Pathname(__FILE__).dirname.expand_path
11
+ ext_dir = base_dir + "ext" + package
12
+ mkmf_gnome2_dir = base_dir + 'lib'
13
+
14
+ ruby = File.join(RbConfig::CONFIG['bindir'],
15
+ RbConfig::CONFIG['ruby_install_name'] +
16
+ RbConfig::CONFIG["EXEEXT"])
17
+
18
+ build_dir = Pathname("ext") + package
19
+ FileUtils.mkdir_p(build_dir.to_s) unless build_dir.exist?
20
+ extconf_rb_path = ext_dir + "extconf.rb"
21
+ system(ruby, "-C", build_dir.to_s, extconf_rb_path.to_s, *ARGV) || exit(false)
22
+
23
+ create_makefile(package)
24
+ FileUtils.mv("Makefile", "Makefile.lib")
25
+
26
+ File.open("Makefile", "w") do |makefile|
27
+ makefile.puts(<<-EOM)
28
+ all:
29
+ (cd ext/#{package} && $(MAKE))
30
+ $(MAKE) -f Makefile.lib
31
+
32
+ install:
33
+ (cd ext/#{package} && $(MAKE) install)
34
+ $(MAKE) -f Makefile.lib install
35
+
36
+ site-install:
37
+ (cd ext/#{package} && $(MAKE) site-install)
38
+ $(MAKE) -f Makefile.lib site-install
39
+
40
+ clean:
41
+ (cd ext/#{package} && $(MAKE) clean)
42
+ $(MAKE) -f Makefile.lib clean
43
+
44
+ distclean:
45
+ (cd ext/#{package} && $(MAKE) distclean)
46
+ $(MAKE) -f Makefile.lib distclean
47
+ @rm -f Makefile.lib
48
+ EOM
49
+ end
@@ -0,0 +1,141 @@
1
+ require 'glib2'
2
+
3
+ base_dir = Pathname.new(__FILE__).dirname.dirname.expand_path
4
+ vendor_dir = base_dir + "vendor" + "local"
5
+ vendor_bin_dir = vendor_dir + "bin"
6
+ GLib.prepend_environment_path(vendor_bin_dir)
7
+ begin
8
+ major, minor, micro, = RUBY_VERSION.split(/\./)
9
+ require "#{major}.#{minor}/gio2.so"
10
+ rescue LoadError
11
+ require "gio2.so"
12
+ end
13
+
14
+ class GLib::DataInputStream
15
+ def each
16
+ while line = read_line
17
+ yield line
18
+ end
19
+ end
20
+
21
+ alias each_line each
22
+
23
+ def each_async(io_priority = GLib::PRIORITY_DEFAULT, cancellable = nil, &block)
24
+ each_async_loop io_priority, cancellable, block
25
+ self
26
+ end
27
+
28
+ alias each_line_async each_async
29
+
30
+ private
31
+
32
+ def each_async_loop(io_priority, cancellable, block)
33
+ # TODO: Should we really pass in the object? I mean, how often is that
34
+ # useful? We can always get it with result.source_object as well.
35
+ read_line_async io_priority, cancellable do |result|
36
+ if line = read_line_finish(result)
37
+ block.call line
38
+ each_async_loop io_priority, cancellable, block
39
+ end
40
+ end
41
+ end
42
+
43
+ # TODO: Add #each_byte?
44
+ end
45
+
46
+ if GLib.const_defined? :DesktopAppInfo
47
+ class GLib::DesktopAppInfo
48
+ class << self
49
+ def desktop_env=(desktop_env)
50
+ set_desktop_env desktop_env
51
+ desktop_env
52
+ end
53
+ end
54
+ end
55
+ end
56
+
57
+ module GLib::File
58
+ def eql?(other)
59
+ self === other and self == other
60
+ end
61
+
62
+ alias each enumerate_children
63
+
64
+ def each_async(num_files, attributes = nil, flags = nil,
65
+ io_priority = GLib::PRIORITY_DEFAULT, cancellable = nil,
66
+ &block)
67
+ enumerate_children_async attributes, flags, io_priority, cancellable do |result|
68
+ enumerate_children_finish(result).each_async num_files, io_priority, cancellable, &block
69
+ end
70
+ self
71
+ end
72
+ end
73
+
74
+ class GLib::FileEnumerator
75
+ def each(cancellable = nil)
76
+ while file = next_file(cancellable)
77
+ yield file
78
+ end
79
+ close
80
+ self
81
+ end
82
+
83
+ def each_async(num_files, io_priority = GLib::PRIORITY_DEFAULT, cancellable = nil, &block)
84
+ each_async_loop num_files, io_priority, cancellable, block
85
+ self
86
+ end
87
+
88
+ private
89
+
90
+ def each_async_loop(num_files, io_priority, cancellable, block)
91
+ next_files_async num_files, io_priority, cancellable do |result|
92
+ files = next_files_finish(result)
93
+ files.each do |file|
94
+ block.call file
95
+ end
96
+ if files.length > 0
97
+ each_async_loop num_files, io_priority, cancellable, block
98
+ else
99
+ close
100
+ end
101
+ end
102
+ end
103
+ end
104
+
105
+ class GLib::FileInfo
106
+ def directory?
107
+ file_type == GLib::File::Type::DIRECTORY
108
+ end
109
+ end
110
+
111
+ module GLib::Icon
112
+ def eql?(other)
113
+ self === other and self == other
114
+ end
115
+ end
116
+
117
+ class GLib::InputStream
118
+ def pending=(pending)
119
+ pending ? set_pending : clear_pending
120
+ end
121
+ end
122
+
123
+ class GLib::Resolver
124
+ class << self
125
+ def default=(default)
126
+ set_default default
127
+ default
128
+ end
129
+ end
130
+ end
131
+
132
+ module GLib::SocketConnectable
133
+ include Enumerable
134
+
135
+ def each(cancellable = nil)
136
+ enumerator = enumerate
137
+ while address = enumerator.next(cancellable)
138
+ yield address
139
+ end
140
+ end
141
+ end
metadata ADDED
@@ -0,0 +1,184 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: gio2
3
+ version: !ruby/object:Gem::Version
4
+ hash: 369
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 90
9
+ - 3
10
+ version: 0.90.3
11
+ platform: ruby
12
+ authors:
13
+ - The Ruby-GNOME2 Proejct Team
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-23 00:00:00 +09:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: cairo
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 63
30
+ segments:
31
+ - 1
32
+ - 10
33
+ - 0
34
+ version: 1.10.0
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: glib2
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 369
46
+ segments:
47
+ - 0
48
+ - 90
49
+ - 3
50
+ version: 0.90.3
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ description: Ruby/GIO2 is a Ruby binding of gio-2.x.
54
+ email: ruby-gnome2-devel-en@lists.sourceforge.net
55
+ executables: []
56
+
57
+ extensions:
58
+ - ext/gio2/extconf.rb
59
+ extra_rdoc_files: []
60
+
61
+ files:
62
+ - ChangeLog
63
+ - README
64
+ - Rakefile
65
+ - extconf.rb
66
+ - lib/gio2.rb
67
+ - ext/gio2/gunixfdlist.c
68
+ - ext/gio2/gasyncinitable.c
69
+ - ext/gio2/gfilemonitor.c
70
+ - ext/gio2/gappinfo.c
71
+ - ext/gio2/gfileiostream.c
72
+ - ext/gio2/ginetaddress.c
73
+ - ext/gio2/gzlibdecompressor.c
74
+ - ext/gio2/ginetsocketaddress.c
75
+ - ext/gio2/gfileenumerator.c
76
+ - ext/gio2/gfileinfo.c
77
+ - ext/gio2/gemblemedicon.c
78
+ - ext/gio2/gseekable.c
79
+ - ext/gio2/gmountoperation.c
80
+ - ext/gio2/gresolver.c
81
+ - ext/gio2/gsrvtarget.c
82
+ - ext/gio2/gfileinputstream.c
83
+ - ext/gio2/gbufferedinputstream.c
84
+ - ext/gio2/gicon.c
85
+ - ext/gio2/gfiledescriptorbased.c
86
+ - ext/gio2/gnetworkservice.c
87
+ - ext/gio2/gnetworkaddress.c
88
+ - ext/gio2/gsocketconnectable.c
89
+ - ext/gio2/gsocketcontrolmessage.c
90
+ - ext/gio2/gdesktopappinfo.c
91
+ - ext/gio2/gfilteroutputstream.c
92
+ - ext/gio2/gvolumemonitor.c
93
+ - ext/gio2/gioerror.c
94
+ - ext/gio2/gmemoryoutputstream.c
95
+ - ext/gio2/gfileattributematcher.c
96
+ - ext/gio2/gcancellable.c
97
+ - ext/gio2/gconverteroutputstream.c
98
+ - ext/gio2/gioscheduler.c
99
+ - ext/gio2/gio2.h
100
+ - ext/gio2/gsocketservice.c
101
+ - ext/gio2/gconverter.c
102
+ - ext/gio2/gfile.c
103
+ - ext/gio2/gunixoutputstream.c
104
+ - ext/gio2/gdatainputstream.c
105
+ - ext/gio2/gfileattribute.c
106
+ - ext/gio2/gdataoutputstream.c
107
+ - ext/gio2/gcontenttype.c
108
+ - ext/gio2/gio2.c
109
+ - ext/gio2/gmount.c
110
+ - ext/gio2/extconf.rb
111
+ - ext/gio2/ginitable.c
112
+ - ext/gio2/gasyncresult.c
113
+ - ext/gio2/gunixconnection.c
114
+ - ext/gio2/gsocketconnection.c
115
+ - ext/gio2/gsocket.c
116
+ - ext/gio2/gzlibcompressor.c
117
+ - ext/gio2/gvfs.c
118
+ - ext/gio2/gmemoryinputstream.c
119
+ - ext/gio2/gsimpleasyncresult.c
120
+ - ext/gio2/gvolume.c
121
+ - ext/gio2/goutputstream.c
122
+ - ext/gio2/gsocketaddress.c
123
+ - ext/gio2/gfilenamecompleter.c
124
+ - ext/gio2/gdrive.c
125
+ - ext/gio2/gtcpconnection.c
126
+ - ext/gio2/gfileoutputstream.c
127
+ - ext/gio2/giostream.c
128
+ - ext/gio2/gunixfdmessage.c
129
+ - ext/gio2/util.c
130
+ - ext/gio2/gsocketlistener.c
131
+ - ext/gio2/gfilterinputstream.c
132
+ - ext/gio2/gthemedicon.c
133
+ - ext/gio2/gloadableicon.c
134
+ - ext/gio2/gapplaunchcontext.c
135
+ - ext/gio2/gunixmounts.c
136
+ - ext/gio2/gunixsocketaddress.c
137
+ - ext/gio2/gcharsetconverter.c
138
+ - ext/gio2/gsocketclient.c
139
+ - ext/gio2/giomodule.c
140
+ - ext/gio2/depend
141
+ - ext/gio2/ginputstream.c
142
+ - ext/gio2/gbufferedoutputstream.c
143
+ - ext/gio2/gfileicon.c
144
+ - ext/gio2/gunixinputstream.c
145
+ - ext/gio2/gio2.def
146
+ - ext/gio2/gemblem.c
147
+ - ext/gio2/gconverterinputstream.c
148
+ - ext/gio2/gthreadedsocketservice.c
149
+ has_rdoc: true
150
+ homepage: http://ruby-gnome2.sourceforge.jp/
151
+ licenses: []
152
+
153
+ post_install_message:
154
+ rdoc_options: []
155
+
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ hash: 3
164
+ segments:
165
+ - 0
166
+ version: "0"
167
+ required_rubygems_version: !ruby/object:Gem::Requirement
168
+ none: false
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ hash: 3
173
+ segments:
174
+ - 0
175
+ version: "0"
176
+ requirements: []
177
+
178
+ rubyforge_project:
179
+ rubygems_version: 1.3.7
180
+ signing_key:
181
+ specification_version: 3
182
+ summary: Ruby/GIO2 is a Ruby binding of gio-2.x.
183
+ test_files: []
184
+