gobject-introspection 2.0.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (268) hide show
  1. data/Rakefile +118 -0
  2. data/ext/gobject-introspection/depend +10 -0
  3. data/ext/gobject-introspection/extconf.rb +97 -0
  4. data/ext/gobject-introspection/gobject_introspection.def +5 -0
  5. data/ext/gobject-introspection/rb-gi-arg-info.c +151 -0
  6. data/ext/gobject-introspection/rb-gi-argument.c +1015 -0
  7. data/ext/gobject-introspection/rb-gi-base-info.c +218 -0
  8. data/ext/gobject-introspection/rb-gi-boxed-info.c +48 -0
  9. data/ext/gobject-introspection/rb-gi-callable-info.c +104 -0
  10. data/ext/gobject-introspection/rb-gi-callback-info.c +48 -0
  11. data/ext/gobject-introspection/rb-gi-constant-info.c +77 -0
  12. data/ext/gobject-introspection/rb-gi-constructor-info.c +120 -0
  13. data/ext/gobject-introspection/rb-gi-conversions.h +116 -0
  14. data/ext/gobject-introspection/rb-gi-enum-info.c +145 -0
  15. data/ext/gobject-introspection/rb-gi-field-info.c +153 -0
  16. data/ext/gobject-introspection/rb-gi-flags-info.c +48 -0
  17. data/ext/gobject-introspection/rb-gi-function-info.c +658 -0
  18. data/ext/gobject-introspection/rb-gi-interface-info.c +222 -0
  19. data/ext/gobject-introspection/rb-gi-loader.c +162 -0
  20. data/ext/gobject-introspection/rb-gi-method-info.c +109 -0
  21. data/ext/gobject-introspection/rb-gi-object-info.c +345 -0
  22. data/ext/gobject-introspection/rb-gi-private.h +110 -0
  23. data/ext/gobject-introspection/rb-gi-property-info.c +77 -0
  24. data/ext/gobject-introspection/rb-gi-registered-type-info.c +86 -0
  25. data/ext/gobject-introspection/rb-gi-repository.c +164 -0
  26. data/ext/gobject-introspection/rb-gi-signal-info.c +77 -0
  27. data/ext/gobject-introspection/rb-gi-struct-info.c +190 -0
  28. data/ext/gobject-introspection/rb-gi-type-info.c +143 -0
  29. data/ext/gobject-introspection/rb-gi-type-tag.c +43 -0
  30. data/ext/gobject-introspection/rb-gi-types.h +71 -0
  31. data/ext/gobject-introspection/rb-gi-union-info.c +206 -0
  32. data/ext/gobject-introspection/rb-gi-unresolved-info.c +48 -0
  33. data/ext/gobject-introspection/rb-gi-value-info.c +57 -0
  34. data/ext/gobject-introspection/rb-gi-vfunc-info.c +91 -0
  35. data/ext/gobject-introspection/rb-gobject-introspection.c +44 -0
  36. data/ext/gobject-introspection/rb-gobject-introspection.h +57 -0
  37. data/extconf.rb +71 -0
  38. data/lib/1.9/gobject_introspection.so +0 -0
  39. data/lib/2.0/gobject_introspection.so +0 -0
  40. data/lib/gobject-introspection.rb +52 -0
  41. data/lib/gobject-introspection/callable-info.rb +91 -0
  42. data/lib/gobject-introspection/collection-reader.rb +34 -0
  43. data/lib/gobject-introspection/interface-info.rb +32 -0
  44. data/lib/gobject-introspection/loader.rb +328 -0
  45. data/lib/gobject-introspection/object-info.rb +33 -0
  46. data/lib/gobject-introspection/repository.rb +32 -0
  47. data/lib/gobject-introspection/struct-info.rb +28 -0
  48. data/lib/gobject-introspection/union-info.rb +28 -0
  49. data/test/gobject-introspection-test-utils.rb +26 -0
  50. data/test/run-test.rb +45 -0
  51. data/test/test-arg-info.rb +68 -0
  52. data/test/test-base-info.rb +31 -0
  53. data/test/test-boxed-info.rb +21 -0
  54. data/test/test-callable-info.rb +49 -0
  55. data/test/test-callback-info.rb +29 -0
  56. data/test/test-constant-info.rb +24 -0
  57. data/test/test-enum-info.rb +56 -0
  58. data/test/test-field-type.rb +42 -0
  59. data/test/test-flags-info.rb +27 -0
  60. data/test/test-function-info.rb +37 -0
  61. data/test/test-interface-info.rb +97 -0
  62. data/test/test-loader.rb +30 -0
  63. data/test/test-object-info.rb +131 -0
  64. data/test/test-property-info.rb +38 -0
  65. data/test/test-registered-type-info.rb +35 -0
  66. data/test/test-repository.rb +59 -0
  67. data/test/test-signal-info.rb +37 -0
  68. data/test/test-struct-info.rb +57 -0
  69. data/test/test-type-info.rb +62 -0
  70. data/test/test-type-tag.rb +29 -0
  71. data/test/test-union-info.rb +21 -0
  72. data/test/test-value-info.rb +28 -0
  73. data/test/test-vfunc-info.rb +42 -0
  74. data/vendor/local/bin/g-ir-compiler.exe +0 -0
  75. data/vendor/local/bin/g-ir-generate.exe +0 -0
  76. data/vendor/local/bin/libgirepository-1.0-1.dll +0 -0
  77. data/vendor/local/include/gobject-introspection-1.0/giarginfo.h +52 -0
  78. data/vendor/local/include/gobject-introspection-1.0/gibaseinfo.h +89 -0
  79. data/vendor/local/include/gobject-introspection-1.0/gicallableinfo.h +74 -0
  80. data/vendor/local/include/gobject-introspection-1.0/giconstantinfo.h +46 -0
  81. data/vendor/local/include/gobject-introspection-1.0/gienuminfo.h +56 -0
  82. data/vendor/local/include/gobject-introspection-1.0/gifieldinfo.h +52 -0
  83. data/vendor/local/include/gobject-introspection-1.0/gifunctioninfo.h +77 -0
  84. data/vendor/local/include/gobject-introspection-1.0/giinterfaceinfo.h +68 -0
  85. data/vendor/local/include/gobject-introspection-1.0/giobjectinfo.h +137 -0
  86. data/vendor/local/include/gobject-introspection-1.0/gipropertyinfo.h +44 -0
  87. data/vendor/local/include/gobject-introspection-1.0/giregisteredtypeinfo.h +53 -0
  88. data/vendor/local/include/gobject-introspection-1.0/girepository.h +179 -0
  89. data/vendor/local/include/gobject-introspection-1.0/girffi.h +80 -0
  90. data/vendor/local/include/gobject-introspection-1.0/gisignalinfo.h +45 -0
  91. data/vendor/local/include/gobject-introspection-1.0/gistructinfo.h +53 -0
  92. data/vendor/local/include/gobject-introspection-1.0/gitypeinfo.h +56 -0
  93. data/vendor/local/include/gobject-introspection-1.0/gitypelib.h +55 -0
  94. data/vendor/local/include/gobject-introspection-1.0/gitypes.h +453 -0
  95. data/vendor/local/include/gobject-introspection-1.0/giunioninfo.h +57 -0
  96. data/vendor/local/include/gobject-introspection-1.0/givfuncinfo.h +56 -0
  97. data/vendor/local/lib/girepository-1.0/DBus-1.0.typelib +0 -0
  98. data/vendor/local/lib/girepository-1.0/DBusGLib-1.0.typelib +0 -0
  99. data/vendor/local/lib/girepository-1.0/GIRepository-2.0.typelib +0 -0
  100. data/vendor/local/lib/girepository-1.0/GL-1.0.typelib +0 -0
  101. data/vendor/local/lib/girepository-1.0/GLib-2.0.typelib +0 -0
  102. data/vendor/local/lib/girepository-1.0/GModule-2.0.typelib +0 -0
  103. data/vendor/local/lib/girepository-1.0/GObject-2.0.typelib +0 -0
  104. data/vendor/local/lib/girepository-1.0/Gio-2.0.typelib +0 -0
  105. data/vendor/local/lib/girepository-1.0/cairo-1.0.typelib +0 -0
  106. data/vendor/local/lib/girepository-1.0/fontconfig-2.0.typelib +0 -0
  107. data/vendor/local/lib/girepository-1.0/freetype2-2.0.typelib +0 -0
  108. data/vendor/local/lib/girepository-1.0/libxml2-2.0.typelib +0 -0
  109. data/vendor/local/lib/girepository-1.0/xfixes-4.0.typelib +0 -0
  110. data/vendor/local/lib/girepository-1.0/xft-2.0.typelib +0 -0
  111. data/vendor/local/lib/girepository-1.0/xlib-2.0.typelib +0 -0
  112. data/vendor/local/lib/girepository-1.0/xrandr-1.3.typelib +0 -0
  113. data/vendor/local/lib/gobject-introspection/giscanner/__init__.py +24 -0
  114. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyc +0 -0
  115. data/vendor/local/lib/gobject-introspection/giscanner/__init__.pyo +0 -0
  116. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.py +74 -0
  117. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyc +0 -0
  118. data/vendor/local/lib/gobject-introspection/giscanner/annotationmain.pyo +0 -0
  119. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.py +1204 -0
  120. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyc +0 -0
  121. data/vendor/local/lib/gobject-introspection/giscanner/annotationparser.pyo +0 -0
  122. data/vendor/local/lib/gobject-introspection/giscanner/ast.py +1100 -0
  123. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyc +0 -0
  124. data/vendor/local/lib/gobject-introspection/giscanner/ast.pyo +0 -0
  125. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.py +196 -0
  126. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyc +0 -0
  127. data/vendor/local/lib/gobject-introspection/giscanner/cachestore.pyo +0 -0
  128. data/vendor/local/lib/gobject-introspection/giscanner/codegen.py +140 -0
  129. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyc +0 -0
  130. data/vendor/local/lib/gobject-introspection/giscanner/codegen.pyo +0 -0
  131. data/vendor/local/lib/gobject-introspection/giscanner/docmain.py +60 -0
  132. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyc +0 -0
  133. data/vendor/local/lib/gobject-introspection/giscanner/docmain.pyo +0 -0
  134. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/class.tmpl +2 -0
  135. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/constructor.tmpl +1 -0
  136. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/default.tmpl +1 -0
  137. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/enum.tmpl +2 -0
  138. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/function.tmpl +61 -0
  139. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/method.tmpl +1 -0
  140. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/namespace.tmpl +1 -0
  141. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/property.tmpl +5 -0
  142. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/record.tmpl +1 -0
  143. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/signal.tmpl +5 -0
  144. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/C/vfunc.tmpl +4 -0
  145. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/class.tmpl +18 -0
  146. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/constructor.tmpl +1 -0
  147. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/default.tmpl +1 -0
  148. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/enum.tmpl +13 -0
  149. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/function.tmpl +48 -0
  150. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/method.tmpl +1 -0
  151. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/namespace.tmpl +2 -0
  152. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/property.tmpl +10 -0
  153. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/record.tmpl +2 -0
  154. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/signal.tmpl +37 -0
  155. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Gjs/vfunc.tmpl +27 -0
  156. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/class.tmpl +17 -0
  157. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/constructor.tmpl +1 -0
  158. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/default.tmpl +1 -0
  159. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/enum.tmpl +13 -0
  160. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/function.tmpl +53 -0
  161. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/method.tmpl +1 -0
  162. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/namespace.tmpl +2 -0
  163. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/property.tmpl +10 -0
  164. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/record.tmpl +2 -0
  165. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/signal.tmpl +42 -0
  166. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/Python/vfunc.tmpl +33 -0
  167. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/base.tmpl +29 -0
  168. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/class.tmpl +40 -0
  169. data/vendor/local/lib/gobject-introspection/giscanner/doctemplates/namespace.tmpl +19 -0
  170. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.py +635 -0
  171. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyc +0 -0
  172. data/vendor/local/lib/gobject-introspection/giscanner/docwriter.pyo +0 -0
  173. data/vendor/local/lib/gobject-introspection/giscanner/dumper.py +363 -0
  174. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyc +0 -0
  175. data/vendor/local/lib/gobject-introspection/giscanner/dumper.pyo +0 -0
  176. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.py +551 -0
  177. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyc +0 -0
  178. data/vendor/local/lib/gobject-introspection/giscanner/gdumpparser.pyo +0 -0
  179. data/vendor/local/lib/gobject-introspection/giscanner/girparser.py +581 -0
  180. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyc +0 -0
  181. data/vendor/local/lib/gobject-introspection/giscanner/girparser.pyo +0 -0
  182. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.py +584 -0
  183. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyc +0 -0
  184. data/vendor/local/lib/gobject-introspection/giscanner/girwriter.pyo +0 -0
  185. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.py +236 -0
  186. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyc +0 -0
  187. data/vendor/local/lib/gobject-introspection/giscanner/introspectablepass.pyo +0 -0
  188. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.py +76 -0
  189. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyc +0 -0
  190. data/vendor/local/lib/gobject-introspection/giscanner/libtoolimporter.pyo +0 -0
  191. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.py +1337 -0
  192. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyc +0 -0
  193. data/vendor/local/lib/gobject-introspection/giscanner/maintransformer.pyo +0 -0
  194. data/vendor/local/lib/gobject-introspection/giscanner/message.py +185 -0
  195. data/vendor/local/lib/gobject-introspection/giscanner/message.pyc +0 -0
  196. data/vendor/local/lib/gobject-introspection/giscanner/message.pyo +0 -0
  197. data/vendor/local/lib/gobject-introspection/giscanner/odict.py +50 -0
  198. data/vendor/local/lib/gobject-introspection/giscanner/odict.pyc +0 -0
  199. data/vendor/local/lib/gobject-introspection/giscanner/odict.pyo +0 -0
  200. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.py +497 -0
  201. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyc +0 -0
  202. data/vendor/local/lib/gobject-introspection/giscanner/scannermain.pyo +0 -0
  203. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.py +78 -0
  204. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyc +0 -0
  205. data/vendor/local/lib/gobject-introspection/giscanner/sectionparser.pyo +0 -0
  206. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.py +132 -0
  207. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyc +0 -0
  208. data/vendor/local/lib/gobject-introspection/giscanner/shlibs.pyo +0 -0
  209. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.py +324 -0
  210. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyc +0 -0
  211. data/vendor/local/lib/gobject-introspection/giscanner/sourcescanner.pyo +0 -0
  212. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.py +119 -0
  213. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyc +0 -0
  214. data/vendor/local/lib/gobject-introspection/giscanner/testcodegen.pyo +0 -0
  215. data/vendor/local/lib/gobject-introspection/giscanner/transformer.py +999 -0
  216. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyc +0 -0
  217. data/vendor/local/lib/gobject-introspection/giscanner/transformer.pyo +0 -0
  218. data/vendor/local/lib/gobject-introspection/giscanner/utils.py +141 -0
  219. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyc +0 -0
  220. data/vendor/local/lib/gobject-introspection/giscanner/utils.pyo +0 -0
  221. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.py +197 -0
  222. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyc +0 -0
  223. data/vendor/local/lib/gobject-introspection/giscanner/xmlwriter.pyo +0 -0
  224. data/vendor/local/lib/libgirepository-1.0.a +0 -0
  225. data/vendor/local/lib/libgirepository-1.0.dll.a +0 -0
  226. data/vendor/local/lib/libgirepository-1.0.la +41 -0
  227. data/vendor/local/lib/pkgconfig/gobject-introspection-1.0.pc +26 -0
  228. data/vendor/local/lib/pkgconfig/gobject-introspection-no-export-1.0.pc +23 -0
  229. data/vendor/local/share/aclocal/introspection.m4 +96 -0
  230. data/vendor/local/share/gir-1.0/DBus-1.0.gir +32 -0
  231. data/vendor/local/share/gir-1.0/DBusGLib-1.0.gir +18 -0
  232. data/vendor/local/share/gir-1.0/GIRepository-2.0.gir +3833 -0
  233. data/vendor/local/share/gir-1.0/GL-1.0.gir +31 -0
  234. data/vendor/local/share/gir-1.0/GLib-2.0.gir +44304 -0
  235. data/vendor/local/share/gir-1.0/GModule-2.0.gir +184 -0
  236. data/vendor/local/share/gir-1.0/GObject-2.0.gir +13947 -0
  237. data/vendor/local/share/gir-1.0/Gio-2.0.gir +73619 -0
  238. data/vendor/local/share/gir-1.0/cairo-1.0.gir +70 -0
  239. data/vendor/local/share/gir-1.0/fontconfig-2.0.gir +18 -0
  240. data/vendor/local/share/gir-1.0/freetype2-2.0.gir +22 -0
  241. data/vendor/local/share/gir-1.0/libxml2-2.0.gir +25 -0
  242. data/vendor/local/share/gir-1.0/xfixes-4.0.gir +10 -0
  243. data/vendor/local/share/gir-1.0/xft-2.0.gir +23 -0
  244. data/vendor/local/share/gir-1.0/xlib-2.0.gir +67 -0
  245. data/vendor/local/share/gir-1.0/xrandr-1.3.gir +16 -0
  246. data/vendor/local/share/gobject-introspection-1.0/Makefile.introspection +166 -0
  247. data/vendor/local/share/gobject-introspection-1.0/gdump.c +564 -0
  248. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.c +835 -0
  249. data/vendor/local/share/gobject-introspection-1.0/tests/annotation.h +198 -0
  250. data/vendor/local/share/gobject-introspection-1.0/tests/drawable.c +55 -0
  251. data/vendor/local/share/gobject-introspection-1.0/tests/drawable.h +33 -0
  252. data/vendor/local/share/gobject-introspection-1.0/tests/everything.c +1473 -0
  253. data/vendor/local/share/gobject-introspection-1.0/tests/everything.h +428 -0
  254. data/vendor/local/share/gobject-introspection-1.0/tests/foo.c +790 -0
  255. data/vendor/local/share/gobject-introspection-1.0/tests/foo.h +437 -0
  256. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.c +5256 -0
  257. data/vendor/local/share/gobject-introspection-1.0/tests/gimarshallingtests.h +1158 -0
  258. data/vendor/local/share/gobject-introspection-1.0/tests/regress.c +4009 -0
  259. data/vendor/local/share/gobject-introspection-1.0/tests/regress.h +944 -0
  260. data/vendor/local/share/gobject-introspection-1.0/tests/utility.c +45 -0
  261. data/vendor/local/share/gobject-introspection-1.0/tests/utility.h +95 -0
  262. data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.c +33 -0
  263. data/vendor/local/share/gobject-introspection-1.0/tests/warnlib.h +36 -0
  264. data/vendor/local/share/license/gobject-introspection/AUTHORS +9 -0
  265. data/vendor/local/share/license/gobject-introspection/COPYING +12 -0
  266. data/vendor/local/share/man/man1/g-ir-compiler.1 +51 -0
  267. data/vendor/local/share/man/man1/g-ir-generate.1 +29 -0
  268. metadata +343 -0
@@ -0,0 +1,77 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2012 Ruby-GNOME2 Project Team
4
+ *
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.
9
+ *
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.
14
+ *
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
+ */
20
+
21
+ #include "rb-gi-private.h"
22
+
23
+ #define RG_TARGET_NAMESPACE rb_cGIPropertyInfo
24
+ #define SELF(self) RVAL2GI_BASE_INFO(self)
25
+
26
+ GType
27
+ gi_property_info_get_type(void)
28
+ {
29
+ static GType type = 0;
30
+ if (type == 0) {
31
+ type = g_boxed_type_register_static("GIPropertyInfo",
32
+ (GBoxedCopyFunc)g_base_info_ref,
33
+ (GBoxedFreeFunc)g_base_info_unref);
34
+ }
35
+ return type;
36
+ }
37
+
38
+ static VALUE
39
+ rg_flags(VALUE self)
40
+ {
41
+ GIPropertyInfo *info;
42
+
43
+ info = SELF(self);
44
+ return INT2NUM(g_property_info_get_flags(info));
45
+ }
46
+
47
+ static VALUE
48
+ rg_type(VALUE self)
49
+ {
50
+ GIPropertyInfo *info;
51
+
52
+ info = SELF(self);
53
+ return GI_BASE_INFO2RVAL_WITH_UNREF(g_property_info_get_type(info));
54
+ }
55
+
56
+ static VALUE
57
+ rg_ownership_transfer(VALUE self)
58
+ {
59
+ GIPropertyInfo *info;
60
+
61
+ info = SELF(self);
62
+ return GI_TRANSFER2RVAL(g_property_info_get_ownership_transfer(info));
63
+ }
64
+
65
+ void
66
+ rb_gi_property_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
67
+ {
68
+ VALUE RG_TARGET_NAMESPACE;
69
+
70
+ RG_TARGET_NAMESPACE =
71
+ G_DEF_CLASS_WITH_PARENT(GI_TYPE_PROPERTY_INFO, "PropertyInfo", rb_mGI,
72
+ rb_cGICallableInfo);
73
+
74
+ RG_DEF_METHOD(flags, 0);
75
+ RG_DEF_METHOD(type, 0);
76
+ RG_DEF_METHOD(ownership_transfer, 0);
77
+ }
@@ -0,0 +1,86 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2012 Ruby-GNOME2 Project Team
4
+ *
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.
9
+ *
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.
14
+ *
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
+ */
20
+
21
+ #include "rb-gi-private.h"
22
+
23
+ #define RG_TARGET_NAMESPACE rb_cGIRegisteredTypeInfo
24
+ #define SELF(self) (RVAL2GI_REGISTERED_TYPE_INFO(self))
25
+
26
+ GType
27
+ gi_registered_type_info_get_type(void)
28
+ {
29
+ static GType type = 0;
30
+ if (type == 0) {
31
+ type = g_boxed_type_register_static("GIRegisteredTypeInfo",
32
+ (GBoxedCopyFunc)g_base_info_ref,
33
+ (GBoxedFreeFunc)g_base_info_unref);
34
+ }
35
+ return type;
36
+ }
37
+
38
+ static VALUE
39
+ rg_type_name(VALUE self)
40
+ {
41
+ GIRegisteredTypeInfo *info;
42
+
43
+ info = SELF(self);
44
+ return CSTR2RVAL(g_registered_type_info_get_type_name(info));
45
+ }
46
+
47
+ static VALUE
48
+ rg_type_init(VALUE self)
49
+ {
50
+ GIRegisteredTypeInfo *info;
51
+
52
+ info = SELF(self);
53
+ return CSTR2RVAL(g_registered_type_info_get_type_init(info));
54
+ }
55
+
56
+ static VALUE
57
+ rg_gtype(VALUE self)
58
+ {
59
+ GIRegisteredTypeInfo *info;
60
+
61
+ info = SELF(self);
62
+ return rbgobj_gtype_new(g_registered_type_info_get_g_type(info));
63
+ }
64
+
65
+ void
66
+ rb_gi_registered_type_info_init(VALUE rb_mGI, VALUE rb_cGIBaseInfo)
67
+ {
68
+ VALUE RG_TARGET_NAMESPACE;
69
+
70
+ RG_TARGET_NAMESPACE =
71
+ G_DEF_CLASS_WITH_PARENT(GI_TYPE_REGISTERED_TYPE_INFO,
72
+ "RegisteredTypeInfo",
73
+ rb_mGI,
74
+ rb_cGIBaseInfo);
75
+
76
+ RG_DEF_METHOD(type_name, 0);
77
+ RG_DEF_METHOD(type_init, 0);
78
+ RG_DEF_METHOD(gtype, 0);
79
+
80
+ rb_gi_struct_info_init(rb_mGI, RG_TARGET_NAMESPACE);
81
+ rb_gi_boxed_info_init(rb_mGI, RG_TARGET_NAMESPACE);
82
+ rb_gi_enum_info_init(rb_mGI, RG_TARGET_NAMESPACE);
83
+ rb_gi_object_info_init(rb_mGI, RG_TARGET_NAMESPACE);
84
+ rb_gi_interface_info_init(rb_mGI, RG_TARGET_NAMESPACE);
85
+ rb_gi_union_info_init(rb_mGI, RG_TARGET_NAMESPACE);
86
+ }
@@ -0,0 +1,164 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2012 Ruby-GNOME2 Project Team
4
+ *
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.
9
+ *
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.
14
+ *
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
+ */
20
+
21
+ #include "rb-gi-private.h"
22
+
23
+ #define RG_TARGET_NAMESPACE rb_cGIRepository
24
+ #define SELF(self) RVAL2GI_REPOSITORY(self)
25
+
26
+ static VALUE
27
+ rg_s_default(G_GNUC_UNUSED VALUE klass)
28
+ {
29
+ return GOBJ2RVAL(g_irepository_get_default());
30
+ }
31
+
32
+ static VALUE
33
+ rg_require(int argc, VALUE *argv, VALUE self)
34
+ {
35
+ VALUE rb_namespace, rb_version, rb_flags;
36
+ const gchar *namespace_, *version;
37
+ GIRepositoryLoadFlags flags = 0;
38
+ GError *error = NULL;
39
+
40
+ rb_scan_args(argc, argv, "12", &rb_namespace, &rb_version, &rb_flags);
41
+
42
+ namespace_ = RVAL2CSTR(rb_namespace);
43
+ version = RVAL2CSTR_ACCEPT_NIL(rb_version);
44
+ if (!NIL_P(rb_flags)) {
45
+ flags = RVAL2GI_REPOSITORY_LOAD_FLAGS(rb_flags);
46
+ }
47
+
48
+ g_irepository_require(SELF(self), namespace_, version, flags, &error);
49
+ if (error) {
50
+ RG_RAISE_ERROR(error);
51
+ }
52
+
53
+ return Qnil;
54
+ }
55
+
56
+ static VALUE
57
+ rg_get_dependencies(VALUE self, VALUE rb_namespace)
58
+ {
59
+ GIRepository *repository;
60
+ const gchar *namespace_;
61
+ VALUE rb_dependencies;
62
+ gchar **dependencies;
63
+ gint i;
64
+
65
+ repository = SELF(self);
66
+ namespace_ = RVAL2CSTR(rb_namespace);
67
+ dependencies = g_irepository_get_dependencies(repository, namespace_);
68
+ rb_dependencies = rb_ary_new();
69
+ for (i = 0; dependencies[i]; i++) {
70
+ rb_ary_push(rb_dependencies, CSTR2RVAL(dependencies[i]));
71
+ }
72
+ g_strfreev(dependencies);
73
+
74
+ return rb_dependencies;
75
+ }
76
+
77
+ static VALUE
78
+ rg_loaded_namespaces(VALUE self)
79
+ {
80
+ GIRepository *repository;
81
+ VALUE rb_namespaces;
82
+ gchar **namespaces;
83
+ gint i;
84
+
85
+ repository = SELF(self);
86
+ namespaces = g_irepository_get_loaded_namespaces(repository);
87
+ rb_namespaces = rb_ary_new();
88
+ for (i = 0; namespaces[i]; i++) {
89
+ rb_ary_push(rb_namespaces, CSTR2RVAL(namespaces[i]));
90
+ }
91
+ g_strfreev(namespaces);
92
+
93
+ return rb_namespaces;
94
+ }
95
+
96
+ static VALUE
97
+ rg_get_n_infos(VALUE self, VALUE rb_namespace)
98
+ {
99
+ const gchar *namespace_;
100
+ gint n_infos;
101
+
102
+ namespace_ = RVAL2CSTR(rb_namespace);
103
+ n_infos = g_irepository_get_n_infos(SELF(self), namespace_);
104
+
105
+ return INT2NUM(n_infos);
106
+ }
107
+
108
+ static VALUE
109
+ rg_get_info(VALUE self, VALUE rb_namespace, VALUE rb_n)
110
+ {
111
+ GIRepository *repository;
112
+ const gchar *namespace_;
113
+ gint n;
114
+ GIBaseInfo *info;
115
+
116
+ repository = SELF(self);
117
+ namespace_ = RVAL2CSTR(rb_namespace);
118
+ n = NUM2INT(rb_n);
119
+ info = g_irepository_get_info(repository, namespace_, n);
120
+ return GI_BASE_INFO2RVAL_WITH_UNREF(info);
121
+ }
122
+
123
+ static VALUE
124
+ rg_find(int argc, VALUE *argv, VALUE self)
125
+ {
126
+ GIBaseInfo *info;
127
+
128
+ if (argc == 1) {
129
+ VALUE rb_gtype;
130
+ GType gtype;
131
+ rb_gtype = argv[0];
132
+ gtype = NUM2UINT(rb_gtype);
133
+ info = g_irepository_find_by_gtype(SELF(self), gtype);
134
+ } else {
135
+ VALUE rb_namespace, rb_name;
136
+ const gchar *namespace_, *name;
137
+
138
+ rb_scan_args(argc, argv, "2", &rb_namespace, &rb_name);
139
+ namespace_ = RVAL2CSTR(rb_namespace);
140
+ name = RVAL2CSTR(rb_name);
141
+ info = g_irepository_find_by_name(SELF(self), namespace_, name);
142
+ }
143
+
144
+ return GI_BASE_INFO2RVAL(info);
145
+ }
146
+
147
+ void
148
+ rb_gi_repository_init(VALUE rb_mGI)
149
+ {
150
+ VALUE RG_TARGET_NAMESPACE;
151
+
152
+ RG_TARGET_NAMESPACE = G_DEF_CLASS(G_TYPE_IREPOSITORY, "Repository", rb_mGI);
153
+
154
+ RG_DEF_SMETHOD(default, 0);
155
+ RG_DEF_METHOD(require, -1);
156
+ RG_DEF_METHOD(get_dependencies, 1);
157
+ RG_DEF_METHOD(loaded_namespaces, 0);
158
+ RG_DEF_METHOD(get_n_infos, 1);
159
+ RG_DEF_METHOD(get_info, 2);
160
+ RG_DEF_METHOD(find, -1);
161
+
162
+ G_DEF_CLASS(G_TYPE_I_REPOSITORY_LOAD_FLAGS, "RepositoryLoadFlags", rb_mGI);
163
+ G_DEF_CLASS(G_TYPE_I_REPOSITORY_ERROR, "RepositoryError", rb_mGI);
164
+ }
@@ -0,0 +1,77 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2012 Ruby-GNOME2 Project Team
4
+ *
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.
9
+ *
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.
14
+ *
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
+ */
20
+
21
+ #include "rb-gi-private.h"
22
+
23
+ #define RG_TARGET_NAMESPACE rb_cGISignalInfo
24
+ #define SELF(self) RVAL2GI_BASE_INFO(self)
25
+
26
+ GType
27
+ gi_signal_info_get_type(void)
28
+ {
29
+ static GType type = 0;
30
+ if (type == 0) {
31
+ type = g_boxed_type_register_static("GISignalInfo",
32
+ (GBoxedCopyFunc)g_base_info_ref,
33
+ (GBoxedFreeFunc)g_base_info_unref);
34
+ }
35
+ return type;
36
+ }
37
+
38
+ static VALUE
39
+ rg_flags(VALUE self)
40
+ {
41
+ GISignalInfo *info;
42
+
43
+ info = SELF(self);
44
+ return GI_SIGNAL_FLAGS2RVAL(g_signal_info_get_flags(info));
45
+ }
46
+
47
+ static VALUE
48
+ rg_class_closure(VALUE self)
49
+ {
50
+ GISignalInfo *info;
51
+
52
+ info = SELF(self);
53
+ return GI_BASE_INFO2RVAL_WITH_UNREF(g_signal_info_get_class_closure(info));
54
+ }
55
+
56
+ static VALUE
57
+ rg_true_stops_emit_p(VALUE self)
58
+ {
59
+ GISignalInfo *info;
60
+
61
+ info = SELF(self);
62
+ return CBOOL2RVAL(g_signal_info_true_stops_emit(info));
63
+ }
64
+
65
+ void
66
+ rb_gi_signal_info_init(VALUE rb_mGI, VALUE rb_cGICallableInfo)
67
+ {
68
+ VALUE RG_TARGET_NAMESPACE;
69
+
70
+ RG_TARGET_NAMESPACE =
71
+ G_DEF_CLASS_WITH_PARENT(GI_TYPE_SIGNAL_INFO, "SignalInfo", rb_mGI,
72
+ rb_cGICallableInfo);
73
+
74
+ RG_DEF_METHOD(flags, 0);
75
+ RG_DEF_METHOD(class_closure, 0);
76
+ RG_DEF_METHOD_P(true_stops_emit, 0);
77
+ }
@@ -0,0 +1,190 @@
1
+ /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Copyright (C) 2012-2013 Ruby-GNOME2 Project Team
4
+ *
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.
9
+ *
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.
14
+ *
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
+ */
20
+
21
+ #include "rb-gi-private.h"
22
+
23
+ #define RG_TARGET_NAMESPACE rb_cGIStructInfo
24
+ #define SELF(self) (RVAL2GI_STRUCT_INFO(self))
25
+
26
+ GType
27
+ gi_struct_info_get_type(void)
28
+ {
29
+ static GType type = 0;
30
+ if (type == 0) {
31
+ type = g_boxed_type_register_static("GIStructInfo",
32
+ (GBoxedCopyFunc)g_base_info_ref,
33
+ (GBoxedFreeFunc)g_base_info_unref);
34
+ }
35
+ return type;
36
+ }
37
+
38
+ static VALUE
39
+ rg_n_fields(VALUE self)
40
+ {
41
+ GIStructInfo *info;
42
+
43
+ info = SELF(self);
44
+ return INT2NUM(g_struct_info_get_n_fields(info));
45
+ }
46
+
47
+ static VALUE
48
+ rg_get_field(VALUE self, VALUE rb_n)
49
+ {
50
+ GIStructInfo *info;
51
+ gint n;
52
+
53
+ info = SELF(self);
54
+ n = NUM2INT(rb_n);
55
+ return GI_BASE_INFO2RVAL_WITH_UNREF(g_struct_info_get_field(info, n));
56
+ }
57
+
58
+ static VALUE
59
+ rg_get_field_value(VALUE self, VALUE rb_struct, VALUE rb_n)
60
+ {
61
+ GIStructInfo *info;
62
+ gint n;
63
+ GIFieldInfo *field_info;
64
+ VALUE rb_value;
65
+ gpointer instance;
66
+
67
+ info = SELF(self);
68
+ n = NUM2INT(rb_n);
69
+ field_info = g_struct_info_get_field(info, n);
70
+ if (rb_respond_to(rb_struct, rb_intern("gtype"))) {
71
+ VALUE rb_gtype;
72
+ GType gtype;
73
+ rb_gtype = rb_funcall(rb_struct, rb_intern("gtype"), 0);
74
+ gtype = NUM2UINT(rb_funcall(rb_gtype, rb_intern("to_i"), 0));
75
+ instance = RVAL2BOXED(rb_struct, gtype);
76
+ } else {
77
+ Data_Get_Struct(rb_struct, void, instance);
78
+ }
79
+ rb_value = rb_gi_field_info_get_field_raw(field_info, instance);
80
+ g_base_info_unref(field_info);
81
+
82
+ return rb_value;
83
+ }
84
+
85
+ static VALUE
86
+ rg_set_field_value(VALUE self, VALUE rb_struct, VALUE rb_n, VALUE rb_value)
87
+ {
88
+ GIStructInfo *info;
89
+ gint n;
90
+ GIFieldInfo *field_info;
91
+ GType gtype;
92
+
93
+ info = SELF(self);
94
+ n = NUM2INT(rb_n);
95
+ field_info = g_struct_info_get_field(info, n);
96
+ gtype = g_registered_type_info_get_g_type(info);
97
+ rb_gi_field_info_set_field_raw(field_info,
98
+ RVAL2BOXED(rb_struct, gtype),
99
+ rb_value);
100
+ /* TODO: use rb_ensure() to unref field_info. */
101
+ g_base_info_unref(field_info);
102
+
103
+ return Qnil;
104
+ }
105
+
106
+ static VALUE
107
+ rg_n_methods(VALUE self)
108
+ {
109
+ GIStructInfo *info;
110
+
111
+ info = SELF(self);
112
+ return INT2NUM(g_struct_info_get_n_methods(info));
113
+ }
114
+
115
+ static VALUE
116
+ rg_get_method(VALUE self, VALUE rb_n_or_name)
117
+ {
118
+ GIStructInfo *info;
119
+ GIFunctionInfo *function_info;
120
+
121
+ info = SELF(self);
122
+ if (RB_TYPE_P(rb_n_or_name, RUBY_T_FIXNUM)) {
123
+ gint n;
124
+ n = NUM2INT(rb_n_or_name);
125
+ function_info = g_struct_info_get_method(info, n);
126
+ } else {
127
+ const gchar *name;
128
+ name = RVAL2CSTR(rb_n_or_name);
129
+ function_info = g_struct_info_find_method(info, name);
130
+ }
131
+
132
+ return GI_BASE_INFO2RVAL_WITH_UNREF(function_info);
133
+ }
134
+
135
+ static VALUE
136
+ rg_size(VALUE self)
137
+ {
138
+ GIStructInfo *info;
139
+
140
+ info = SELF(self);
141
+ return UINT2NUM(g_struct_info_get_size(info));
142
+ }
143
+
144
+ static VALUE
145
+ rg_alignment(VALUE self)
146
+ {
147
+ GIStructInfo *info;
148
+
149
+ info = SELF(self);
150
+ return UINT2NUM(g_struct_info_get_alignment(info));
151
+ }
152
+
153
+ static VALUE
154
+ rg_gtype_struct_p(VALUE self)
155
+ {
156
+ GIStructInfo *info;
157
+
158
+ info = SELF(self);
159
+ return CBOOL2RVAL(g_struct_info_is_gtype_struct(info));
160
+ }
161
+
162
+ static VALUE
163
+ rg_foreign_p(VALUE self)
164
+ {
165
+ GIStructInfo *info;
166
+
167
+ info = SELF(self);
168
+ return CBOOL2RVAL(g_struct_info_is_foreign(info));
169
+ }
170
+
171
+ void
172
+ rb_gi_struct_info_init(VALUE rb_mGI, VALUE rb_cGIRegisteredTypeInfo)
173
+ {
174
+ VALUE RG_TARGET_NAMESPACE;
175
+
176
+ RG_TARGET_NAMESPACE =
177
+ G_DEF_CLASS_WITH_PARENT(GI_TYPE_STRUCT_INFO, "StructInfo", rb_mGI,
178
+ rb_cGIRegisteredTypeInfo);
179
+
180
+ RG_DEF_METHOD(n_fields, 0);
181
+ RG_DEF_METHOD(get_field, 1);
182
+ RG_DEF_METHOD(get_field_value, 2);
183
+ RG_DEF_METHOD(set_field_value, 3);
184
+ RG_DEF_METHOD(n_methods, 0);
185
+ RG_DEF_METHOD(get_method, 1);
186
+ RG_DEF_METHOD(size, 0);
187
+ RG_DEF_METHOD(alignment, 0);
188
+ RG_DEF_METHOD_P(gtype_struct, 0);
189
+ RG_DEF_METHOD_P(foreign, 0);
190
+ }