rho-tau-extensions 5.5.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (661) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +2 -0
  3. data/LICENSE +21 -0
  4. data/README.md +6 -0
  5. data/Rakefile +90 -0
  6. data/libs/crosswalk.rb +2 -0
  7. data/libs/crosswalk/crosswalk.rb +2 -0
  8. data/libs/crosswalk/ext.yml +21 -0
  9. data/libs/crosswalk/ext/Crosswalk.xml +27 -0
  10. data/libs/crosswalk/ext/build +19 -0
  11. data/libs/crosswalk/ext/build.bat +29 -0
  12. data/libs/crosswalk/ext/platform/android/AndroidManifest.xml +9 -0
  13. data/libs/crosswalk/ext/platform/android/Rakefile +141 -0
  14. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkcore.so +0 -0
  15. data/libs/crosswalk/ext/platform/android/adds/lib/armeabi/libxwalkdummy.so +0 -0
  16. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkcore.so +0 -0
  17. data/libs/crosswalk/ext/platform/android/adds/lib/x86/libxwalkdummy.so +0 -0
  18. data/libs/crosswalk/ext/platform/android/adds/lib/xwalk_core_library_java.jar +0 -0
  19. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/bubble.9.png +0 -0
  20. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/bubble_arrow_up.png +0 -0
  21. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/color_picker_advanced_select_handle.png +0 -0
  22. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/crosswalk.png +0 -0
  23. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/dropdown_popup_background_down.9.png +0 -0
  24. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/dropdown_popup_background_up.9.png +0 -0
  25. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_menu_share_holo_light.png +0 -0
  26. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_search.png +0 -0
  27. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ic_warning.png +0 -0
  28. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/ondemand_overlay.9.png +0 -0
  29. data/libs/crosswalk/ext/platform/android/adds/res/drawable-hdpi/verify_checkmark.png +0 -0
  30. data/libs/crosswalk/ext/platform/android/adds/res/drawable-ldpi/crosswalk.png +0 -0
  31. data/libs/crosswalk/ext/platform/android/adds/res/drawable-mdpi/crosswalk.png +0 -0
  32. data/libs/crosswalk/ext/platform/android/adds/res/drawable-v21/button_borderless_compat.xml +10 -0
  33. data/libs/crosswalk/ext/platform/android/adds/res/drawable-v21/button_compat.xml +9 -0
  34. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/bubble.9.png +0 -0
  35. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/bubble_arrow_up.png +0 -0
  36. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/color_picker_advanced_select_handle.png +0 -0
  37. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/crosswalk.png +0 -0
  38. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/dropdown_popup_background_down.9.png +0 -0
  39. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/dropdown_popup_background_up.9.png +0 -0
  40. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_menu_share_holo_light.png +0 -0
  41. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_search.png +0 -0
  42. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ic_warning.png +0 -0
  43. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/ondemand_overlay.9.png +0 -0
  44. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xhdpi/verify_checkmark.png +0 -0
  45. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_menu_share_holo_light.png +0 -0
  46. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_search.png +0 -0
  47. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/ic_warning.png +0 -0
  48. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxhdpi/verify_checkmark.png +0 -0
  49. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_menu_share_holo_light.png +0 -0
  50. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_search.png +0 -0
  51. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/ic_warning.png +0 -0
  52. data/libs/crosswalk/ext/platform/android/adds/res/drawable-xxxhdpi/verify_checkmark.png +0 -0
  53. data/libs/crosswalk/ext/platform/android/adds/res/drawable/autofill_chip_inset.xml +15 -0
  54. data/libs/crosswalk/ext/platform/android/adds/res/drawable/bubble.9.png +0 -0
  55. data/libs/crosswalk/ext/platform/android/adds/res/drawable/bubble_arrow_up.png +0 -0
  56. data/libs/crosswalk/ext/platform/android/adds/res/drawable/button_compat_shape.xml +9 -0
  57. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_button_background.xml +36 -0
  58. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_picker_advanced_select_handle.png +0 -0
  59. data/libs/crosswalk/ext/platform/android/adds/res/drawable/color_picker_border.xml +12 -0
  60. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_label_color.xml +11 -0
  61. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background.xml +13 -0
  62. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background_down.9.png +0 -0
  63. data/libs/crosswalk/ext/platform/android/adds/res/drawable/dropdown_popup_background_up.9.png +0 -0
  64. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_menu_share_holo_light.png +0 -0
  65. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_search.png +0 -0
  66. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ic_warning.png +0 -0
  67. data/libs/crosswalk/ext/platform/android/adds/res/drawable/launchscreen_bg.xml +19 -0
  68. data/libs/crosswalk/ext/platform/android/adds/res/drawable/ondemand_overlay.9.png +0 -0
  69. data/libs/crosswalk/ext/platform/android/adds/res/drawable/verify_checkmark.png +0 -0
  70. data/libs/crosswalk/ext/platform/android/adds/res/layout-land/date_time_picker_dialog.xml +42 -0
  71. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_keyboard_accessory_item.xml +40 -0
  72. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/autofill_suggestion_item.xml +18 -0
  73. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_advanced_component.xml +46 -0
  74. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_dialog_content.xml +51 -0
  75. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/color_picker_dialog_title.xml +41 -0
  76. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/date_time_suggestion.xml +35 -0
  77. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/dropdown_item.xml +58 -0
  78. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/multi_field_time_picker_dialog.xml +122 -0
  79. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/two_field_date_picker.xml +38 -0
  80. data/libs/crosswalk/ext/platform/android/adds/res/layout-v17/validation_message_bubble.xml +72 -0
  81. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_keyboard_accessory_icon.xml +13 -0
  82. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_keyboard_accessory_item.xml +17 -0
  83. data/libs/crosswalk/ext/platform/android/adds/res/layout/autofill_suggestion_item.xml +7 -0
  84. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_advanced_component.xml +30 -0
  85. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_dialog_content.xml +36 -0
  86. data/libs/crosswalk/ext/platform/android/adds/res/layout/color_picker_dialog_title.xml +25 -0
  87. data/libs/crosswalk/ext/platform/android/adds/res/layout/date_time_picker_dialog.xml +42 -0
  88. data/libs/crosswalk/ext/platform/android/adds/res/layout/date_time_suggestion.xml +16 -0
  89. data/libs/crosswalk/ext/platform/android/adds/res/layout/dropdown_item.xml +34 -0
  90. data/libs/crosswalk/ext/platform/android/adds/res/layout/multi_field_time_picker_dialog.xml +50 -0
  91. data/libs/crosswalk/ext/platform/android/adds/res/layout/two_field_date_picker.xml +26 -0
  92. data/libs/crosswalk/ext/platform/android/adds/res/layout/validation_message_bubble.xml +47 -0
  93. data/libs/crosswalk/ext/platform/android/adds/res/menu/select_action_menu.xml +54 -0
  94. data/libs/crosswalk/ext/platform/android/adds/res/raw/contacts_api.js +206 -0
  95. data/libs/crosswalk/ext/platform/android/adds/res/raw/device_capabilities_api.js +231 -0
  96. data/libs/crosswalk/ext/platform/android/adds/res/raw/empty.wav +0 -0
  97. data/libs/crosswalk/ext/platform/android/adds/res/raw/icudtl.dat +0 -0
  98. data/libs/crosswalk/ext/platform/android/adds/res/raw/launch_screen_api.js +9 -0
  99. data/libs/crosswalk/ext/platform/android/adds/res/raw/messaging_api.js +359 -0
  100. data/libs/crosswalk/ext/platform/android/adds/res/raw/presentation_api.js +144 -0
  101. data/libs/crosswalk/ext/platform/android/adds/res/raw/wifidirect_api.js +227 -0
  102. data/libs/crosswalk/ext/platform/android/adds/res/raw/xwalk.pak +0 -0
  103. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_content_strings.xml +15 -0
  104. data/libs/crosswalk/ext/platform/android/adds/res/values-am/android_ui_strings.xml +47 -0
  105. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_content_strings.xml +15 -0
  106. data/libs/crosswalk/ext/platform/android/adds/res/values-ar/android_ui_strings.xml +47 -0
  107. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_content_strings.xml +15 -0
  108. data/libs/crosswalk/ext/platform/android/adds/res/values-bg/android_ui_strings.xml +47 -0
  109. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_content_strings.xml +15 -0
  110. data/libs/crosswalk/ext/platform/android/adds/res/values-ca/android_ui_strings.xml +47 -0
  111. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_content_strings.xml +15 -0
  112. data/libs/crosswalk/ext/platform/android/adds/res/values-cs/android_ui_strings.xml +47 -0
  113. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_content_strings.xml +15 -0
  114. data/libs/crosswalk/ext/platform/android/adds/res/values-da/android_ui_strings.xml +47 -0
  115. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_content_strings.xml +15 -0
  116. data/libs/crosswalk/ext/platform/android/adds/res/values-de/android_ui_strings.xml +47 -0
  117. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_content_strings.xml +15 -0
  118. data/libs/crosswalk/ext/platform/android/adds/res/values-el/android_ui_strings.xml +47 -0
  119. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_content_strings.xml +15 -0
  120. data/libs/crosswalk/ext/platform/android/adds/res/values-en-rGB/android_ui_strings.xml +47 -0
  121. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_content_strings.xml +15 -0
  122. data/libs/crosswalk/ext/platform/android/adds/res/values-es-rUS/android_ui_strings.xml +47 -0
  123. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_content_strings.xml +15 -0
  124. data/libs/crosswalk/ext/platform/android/adds/res/values-es/android_ui_strings.xml +47 -0
  125. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_content_strings.xml +15 -0
  126. data/libs/crosswalk/ext/platform/android/adds/res/values-fa/android_ui_strings.xml +47 -0
  127. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_content_strings.xml +15 -0
  128. data/libs/crosswalk/ext/platform/android/adds/res/values-fi/android_ui_strings.xml +47 -0
  129. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_content_strings.xml +15 -0
  130. data/libs/crosswalk/ext/platform/android/adds/res/values-fr/android_ui_strings.xml +47 -0
  131. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_content_strings.xml +15 -0
  132. data/libs/crosswalk/ext/platform/android/adds/res/values-hi/android_ui_strings.xml +47 -0
  133. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_content_strings.xml +15 -0
  134. data/libs/crosswalk/ext/platform/android/adds/res/values-hr/android_ui_strings.xml +47 -0
  135. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_content_strings.xml +15 -0
  136. data/libs/crosswalk/ext/platform/android/adds/res/values-hu/android_ui_strings.xml +47 -0
  137. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_content_strings.xml +15 -0
  138. data/libs/crosswalk/ext/platform/android/adds/res/values-in/android_ui_strings.xml +47 -0
  139. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_content_strings.xml +15 -0
  140. data/libs/crosswalk/ext/platform/android/adds/res/values-it/android_ui_strings.xml +47 -0
  141. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_content_strings.xml +15 -0
  142. data/libs/crosswalk/ext/platform/android/adds/res/values-iw/android_ui_strings.xml +47 -0
  143. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_content_strings.xml +15 -0
  144. data/libs/crosswalk/ext/platform/android/adds/res/values-ja/android_ui_strings.xml +47 -0
  145. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_content_strings.xml +15 -0
  146. data/libs/crosswalk/ext/platform/android/adds/res/values-ko/android_ui_strings.xml +47 -0
  147. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_content_strings.xml +15 -0
  148. data/libs/crosswalk/ext/platform/android/adds/res/values-lt/android_ui_strings.xml +47 -0
  149. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_content_strings.xml +15 -0
  150. data/libs/crosswalk/ext/platform/android/adds/res/values-lv/android_ui_strings.xml +47 -0
  151. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_content_strings.xml +15 -0
  152. data/libs/crosswalk/ext/platform/android/adds/res/values-nb/android_ui_strings.xml +47 -0
  153. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_content_strings.xml +15 -0
  154. data/libs/crosswalk/ext/platform/android/adds/res/values-nl/android_ui_strings.xml +47 -0
  155. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_content_strings.xml +15 -0
  156. data/libs/crosswalk/ext/platform/android/adds/res/values-pl/android_ui_strings.xml +47 -0
  157. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_content_strings.xml +15 -0
  158. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rBR/android_ui_strings.xml +47 -0
  159. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_content_strings.xml +15 -0
  160. data/libs/crosswalk/ext/platform/android/adds/res/values-pt-rPT/android_ui_strings.xml +47 -0
  161. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_content_strings.xml +15 -0
  162. data/libs/crosswalk/ext/platform/android/adds/res/values-ro/android_ui_strings.xml +47 -0
  163. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_content_strings.xml +15 -0
  164. data/libs/crosswalk/ext/platform/android/adds/res/values-ru/android_ui_strings.xml +47 -0
  165. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_content_strings.xml +15 -0
  166. data/libs/crosswalk/ext/platform/android/adds/res/values-sk/android_ui_strings.xml +47 -0
  167. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_content_strings.xml +15 -0
  168. data/libs/crosswalk/ext/platform/android/adds/res/values-sl/android_ui_strings.xml +47 -0
  169. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_content_strings.xml +15 -0
  170. data/libs/crosswalk/ext/platform/android/adds/res/values-sr/android_ui_strings.xml +47 -0
  171. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_content_strings.xml +15 -0
  172. data/libs/crosswalk/ext/platform/android/adds/res/values-sv/android_ui_strings.xml +47 -0
  173. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_content_strings.xml +15 -0
  174. data/libs/crosswalk/ext/platform/android/adds/res/values-sw/android_ui_strings.xml +47 -0
  175. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_content_strings.xml +15 -0
  176. data/libs/crosswalk/ext/platform/android/adds/res/values-th/android_ui_strings.xml +47 -0
  177. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_content_strings.xml +15 -0
  178. data/libs/crosswalk/ext/platform/android/adds/res/values-tl/android_ui_strings.xml +47 -0
  179. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_content_strings.xml +15 -0
  180. data/libs/crosswalk/ext/platform/android/adds/res/values-tr/android_ui_strings.xml +47 -0
  181. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_content_strings.xml +15 -0
  182. data/libs/crosswalk/ext/platform/android/adds/res/values-uk/android_ui_strings.xml +47 -0
  183. data/libs/crosswalk/ext/platform/android/adds/res/values-v14/theme.xml +16 -0
  184. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/styles.xml +19 -0
  185. data/libs/crosswalk/ext/platform/android/adds/res/values-v17/ui_java_styles.xml +41 -0
  186. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/styles.xml +14 -0
  187. data/libs/crosswalk/ext/platform/android/adds/res/values-v21/ui_java_styles.xml +14 -0
  188. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_content_strings.xml +15 -0
  189. data/libs/crosswalk/ext/platform/android/adds/res/values-vi/android_ui_strings.xml +47 -0
  190. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_content_strings.xml +15 -0
  191. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rCN/android_ui_strings.xml +47 -0
  192. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_content_strings.xml +15 -0
  193. data/libs/crosswalk/ext/platform/android/adds/res/values-zh-rTW/android_ui_strings.xml +47 -0
  194. data/libs/crosswalk/ext/platform/android/adds/res/values/android_content_strings.xml +15 -0
  195. data/libs/crosswalk/ext/platform/android/adds/res/values/android_ui_strings.xml +47 -0
  196. data/libs/crosswalk/ext/platform/android/adds/res/values/android_xwalk_strings.xml +17 -0
  197. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_attrs.xml +9 -0
  198. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_dimens.xml +31 -0
  199. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_strings.xml +16 -0
  200. data/libs/crosswalk/ext/platform/android/adds/res/values/ui_java_styles.xml +101 -0
  201. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_app_strings.xml +28 -0
  202. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_attrs.xml +11 -0
  203. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_colors.xml +13 -0
  204. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_core_internal_java_strings.xml +16 -0
  205. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_core_java_strings.xml +16 -0
  206. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_dimens.xml +11 -0
  207. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_resources_list.xml +7 -0
  208. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_styles.xml +40 -0
  209. data/libs/crosswalk/ext/platform/android/adds/res/values/xwalk_values.xml +10 -0
  210. data/libs/crosswalk/ext/platform/android/ext_java.files +14 -0
  211. data/libs/crosswalk/ext/platform/android/ext_native.files +7 -0
  212. data/libs/crosswalk/ext/platform/android/jni/Crosswalk_impl.cpp +61 -0
  213. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/Crosswalk.java +14 -0
  214. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/CrosswalkFactory.java +18 -0
  215. data/libs/crosswalk/ext/platform/android/src/com/rho/crosswalk/CrosswalkSingleton.java +24 -0
  216. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/CrosswalkExtension.java +16 -0
  217. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/RhodesListener.java +18 -0
  218. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWResourceClient.java +182 -0
  219. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWUIClient.java +125 -0
  220. data/libs/crosswalk/ext/platform/android/src/com/tautechnologies/tau/crosswalk/TauXWalkWebView.java +368 -0
  221. data/libs/crosswalk/ext/platform/iphone/Crosswalk.xcodeproj/project.pbxproj +368 -0
  222. data/libs/crosswalk/ext/platform/iphone/Crosswalk_Prefix.pch +7 -0
  223. data/libs/crosswalk/ext/platform/iphone/Rakefile +73 -0
  224. data/libs/crosswalk/ext/platform/iphone/impl/Crosswalk.h +14 -0
  225. data/libs/crosswalk/ext/platform/iphone/impl/Crosswalk.m +24 -0
  226. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkFactorySingleton.m +16 -0
  227. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSetup.m +9 -0
  228. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSingleton.h +17 -0
  229. data/libs/crosswalk/ext/platform/iphone/impl/CrosswalkSingleton.m +23 -0
  230. data/libs/crosswalk/ext/platform/iphone/impl/readme.txt +7 -0
  231. data/libs/crosswalk/ext/platform/qt/Crosswalk.pro +66 -0
  232. data/libs/crosswalk/ext/platform/qt/Rakefile +35 -0
  233. data/libs/crosswalk/ext/platform/qt/src/Crosswalk_impl.cpp +77 -0
  234. data/libs/crosswalk/ext/platform/wm/Crosswalk.sln +52 -0
  235. data/libs/crosswalk/ext/platform/wm/Crosswalk.vcproj +714 -0
  236. data/libs/crosswalk/ext/platform/wm/Crosswalk.vsprops +15 -0
  237. data/libs/crosswalk/ext/platform/wm/src/Crosswalk_impl.cpp +77 -0
  238. data/libs/crosswalk/ext/platform/wp8/Crosswalk.props +18 -0
  239. data/libs/crosswalk/ext/platform/wp8/Crosswalk.vcxproj +170 -0
  240. data/libs/crosswalk/ext/platform/wp8/Crosswalk.vcxproj.filters +50 -0
  241. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.csproj +119 -0
  242. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.props +8 -0
  243. data/libs/crosswalk/ext/platform/wp8/CrosswalkImpl.targets +7 -0
  244. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.props +18 -0
  245. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.vcxproj +185 -0
  246. data/libs/crosswalk/ext/platform/wp8/CrosswalkLib.vcxproj.filters +58 -0
  247. data/libs/crosswalk/ext/platform/wp8/src/Crosswalk_impl.cpp +76 -0
  248. data/libs/crosswalk/ext/platform/wp8/src/Crosswalk_impl.cs +69 -0
  249. data/libs/crosswalk/ext/platform/wp8/src/Properties/AssemblyInfo.cs +37 -0
  250. data/libs/enterprise-barcode/ext.yml +13 -0
  251. data/libs/enterprise-barcode/ext/barcode.xml +2144 -0
  252. data/libs/enterprise-barcode/ext/build +17 -0
  253. data/libs/enterprise-barcode/ext/build.bat +29 -0
  254. data/libs/enterprise-barcode/ext/platform/android/AndroidManifest.xml +31 -0
  255. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/AUTHORS +58 -0
  256. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/CHANGES +266 -0
  257. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/COPYING +201 -0
  258. data/libs/enterprise-barcode/ext/platform/android/ZXing_Info/README +11 -0
  259. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/cancel_icon.png +0 -0
  260. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/ok_icon.png +0 -0
  261. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable-hdpi/retake_icon.png +0 -0
  262. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/cancel_icon.png +0 -0
  263. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/ok_icon.png +0 -0
  264. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/drawable/retake_icon.png +0 -0
  265. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/layout/capture.xml +122 -0
  266. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/raw/beep.ogg +0 -0
  267. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/attrs.xml +20 -0
  268. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/colors.xml +42 -0
  269. data/libs/enterprise-barcode/ext/platform/android/additional_files/res/values/ids.xml +31 -0
  270. data/libs/enterprise-barcode/ext/platform/android/adds/lib/armeabi/liballbarcode.a +0 -0
  271. data/libs/enterprise-barcode/ext/platform/android/adds/lib/x86/liballbarcode.a +0 -0
  272. data/libs/enterprise-barcode/ext/platform/android/allbarcode.jar +0 -0
  273. data/libs/enterprise-barcode/ext/platform/iphone/Barcode.xcodeproj/project.pbxproj +524 -0
  274. data/libs/enterprise-barcode/ext/platform/iphone/Barcode_Prefix.pch +7 -0
  275. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeCallbackHelper.h +27 -0
  276. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeCallbackHelper.mm +231 -0
  277. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewController.h +95 -0
  278. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewController.m +1017 -0
  279. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactory.h +7 -0
  280. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactory.mm +58 -0
  281. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewFactoryRegister.mm +18 -0
  282. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewManager.h +16 -0
  283. data/libs/enterprise-barcode/ext/platform/iphone/Classes/BarcodeViewManager.mm +32 -0
  284. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.cpp +25 -0
  285. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.h +15 -0
  286. data/libs/enterprise-barcode/ext/platform/iphone/Classes/ImageProvider.mm +159 -0
  287. data/libs/enterprise-barcode/ext/platform/iphone/Classes/barcode.m +123 -0
  288. data/libs/enterprise-barcode/ext/platform/iphone/Rakefile +69 -0
  289. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/COPYING +27 -0
  290. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCameraSimulator.h +45 -0
  291. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarCaptureReader.h +111 -0
  292. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarHelpController.h +60 -0
  293. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImage.h +69 -0
  294. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarImageScanner.h +51 -0
  295. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderController.h +142 -0
  296. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderView.h +135 -0
  297. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarReaderViewController.h +130 -0
  298. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSDK.h +34 -0
  299. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/ZBarSymbol.h +71 -0
  300. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar.h +1497 -0
  301. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Decoder.h +202 -0
  302. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Exception.h +187 -0
  303. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Image.h +321 -0
  304. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/ImageScanner.h +130 -0
  305. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Processor.h +223 -0
  306. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Scanner.h +162 -0
  307. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Symbol.h +528 -0
  308. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Video.h +170 -0
  309. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Headers/ZBarSDK/zbar/Window.h +136 -0
  310. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/LICENSE +504 -0
  311. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/README +59 -0
  312. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-back.png +0 -0
  313. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-help.html +88 -0
  314. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-helpicons.png +0 -0
  315. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/Resources/zbar-samples.png +0 -0
  316. data/libs/enterprise-barcode/ext/platform/iphone/ZBarSDK/libzbar.a +0 -0
  317. data/libs/enterprise-barcode/ext/platform/iphone/impl/Barcode.h +21 -0
  318. data/libs/enterprise-barcode/ext/platform/iphone/impl/Barcode.m +132 -0
  319. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactory.h +10 -0
  320. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactory.m +16 -0
  321. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeFactorySingleton.m +16 -0
  322. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSetup.m +8 -0
  323. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSingleton.h +17 -0
  324. data/libs/enterprise-barcode/ext/platform/iphone/impl/BarcodeSingleton.m +22 -0
  325. data/libs/enterprise-barcode/ext/platform/iphone/impl/readme.txt +7 -0
  326. data/libs/enterprise-barcode/ext/platform/wm/Barcode.sln +44 -0
  327. data/libs/enterprise-barcode/ext/platform/wm/Barcode.vcproj +836 -0
  328. data/libs/enterprise-barcode/ext/platform/wm/Barcode.vsprops +15 -0
  329. data/libs/enterprise-barcode/ext/platform/wm/readme.txt +0 -0
  330. data/libs/enterprise-barcode/ext/platform/wm/src/Barcode_impl.cpp +376 -0
  331. data/libs/enterprise-barcode/ext/platform/wm/src/DecodeNotifier.cpp +173 -0
  332. data/libs/enterprise-barcode/ext/platform/wm/src/DecodeNotifier.h +149 -0
  333. data/libs/enterprise-barcode/ext/platform/wm/src/EMDKInterfaceAbstraction.cpp +476 -0
  334. data/libs/enterprise-barcode/ext/platform/wm/src/GetDecoderProperties.cpp +1195 -0
  335. data/libs/enterprise-barcode/ext/platform/wm/src/GetScannerProperties.cpp +553 -0
  336. data/libs/enterprise-barcode/ext/platform/wm/src/KeyInjector.cpp +177 -0
  337. data/libs/enterprise-barcode/ext/platform/wm/src/KeyInjector.h +40 -0
  338. data/libs/enterprise-barcode/ext/platform/wm/src/NotificationLoader.cpp +76 -0
  339. data/libs/enterprise-barcode/ext/platform/wm/src/NotificationLoader.h +44 -0
  340. data/libs/enterprise-barcode/ext/platform/wm/src/RSM.cpp +1211 -0
  341. data/libs/enterprise-barcode/ext/platform/wm/src/Scanner.cpp +2609 -0
  342. data/libs/enterprise-barcode/ext/platform/wm/src/Scanner.h +1099 -0
  343. data/libs/enterprise-barcode/ext/platform/wm/src/ScannerDefines.h +322 -0
  344. data/libs/enterprise-barcode/ext/platform/wm/src/SetDecoderProperties.cpp +2106 -0
  345. data/libs/enterprise-barcode/ext/platform/wm/src/SetScannerProperties.cpp +1060 -0
  346. data/libs/enterprise-barcode/ext/platform/wm/src/Utilities.cpp +184 -0
  347. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.csproj +119 -0
  348. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.props +8 -0
  349. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeImpl.targets +35 -0
  350. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.props +18 -0
  351. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.vcxproj +185 -0
  352. data/libs/enterprise-barcode/ext/platform/wp8/BarcodeLib.vcxproj.filters +58 -0
  353. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.dll +0 -0
  354. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.winmd +0 -0
  355. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.Graphics.Imaging.xml +4813 -0
  356. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.dll +0 -0
  357. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.winmd +0 -0
  358. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/Nokia.InteropServices.WindowsRuntime.xml +41 -0
  359. data/libs/enterprise-barcode/ext/platform/wp8/lib/ARM/OpticalReaderLib.dll +0 -0
  360. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib.XML +68 -0
  361. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib.dll +0 -0
  362. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/BarcodeReaderLib.csproj +120 -0
  363. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/BarcodeReaderLib.sln +34 -0
  364. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/CameraNavigatePage.xaml +32 -0
  365. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/CameraNavigatePage.xaml.cs +235 -0
  366. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/OpticalReaderTask.cs +182 -0
  367. data/libs/enterprise-barcode/ext/platform/wp8/lib/BarcodeReaderLib/Properties/AssemblyInfo.cs +37 -0
  368. data/libs/enterprise-barcode/ext/platform/wp8/lib/Nokia.Graphics.Imaging.Managed.dll +0 -0
  369. data/libs/enterprise-barcode/ext/platform/wp8/lib/Nokia.Graphics.Imaging.Managed.xml +341 -0
  370. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.dll +0 -0
  371. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.winmd +0 -0
  372. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.Graphics.Imaging.xml +4813 -0
  373. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.dll +0 -0
  374. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.winmd +0 -0
  375. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/Nokia.InteropServices.WindowsRuntime.xml +41 -0
  376. data/libs/enterprise-barcode/ext/platform/wp8/lib/x86/OpticalReaderLib.dll +0 -0
  377. data/libs/enterprise-barcode/ext/platform/wp8/lib/zxing.wp8.0.XML +10324 -0
  378. data/libs/enterprise-barcode/ext/platform/wp8/lib/zxing.wp8.0.dll +0 -0
  379. data/libs/enterprise-barcode/ext/platform/wp8/src/Barcode_impl.cs +630 -0
  380. data/libs/enterprise-barcode/ext/platform/wp8/src/Properties/AssemblyInfo.cs +37 -0
  381. data/libs/enterprise-barcode/public/api/generated/Rho.Barcode.js +772 -0
  382. data/libs/ie/rhobrowser.dll +0 -0
  383. data/libs/nodejs.rb +2 -0
  384. data/libs/nodejs/ext.yml +25 -0
  385. data/libs/nodejs/ext/Nodejs.xml +37 -0
  386. data/libs/nodejs/ext/build +19 -0
  387. data/libs/nodejs/ext/build.bat +29 -0
  388. data/libs/nodejs/ext/platform/android/Rakefile +161 -0
  389. data/libs/nodejs/ext/platform/android/ext_native.files +8 -0
  390. data/libs/nodejs/ext/platform/android/jxCore/jx.h +134 -0
  391. data/libs/nodejs/ext/platform/android/jxCore/jx_result.h +221 -0
  392. data/libs/nodejs/ext/platform/android/jxCore/libcares_arm.a +0 -0
  393. data/libs/nodejs/ext/platform/android/jxCore/libcares_ia32.a +0 -0
  394. data/libs/nodejs/ext/platform/android/jxCore/libcares_x64.a +0 -0
  395. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_arm.a +0 -0
  396. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_ia32.a +0 -0
  397. data/libs/nodejs/ext/platform/android/jxCore/libchrome_zlib_x64.a +0 -0
  398. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_arm.a +0 -0
  399. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_ia32.a +0 -0
  400. data/libs/nodejs/ext/platform/android/jxCore/libhttp_parser_x64.a +0 -0
  401. data/libs/nodejs/ext/platform/android/jxCore/libjx_arm.a +0 -0
  402. data/libs/nodejs/ext/platform/android/jxCore/libjx_ia32.a +0 -0
  403. data/libs/nodejs/ext/platform/android/jxCore/libjx_x64.a +0 -0
  404. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_arm.a +0 -0
  405. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_ia32.a +0 -0
  406. data/libs/nodejs/ext/platform/android/jxCore/libopenssl_x64.a +0 -0
  407. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_arm.a +0 -0
  408. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_ia32.a +0 -0
  409. data/libs/nodejs/ext/platform/android/jxCore/libsqlite3_x64.a +0 -0
  410. data/libs/nodejs/ext/platform/android/jxCore/libuv_arm.a +0 -0
  411. data/libs/nodejs/ext/platform/android/jxCore/libuv_ia32.a +0 -0
  412. data/libs/nodejs/ext/platform/android/jxCore/libuv_x64.a +0 -0
  413. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_arm.a +0 -0
  414. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_ia32.a +0 -0
  415. data/libs/nodejs/ext/platform/android/jxCore/libv8_base_x64.a +0 -0
  416. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_arm.a +0 -0
  417. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_ia32.a +0 -0
  418. data/libs/nodejs/ext/platform/android/jxCore/libv8_nosnapshot_x64.a +0 -0
  419. data/libs/nodejs/ext/platform/iphone/Nodejs.xcodeproj/project.pbxproj +350 -0
  420. data/libs/nodejs/ext/platform/iphone/Nodejs_Prefix.pch +7 -0
  421. data/libs/nodejs/ext/platform/iphone/Rakefile +73 -0
  422. data/libs/nodejs/ext/platform/iphone/jxCore/jx.h +134 -0
  423. data/libs/nodejs/ext/platform/iphone/jxCore/jx_result.h +221 -0
  424. data/libs/nodejs/ext/platform/iphone/jxCore/libcares.a +0 -0
  425. data/libs/nodejs/ext/platform/iphone/jxCore/libchrome_zlib.a +0 -0
  426. data/libs/nodejs/ext/platform/iphone/jxCore/libhttp_parser.a +0 -0
  427. data/libs/nodejs/ext/platform/iphone/jxCore/libjx.a +0 -0
  428. data/libs/nodejs/ext/platform/iphone/jxCore/libmozjs.a +0 -0
  429. data/libs/nodejs/ext/platform/iphone/jxCore/libopenssl.a +0 -0
  430. data/libs/nodejs/ext/platform/iphone/jxCore/libsqlite3.a +0 -0
  431. data/libs/nodejs/ext/platform/iphone/jxCore/libuv.a +0 -0
  432. data/libs/nodejs/ext/shared/jxcore/jx.h +134 -0
  433. data/libs/nodejs/ext/shared/jxcore/jx_result.h +221 -0
  434. data/libs/nodejs/ext/shared/jxcoretau.cpp +454 -0
  435. data/libs/nodejs/ext/shared/jxcoretau.h +20 -0
  436. data/libs/nodejs/ext/shared/nodejs_impl.cpp +106 -0
  437. data/libs/nodejs/nodejs.rb +2 -0
  438. data/libs/openssl-edge.rb +2 -0
  439. data/libs/openssl-edge/ext.yml +4 -0
  440. data/libs/openssl-edge/ext/Rakefile +145 -0
  441. data/libs/openssl-edge/ext/android/Rakefile +107 -0
  442. data/libs/openssl-edge/ext/android/ext_native.files +32 -0
  443. data/libs/openssl-edge/ext/android/extconf.h +91 -0
  444. data/libs/openssl-edge/ext/build +12 -0
  445. data/libs/openssl-edge/ext/build.bat +5 -0
  446. data/libs/openssl-edge/ext/extconf.rb +141 -0
  447. data/libs/openssl-edge/ext/openssl.pro +109 -0
  448. data/libs/openssl-edge/ext/openssl.sln +52 -0
  449. data/libs/openssl-edge/ext/openssl.vcproj +1010 -0
  450. data/libs/openssl-edge/ext/openssl_missing.c +1163 -0
  451. data/libs/openssl-edge/ext/openssl_missing.h +537 -0
  452. data/libs/openssl-edge/ext/ossl.c +1203 -0
  453. data/libs/openssl-edge/ext/ossl.h +242 -0
  454. data/libs/openssl-edge/ext/ossl_asn1.c +2008 -0
  455. data/libs/openssl-edge/ext/ossl_asn1.h +66 -0
  456. data/libs/openssl-edge/ext/ossl_bio.c +118 -0
  457. data/libs/openssl-edge/ext/ossl_bio.h +19 -0
  458. data/libs/openssl-edge/ext/ossl_bn.c +1153 -0
  459. data/libs/openssl-edge/ext/ossl_bn.h +23 -0
  460. data/libs/openssl-edge/ext/ossl_cipher.c +1085 -0
  461. data/libs/openssl-edge/ext/ossl_cipher.h +20 -0
  462. data/libs/openssl-edge/ext/ossl_config.c +89 -0
  463. data/libs/openssl-edge/ext/ossl_config.h +19 -0
  464. data/libs/openssl-edge/ext/ossl_digest.c +453 -0
  465. data/libs/openssl-edge/ext/ossl_digest.h +20 -0
  466. data/libs/openssl-edge/ext/ossl_engine.c +580 -0
  467. data/libs/openssl-edge/ext/ossl_engine.h +19 -0
  468. data/libs/openssl-edge/ext/ossl_hmac.c +398 -0
  469. data/libs/openssl-edge/ext/ossl_hmac.h +18 -0
  470. data/libs/openssl-edge/ext/ossl_ns_spki.c +406 -0
  471. data/libs/openssl-edge/ext/ossl_ns_spki.h +19 -0
  472. data/libs/openssl-edge/ext/ossl_ocsp.c +2013 -0
  473. data/libs/openssl-edge/ext/ossl_ocsp.h +23 -0
  474. data/libs/openssl-edge/ext/ossl_pkcs12.c +261 -0
  475. data/libs/openssl-edge/ext/ossl_pkcs12.h +13 -0
  476. data/libs/openssl-edge/ext/ossl_pkcs5.c +180 -0
  477. data/libs/openssl-edge/ext/ossl_pkcs5.h +6 -0
  478. data/libs/openssl-edge/ext/ossl_pkcs7.c +1157 -0
  479. data/libs/openssl-edge/ext/ossl_pkcs7.h +20 -0
  480. data/libs/openssl-edge/ext/ossl_pkey.c +469 -0
  481. data/libs/openssl-edge/ext/ossl_pkey.h +245 -0
  482. data/libs/openssl-edge/ext/ossl_pkey_dh.c +650 -0
  483. data/libs/openssl-edge/ext/ossl_pkey_dsa.c +672 -0
  484. data/libs/openssl-edge/ext/ossl_pkey_ec.c +1806 -0
  485. data/libs/openssl-edge/ext/ossl_pkey_rsa.c +768 -0
  486. data/libs/openssl-edge/ext/ossl_rand.c +238 -0
  487. data/libs/openssl-edge/ext/ossl_rand.h +18 -0
  488. data/libs/openssl-edge/ext/ossl_ssl.c +2724 -0
  489. data/libs/openssl-edge/ext/ossl_ssl.h +41 -0
  490. data/libs/openssl-edge/ext/ossl_ssl_session.c +352 -0
  491. data/libs/openssl-edge/ext/ossl_version.h +15 -0
  492. data/libs/openssl-edge/ext/ossl_x509.c +186 -0
  493. data/libs/openssl-edge/ext/ossl_x509.h +119 -0
  494. data/libs/openssl-edge/ext/ossl_x509attr.c +328 -0
  495. data/libs/openssl-edge/ext/ossl_x509cert.c +863 -0
  496. data/libs/openssl-edge/ext/ossl_x509crl.c +565 -0
  497. data/libs/openssl-edge/ext/ossl_x509ext.c +480 -0
  498. data/libs/openssl-edge/ext/ossl_x509name.c +547 -0
  499. data/libs/openssl-edge/ext/ossl_x509req.c +492 -0
  500. data/libs/openssl-edge/ext/ossl_x509revoked.c +279 -0
  501. data/libs/openssl-edge/ext/ossl_x509store.c +846 -0
  502. data/libs/openssl-edge/ext/ruby_missing.h +32 -0
  503. data/libs/openssl-edge/openssl-edge.rb +2 -0
  504. data/libs/openssl-edge/openssl.rb +24 -0
  505. data/libs/openssl-edge/openssl/bn.rb +35 -0
  506. data/libs/openssl-edge/openssl/buffering.rb +341 -0
  507. data/libs/openssl-edge/openssl/cipher.rb +65 -0
  508. data/libs/openssl-edge/openssl/digest.rb +61 -0
  509. data/libs/openssl-edge/openssl/ssl-internal.rb +180 -0
  510. data/libs/openssl-edge/openssl/ssl.rb +1 -0
  511. data/libs/openssl-edge/openssl/x509-internal.rb +153 -0
  512. data/libs/openssl-edge/openssl/x509.rb +1 -0
  513. data/libs/openssl.so-edge.rb +2 -0
  514. data/libs/openssl.so-edge/ext.yml +8 -0
  515. data/libs/openssl.so-edge/ext/Rakefile +140 -0
  516. data/libs/openssl.so-edge/ext/android/armeabi/libcrypto.a +0 -0
  517. data/libs/openssl.so-edge/ext/android/armeabi/libssl.a +0 -0
  518. data/libs/openssl.so-edge/ext/android/x86/libcrypto.a +0 -0
  519. data/libs/openssl.so-edge/ext/android/x86/libssl.a +0 -0
  520. data/libs/openssl.so-edge/ext/build +12 -0
  521. data/libs/openssl.so-edge/ext/build.bat +1 -0
  522. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/dh/dh_locl.h +56 -0
  523. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/dsa/dsa_locl.h +76 -0
  524. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/evp/evp_locl.h +66 -0
  525. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/hmac/hmac_lcl.h +33 -0
  526. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/asn1_int.h +94 -0
  527. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/async.h +14 -0
  528. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_conf.h +28 -0
  529. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_dh.h +17 -0
  530. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_int.h +82 -0
  531. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/bn_srp.h +32 -0
  532. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/chacha.h +49 -0
  533. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/cryptlib.h +81 -0
  534. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/cryptlib_int.h +31 -0
  535. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/dso_conf.h +16 -0
  536. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/engine.h +20 -0
  537. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/err_int.h +17 -0
  538. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/evp_int.h +382 -0
  539. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/md32_common.h +383 -0
  540. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/objects.h +12 -0
  541. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/poly1305.h +19 -0
  542. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/rand.h +20 -0
  543. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/include/internal/x509_int.h +267 -0
  544. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/ocsp/ocsp_lcl.h +216 -0
  545. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/rsa/rsa_locl.h +96 -0
  546. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/crypto/x509/x509_lcl.h +142 -0
  547. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/e_os.h +520 -0
  548. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/bio.h +26 -0
  549. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/comp.h +12 -0
  550. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/conf.h +32 -0
  551. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/constant_time_locl.h +185 -0
  552. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dane.h +103 -0
  553. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/dso.h +216 -0
  554. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/err.h +15 -0
  555. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/numbers.h +68 -0
  556. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/o_dir.h +63 -0
  557. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/o_str.h +17 -0
  558. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/internal/thread_once.h +42 -0
  559. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/__DECC_INCLUDE_EPILOGUE.H +16 -0
  560. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/__DECC_INCLUDE_PROLOGUE.H +20 -0
  561. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/aes.h +92 -0
  562. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1.h +1096 -0
  563. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1_mac.h +10 -0
  564. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/asn1t.h +924 -0
  565. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/async.h +98 -0
  566. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bio.h +854 -0
  567. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/blowfish.h +61 -0
  568. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/bn.h +575 -0
  569. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/buffer.h +76 -0
  570. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/camellia.h +83 -0
  571. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cast.h +53 -0
  572. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cmac.h +41 -0
  573. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/cms.h +512 -0
  574. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/comp.h +72 -0
  575. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf.h +216 -0
  576. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/conf_api.h +40 -0
  577. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/crypto.h +463 -0
  578. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ct.h +518 -0
  579. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/des.h +174 -0
  580. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dh.h +343 -0
  581. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dsa.h +282 -0
  582. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/dtls1.h +56 -0
  583. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/e_os2.h +311 -0
  584. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ebcdic.h +33 -0
  585. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ec.h +1581 -0
  586. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ecdh.h +10 -0
  587. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ecdsa.h +10 -0
  588. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/engine.h +842 -0
  589. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/err.h +259 -0
  590. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/evp.h +1586 -0
  591. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/hmac.h +49 -0
  592. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/idea.h +64 -0
  593. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/kdf.h +75 -0
  594. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/lhash.h +204 -0
  595. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md2.h +44 -0
  596. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md4.h +51 -0
  597. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/md5.h +50 -0
  598. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/mdc2.h +42 -0
  599. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/modes.h +203 -0
  600. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/obj_mac.h +4577 -0
  601. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/objects.h +1097 -0
  602. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ocsp.h +409 -0
  603. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h +169 -0
  604. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslconf.h.in +141 -0
  605. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/opensslv.h +105 -0
  606. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ossl_typ.h +190 -0
  607. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pem.h +501 -0
  608. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pem2.h +20 -0
  609. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pkcs12.h +282 -0
  610. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/pkcs7.h +404 -0
  611. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rand.h +89 -0
  612. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc2.h +51 -0
  613. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc4.h +36 -0
  614. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rc5.h +63 -0
  615. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ripemd.h +47 -0
  616. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/rsa.h +588 -0
  617. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/safestack.h +164 -0
  618. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/seed.h +98 -0
  619. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/sha.h +119 -0
  620. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srp.h +131 -0
  621. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/srtp.h +50 -0
  622. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl.h +2527 -0
  623. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl2.h +24 -0
  624. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ssl3.h +307 -0
  625. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/stack.h +78 -0
  626. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/symhacks.h +52 -0
  627. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/tls1.h +972 -0
  628. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ts.h +643 -0
  629. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/txt_db.h +57 -0
  630. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/ui.h +368 -0
  631. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/whrlpool.h +48 -0
  632. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509.h +1123 -0
  633. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509_vfy.h +539 -0
  634. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/openssl/x509v3.h +1005 -0
  635. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/packet_locl.h +555 -0
  636. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/record/record.h +240 -0
  637. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/record/record_locl.h +114 -0
  638. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/ssl_locl.h +2127 -0
  639. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/statem/statem.h +123 -0
  640. data/libs/openssl.so-edge/ext/openssl-1-1-0-stable/include/ssl/statem/statem_locl.h +124 -0
  641. data/libs/openssl.so-edge/openssl.so.rb +2 -0
  642. data/libs/webkit.rb +2 -0
  643. data/libs/webkit/ext.yml +4 -0
  644. data/libs/webkit/ext/build +12 -0
  645. data/libs/webkit/ext/build.bat +7 -0
  646. data/libs/webkit/ext/wm/Rakefile +61 -0
  647. data/libs/webkit/ext/wm/RhoMsgs.cpp +17 -0
  648. data/libs/webkit/ext/wm/RhoMsgs.h +14 -0
  649. data/libs/webkit/ext/wm/RhoWKBrowserEngine.cpp +736 -0
  650. data/libs/webkit/ext/wm/RhoWKBrowserEngine.h +105 -0
  651. data/libs/webkit/ext/wm/lib/npapi/rhobridge.dll +0 -0
  652. data/libs/webkit/ext/wm/lib/rhoengine_defs.h +80 -0
  653. data/libs/webkit/ext/wm/lib/rhowebkit.dll +0 -0
  654. data/libs/webkit/ext/wm/webkit.sln +36 -0
  655. data/libs/webkit/ext/wm/webkit.suo +0 -0
  656. data/libs/webkit/ext/wm/webkit.vcproj +800 -0
  657. data/libs/webkit/ext/wm/webkit.vsprops +20 -0
  658. data/libs/webkit/webkit.rb +2 -0
  659. data/rho-tau-extensions.gemspec +23 -0
  660. data/version +1 -0
  661. metadata +705 -0
@@ -0,0 +1,135 @@
1
+ //------------------------------------------------------------------------
2
+ // Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ //
4
+ // This file is part of the ZBar Bar Code Reader.
5
+ //
6
+ // The ZBar Bar Code Reader is free software; you can redistribute it
7
+ // and/or modify it under the terms of the GNU Lesser Public License as
8
+ // published by the Free Software Foundation; either version 2.1 of
9
+ // the License, or (at your option) any later version.
10
+ //
11
+ // The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU Lesser Public License for more details.
15
+ //
16
+ // You should have received a copy of the GNU Lesser Public License
17
+ // along with the ZBar Bar Code Reader; if not, write to the Free
18
+ // Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ // Boston, MA 02110-1301 USA
20
+ //
21
+ // http://sourceforge.net/projects/zbar
22
+ //------------------------------------------------------------------------
23
+
24
+ #import <UIKit/UIKit.h>
25
+ #import "ZBarImageScanner.h"
26
+
27
+ @class AVCaptureSession, AVCaptureDevice;
28
+ @class CALayer;
29
+ @class ZBarImageScanner, ZBarCaptureReader, ZBarReaderView;
30
+
31
+ // delegate is notified of decode results.
32
+
33
+ @protocol ZBarReaderViewDelegate < NSObject >
34
+
35
+ - (void) readerView: (ZBarReaderView*) readerView
36
+ didReadSymbols: (ZBarSymbolSet*) symbols
37
+ fromImage: (UIImage*) image;
38
+
39
+ @end
40
+
41
+ // read barcodes from the displayed video preview. the view maintains
42
+ // a complete video capture session feeding a ZBarCaptureReader and
43
+ // presents the associated preview with symbol tracking annotations.
44
+
45
+ @interface ZBarReaderView
46
+ : UIView
47
+ {
48
+ id<ZBarReaderViewDelegate> readerDelegate;
49
+ ZBarCaptureReader *captureReader;
50
+ CGRect scanCrop, effectiveCrop;
51
+ CGAffineTransform previewTransform;
52
+ CGFloat zoom, zoom0, maxZoom;
53
+ UIColor *trackingColor;
54
+ BOOL tracksSymbols, showsFPS;
55
+ NSInteger torchMode;
56
+ UIInterfaceOrientation interfaceOrientation;
57
+ NSTimeInterval animationDuration;
58
+
59
+ CALayer *preview, *overlay, *tracking, *cropLayer;
60
+ UIView *fpsView;
61
+ UILabel *fpsLabel;
62
+ UIPinchGestureRecognizer *pinch;
63
+ CGFloat imageScale;
64
+ CGSize imageSize;
65
+ BOOL started, running;
66
+ }
67
+
68
+ // supply a pre-configured image scanner.
69
+ - (id) initWithImageScanner: (ZBarImageScanner*) imageScanner;
70
+
71
+ // start the video stream and barcode reader.
72
+ - (void) start;
73
+
74
+ // stop the video stream and barcode reader.
75
+ - (void) stop;
76
+
77
+ // clear the internal result cache
78
+ - (void) flushCache;
79
+
80
+ // compensate for device/camera/interface orientation
81
+ - (void) willRotateToInterfaceOrientation: (UIInterfaceOrientation) orient
82
+ duration: (NSTimeInterval) duration;
83
+
84
+ // delegate is notified of decode results.
85
+ @property (nonatomic, assign) id<ZBarReaderViewDelegate> readerDelegate;
86
+
87
+ // access to image scanner for configuration.
88
+ @property (nonatomic, readonly) ZBarImageScanner *scanner;
89
+
90
+ // whether to display the tracking annotation for uncertain barcodes
91
+ // (default YES).
92
+ @property (nonatomic) BOOL tracksSymbols;
93
+
94
+ // color of the tracking box (default green)
95
+ @property (nonatomic, retain) UIColor *trackingColor;
96
+
97
+ // enable pinch gesture recognition for zooming the preview/decode
98
+ // (default YES).
99
+ @property (nonatomic) BOOL allowsPinchZoom;
100
+
101
+ // torch mode to set automatically (default Auto).
102
+ @property (nonatomic) NSInteger torchMode;
103
+
104
+ // whether to display the frame rate for debug/configuration
105
+ // (default NO).
106
+ @property (nonatomic) BOOL showsFPS;
107
+
108
+ // zoom scale factor applied to video preview *and* scanCrop.
109
+ // also updated by pinch-zoom gesture. clipped to range [1,maxZoom],
110
+ // defaults to 1.25
111
+ @property (nonatomic) CGFloat zoom;
112
+ - (void) setZoom: (CGFloat) zoom
113
+ animated: (BOOL) animated;
114
+
115
+ // maximum settable zoom factor.
116
+ @property (nonatomic) CGFloat maxZoom;
117
+
118
+ // the region of the image that will be scanned. normalized coordinates.
119
+ @property (nonatomic) CGRect scanCrop;
120
+
121
+ // additional transform applied to video preview.
122
+ // (NB *not* applied to scan crop)
123
+ @property (nonatomic) CGAffineTransform previewTransform;
124
+
125
+ // specify an alternate capture device.
126
+ @property (nonatomic, retain) AVCaptureDevice *device;
127
+
128
+ // direct access to the capture session. warranty void if opened...
129
+ @property (nonatomic, readonly) AVCaptureSession *session;
130
+ @property (nonatomic, readonly) ZBarCaptureReader *captureReader;
131
+
132
+ // this flag still works, but its use is deprecated
133
+ @property (nonatomic) BOOL enableCache;
134
+
135
+ @end
@@ -0,0 +1,130 @@
1
+ //------------------------------------------------------------------------
2
+ // Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ //
4
+ // This file is part of the ZBar Bar Code Reader.
5
+ //
6
+ // The ZBar Bar Code Reader is free software; you can redistribute it
7
+ // and/or modify it under the terms of the GNU Lesser Public License as
8
+ // published by the Free Software Foundation; either version 2.1 of
9
+ // the License, or (at your option) any later version.
10
+ //
11
+ // The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU Lesser Public License for more details.
15
+ //
16
+ // You should have received a copy of the GNU Lesser Public License
17
+ // along with the ZBar Bar Code Reader; if not, write to the Free
18
+ // Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ // Boston, MA 02110-1301 USA
20
+ //
21
+ // http://sourceforge.net/projects/zbar
22
+ //------------------------------------------------------------------------
23
+
24
+ #import <UIKit/UIKit.h>
25
+ #import "ZBarReaderController.h"
26
+
27
+ // orientation set support
28
+ #define ZBarOrientationMask(orient) (1 << orient)
29
+ #define ZBarOrientationMaskAll \
30
+ (ZBarOrientationMask(UIInterfaceOrientationPortrait) | \
31
+ ZBarOrientationMask(UIInterfaceOrientationPortraitUpsideDown) | \
32
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeLeft) | \
33
+ ZBarOrientationMask(UIInterfaceOrientationLandscapeRight))
34
+
35
+ @class ZBarReaderView, ZBarCameraSimulator;
36
+
37
+ // drop in video scanning replacement for ZBarReaderController.
38
+ // this is a thin controller around a ZBarReaderView that adds the UI
39
+ // controls and select functionality offered by ZBarReaderController.
40
+ // Automatically falls back to a ZBarReaderController if video APIs
41
+ // are unavailable (eg for OS < 4.0)
42
+
43
+ @interface ZBarReaderViewController
44
+ : UIViewController
45
+ {
46
+ ZBarImageScanner *scanner;
47
+ id <ZBarReaderDelegate> readerDelegate;
48
+ ZBarReaderView *readerView;
49
+ UIView *cameraOverlayView;
50
+ CGAffineTransform cameraViewTransform;
51
+ CGRect scanCrop;
52
+ NSUInteger supportedOrientationsMask;
53
+ UIImagePickerControllerCameraDevice cameraDevice;
54
+ UIImagePickerControllerCameraFlashMode cameraFlashMode;
55
+ UIImagePickerControllerQualityType videoQuality;
56
+ BOOL showsZBarControls, tracksSymbols, enableCache;
57
+
58
+ ZBarHelpController *helpController;
59
+ UIView *controls;
60
+ BOOL didHideStatusBar, rotating;
61
+ ZBarCameraSimulator *cameraSim;
62
+ }
63
+
64
+ // access to configure image scanner
65
+ @property (nonatomic, readonly) ZBarImageScanner *scanner;
66
+
67
+ // barcode result recipient
68
+ @property (nonatomic, assign) id <ZBarReaderDelegate> readerDelegate;
69
+
70
+ // whether to use alternate control set
71
+ @property (nonatomic) BOOL showsZBarControls;
72
+
73
+ // whether to show the green tracking box. note that, even when
74
+ // enabled, the box will only be visible when scanning EAN and I2/5.
75
+ @property (nonatomic) BOOL tracksSymbols;
76
+
77
+ // interface orientation support. bit-mask of accepted orientations.
78
+ // see eg ZBarOrientationMask() and ZBarOrientationMaskAll
79
+ @property (nonatomic) NSUInteger supportedOrientationsMask;
80
+
81
+ // crop images for scanning. the image will be cropped to this
82
+ // rectangle before scanning. the rectangle is normalized to the
83
+ // image size and aspect ratio; useful values will place the rectangle
84
+ // between 0 and 1 on each axis, where the x-axis corresponds to the
85
+ // image major axis. defaults to the full image (0, 0, 1, 1).
86
+ @property (nonatomic) CGRect scanCrop;
87
+
88
+ // provide a custom overlay. note that this can be used with
89
+ // showsZBarControls enabled (but not if you want backward compatibility)
90
+ @property (nonatomic, retain) UIView *cameraOverlayView;
91
+
92
+ // transform applied to the preview image.
93
+ @property (nonatomic) CGAffineTransform cameraViewTransform;
94
+
95
+ // display the built-in help browser. the argument will be passed to
96
+ // the onZBarHelp() javascript function.
97
+ - (void) showHelpWithReason: (NSString*) reason;
98
+
99
+ // capture the next frame and send it over the usual delegate path.
100
+ - (void) takePicture;
101
+
102
+ // these attempt to emulate UIImagePickerController
103
+ + (BOOL) isCameraDeviceAvailable: (UIImagePickerControllerCameraDevice) cameraDevice;
104
+ + (BOOL) isFlashAvailableForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
105
+ + (NSArray*) availableCaptureModesForCameraDevice: (UIImagePickerControllerCameraDevice) cameraDevice;
106
+ @property(nonatomic) UIImagePickerControllerCameraDevice cameraDevice;
107
+ @property(nonatomic) UIImagePickerControllerCameraFlashMode cameraFlashMode;
108
+ @property(nonatomic) UIImagePickerControllerCameraCaptureMode cameraCaptureMode;
109
+ @property(nonatomic) UIImagePickerControllerQualityType videoQuality;
110
+
111
+ // direct access to the ZBarReaderView
112
+ @property (nonatomic, readonly) ZBarReaderView *readerView;
113
+
114
+ // this flag still works, but its use is deprecated
115
+ @property (nonatomic) BOOL enableCache;
116
+
117
+ // these are present only for backward compatibility.
118
+ // they will error if inappropriate/unsupported values are set
119
+ @property (nonatomic) UIImagePickerControllerSourceType sourceType; // Camera
120
+ @property (nonatomic) BOOL allowsEditing; // NO
121
+ @property (nonatomic) BOOL allowsImageEditing; // NO
122
+ @property (nonatomic) BOOL showsCameraControls; // NO
123
+ @property (nonatomic) BOOL showsHelpOnFail; // ignored
124
+ @property (nonatomic) ZBarReaderControllerCameraMode cameraMode; // Sampling
125
+ @property (nonatomic) BOOL takesPicture; // NO
126
+ @property (nonatomic) NSInteger maxScanDimension; // ignored
127
+
128
+ + (BOOL) isSourceTypeAvailable: (UIImagePickerControllerSourceType) sourceType;
129
+
130
+ @end
@@ -0,0 +1,34 @@
1
+ /*------------------------------------------------------------------------
2
+ * Copyright 2010 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ *
4
+ * This file is part of the ZBar Bar Code Reader.
5
+ *
6
+ * The ZBar Bar Code Reader is free software; you can redistribute it
7
+ * and/or modify it under the terms of the GNU Lesser Public License as
8
+ * published by the Free Software Foundation; either version 2.1 of
9
+ * the License, or (at your option) any later version.
10
+ *
11
+ * The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser Public License
17
+ * along with the ZBar Bar Code Reader; if not, write to the Free
18
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ * Boston, MA 02110-1301 USA
20
+ *
21
+ * http://sourceforge.net/projects/zbar
22
+ *------------------------------------------------------------------------*/
23
+
24
+ #import "zbar.h"
25
+
26
+ #import "ZBarSymbol.h"
27
+ #import "ZBarImage.h"
28
+ #import "ZBarImageScanner.h"
29
+ #import "ZBarReaderView.h"
30
+ #import "ZBarReaderViewController.h"
31
+ #import "ZBarReaderController.h"
32
+ #import "ZBarCaptureReader.h"
33
+ #import "ZBarHelpController.h"
34
+ #import "ZBarCameraSimulator.h"
@@ -0,0 +1,71 @@
1
+ //------------------------------------------------------------------------
2
+ // Copyright 2009-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ //
4
+ // This file is part of the ZBar Bar Code Reader.
5
+ //
6
+ // The ZBar Bar Code Reader is free software; you can redistribute it
7
+ // and/or modify it under the terms of the GNU Lesser Public License as
8
+ // published by the Free Software Foundation; either version 2.1 of
9
+ // the License, or (at your option) any later version.
10
+ //
11
+ // The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ // GNU Lesser Public License for more details.
15
+ //
16
+ // You should have received a copy of the GNU Lesser Public License
17
+ // along with the ZBar Bar Code Reader; if not, write to the Free
18
+ // Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ // Boston, MA 02110-1301 USA
20
+ //
21
+ // http://sourceforge.net/projects/zbar
22
+ //------------------------------------------------------------------------
23
+
24
+ #import <Foundation/Foundation.h>
25
+ #import <CoreGraphics/CoreGraphics.h>
26
+ #import "zbar.h"
27
+
28
+ #ifdef __cplusplus
29
+ using namespace zbar;
30
+ #endif
31
+
32
+ // Obj-C wrapper for ZBar result types
33
+
34
+ @interface ZBarSymbolSet
35
+ : NSObject <NSFastEnumeration>
36
+ {
37
+ const zbar_symbol_set_t *set;
38
+ BOOL filterSymbols;
39
+ }
40
+
41
+ @property (readonly, nonatomic) int count;
42
+ @property (readonly, nonatomic) const zbar_symbol_set_t *zbarSymbolSet;
43
+ @property (nonatomic) BOOL filterSymbols;
44
+
45
+ - (id) initWithSymbolSet: (const zbar_symbol_set_t*) set;
46
+
47
+ @end
48
+
49
+
50
+ @interface ZBarSymbol : NSObject
51
+ {
52
+ const zbar_symbol_t *symbol;
53
+ }
54
+
55
+ @property (readonly, nonatomic) zbar_symbol_type_t type;
56
+ @property (readonly, nonatomic) NSString *typeName;
57
+ @property (readonly, nonatomic) NSUInteger configMask;
58
+ @property (readonly, nonatomic) NSUInteger modifierMask;
59
+ @property (readonly, nonatomic) NSString *data;
60
+ @property (readonly, nonatomic) int quality;
61
+ @property (readonly, nonatomic) int count;
62
+ @property (readonly, nonatomic) zbar_orientation_t orientation;
63
+ @property (readonly, nonatomic) ZBarSymbolSet *components;
64
+ @property (readonly, nonatomic) const zbar_symbol_t *zbarSymbol;
65
+ @property (readonly, nonatomic) CGRect bounds;
66
+
67
+ - (id) initWithSymbol: (const zbar_symbol_t*) symbol;
68
+
69
+ + (NSString*) nameForType: (zbar_symbol_type_t) type;
70
+
71
+ @end
@@ -0,0 +1,1497 @@
1
+ /*------------------------------------------------------------------------
2
+ * Copyright 2007-2010 (c) Jeff Brown <spadix@users.sourceforge.net>
3
+ *
4
+ * This file is part of the ZBar Bar Code Reader.
5
+ *
6
+ * The ZBar Bar Code Reader is free software; you can redistribute it
7
+ * and/or modify it under the terms of the GNU Lesser Public License as
8
+ * published by the Free Software Foundation; either version 2.1 of
9
+ * the License, or (at your option) any later version.
10
+ *
11
+ * The ZBar Bar Code Reader is distributed in the hope that it will be
12
+ * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Lesser Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Lesser Public License
17
+ * along with the ZBar Bar Code Reader; if not, write to the Free
18
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor,
19
+ * Boston, MA 02110-1301 USA
20
+ *
21
+ * http://sourceforge.net/projects/zbar
22
+ *------------------------------------------------------------------------*/
23
+ #ifndef _ZBAR_H_
24
+ #define _ZBAR_H_
25
+
26
+ /** @file
27
+ * ZBar Barcode Reader C API definition
28
+ */
29
+
30
+ /** @mainpage
31
+ *
32
+ * interface to the barcode reader is available at several levels.
33
+ * most applications will want to use the high-level interfaces:
34
+ *
35
+ * @section high-level High-Level Interfaces
36
+ *
37
+ * these interfaces wrap all library functionality into an easy-to-use
38
+ * package for a specific toolkit:
39
+ * - the "GTK+ 2.x widget" may be used with GTK GUI applications. a
40
+ * Python wrapper is included for PyGtk
41
+ * - the @ref zbar::QZBar "Qt4 widget" may be used with Qt GUI
42
+ * applications
43
+ * - the Processor interface (in @ref c-processor "C" or @ref
44
+ * zbar::Processor "C++") adds a scanning window to an application
45
+ * with no GUI.
46
+ *
47
+ * @section mid-level Intermediate Interfaces
48
+ *
49
+ * building blocks used to construct high-level interfaces:
50
+ * - the ImageScanner (in @ref c-imagescanner "C" or @ref
51
+ * zbar::ImageScanner "C++") looks for barcodes in a library defined
52
+ * image object
53
+ * - the Window abstraction (in @ref c-window "C" or @ref
54
+ * zbar::Window "C++") sinks library images, displaying them on the
55
+ * platform display
56
+ * - the Video abstraction (in @ref c-video "C" or @ref zbar::Video
57
+ * "C++") sources library images from a video device
58
+ *
59
+ * @section low-level Low-Level Interfaces
60
+ *
61
+ * direct interaction with barcode scanning and decoding:
62
+ * - the Scanner (in @ref c-scanner "C" or @ref zbar::Scanner "C++")
63
+ * looks for barcodes in a linear intensity sample stream
64
+ * - the Decoder (in @ref c-decoder "C" or @ref zbar::Decoder "C++")
65
+ * extracts barcodes from a stream of bar and space widths
66
+ */
67
+
68
+ #ifdef __cplusplus
69
+
70
+ /** C++ namespace for library interfaces */
71
+ namespace zbar {
72
+ extern "C" {
73
+ #endif
74
+
75
+
76
+ /** @name Global library interfaces */
77
+ /*@{*/
78
+
79
+ /** "color" of element: bar or space. */
80
+ typedef enum zbar_color_e {
81
+ ZBAR_SPACE = 0, /**< light area or space between bars */
82
+ ZBAR_BAR = 1, /**< dark area or colored bar segment */
83
+ } zbar_color_t;
84
+
85
+ /** decoded symbol type. */
86
+ typedef enum zbar_symbol_type_e {
87
+ ZBAR_NONE = 0, /**< no symbol decoded */
88
+ ZBAR_PARTIAL = 1, /**< intermediate status */
89
+ ZBAR_EAN2 = 2, /**< GS1 2-digit add-on */
90
+ ZBAR_EAN5 = 5, /**< GS1 5-digit add-on */
91
+ ZBAR_EAN8 = 8, /**< EAN-8 */
92
+ ZBAR_UPCE = 9, /**< UPC-E */
93
+ ZBAR_ISBN10 = 10, /**< ISBN-10 (from EAN-13). @since 0.4 */
94
+ ZBAR_UPCA = 12, /**< UPC-A */
95
+ ZBAR_EAN13 = 13, /**< EAN-13 */
96
+ ZBAR_ISBN13 = 14, /**< ISBN-13 (from EAN-13). @since 0.4 */
97
+ ZBAR_COMPOSITE = 15, /**< EAN/UPC composite */
98
+ ZBAR_I25 = 25, /**< Interleaved 2 of 5. @since 0.4 */
99
+ ZBAR_DATABAR = 34, /**< GS1 DataBar (RSS). @since 0.11 */
100
+ ZBAR_DATABAR_EXP = 35, /**< GS1 DataBar Expanded. @since 0.11 */
101
+ ZBAR_CODE39 = 39, /**< Code 39. @since 0.4 */
102
+ ZBAR_PDF417 = 57, /**< PDF417. @since 0.6 */
103
+ ZBAR_QRCODE = 64, /**< QR Code. @since 0.10 */
104
+ ZBAR_CODE93 = 93, /**< Code 93. @since 0.11 */
105
+ ZBAR_CODE128 = 128, /**< Code 128 */
106
+
107
+ /** mask for base symbol type.
108
+ * @deprecated in 0.11, remove this from existing code
109
+ */
110
+ ZBAR_SYMBOL = 0x00ff,
111
+ /** 2-digit add-on flag.
112
+ * @deprecated in 0.11, a ::ZBAR_EAN2 component is used for
113
+ * 2-digit GS1 add-ons
114
+ */
115
+ ZBAR_ADDON2 = 0x0200,
116
+ /** 5-digit add-on flag.
117
+ * @deprecated in 0.11, a ::ZBAR_EAN5 component is used for
118
+ * 5-digit GS1 add-ons
119
+ */
120
+ ZBAR_ADDON5 = 0x0500,
121
+ /** add-on flag mask.
122
+ * @deprecated in 0.11, GS1 add-ons are represented using composite
123
+ * symbols of type ::ZBAR_COMPOSITE; add-on components use ::ZBAR_EAN2
124
+ * or ::ZBAR_EAN5
125
+ */
126
+ ZBAR_ADDON = 0x0700,
127
+ } zbar_symbol_type_t;
128
+
129
+ /** decoded symbol coarse orientation.
130
+ * @since 0.11
131
+ */
132
+ typedef enum zbar_orientation_e {
133
+ ZBAR_ORIENT_UNKNOWN = -1, /**< unable to determine orientation */
134
+ ZBAR_ORIENT_UP, /**< upright, read left to right */
135
+ ZBAR_ORIENT_RIGHT, /**< sideways, read top to bottom */
136
+ ZBAR_ORIENT_DOWN, /**< upside-down, read right to left */
137
+ ZBAR_ORIENT_LEFT, /**< sideways, read bottom to top */
138
+ } zbar_orientation_t;
139
+
140
+ /** error codes. */
141
+ typedef enum zbar_error_e {
142
+ ZBAR_OK = 0, /**< no error */
143
+ ZBAR_ERR_NOMEM, /**< out of memory */
144
+ ZBAR_ERR_INTERNAL, /**< internal library error */
145
+ ZBAR_ERR_UNSUPPORTED, /**< unsupported request */
146
+ ZBAR_ERR_INVALID, /**< invalid request */
147
+ ZBAR_ERR_SYSTEM, /**< system error */
148
+ ZBAR_ERR_LOCKING, /**< locking error */
149
+ ZBAR_ERR_BUSY, /**< all resources busy */
150
+ ZBAR_ERR_XDISPLAY, /**< X11 display error */
151
+ ZBAR_ERR_XPROTO, /**< X11 protocol error */
152
+ ZBAR_ERR_CLOSED, /**< output window is closed */
153
+ ZBAR_ERR_WINAPI, /**< windows system error */
154
+ ZBAR_ERR_NUM /**< number of error codes */
155
+ } zbar_error_t;
156
+
157
+ /** decoder configuration options.
158
+ * @since 0.4
159
+ */
160
+ typedef enum zbar_config_e {
161
+ ZBAR_CFG_ENABLE = 0, /**< enable symbology/feature */
162
+ ZBAR_CFG_ADD_CHECK, /**< enable check digit when optional */
163
+ ZBAR_CFG_EMIT_CHECK, /**< return check digit when present */
164
+ ZBAR_CFG_ASCII, /**< enable full ASCII character set */
165
+ ZBAR_CFG_NUM, /**< number of boolean decoder configs */
166
+
167
+ ZBAR_CFG_MIN_LEN = 0x20, /**< minimum data length for valid decode */
168
+ ZBAR_CFG_MAX_LEN, /**< maximum data length for valid decode */
169
+
170
+ ZBAR_CFG_UNCERTAINTY = 0x40,/**< required video consistency frames */
171
+
172
+ ZBAR_CFG_POSITION = 0x80, /**< enable scanner to collect position data */
173
+
174
+ ZBAR_CFG_X_DENSITY = 0x100, /**< image scanner vertical scan density */
175
+ ZBAR_CFG_Y_DENSITY, /**< image scanner horizontal scan density */
176
+ } zbar_config_t;
177
+
178
+ /** decoder symbology modifier flags.
179
+ * @since 0.11
180
+ */
181
+ typedef enum zbar_modifier_e {
182
+ /** barcode tagged as GS1 (EAN.UCC) reserved
183
+ * (eg, FNC1 before first data character).
184
+ * data may be parsed as a sequence of GS1 AIs
185
+ */
186
+ ZBAR_MOD_GS1 = 0,
187
+
188
+ /** barcode tagged as AIM reserved
189
+ * (eg, FNC1 after first character or digit pair)
190
+ */
191
+ ZBAR_MOD_AIM,
192
+
193
+ /** number of modifiers */
194
+ ZBAR_MOD_NUM,
195
+ } zbar_modifier_t;
196
+
197
+ /** retrieve runtime library version information.
198
+ * @param major set to the running major version (unless NULL)
199
+ * @param minor set to the running minor version (unless NULL)
200
+ * @returns 0
201
+ */
202
+ extern int zbar_version(unsigned *major,
203
+ unsigned *minor);
204
+
205
+ /** set global library debug level.
206
+ * @param verbosity desired debug level. higher values create more spew
207
+ */
208
+ extern void zbar_set_verbosity(int verbosity);
209
+
210
+ /** increase global library debug level.
211
+ * eg, for -vvvv
212
+ */
213
+ extern void zbar_increase_verbosity(void);
214
+
215
+ /** retrieve string name for symbol encoding.
216
+ * @param sym symbol type encoding
217
+ * @returns the static string name for the specified symbol type,
218
+ * or "UNKNOWN" if the encoding is not recognized
219
+ */
220
+ extern const char *zbar_get_symbol_name(zbar_symbol_type_t sym);
221
+
222
+ /** retrieve string name for addon encoding.
223
+ * @param sym symbol type encoding
224
+ * @returns static string name for any addon, or the empty string
225
+ * if no addons were decoded
226
+ * @deprecated in 0.11
227
+ */
228
+ extern const char *zbar_get_addon_name(zbar_symbol_type_t sym);
229
+
230
+ /** retrieve string name for configuration setting.
231
+ * @param config setting to name
232
+ * @returns static string name for config,
233
+ * or the empty string if value is not a known config
234
+ */
235
+ extern const char *zbar_get_config_name(zbar_config_t config);
236
+
237
+ /** retrieve string name for modifier.
238
+ * @param modifier flag to name
239
+ * @returns static string name for modifier,
240
+ * or the empty string if the value is not a known flag
241
+ */
242
+ extern const char *zbar_get_modifier_name(zbar_modifier_t modifier);
243
+
244
+ /** retrieve string name for orientation.
245
+ * @param orientation orientation encoding
246
+ * @returns the static string name for the specified orientation,
247
+ * or "UNKNOWN" if the orientation is not recognized
248
+ * @since 0.11
249
+ */
250
+ extern const char *zbar_get_orientation_name(zbar_orientation_t orientation);
251
+
252
+ /** parse a configuration string of the form "[symbology.]config[=value]".
253
+ * the config must match one of the recognized names.
254
+ * the symbology, if present, must match one of the recognized names.
255
+ * if symbology is unspecified, it will be set to 0.
256
+ * if value is unspecified it will be set to 1.
257
+ * @returns 0 if the config is parsed successfully, 1 otherwise
258
+ * @since 0.4
259
+ */
260
+ extern int zbar_parse_config(const char *config_string,
261
+ zbar_symbol_type_t *symbology,
262
+ zbar_config_t *config,
263
+ int *value);
264
+
265
+ /** consistently compute fourcc values across architectures
266
+ * (adapted from v4l2 specification)
267
+ * @since 0.11
268
+ */
269
+ #define zbar_fourcc(a, b, c, d) \
270
+ ((unsigned long)(a) | \
271
+ ((unsigned long)(b) << 8) | \
272
+ ((unsigned long)(c) << 16) | \
273
+ ((unsigned long)(d) << 24))
274
+
275
+ /** parse a fourcc string into its encoded integer value.
276
+ * @since 0.11
277
+ */
278
+ static inline unsigned long zbar_fourcc_parse (const char *format)
279
+ {
280
+ unsigned long fourcc = 0;
281
+ if(format) {
282
+ int i;
283
+ for(i = 0; i < 4 && format[i]; i++)
284
+ fourcc |= ((unsigned long)format[i]) << (i * 8);
285
+ }
286
+ return(fourcc);
287
+ }
288
+
289
+ /** @internal type unsafe error API (don't use) */
290
+ extern int _zbar_error_spew(const void *object,
291
+ int verbosity);
292
+ extern const char *_zbar_error_string(const void *object,
293
+ int verbosity);
294
+ extern zbar_error_t _zbar_get_error_code(const void *object);
295
+
296
+ /*@}*/
297
+
298
+ struct zbar_symbol_s;
299
+ typedef struct zbar_symbol_s zbar_symbol_t;
300
+
301
+ struct zbar_symbol_set_s;
302
+ typedef struct zbar_symbol_set_s zbar_symbol_set_t;
303
+
304
+
305
+ /*------------------------------------------------------------*/
306
+ /** @name Symbol interface
307
+ * decoded barcode symbol result object. stores type, data, and image
308
+ * location of decoded symbol. all memory is owned by the library
309
+ */
310
+ /*@{*/
311
+
312
+ /** @typedef zbar_symbol_t
313
+ * opaque decoded symbol object.
314
+ */
315
+
316
+ /** symbol reference count manipulation.
317
+ * increment the reference count when you store a new reference to the
318
+ * symbol. decrement when the reference is no longer used. do not
319
+ * refer to the symbol once the count is decremented and the
320
+ * containing image has been recycled or destroyed.
321
+ * @note the containing image holds a reference to the symbol, so you
322
+ * only need to use this if you keep a symbol after the image has been
323
+ * destroyed or reused.
324
+ * @since 0.9
325
+ */
326
+ extern void zbar_symbol_ref(const zbar_symbol_t *symbol,
327
+ int refs);
328
+
329
+ /** retrieve type of decoded symbol.
330
+ * @returns the symbol type
331
+ */
332
+ extern zbar_symbol_type_t zbar_symbol_get_type(const zbar_symbol_t *symbol);
333
+
334
+ /** retrieve symbology boolean config settings.
335
+ * @returns a bitmask indicating which configs were set for the detected
336
+ * symbology during decoding.
337
+ * @since 0.11
338
+ */
339
+ extern unsigned int zbar_symbol_get_configs(const zbar_symbol_t *symbol);
340
+
341
+ /** retrieve symbology modifier flag settings.
342
+ * @returns a bitmask indicating which characteristics were detected
343
+ * during decoding.
344
+ * @since 0.11
345
+ */
346
+ extern unsigned int zbar_symbol_get_modifiers(const zbar_symbol_t *symbol);
347
+
348
+ /** retrieve data decoded from symbol.
349
+ * @returns the data string
350
+ */
351
+ extern const char *zbar_symbol_get_data(const zbar_symbol_t *symbol);
352
+
353
+ /** retrieve length of binary data.
354
+ * @returns the length of the decoded data
355
+ */
356
+ extern unsigned int zbar_symbol_get_data_length(const zbar_symbol_t *symbol);
357
+
358
+ /** retrieve a symbol confidence metric.
359
+ * @returns an unscaled, relative quantity: larger values are better
360
+ * than smaller values, where "large" and "small" are application
361
+ * dependent.
362
+ * @note expect the exact definition of this quantity to change as the
363
+ * metric is refined. currently, only the ordered relationship
364
+ * between two values is defined and will remain stable in the future
365
+ * @since 0.9
366
+ */
367
+ extern int zbar_symbol_get_quality(const zbar_symbol_t *symbol);
368
+
369
+ /** retrieve current cache count. when the cache is enabled for the
370
+ * image_scanner this provides inter-frame reliability and redundancy
371
+ * information for video streams.
372
+ * @returns < 0 if symbol is still uncertain.
373
+ * @returns 0 if symbol is newly verified.
374
+ * @returns > 0 for duplicate symbols
375
+ */
376
+ extern int zbar_symbol_get_count(const zbar_symbol_t *symbol);
377
+
378
+ /** retrieve the number of points in the location polygon. the
379
+ * location polygon defines the image area that the symbol was
380
+ * extracted from.
381
+ * @returns the number of points in the location polygon
382
+ * @note this is currently not a polygon, but the scan locations
383
+ * where the symbol was decoded
384
+ */
385
+ extern unsigned zbar_symbol_get_loc_size(const zbar_symbol_t *symbol);
386
+
387
+ /** retrieve location polygon x-coordinates.
388
+ * points are specified by 0-based index.
389
+ * @returns the x-coordinate for a point in the location polygon.
390
+ * @returns -1 if index is out of range
391
+ */
392
+ extern int zbar_symbol_get_loc_x(const zbar_symbol_t *symbol,
393
+ unsigned index);
394
+
395
+ /** retrieve location polygon y-coordinates.
396
+ * points are specified by 0-based index.
397
+ * @returns the y-coordinate for a point in the location polygon.
398
+ * @returns -1 if index is out of range
399
+ */
400
+ extern int zbar_symbol_get_loc_y(const zbar_symbol_t *symbol,
401
+ unsigned index);
402
+
403
+ /** retrieve general orientation of decoded symbol.
404
+ * @returns a coarse, axis-aligned indication of symbol orientation or
405
+ * ::ZBAR_ORIENT_UNKNOWN if unknown
406
+ * @since 0.11
407
+ */
408
+ extern zbar_orientation_t
409
+ zbar_symbol_get_orientation(const zbar_symbol_t *symbol);
410
+
411
+ /** iterate the set to which this symbol belongs (there can be only one).
412
+ * @returns the next symbol in the set, or
413
+ * @returns NULL when no more results are available
414
+ */
415
+ extern const zbar_symbol_t *zbar_symbol_next(const zbar_symbol_t *symbol);
416
+
417
+ /** retrieve components of a composite result.
418
+ * @returns the symbol set containing the components
419
+ * @returns NULL if the symbol is already a physical symbol
420
+ * @since 0.10
421
+ */
422
+ extern const zbar_symbol_set_t*
423
+ zbar_symbol_get_components(const zbar_symbol_t *symbol);
424
+
425
+ /** iterate components of a composite result.
426
+ * @returns the first physical component symbol of a composite result
427
+ * @returns NULL if the symbol is already a physical symbol
428
+ * @since 0.10
429
+ */
430
+ extern const zbar_symbol_t*
431
+ zbar_symbol_first_component(const zbar_symbol_t *symbol);
432
+
433
+ /** print XML symbol element representation to user result buffer.
434
+ * @see http://zbar.sourceforge.net/2008/barcode.xsd for the schema.
435
+ * @param symbol is the symbol to print
436
+ * @param buffer is the inout result pointer, it will be reallocated
437
+ * with a larger size if necessary.
438
+ * @param buflen is inout length of the result buffer.
439
+ * @returns the buffer pointer
440
+ * @since 0.6
441
+ */
442
+ extern char *zbar_symbol_xml(const zbar_symbol_t *symbol,
443
+ char **buffer,
444
+ unsigned *buflen);
445
+
446
+ /*@}*/
447
+
448
+ /*------------------------------------------------------------*/
449
+ /** @name Symbol Set interface
450
+ * container for decoded result symbols associated with an image
451
+ * or a composite symbol.
452
+ * @since 0.10
453
+ */
454
+ /*@{*/
455
+
456
+ /** @typedef zbar_symbol_set_t
457
+ * opaque symbol iterator object.
458
+ * @since 0.10
459
+ */
460
+
461
+ /** reference count manipulation.
462
+ * increment the reference count when you store a new reference.
463
+ * decrement when the reference is no longer used. do not refer to
464
+ * the object any longer once references have been released.
465
+ * @since 0.10
466
+ */
467
+ extern void zbar_symbol_set_ref(const zbar_symbol_set_t *symbols,
468
+ int refs);
469
+
470
+ /** retrieve set size.
471
+ * @returns the number of symbols in the set.
472
+ * @since 0.10
473
+ */
474
+ extern int zbar_symbol_set_get_size(const zbar_symbol_set_t *symbols);
475
+
476
+ /** set iterator.
477
+ * @returns the first decoded symbol result in a set
478
+ * @returns NULL if the set is empty
479
+ * @since 0.10
480
+ */
481
+ extern const zbar_symbol_t*
482
+ zbar_symbol_set_first_symbol(const zbar_symbol_set_t *symbols);
483
+
484
+ /** raw result iterator.
485
+ * @returns the first decoded symbol result in a set, *before* filtering
486
+ * @returns NULL if the set is empty
487
+ * @since 0.11
488
+ */
489
+ extern const zbar_symbol_t*
490
+ zbar_symbol_set_first_unfiltered(const zbar_symbol_set_t *symbols);
491
+
492
+ /*@}*/
493
+
494
+ /*------------------------------------------------------------*/
495
+ /** @name Image interface
496
+ * stores image data samples along with associated format and size
497
+ * metadata
498
+ */
499
+ /*@{*/
500
+
501
+ struct zbar_image_s;
502
+ /** opaque image object. */
503
+ typedef struct zbar_image_s zbar_image_t;
504
+
505
+ /** cleanup handler callback function.
506
+ * called to free sample data when an image is destroyed.
507
+ */
508
+ typedef void (zbar_image_cleanup_handler_t)(zbar_image_t *image);
509
+
510
+ /** data handler callback function.
511
+ * called when decoded symbol results are available for an image
512
+ */
513
+ typedef void (zbar_image_data_handler_t)(zbar_image_t *image,
514
+ const void *userdata);
515
+
516
+ /** new image constructor.
517
+ * @returns a new image object with uninitialized data and format.
518
+ * this image should be destroyed (using zbar_image_destroy()) as
519
+ * soon as the application is finished with it
520
+ */
521
+ extern zbar_image_t *zbar_image_create(void);
522
+
523
+ /** image destructor. all images created by or returned to the
524
+ * application should be destroyed using this function. when an image
525
+ * is destroyed, the associated data cleanup handler will be invoked
526
+ * if available
527
+ * @note make no assumptions about the image or the data buffer.
528
+ * they may not be destroyed/cleaned immediately if the library
529
+ * is still using them. if necessary, use the cleanup handler hook
530
+ * to keep track of image data buffers
531
+ */
532
+ extern void zbar_image_destroy(zbar_image_t *image);
533
+
534
+ /** image reference count manipulation.
535
+ * increment the reference count when you store a new reference to the
536
+ * image. decrement when the reference is no longer used. do not
537
+ * refer to the image any longer once the count is decremented.
538
+ * zbar_image_ref(image, -1) is the same as zbar_image_destroy(image)
539
+ * @since 0.5
540
+ */
541
+ extern void zbar_image_ref(zbar_image_t *image,
542
+ int refs);
543
+
544
+ /** image format conversion. refer to the documentation for supported
545
+ * image formats
546
+ * @returns a @em new image with the sample data from the original image
547
+ * converted to the requested format. the original image is
548
+ * unaffected.
549
+ * @note the converted image size may be rounded (up) due to format
550
+ * constraints
551
+ */
552
+ extern zbar_image_t *zbar_image_convert(const zbar_image_t *image,
553
+ unsigned long format);
554
+
555
+ /** image format conversion with crop/pad.
556
+ * if the requested size is larger than the image, the last row/column
557
+ * are duplicated to cover the difference. if the requested size is
558
+ * smaller than the image, the extra rows/columns are dropped from the
559
+ * right/bottom.
560
+ * @returns a @em new image with the sample data from the original
561
+ * image converted to the requested format and size.
562
+ * @note the image is @em not scaled
563
+ * @see zbar_image_convert()
564
+ * @since 0.4
565
+ */
566
+ extern zbar_image_t *zbar_image_convert_resize(const zbar_image_t *image,
567
+ unsigned long format,
568
+ unsigned width,
569
+ unsigned height);
570
+
571
+ /** retrieve the image format.
572
+ * @returns the fourcc describing the format of the image sample data
573
+ */
574
+ extern unsigned long zbar_image_get_format(const zbar_image_t *image);
575
+
576
+ /** retrieve a "sequence" (page/frame) number associated with this image.
577
+ * @since 0.6
578
+ */
579
+ extern unsigned zbar_image_get_sequence(const zbar_image_t *image);
580
+
581
+ /** retrieve the width of the image.
582
+ * @returns the width in sample columns
583
+ */
584
+ extern unsigned zbar_image_get_width(const zbar_image_t *image);
585
+
586
+ /** retrieve the height of the image.
587
+ * @returns the height in sample rows
588
+ */
589
+ extern unsigned zbar_image_get_height(const zbar_image_t *image);
590
+
591
+ /** retrieve both dimensions of the image.
592
+ * fills in the width and height in samples
593
+ */
594
+ extern void zbar_image_get_size(const zbar_image_t *image,
595
+ unsigned *width,
596
+ unsigned *height);
597
+
598
+ /** retrieve the crop rectangle.
599
+ * fills in the image coordinates of the upper left corner and size
600
+ * of an axis-aligned rectangular area of the image that will be scanned.
601
+ * defaults to the full image
602
+ * @since 0.11
603
+ */
604
+ extern void zbar_image_get_crop(const zbar_image_t *image,
605
+ unsigned *x,
606
+ unsigned *y,
607
+ unsigned *width,
608
+ unsigned *height);
609
+
610
+ /** return the image sample data. the returned data buffer is only
611
+ * valid until zbar_image_destroy() is called
612
+ */
613
+ extern const void *zbar_image_get_data(const zbar_image_t *image);
614
+
615
+ /** return the size of image data.
616
+ * @since 0.6
617
+ */
618
+ extern unsigned long zbar_image_get_data_length(const zbar_image_t *img);
619
+
620
+ /** retrieve the decoded results.
621
+ * @returns the (possibly empty) set of decoded symbols
622
+ * @returns NULL if the image has not been scanned
623
+ * @since 0.10
624
+ */
625
+ extern const zbar_symbol_set_t*
626
+ zbar_image_get_symbols(const zbar_image_t *image);
627
+
628
+ /** associate the specified symbol set with the image, replacing any
629
+ * existing results. use NULL to release the current results from the
630
+ * image.
631
+ * @see zbar_image_scanner_recycle_image()
632
+ * @since 0.10
633
+ */
634
+ extern void zbar_image_set_symbols(zbar_image_t *image,
635
+ const zbar_symbol_set_t *symbols);
636
+
637
+ /** image_scanner decode result iterator.
638
+ * @returns the first decoded symbol result for an image
639
+ * or NULL if no results are available
640
+ */
641
+ extern const zbar_symbol_t*
642
+ zbar_image_first_symbol(const zbar_image_t *image);
643
+
644
+ /** specify the fourcc image format code for image sample data.
645
+ * refer to the documentation for supported formats.
646
+ * @note this does not convert the data!
647
+ * (see zbar_image_convert() for that)
648
+ */
649
+ extern void zbar_image_set_format(zbar_image_t *image,
650
+ unsigned long format);
651
+
652
+ /** associate a "sequence" (page/frame) number with this image.
653
+ * @since 0.6
654
+ */
655
+ extern void zbar_image_set_sequence(zbar_image_t *image,
656
+ unsigned sequence_num);
657
+
658
+ /** specify the pixel size of the image.
659
+ * @note this also resets the crop rectangle to the full image
660
+ * (0, 0, width, height)
661
+ * @note this does not affect the data!
662
+ */
663
+ extern void zbar_image_set_size(zbar_image_t *image,
664
+ unsigned width,
665
+ unsigned height);
666
+
667
+ /** specify a rectangular region of the image to scan.
668
+ * the rectangle will be clipped to the image boundaries.
669
+ * defaults to the full image specified by zbar_image_set_size()
670
+ */
671
+ extern void zbar_image_set_crop(zbar_image_t *image,
672
+ unsigned x,
673
+ unsigned y,
674
+ unsigned width,
675
+ unsigned height);
676
+
677
+ /** specify image sample data. when image data is no longer needed by
678
+ * the library the specific data cleanup handler will be called
679
+ * (unless NULL)
680
+ * @note application image data will not be modified by the library
681
+ */
682
+ extern void zbar_image_set_data(zbar_image_t *image,
683
+ const void *data,
684
+ unsigned long data_byte_length,
685
+ zbar_image_cleanup_handler_t *cleanup_hndlr);
686
+
687
+ /** built-in cleanup handler.
688
+ * passes the image data buffer to free()
689
+ */
690
+ extern void zbar_image_free_data(zbar_image_t *image);
691
+
692
+ /** associate user specified data value with an image.
693
+ * @since 0.5
694
+ */
695
+ extern void zbar_image_set_userdata(zbar_image_t *image,
696
+ void *userdata);
697
+
698
+ /** return user specified data value associated with the image.
699
+ * @since 0.5
700
+ */
701
+ extern void *zbar_image_get_userdata(const zbar_image_t *image);
702
+
703
+ /** dump raw image data to a file for debug.
704
+ * the data will be prefixed with a 16 byte header consisting of:
705
+ * - 4 bytes uint = 0x676d697a ("zimg")
706
+ * - 4 bytes format fourcc
707
+ * - 2 bytes width
708
+ * - 2 bytes height
709
+ * - 4 bytes size of following image data in bytes
710
+ * this header can be dumped w/eg:
711
+ * @verbatim
712
+ od -Ax -tx1z -N16 -w4 [file]
713
+ @endverbatim
714
+ * for some formats the image can be displayed/converted using
715
+ * ImageMagick, eg:
716
+ * @verbatim
717
+ display -size 640x480+16 [-depth ?] [-sampling-factor ?x?] \
718
+ {GRAY,RGB,UYVY,YUV}:[file]
719
+ @endverbatim
720
+ *
721
+ * @param image the image object to dump
722
+ * @param filebase base filename, appended with ".XXXX.zimg" where
723
+ * XXXX is the format fourcc
724
+ * @returns 0 on success or a system error code on failure
725
+ */
726
+ extern int zbar_image_write(const zbar_image_t *image,
727
+ const char *filebase);
728
+
729
+ /** read back an image in the format written by zbar_image_write()
730
+ * @note TBD
731
+ */
732
+ extern zbar_image_t *zbar_image_read(char *filename);
733
+
734
+ /*@}*/
735
+
736
+ /*------------------------------------------------------------*/
737
+ /** @name Processor interface
738
+ * @anchor c-processor
739
+ * high-level self-contained image processor.
740
+ * processes video and images for barcodes, optionally displaying
741
+ * images to a library owned output window
742
+ */
743
+ /*@{*/
744
+
745
+ struct zbar_processor_s;
746
+ /** opaque standalone processor object. */
747
+ typedef struct zbar_processor_s zbar_processor_t;
748
+
749
+ /** constructor.
750
+ * if threaded is set and threading is available the processor
751
+ * will spawn threads where appropriate to avoid blocking and
752
+ * improve responsiveness
753
+ */
754
+ extern zbar_processor_t *zbar_processor_create(int threaded);
755
+
756
+ /** destructor. cleans up all resources associated with the processor
757
+ */
758
+ extern void zbar_processor_destroy(zbar_processor_t *processor);
759
+
760
+ /** (re)initialization.
761
+ * opens a video input device and/or prepares to display output
762
+ */
763
+ extern int zbar_processor_init(zbar_processor_t *processor,
764
+ const char *video_device,
765
+ int enable_display);
766
+
767
+ /** request a preferred size for the video image from the device.
768
+ * the request may be adjusted or completely ignored by the driver.
769
+ * @note must be called before zbar_processor_init()
770
+ * @since 0.6
771
+ */
772
+ extern int zbar_processor_request_size(zbar_processor_t *processor,
773
+ unsigned width,
774
+ unsigned height);
775
+
776
+ /** request a preferred video driver interface version for
777
+ * debug/testing.
778
+ * @note must be called before zbar_processor_init()
779
+ * @since 0.6
780
+ */
781
+ extern int zbar_processor_request_interface(zbar_processor_t *processor,
782
+ int version);
783
+
784
+ /** request a preferred video I/O mode for debug/testing. You will
785
+ * get errors if the driver does not support the specified mode.
786
+ * @verbatim
787
+ 0 = auto-detect
788
+ 1 = force I/O using read()
789
+ 2 = force memory mapped I/O using mmap()
790
+ 3 = force USERPTR I/O (v4l2 only)
791
+ @endverbatim
792
+ * @note must be called before zbar_processor_init()
793
+ * @since 0.7
794
+ */
795
+ extern int zbar_processor_request_iomode(zbar_processor_t *video,
796
+ int iomode);
797
+
798
+ /** force specific input and output formats for debug/testing.
799
+ * @note must be called before zbar_processor_init()
800
+ */
801
+ extern int zbar_processor_force_format(zbar_processor_t *processor,
802
+ unsigned long input_format,
803
+ unsigned long output_format);
804
+
805
+ /** setup result handler callback.
806
+ * the specified function will be called by the processor whenever
807
+ * new results are available from the video stream or a static image.
808
+ * pass a NULL value to disable callbacks.
809
+ * @param processor the object on which to set the handler.
810
+ * @param handler the function to call when new results are available.
811
+ * @param userdata is set as with zbar_processor_set_userdata().
812
+ * @returns the previously registered handler
813
+ */
814
+ extern zbar_image_data_handler_t*
815
+ zbar_processor_set_data_handler(zbar_processor_t *processor,
816
+ zbar_image_data_handler_t *handler,
817
+ const void *userdata);
818
+
819
+ /** associate user specified data value with the processor.
820
+ * @since 0.6
821
+ */
822
+ extern void zbar_processor_set_userdata(zbar_processor_t *processor,
823
+ void *userdata);
824
+
825
+ /** return user specified data value associated with the processor.
826
+ * @since 0.6
827
+ */
828
+ extern void *zbar_processor_get_userdata(const zbar_processor_t *processor);
829
+
830
+ /** set config for indicated symbology (0 for all) to specified value.
831
+ * @returns 0 for success, non-0 for failure (config does not apply to
832
+ * specified symbology, or value out of range)
833
+ * @see zbar_decoder_set_config()
834
+ * @since 0.4
835
+ */
836
+ extern int zbar_processor_set_config(zbar_processor_t *processor,
837
+ zbar_symbol_type_t symbology,
838
+ zbar_config_t config,
839
+ int value);
840
+
841
+ /** parse configuration string using zbar_parse_config()
842
+ * and apply to processor using zbar_processor_set_config().
843
+ * @returns 0 for success, non-0 for failure
844
+ * @see zbar_parse_config()
845
+ * @see zbar_processor_set_config()
846
+ * @since 0.4
847
+ */
848
+ static inline int zbar_processor_parse_config (zbar_processor_t *processor,
849
+ const char *config_string)
850
+ {
851
+ zbar_symbol_type_t sym;
852
+ zbar_config_t cfg;
853
+ int val;
854
+ return(zbar_parse_config(config_string, &sym, &cfg, &val) ||
855
+ zbar_processor_set_config(processor, sym, cfg, val));
856
+ }
857
+
858
+ /** retrieve the current state of the ouput window.
859
+ * @returns 1 if the output window is currently displayed, 0 if not.
860
+ * @returns -1 if an error occurs
861
+ */
862
+ extern int zbar_processor_is_visible(zbar_processor_t *processor);
863
+
864
+ /** show or hide the display window owned by the library.
865
+ * the size will be adjusted to the input size
866
+ */
867
+ extern int zbar_processor_set_visible(zbar_processor_t *processor,
868
+ int visible);
869
+
870
+ /** control the processor in free running video mode.
871
+ * only works if video input is initialized. if threading is in use,
872
+ * scanning will occur in the background, otherwise this is only
873
+ * useful wrapping calls to zbar_processor_user_wait(). if the
874
+ * library output window is visible, video display will be enabled.
875
+ */
876
+ extern int zbar_processor_set_active(zbar_processor_t *processor,
877
+ int active);
878
+
879
+ /** retrieve decode results for last scanned image/frame.
880
+ * @returns the symbol set result container or NULL if no results are
881
+ * available
882
+ * @note the returned symbol set has its reference count incremented;
883
+ * ensure that the count is decremented after use
884
+ * @since 0.10
885
+ */
886
+ extern const zbar_symbol_set_t*
887
+ zbar_processor_get_results(const zbar_processor_t *processor);
888
+
889
+ /** wait for input to the display window from the user
890
+ * (via mouse or keyboard).
891
+ * @returns >0 when input is received, 0 if timeout ms expired
892
+ * with no input or -1 in case of an error
893
+ */
894
+ extern int zbar_processor_user_wait(zbar_processor_t *processor,
895
+ int timeout);
896
+
897
+ /** process from the video stream until a result is available,
898
+ * or the timeout (in milliseconds) expires.
899
+ * specify a timeout of -1 to scan indefinitely
900
+ * (zbar_processor_set_active() may still be used to abort the scan
901
+ * from another thread).
902
+ * if the library window is visible, video display will be enabled.
903
+ * @note that multiple results may still be returned (despite the
904
+ * name).
905
+ * @returns >0 if symbols were successfully decoded,
906
+ * 0 if no symbols were found (ie, the timeout expired)
907
+ * or -1 if an error occurs
908
+ */
909
+ extern int zbar_process_one(zbar_processor_t *processor,
910
+ int timeout);
911
+
912
+ /** process the provided image for barcodes.
913
+ * if the library window is visible, the image will be displayed.
914
+ * @returns >0 if symbols were successfully decoded,
915
+ * 0 if no symbols were found or -1 if an error occurs
916
+ */
917
+ extern int zbar_process_image(zbar_processor_t *processor,
918
+ zbar_image_t *image);
919
+
920
+ /** display detail for last processor error to stderr.
921
+ * @returns a non-zero value suitable for passing to exit()
922
+ */
923
+ static inline int
924
+ zbar_processor_error_spew (const zbar_processor_t *processor,
925
+ int verbosity)
926
+ {
927
+ return(_zbar_error_spew(processor, verbosity));
928
+ }
929
+
930
+ /** retrieve the detail string for the last processor error. */
931
+ static inline const char*
932
+ zbar_processor_error_string (const zbar_processor_t *processor,
933
+ int verbosity)
934
+ {
935
+ return(_zbar_error_string(processor, verbosity));
936
+ }
937
+
938
+ /** retrieve the type code for the last processor error. */
939
+ static inline zbar_error_t
940
+ zbar_processor_get_error_code (const zbar_processor_t *processor)
941
+ {
942
+ return(_zbar_get_error_code(processor));
943
+ }
944
+
945
+ /*@}*/
946
+
947
+ /*------------------------------------------------------------*/
948
+ /** @name Video interface
949
+ * @anchor c-video
950
+ * mid-level video source abstraction.
951
+ * captures images from a video device
952
+ */
953
+ /*@{*/
954
+
955
+ struct zbar_video_s;
956
+ /** opaque video object. */
957
+ typedef struct zbar_video_s zbar_video_t;
958
+
959
+ /** constructor. */
960
+ extern zbar_video_t *zbar_video_create(void);
961
+
962
+ /** destructor. */
963
+ extern void zbar_video_destroy(zbar_video_t *video);
964
+
965
+ /** open and probe a video device.
966
+ * the device specified by platform specific unique name
967
+ * (v4l device node path in *nix eg "/dev/video",
968
+ * DirectShow DevicePath property in windows).
969
+ * @returns 0 if successful or -1 if an error occurs
970
+ */
971
+ extern int zbar_video_open(zbar_video_t *video,
972
+ const char *device);
973
+
974
+ /** retrieve file descriptor associated with open *nix video device
975
+ * useful for using select()/poll() to tell when new images are
976
+ * available (NB v4l2 only!!).
977
+ * @returns the file descriptor or -1 if the video device is not open
978
+ * or the driver only supports v4l1
979
+ */
980
+ extern int zbar_video_get_fd(const zbar_video_t *video);
981
+
982
+ /** request a preferred size for the video image from the device.
983
+ * the request may be adjusted or completely ignored by the driver.
984
+ * @returns 0 if successful or -1 if the video device is already
985
+ * initialized
986
+ * @since 0.6
987
+ */
988
+ extern int zbar_video_request_size(zbar_video_t *video,
989
+ unsigned width,
990
+ unsigned height);
991
+
992
+ /** request a preferred driver interface version for debug/testing.
993
+ * @note must be called before zbar_video_open()
994
+ * @since 0.6
995
+ */
996
+ extern int zbar_video_request_interface(zbar_video_t *video,
997
+ int version);
998
+
999
+ /** request a preferred I/O mode for debug/testing. You will get
1000
+ * errors if the driver does not support the specified mode.
1001
+ * @verbatim
1002
+ 0 = auto-detect
1003
+ 1 = force I/O using read()
1004
+ 2 = force memory mapped I/O using mmap()
1005
+ 3 = force USERPTR I/O (v4l2 only)
1006
+ @endverbatim
1007
+ * @note must be called before zbar_video_open()
1008
+ * @since 0.7
1009
+ */
1010
+ extern int zbar_video_request_iomode(zbar_video_t *video,
1011
+ int iomode);
1012
+
1013
+ /** retrieve current output image width.
1014
+ * @returns the width or 0 if the video device is not open
1015
+ */
1016
+ extern int zbar_video_get_width(const zbar_video_t *video);
1017
+
1018
+ /** retrieve current output image height.
1019
+ * @returns the height or 0 if the video device is not open
1020
+ */
1021
+ extern int zbar_video_get_height(const zbar_video_t *video);
1022
+
1023
+ /** initialize video using a specific format for debug.
1024
+ * use zbar_negotiate_format() to automatically select and initialize
1025
+ * the best available format
1026
+ */
1027
+ extern int zbar_video_init(zbar_video_t *video,
1028
+ unsigned long format);
1029
+
1030
+ /** start/stop video capture.
1031
+ * all buffered images are retired when capture is disabled.
1032
+ * @returns 0 if successful or -1 if an error occurs
1033
+ */
1034
+ extern int zbar_video_enable(zbar_video_t *video,
1035
+ int enable);
1036
+
1037
+ /** retrieve next captured image. blocks until an image is available.
1038
+ * @returns NULL if video is not enabled or an error occurs
1039
+ */
1040
+ extern zbar_image_t *zbar_video_next_image(zbar_video_t *video);
1041
+
1042
+ /** display detail for last video error to stderr.
1043
+ * @returns a non-zero value suitable for passing to exit()
1044
+ */
1045
+ static inline int zbar_video_error_spew (const zbar_video_t *video,
1046
+ int verbosity)
1047
+ {
1048
+ return(_zbar_error_spew(video, verbosity));
1049
+ }
1050
+
1051
+ /** retrieve the detail string for the last video error. */
1052
+ static inline const char *zbar_video_error_string (const zbar_video_t *video,
1053
+ int verbosity)
1054
+ {
1055
+ return(_zbar_error_string(video, verbosity));
1056
+ }
1057
+
1058
+ /** retrieve the type code for the last video error. */
1059
+ static inline zbar_error_t
1060
+ zbar_video_get_error_code (const zbar_video_t *video)
1061
+ {
1062
+ return(_zbar_get_error_code(video));
1063
+ }
1064
+
1065
+ /*@}*/
1066
+
1067
+ /*------------------------------------------------------------*/
1068
+ /** @name Window interface
1069
+ * @anchor c-window
1070
+ * mid-level output window abstraction.
1071
+ * displays images to user-specified platform specific output window
1072
+ */
1073
+ /*@{*/
1074
+
1075
+ struct zbar_window_s;
1076
+ /** opaque window object. */
1077
+ typedef struct zbar_window_s zbar_window_t;
1078
+
1079
+ /** constructor. */
1080
+ extern zbar_window_t *zbar_window_create(void);
1081
+
1082
+ /** destructor. */
1083
+ extern void zbar_window_destroy(zbar_window_t *window);
1084
+
1085
+ /** associate reader with an existing platform window.
1086
+ * This can be any "Drawable" for X Windows or a "HWND" for windows.
1087
+ * input images will be scaled into the output window.
1088
+ * pass NULL to detach from the resource, further input will be
1089
+ * ignored
1090
+ */
1091
+ extern int zbar_window_attach(zbar_window_t *window,
1092
+ void *x11_display_w32_hwnd,
1093
+ unsigned long x11_drawable);
1094
+
1095
+ /** control content level of the reader overlay.
1096
+ * the overlay displays graphical data for informational or debug
1097
+ * purposes. higher values increase the level of annotation (possibly
1098
+ * decreasing performance). @verbatim
1099
+ 0 = disable overlay
1100
+ 1 = outline decoded symbols (default)
1101
+ 2 = also track and display input frame rate
1102
+ @endverbatim
1103
+ */
1104
+ extern void zbar_window_set_overlay(zbar_window_t *window,
1105
+ int level);
1106
+
1107
+ /** retrieve current content level of reader overlay.
1108
+ * @see zbar_window_set_overlay()
1109
+ * @since 0.10
1110
+ */
1111
+ extern int zbar_window_get_overlay(const zbar_window_t *window);
1112
+
1113
+ /** draw a new image into the output window. */
1114
+ extern int zbar_window_draw(zbar_window_t *window,
1115
+ zbar_image_t *image);
1116
+
1117
+ /** redraw the last image (exposure handler). */
1118
+ extern int zbar_window_redraw(zbar_window_t *window);
1119
+
1120
+ /** resize the image window (reconfigure handler).
1121
+ * this does @em not update the contents of the window
1122
+ * @since 0.3, changed in 0.4 to not redraw window
1123
+ */
1124
+ extern int zbar_window_resize(zbar_window_t *window,
1125
+ unsigned width,
1126
+ unsigned height);
1127
+
1128
+ /** display detail for last window error to stderr.
1129
+ * @returns a non-zero value suitable for passing to exit()
1130
+ */
1131
+ static inline int zbar_window_error_spew (const zbar_window_t *window,
1132
+ int verbosity)
1133
+ {
1134
+ return(_zbar_error_spew(window, verbosity));
1135
+ }
1136
+
1137
+ /** retrieve the detail string for the last window error. */
1138
+ static inline const char*
1139
+ zbar_window_error_string (const zbar_window_t *window,
1140
+ int verbosity)
1141
+ {
1142
+ return(_zbar_error_string(window, verbosity));
1143
+ }
1144
+
1145
+ /** retrieve the type code for the last window error. */
1146
+ static inline zbar_error_t
1147
+ zbar_window_get_error_code (const zbar_window_t *window)
1148
+ {
1149
+ return(_zbar_get_error_code(window));
1150
+ }
1151
+
1152
+
1153
+ /** select a compatible format between video input and output window.
1154
+ * the selection algorithm attempts to use a format shared by
1155
+ * video input and window output which is also most useful for
1156
+ * barcode scanning. if a format conversion is necessary, it will
1157
+ * heuristically attempt to minimize the cost of the conversion
1158
+ */
1159
+ extern int zbar_negotiate_format(zbar_video_t *video,
1160
+ zbar_window_t *window);
1161
+
1162
+ /*@}*/
1163
+
1164
+ /*------------------------------------------------------------*/
1165
+ /** @name Image Scanner interface
1166
+ * @anchor c-imagescanner
1167
+ * mid-level image scanner interface.
1168
+ * reads barcodes from 2-D images
1169
+ */
1170
+ /*@{*/
1171
+
1172
+ struct zbar_image_scanner_s;
1173
+ /** opaque image scanner object. */
1174
+ typedef struct zbar_image_scanner_s zbar_image_scanner_t;
1175
+
1176
+ /** constructor. */
1177
+ extern zbar_image_scanner_t *zbar_image_scanner_create(void);
1178
+
1179
+ /** destructor. */
1180
+ extern void zbar_image_scanner_destroy(zbar_image_scanner_t *scanner);
1181
+
1182
+ /** setup result handler callback.
1183
+ * the specified function will be called by the scanner whenever
1184
+ * new results are available from a decoded image.
1185
+ * pass a NULL value to disable callbacks.
1186
+ * @returns the previously registered handler
1187
+ */
1188
+ extern zbar_image_data_handler_t*
1189
+ zbar_image_scanner_set_data_handler(zbar_image_scanner_t *scanner,
1190
+ zbar_image_data_handler_t *handler,
1191
+ const void *userdata);
1192
+
1193
+
1194
+ /** set config for indicated symbology (0 for all) to specified value.
1195
+ * @returns 0 for success, non-0 for failure (config does not apply to
1196
+ * specified symbology, or value out of range)
1197
+ * @see zbar_decoder_set_config()
1198
+ * @since 0.4
1199
+ */
1200
+ extern int zbar_image_scanner_set_config(zbar_image_scanner_t *scanner,
1201
+ zbar_symbol_type_t symbology,
1202
+ zbar_config_t config,
1203
+ int value);
1204
+
1205
+ /** parse configuration string using zbar_parse_config()
1206
+ * and apply to image scanner using zbar_image_scanner_set_config().
1207
+ * @returns 0 for success, non-0 for failure
1208
+ * @see zbar_parse_config()
1209
+ * @see zbar_image_scanner_set_config()
1210
+ * @since 0.4
1211
+ */
1212
+ static inline int
1213
+ zbar_image_scanner_parse_config (zbar_image_scanner_t *scanner,
1214
+ const char *config_string)
1215
+ {
1216
+ zbar_symbol_type_t sym;
1217
+ zbar_config_t cfg;
1218
+ int val;
1219
+ return(zbar_parse_config(config_string, &sym, &cfg, &val) ||
1220
+ zbar_image_scanner_set_config(scanner, sym, cfg, val));
1221
+ }
1222
+
1223
+ /** enable or disable the inter-image result cache (default disabled).
1224
+ * mostly useful for scanning video frames, the cache filters
1225
+ * duplicate results from consecutive images, while adding some
1226
+ * consistency checking and hysteresis to the results.
1227
+ * this interface also clears the cache
1228
+ */
1229
+ extern void zbar_image_scanner_enable_cache(zbar_image_scanner_t *scanner,
1230
+ int enable);
1231
+
1232
+ /** remove any previously decoded results from the image scanner and the
1233
+ * specified image. somewhat more efficient version of
1234
+ * zbar_image_set_symbols(image, NULL) which may retain memory for
1235
+ * subsequent decodes
1236
+ * @since 0.10
1237
+ */
1238
+ extern void zbar_image_scanner_recycle_image(zbar_image_scanner_t *scanner,
1239
+ zbar_image_t *image);
1240
+
1241
+ /** retrieve decode results for last scanned image.
1242
+ * @returns the symbol set result container or NULL if no results are
1243
+ * available
1244
+ * @note the symbol set does not have its reference count adjusted;
1245
+ * ensure that the count is incremented if the results may be kept
1246
+ * after the next image is scanned
1247
+ * @since 0.10
1248
+ */
1249
+ extern const zbar_symbol_set_t*
1250
+ zbar_image_scanner_get_results(const zbar_image_scanner_t *scanner);
1251
+
1252
+ /** scan for symbols in provided image. The image format must be
1253
+ * "Y800" or "GRAY".
1254
+ * @returns >0 if symbols were successfully decoded from the image,
1255
+ * 0 if no symbols were found or -1 if an error occurs
1256
+ * @see zbar_image_convert()
1257
+ * @since 0.9 - changed to only accept grayscale images
1258
+ */
1259
+ extern int zbar_scan_image(zbar_image_scanner_t *scanner,
1260
+ zbar_image_t *image);
1261
+
1262
+ /*@}*/
1263
+
1264
+ /*------------------------------------------------------------*/
1265
+ /** @name Decoder interface
1266
+ * @anchor c-decoder
1267
+ * low-level bar width stream decoder interface.
1268
+ * identifies symbols and extracts encoded data
1269
+ */
1270
+ /*@{*/
1271
+
1272
+ struct zbar_decoder_s;
1273
+ /** opaque decoder object. */
1274
+ typedef struct zbar_decoder_s zbar_decoder_t;
1275
+
1276
+ /** decoder data handler callback function.
1277
+ * called by decoder when new data has just been decoded
1278
+ */
1279
+ typedef void (zbar_decoder_handler_t)(zbar_decoder_t *decoder);
1280
+
1281
+ /** constructor. */
1282
+ extern zbar_decoder_t *zbar_decoder_create(void);
1283
+
1284
+ /** destructor. */
1285
+ extern void zbar_decoder_destroy(zbar_decoder_t *decoder);
1286
+
1287
+ /** set config for indicated symbology (0 for all) to specified value.
1288
+ * @returns 0 for success, non-0 for failure (config does not apply to
1289
+ * specified symbology, or value out of range)
1290
+ * @since 0.4
1291
+ */
1292
+ extern int zbar_decoder_set_config(zbar_decoder_t *decoder,
1293
+ zbar_symbol_type_t symbology,
1294
+ zbar_config_t config,
1295
+ int value);
1296
+
1297
+ /** parse configuration string using zbar_parse_config()
1298
+ * and apply to decoder using zbar_decoder_set_config().
1299
+ * @returns 0 for success, non-0 for failure
1300
+ * @see zbar_parse_config()
1301
+ * @see zbar_decoder_set_config()
1302
+ * @since 0.4
1303
+ */
1304
+ static inline int zbar_decoder_parse_config (zbar_decoder_t *decoder,
1305
+ const char *config_string)
1306
+ {
1307
+ zbar_symbol_type_t sym;
1308
+ zbar_config_t cfg;
1309
+ int val;
1310
+ return(zbar_parse_config(config_string, &sym, &cfg, &val) ||
1311
+ zbar_decoder_set_config(decoder, sym, cfg, val));
1312
+ }
1313
+
1314
+ /** retrieve symbology boolean config settings.
1315
+ * @returns a bitmask indicating which configs are currently set for the
1316
+ * specified symbology.
1317
+ * @since 0.11
1318
+ */
1319
+ extern unsigned int zbar_decoder_get_configs(const zbar_decoder_t *decoder,
1320
+ zbar_symbol_type_t symbology);
1321
+
1322
+ /** clear all decoder state.
1323
+ * any partial symbols are flushed
1324
+ */
1325
+ extern void zbar_decoder_reset(zbar_decoder_t *decoder);
1326
+
1327
+ /** mark start of a new scan pass.
1328
+ * clears any intra-symbol state and resets color to ::ZBAR_SPACE.
1329
+ * any partially decoded symbol state is retained
1330
+ */
1331
+ extern void zbar_decoder_new_scan(zbar_decoder_t *decoder);
1332
+
1333
+ /** process next bar/space width from input stream.
1334
+ * the width is in arbitrary relative units. first value of a scan
1335
+ * is ::ZBAR_SPACE width, alternating from there.
1336
+ * @returns appropriate symbol type if width completes
1337
+ * decode of a symbol (data is available for retrieval)
1338
+ * @returns ::ZBAR_PARTIAL as a hint if part of a symbol was decoded
1339
+ * @returns ::ZBAR_NONE (0) if no new symbol data is available
1340
+ */
1341
+ extern zbar_symbol_type_t zbar_decode_width(zbar_decoder_t *decoder,
1342
+ unsigned width);
1343
+
1344
+ /** retrieve color of @em next element passed to
1345
+ * zbar_decode_width(). */
1346
+ extern zbar_color_t zbar_decoder_get_color(const zbar_decoder_t *decoder);
1347
+
1348
+ /** retrieve last decoded data.
1349
+ * @returns the data string or NULL if no new data available.
1350
+ * the returned data buffer is owned by library, contents are only
1351
+ * valid between non-0 return from zbar_decode_width and next library
1352
+ * call
1353
+ */
1354
+ extern const char *zbar_decoder_get_data(const zbar_decoder_t *decoder);
1355
+
1356
+ /** retrieve length of binary data.
1357
+ * @returns the length of the decoded data or 0 if no new data
1358
+ * available.
1359
+ */
1360
+ extern unsigned int
1361
+ zbar_decoder_get_data_length(const zbar_decoder_t *decoder);
1362
+
1363
+ /** retrieve last decoded symbol type.
1364
+ * @returns the type or ::ZBAR_NONE if no new data available
1365
+ */
1366
+ extern zbar_symbol_type_t
1367
+ zbar_decoder_get_type(const zbar_decoder_t *decoder);
1368
+
1369
+ /** retrieve modifier flags for the last decoded symbol.
1370
+ * @returns a bitmask indicating which characteristics were detected
1371
+ * during decoding.
1372
+ * @since 0.11
1373
+ */
1374
+ extern unsigned int zbar_decoder_get_modifiers(const zbar_decoder_t *decoder);
1375
+
1376
+ /** retrieve last decode direction.
1377
+ * @returns 1 for forward and -1 for reverse
1378
+ * @returns 0 if the decode direction is unknown or does not apply
1379
+ * @since 0.11
1380
+ */
1381
+ extern int zbar_decoder_get_direction(const zbar_decoder_t *decoder);
1382
+
1383
+ /** setup data handler callback.
1384
+ * the registered function will be called by the decoder
1385
+ * just before zbar_decode_width() returns a non-zero value.
1386
+ * pass a NULL value to disable callbacks.
1387
+ * @returns the previously registered handler
1388
+ */
1389
+ extern zbar_decoder_handler_t*
1390
+ zbar_decoder_set_handler(zbar_decoder_t *decoder,
1391
+ zbar_decoder_handler_t *handler);
1392
+
1393
+ /** associate user specified data value with the decoder. */
1394
+ extern void zbar_decoder_set_userdata(zbar_decoder_t *decoder,
1395
+ void *userdata);
1396
+
1397
+ /** return user specified data value associated with the decoder. */
1398
+ extern void *zbar_decoder_get_userdata(const zbar_decoder_t *decoder);
1399
+
1400
+ /*@}*/
1401
+
1402
+ /*------------------------------------------------------------*/
1403
+ /** @name Scanner interface
1404
+ * @anchor c-scanner
1405
+ * low-level linear intensity sample stream scanner interface.
1406
+ * identifies "bar" edges and measures width between them.
1407
+ * optionally passes to bar width decoder
1408
+ */
1409
+ /*@{*/
1410
+
1411
+ struct zbar_scanner_s;
1412
+ /** opaque scanner object. */
1413
+ typedef struct zbar_scanner_s zbar_scanner_t;
1414
+
1415
+ /** constructor.
1416
+ * if decoder is non-NULL it will be attached to scanner
1417
+ * and called automatically at each new edge
1418
+ * current color is initialized to ::ZBAR_SPACE
1419
+ * (so an initial BAR->SPACE transition may be discarded)
1420
+ */
1421
+ extern zbar_scanner_t *zbar_scanner_create(zbar_decoder_t *decoder);
1422
+
1423
+ /** destructor. */
1424
+ extern void zbar_scanner_destroy(zbar_scanner_t *scanner);
1425
+
1426
+ /** clear all scanner state.
1427
+ * also resets an associated decoder
1428
+ */
1429
+ extern zbar_symbol_type_t zbar_scanner_reset(zbar_scanner_t *scanner);
1430
+
1431
+ /** mark start of a new scan pass. resets color to ::ZBAR_SPACE.
1432
+ * also updates an associated decoder.
1433
+ * @returns any decode results flushed from the pipeline
1434
+ * @note when not using callback handlers, the return value should
1435
+ * be checked the same as zbar_scan_y()
1436
+ * @note call zbar_scanner_flush() at least twice before calling this
1437
+ * method to ensure no decode results are lost
1438
+ */
1439
+ extern zbar_symbol_type_t zbar_scanner_new_scan(zbar_scanner_t *scanner);
1440
+
1441
+ /** flush scanner processing pipeline.
1442
+ * forces current scanner position to be a scan boundary.
1443
+ * call multiple times (max 3) to completely flush decoder.
1444
+ * @returns any decode/scan results flushed from the pipeline
1445
+ * @note when not using callback handlers, the return value should
1446
+ * be checked the same as zbar_scan_y()
1447
+ * @since 0.9
1448
+ */
1449
+ extern zbar_symbol_type_t zbar_scanner_flush(zbar_scanner_t *scanner);
1450
+
1451
+ /** process next sample intensity value.
1452
+ * intensity (y) is in arbitrary relative units.
1453
+ * @returns result of zbar_decode_width() if a decoder is attached,
1454
+ * otherwise @returns (::ZBAR_PARTIAL) when new edge is detected
1455
+ * or 0 (::ZBAR_NONE) if no new edge is detected
1456
+ */
1457
+ extern zbar_symbol_type_t zbar_scan_y(zbar_scanner_t *scanner,
1458
+ int y);
1459
+
1460
+ /** process next sample from RGB (or BGR) triple. */
1461
+ static inline zbar_symbol_type_t zbar_scan_rgb24 (zbar_scanner_t *scanner,
1462
+ unsigned char *rgb)
1463
+ {
1464
+ return(zbar_scan_y(scanner, rgb[0] + rgb[1] + rgb[2]));
1465
+ }
1466
+
1467
+ /** retrieve last scanned width. */
1468
+ extern unsigned zbar_scanner_get_width(const zbar_scanner_t *scanner);
1469
+
1470
+ /** retrieve sample position of last edge.
1471
+ * @since 0.10
1472
+ */
1473
+ extern unsigned zbar_scanner_get_edge(const zbar_scanner_t *scn,
1474
+ unsigned offset,
1475
+ int prec);
1476
+
1477
+ /** retrieve last scanned color. */
1478
+ extern zbar_color_t zbar_scanner_get_color(const zbar_scanner_t *scanner);
1479
+
1480
+ /*@}*/
1481
+
1482
+ #ifdef __cplusplus
1483
+ }
1484
+ }
1485
+
1486
+ # include "zbar/Exception.h"
1487
+ # include "zbar/Decoder.h"
1488
+ # include "zbar/Scanner.h"
1489
+ # include "zbar/Symbol.h"
1490
+ # include "zbar/Image.h"
1491
+ # include "zbar/ImageScanner.h"
1492
+ # include "zbar/Video.h"
1493
+ # include "zbar/Window.h"
1494
+ # include "zbar/Processor.h"
1495
+ #endif
1496
+
1497
+ #endif