fxruby 1.6.50 → 1.6.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data/.github/workflows/binary.yml +17 -0
  4. data/.github/workflows/ci.yml +13 -2
  5. data/Gemfile +7 -2
  6. data/History.md +14 -0
  7. data/Rakefile +28 -46
  8. data/doap.rdf +2 -2
  9. data/docs/Fox/Canvas/CanvasError.html +2 -2
  10. data/docs/Fox/Canvas/CircleShape.html +2 -2
  11. data/docs/Fox/Canvas/ImageShape.html +2 -2
  12. data/docs/Fox/Canvas/LineShape.html +2 -2
  13. data/docs/Fox/Canvas/PolygonShape.html +2 -2
  14. data/docs/Fox/Canvas/RectangleShape.html +2 -2
  15. data/docs/Fox/Canvas/SelectionPolicy.html +2 -2
  16. data/docs/Fox/Canvas/Shape.html +3 -3
  17. data/docs/Fox/Canvas/ShapeCanvas.html +2 -2
  18. data/docs/Fox/Canvas/ShapeGroup.html +2 -2
  19. data/docs/Fox/Canvas/SingleSelectionPolicy.html +2 -2
  20. data/docs/Fox/Canvas/TextShape.html +7 -9
  21. data/docs/Fox/Canvas.html +3 -3
  22. data/docs/Fox/FTNonModal.html +2 -2
  23. data/docs/Fox/FX4Splitter.html +41 -41
  24. data/docs/Fox/FX7Segment.html +5 -5
  25. data/docs/Fox/FXAccelTable.html +2 -2
  26. data/docs/Fox/FXApp.html +54 -54
  27. data/docs/Fox/FXArc.html +2 -2
  28. data/docs/Fox/FXArrowButton.html +22 -22
  29. data/docs/Fox/FXBMPIcon.html +10 -10
  30. data/docs/Fox/FXBMPImage.html +9 -9
  31. data/docs/Fox/FXBitmap.html +7 -7
  32. data/docs/Fox/FXBitmapFrame.html +3 -3
  33. data/docs/Fox/FXBitmapView.html +4 -4
  34. data/docs/Fox/FXButton.html +21 -21
  35. data/docs/Fox/FXCURCursor.html +2 -2
  36. data/docs/Fox/FXCalendar.html +4 -4
  37. data/docs/Fox/FXCanvas.html +7 -7
  38. data/docs/Fox/FXCheckButton.html +13 -13
  39. data/docs/Fox/FXChoiceBox.html +20 -20
  40. data/docs/Fox/FXColor.html +2 -2
  41. data/docs/Fox/FXColorBar.html +10 -10
  42. data/docs/Fox/FXColorDialog.html +7 -7
  43. data/docs/Fox/FXColorItem.html +2 -2
  44. data/docs/Fox/FXColorList.html +2 -2
  45. data/docs/Fox/FXColorRing.html +7 -7
  46. data/docs/Fox/FXColorSelector.html +36 -36
  47. data/docs/Fox/FXColorWell.html +19 -19
  48. data/docs/Fox/FXColorWheel.html +20 -20
  49. data/docs/Fox/FXComboBox.html +31 -31
  50. data/docs/Fox/FXComboTableItem.html +2 -2
  51. data/docs/Fox/FXCommand.html +2 -2
  52. data/docs/Fox/FXComposite.html +5 -5
  53. data/docs/Fox/FXCursor.html +14 -14
  54. data/docs/Fox/FXDC.html +207 -207
  55. data/docs/Fox/FXDCPrint.html +2 -2
  56. data/docs/Fox/FXDCWindow.html +2 -2
  57. data/docs/Fox/FXDataTarget.html +8 -8
  58. data/docs/Fox/FXDebugTarget.html +3 -3
  59. data/docs/Fox/FXDelegator.html +2 -2
  60. data/docs/Fox/FXDial.html +28 -28
  61. data/docs/Fox/FXDialogBox.html +5 -5
  62. data/docs/Fox/FXDict.html +2 -2
  63. data/docs/Fox/FXDirBox.html +7 -7
  64. data/docs/Fox/FXDirDialog.html +2 -2
  65. data/docs/Fox/FXDirItem.html +2 -2
  66. data/docs/Fox/FXDirList.html +19 -19
  67. data/docs/Fox/FXDirSelector.html +15 -15
  68. data/docs/Fox/FXDockBar.html +27 -27
  69. data/docs/Fox/FXDockHandler.html +5 -5
  70. data/docs/Fox/FXDockSite.html +14 -14
  71. data/docs/Fox/FXDockTitle.html +2 -2
  72. data/docs/Fox/FXDocument.html +5 -5
  73. data/docs/Fox/FXDragCorner.html +2 -2
  74. data/docs/Fox/FXDrawable.html +5 -5
  75. data/docs/Fox/FXDriveBox.html +5 -5
  76. data/docs/Fox/FXEvent.html +62 -60
  77. data/docs/Fox/FXExtentd.html +2 -2
  78. data/docs/Fox/FXExtentf.html +2 -2
  79. data/docs/Fox/FXFileAssoc.html +2 -2
  80. data/docs/Fox/FXFileDialog.html +32 -32
  81. data/docs/Fox/FXFileDict.html +7 -7
  82. data/docs/Fox/FXFileItem.html +2 -2
  83. data/docs/Fox/FXFileList.html +27 -27
  84. data/docs/Fox/FXFileSelector.html +35 -35
  85. data/docs/Fox/FXFileStream.html +6 -6
  86. data/docs/Fox/FXFoldingItem.html +2 -2
  87. data/docs/Fox/FXFoldingList.html +41 -41
  88. data/docs/Fox/FXFont.html +172 -170
  89. data/docs/Fox/FXFontDesc.html +2 -2
  90. data/docs/Fox/FXFontDialog.html +2 -2
  91. data/docs/Fox/FXFontSelector.html +14 -14
  92. data/docs/Fox/FXFrame.html +4 -4
  93. data/docs/Fox/FXGIFCursor.html +2 -2
  94. data/docs/Fox/FXGIFIcon.html +10 -10
  95. data/docs/Fox/FXGIFImage.html +9 -9
  96. data/docs/Fox/FXGLCanvas.html +2 -2
  97. data/docs/Fox/FXGLCone.html +2 -2
  98. data/docs/Fox/FXGLContext.html +2 -2
  99. data/docs/Fox/FXGLCube.html +2 -2
  100. data/docs/Fox/FXGLCylinder.html +2 -2
  101. data/docs/Fox/FXGLGroup.html +2 -2
  102. data/docs/Fox/FXGLLine.html +2 -2
  103. data/docs/Fox/FXGLObject.html +14 -14
  104. data/docs/Fox/FXGLPoint.html +2 -2
  105. data/docs/Fox/FXGLShape.html +26 -26
  106. data/docs/Fox/FXGLSphere.html +2 -2
  107. data/docs/Fox/FXGLViewer.html +74 -74
  108. data/docs/Fox/FXGLVisual.html +2 -2
  109. data/docs/Fox/FXGradient.html +2 -2
  110. data/docs/Fox/FXGradientBar.html +34 -34
  111. data/docs/Fox/FXGroupBox.html +7 -7
  112. data/docs/Fox/FXHeader.html +20 -20
  113. data/docs/Fox/FXHeaderItem.html +19 -19
  114. data/docs/Fox/FXHiliteStyle.html +2 -2
  115. data/docs/Fox/FXHorizontalFrame.html +15 -15
  116. data/docs/Fox/FXHorizontalSeparator.html +13 -13
  117. data/docs/Fox/FXICOIcon.html +10 -10
  118. data/docs/Fox/FXICOImage.html +9 -9
  119. data/docs/Fox/FXIcon.html +10 -10
  120. data/docs/Fox/FXIconDict.html +2 -2
  121. data/docs/Fox/FXIconItem.html +2 -2
  122. data/docs/Fox/FXIconList.html +43 -43
  123. data/docs/Fox/FXIconSource.html +2 -2
  124. data/docs/Fox/FXId.html +2 -2
  125. data/docs/Fox/FXImage.html +120 -297
  126. data/docs/Fox/FXImageFrame.html +14 -14
  127. data/docs/Fox/FXImageView.html +13 -13
  128. data/docs/Fox/FXInputDialog.html +7 -7
  129. data/docs/Fox/FXIrb.html +2 -2
  130. data/docs/Fox/FXJPGIcon.html +11 -11
  131. data/docs/Fox/FXJPGImage.html +10 -10
  132. data/docs/Fox/FXKnob.html +17 -17
  133. data/docs/Fox/FXLabel.html +25 -25
  134. data/docs/Fox/FXLight.html +2 -2
  135. data/docs/Fox/FXList.html +29 -29
  136. data/docs/Fox/FXListBox.html +8 -8
  137. data/docs/Fox/FXListItem.html +2 -2
  138. data/docs/Fox/FXMDIChild.html +21 -21
  139. data/docs/Fox/FXMDIClient.html +224 -28
  140. data/docs/Fox/FXMDIDeleteButton.html +2 -2
  141. data/docs/Fox/FXMDIMaximizeButton.html +2 -2
  142. data/docs/Fox/FXMDIMenu.html +2 -2
  143. data/docs/Fox/FXMDIMinimizeButton.html +2 -2
  144. data/docs/Fox/FXMDIRestoreButton.html +2 -2
  145. data/docs/Fox/FXMDIWindowButton.html +2 -2
  146. data/docs/Fox/FXMainWindow.html +4 -4
  147. data/docs/Fox/FXMaterial.html +2 -2
  148. data/docs/Fox/FXMatrix.html +5 -5
  149. data/docs/Fox/FXMemoryBuffer.html +4 -4
  150. data/docs/Fox/FXMemoryStream.html +8 -8
  151. data/docs/Fox/FXMenuBar.html +2 -2
  152. data/docs/Fox/FXMenuButton.html +24 -24
  153. data/docs/Fox/FXMenuCaption.html +5 -5
  154. data/docs/Fox/FXMenuCascade.html +2 -2
  155. data/docs/Fox/FXMenuCheck.html +4 -4
  156. data/docs/Fox/FXMenuCommand.html +4 -4
  157. data/docs/Fox/FXMenuPane.html +2 -2
  158. data/docs/Fox/FXMenuRadio.html +4 -4
  159. data/docs/Fox/FXMenuSeparator.html +2 -2
  160. data/docs/Fox/FXMenuTitle.html +7 -7
  161. data/docs/Fox/FXMessageBox.html +21 -21
  162. data/docs/Fox/FXObject.html +2 -2
  163. data/docs/Fox/FXOption.html +8 -8
  164. data/docs/Fox/FXOptionMenu.html +8 -8
  165. data/docs/Fox/FXPCXIcon.html +10 -10
  166. data/docs/Fox/FXPCXImage.html +9 -9
  167. data/docs/Fox/FXPNGIcon.html +10 -10
  168. data/docs/Fox/FXPNGImage.html +9 -9
  169. data/docs/Fox/FXPPMIcon.html +10 -10
  170. data/docs/Fox/FXPPMImage.html +9 -9
  171. data/docs/Fox/FXPSBounds.html +2 -2
  172. data/docs/Fox/FXPacker.html +2 -2
  173. data/docs/Fox/FXPicker.html +5 -5
  174. data/docs/Fox/FXPopup.html +6 -6
  175. data/docs/Fox/FXPrintDialog.html +23 -23
  176. data/docs/Fox/FXPrinter.html +22 -22
  177. data/docs/Fox/FXProgressBar.html +8 -8
  178. data/docs/Fox/FXProgressDialog.html +6 -6
  179. data/docs/Fox/FXPseudoKeyboard.html +2 -2
  180. data/docs/Fox/FXPseudoMouse.html +2 -2
  181. data/docs/Fox/FXPseudoTarget.html +2 -2
  182. data/docs/Fox/FXQuatd.html +19 -19
  183. data/docs/Fox/FXQuatf.html +24 -24
  184. data/docs/Fox/FXRGBIcon.html +10 -10
  185. data/docs/Fox/FXRGBImage.html +9 -9
  186. data/docs/Fox/FXRadioButton.html +12 -12
  187. data/docs/Fox/FXRanged.html +2 -2
  188. data/docs/Fox/FXRangef.html +2 -2
  189. data/docs/Fox/FXRealSlider.html +40 -40
  190. data/docs/Fox/FXRealSpinner.html +32 -32
  191. data/docs/Fox/FXRecentFiles.html +17 -17
  192. data/docs/Fox/FXRectangle.html +15 -15
  193. data/docs/Fox/FXRegion.html +2 -2
  194. data/docs/Fox/FXRegistry.html +2 -2
  195. data/docs/Fox/FXReplaceDialog.html +29 -29
  196. data/docs/Fox/FXRootWindow.html +5 -5
  197. data/docs/Fox/FXRuler.html +31 -31
  198. data/docs/Fox/FXRulerView.html +2 -2
  199. data/docs/Fox/FXScintilla.html +9116 -2763
  200. data/docs/Fox/FXScrollArea.html +21 -21
  201. data/docs/Fox/FXScrollBar.html +31 -31
  202. data/docs/Fox/FXScrollCorner.html +2 -2
  203. data/docs/Fox/FXScrollPane.html +6 -6
  204. data/docs/Fox/FXScrollWindow.html +9 -9
  205. data/docs/Fox/FXSearchDialog.html +11 -11
  206. data/docs/Fox/FXSegment.html +2 -2
  207. data/docs/Fox/FXSeparator.html +7 -7
  208. data/docs/Fox/FXSettings.html +56 -56
  209. data/docs/Fox/FXShell.html +2 -2
  210. data/docs/Fox/FXShutter.html +24 -24
  211. data/docs/Fox/FXShutterItem.html +19 -19
  212. data/docs/Fox/FXSize.html +12 -12
  213. data/docs/Fox/FXSlider.html +40 -40
  214. data/docs/Fox/FXSphered.html +2 -2
  215. data/docs/Fox/FXSpheref.html +2 -2
  216. data/docs/Fox/FXSpinner.html +31 -31
  217. data/docs/Fox/FXSplashScreen.html +3 -3
  218. data/docs/Fox/FXSplashWindow.html +7 -7
  219. data/docs/Fox/FXSplitter.html +22 -22
  220. data/docs/Fox/FXSpring.html +17 -17
  221. data/docs/Fox/FXStatusBar.html +17 -17
  222. data/docs/Fox/FXStatusLine.html +8 -8
  223. data/docs/Fox/FXStream.html +26 -26
  224. data/docs/Fox/FXStreamAllocError.html +2 -2
  225. data/docs/Fox/FXStreamEndError.html +2 -2
  226. data/docs/Fox/FXStreamError.html +2 -2
  227. data/docs/Fox/FXStreamFailureError.html +2 -2
  228. data/docs/Fox/FXStreamFormatError.html +2 -2
  229. data/docs/Fox/FXStreamFullError.html +2 -2
  230. data/docs/Fox/FXStreamNoReadError.html +2 -2
  231. data/docs/Fox/FXStreamNoWriteError.html +2 -2
  232. data/docs/Fox/FXStreamUnknownError.html +2 -2
  233. data/docs/Fox/FXStringDict.html +2 -2
  234. data/docs/Fox/FXSwitcher.html +30 -30
  235. data/docs/Fox/FXTGAIcon.html +10 -10
  236. data/docs/Fox/FXTGAImage.html +9 -9
  237. data/docs/Fox/FXTIFIcon.html +10 -10
  238. data/docs/Fox/FXTIFImage.html +9 -9
  239. data/docs/Fox/FXTabBar.html +37 -37
  240. data/docs/Fox/FXTabBook.html +15 -15
  241. data/docs/Fox/FXTabItem.html +27 -27
  242. data/docs/Fox/FXTable.html +89 -89
  243. data/docs/Fox/FXTableItem.html +6 -6
  244. data/docs/Fox/FXTablePos.html +2 -2
  245. data/docs/Fox/FXTableRange.html +2 -2
  246. data/docs/Fox/FXText.html +115 -115
  247. data/docs/Fox/FXTextChange.html +2 -2
  248. data/docs/Fox/FXTextField.html +55 -55
  249. data/docs/Fox/FXToggleButton.html +31 -31
  250. data/docs/Fox/FXToolBar.html +15 -15
  251. data/docs/Fox/FXToolBarGrip.html +14 -14
  252. data/docs/Fox/FXToolBarShell.html +11 -11
  253. data/docs/Fox/FXToolBarTab.html +21 -21
  254. data/docs/Fox/FXToolTip.html +12 -10
  255. data/docs/Fox/FXTopWindow.html +34 -34
  256. data/docs/Fox/FXTranslator.html +2 -2
  257. data/docs/Fox/FXTreeItem.html +2 -2
  258. data/docs/Fox/FXTreeList.html +41 -41
  259. data/docs/Fox/FXTreeListBox.html +23 -23
  260. data/docs/Fox/FXTriStateButton.html +21 -21
  261. data/docs/Fox/FXUndoList.html +3 -3
  262. data/docs/Fox/FXVec2d.html +2 -2
  263. data/docs/Fox/FXVec2f.html +2 -2
  264. data/docs/Fox/FXVec3d.html +2 -2
  265. data/docs/Fox/FXVec3f.html +2 -2
  266. data/docs/Fox/FXVec4d.html +2 -2
  267. data/docs/Fox/FXVec4f.html +2 -2
  268. data/docs/Fox/FXVerticalFrame.html +15 -15
  269. data/docs/Fox/FXVerticalSeparator.html +13 -13
  270. data/docs/Fox/FXViewport.html +2 -2
  271. data/docs/Fox/FXVisual.html +24 -24
  272. data/docs/Fox/FXWindow.html +143 -143
  273. data/docs/Fox/FXWizard.html +5 -5
  274. data/docs/Fox/FXXBMIcon.html +11 -11
  275. data/docs/Fox/FXXBMImage.html +10 -10
  276. data/docs/Fox/FXXPMIcon.html +10 -10
  277. data/docs/Fox/FXXPMImage.html +9 -9
  278. data/docs/Fox/NotifyHeader.html +2 -2
  279. data/docs/Fox/SCNotification.html +2 -2
  280. data/docs/Fox/TextRange.html +2 -2
  281. data/docs/Fox.html +89 -89
  282. data/docs/IRB.html +2 -2
  283. data/docs/Responder.html +2 -2
  284. data/docs/Responder2.html +2 -2
  285. data/docs/_index.html +2 -2
  286. data/docs/css/style.css +2 -15
  287. data/docs/file.History.html +1432 -842
  288. data/docs/file.README.html +9 -9
  289. data/docs/index.html +94 -53
  290. data/docs/js/app.js +91 -40
  291. data/docs/js/full_list.js +22 -20
  292. data/docs/method_list.html +2854 -2286
  293. data/docs/top-level-namespace.html +2 -2
  294. data/examples/canvasdemo.rb +4 -4
  295. data/examples/iconlist.rb +79 -4
  296. data/examples/inputs.rb +1 -1
  297. data/examples/rmagick.rb +9 -9
  298. data/ext/fox16_c/FXRbApp.cpp +2 -1
  299. data/ext/fox16_c/FXRbDataTarget.cpp +1 -0
  300. data/ext/fox16_c/FXRbGLViewer.cpp +1 -0
  301. data/ext/fox16_c/FXRbObjRegistry.cpp +12 -5
  302. data/ext/fox16_c/FXRuby.cpp +57 -37
  303. data/ext/fox16_c/core_wrap.cpp +2593 -2155
  304. data/ext/fox16_c/dc_wrap.cpp +1033 -707
  305. data/ext/fox16_c/dialogs_wrap.cpp +1865 -1513
  306. data/ext/fox16_c/extconf.rb +11 -8
  307. data/ext/fox16_c/frames_wrap.cpp +3257 -2876
  308. data/ext/fox16_c/fx3d_wrap.cpp +2170 -1780
  309. data/ext/fox16_c/gvl_wrappers.cpp +1 -0
  310. data/ext/fox16_c/iconlist_wrap.cpp +1209 -882
  311. data/ext/fox16_c/icons_wrap.cpp +1132 -775
  312. data/ext/fox16_c/image_wrap.cpp +1116 -756
  313. data/ext/fox16_c/impl.cpp +1 -0
  314. data/ext/fox16_c/include/FXRbDCWindow.h +1 -1
  315. data/ext/fox16_c/include/FXRuby.h +6 -6
  316. data/ext/fox16_c/label_wrap.cpp +1702 -1354
  317. data/ext/fox16_c/layout_wrap.cpp +1752 -1392
  318. data/ext/fox16_c/list_wrap.cpp +899 -572
  319. data/ext/fox16_c/make_impl.rb +1 -0
  320. data/ext/fox16_c/markfuncs.cpp +1 -0
  321. data/ext/fox16_c/mdi_wrap.cpp +1220 -881
  322. data/ext/fox16_c/menu_wrap.cpp +1402 -1057
  323. data/ext/fox16_c/scintilla_wrap.cpp +658 -337
  324. data/ext/fox16_c/swigruby.h +262 -119
  325. data/ext/fox16_c/table_wrap.cpp +1064 -741
  326. data/ext/fox16_c/text_wrap.cpp +1062 -741
  327. data/ext/fox16_c/treelist_wrap.cpp +1522 -1189
  328. data/ext/fox16_c/ui_wrap.cpp +3610 -3216
  329. data/ext/fox16_c/unregisterOwnedObjects.cpp +1 -0
  330. data/fxruby.gemspec +6 -1
  331. data/lib/fox16/canvas.rb +1 -1
  332. data/lib/fox16/core.rb +97 -26
  333. data/lib/fox16/undolist.rb +32 -32
  334. data/lib/fox16/version.rb +1 -1
  335. data/rdoc-sources/FXApp.rb +12 -0
  336. data/rdoc-sources/FXFont.rb +2 -0
  337. data/rdoc-sources/FXMDIClient.rb +15 -0
  338. data/scripts/iface.rb +1 -0
  339. data/swig-interfaces/FXScintilla.i +1 -1
  340. data/swig-interfaces/FXText.i +1 -1
  341. data/swig-interfaces/freefuncs.i +1 -0
  342. data/swig-interfaces/ruby-typemaps.i +19 -19
  343. data/test/TC_FXBMPImage.rb +1 -1
  344. data/test/TC_FXDC.rb +24 -0
  345. data/test/TC_FXMat4f.rb +23 -14
  346. data/test/TC_FXSize.rb +8 -4
  347. data/test/TS_All.rb +4 -0
  348. data.tar.gz.sig +0 -0
  349. metadata +18 -15
  350. metadata.gz.sig +0 -0
@@ -23,6 +23,7 @@
23
23
  * but which have somehow been "exposed" to the Ruby layer.
24
24
  */
25
25
 
26
+ #include "swigruby.h"
26
27
  #include "FXRbCommon.h"
27
28
 
28
29
  void FXRbHeader::unregisterOwnedObjects(FXHeader *self)
data/fxruby.gemspec CHANGED
@@ -50,7 +50,12 @@ Gem::Specification.new do |spec|
50
50
  spec.require_paths = ["lib"]
51
51
  spec.extensions = ["ext/fox16_c/extconf.rb"]
52
52
  spec.metadata['msys2_mingw_dependencies'] = 'fox'
53
- spec.required_ruby_version = ">= 2.7"
53
+ spec.required_ruby_version = ">= 3.0"
54
+
55
+ # Automatic apt package installation using rubygems-requirements-system
56
+ spec.requirements << "system: g++: debian: g++"
57
+ spec.requirements << "system: libxrandr: debian: libxrandr-dev"
58
+ spec.requirements << "system: libfox: debian: libfox-1.6-dev"
54
59
 
55
60
  spec.add_runtime_dependency 'mini_portile2', '~> 2.1'
56
61
 
data/lib/fox16/canvas.rb CHANGED
@@ -30,7 +30,7 @@ module Fox
30
30
  @draggable = false
31
31
  @x = x
32
32
  @y = y
33
- @foreground = FXRGB(0, 0, 0)
33
+ @foreground = Fox.FXRGB(0, 0, 0)
34
34
  @target = nil
35
35
  @selector = 0
36
36
  end
data/lib/fox16/core.rb CHANGED
@@ -227,12 +227,7 @@ module Fox
227
227
  end
228
228
  end
229
229
 
230
- class FXVec2d
231
- # Convert to array
232
- def to_a
233
- [x, y]
234
- end
235
-
230
+ module FXVec_to_s
236
231
  # Convert to string
237
232
  def to_s
238
233
  to_a.to_s
@@ -240,56 +235,130 @@ module Fox
240
235
 
241
236
  def inspect; to_a.inspect; end
242
237
  end
238
+ private_constant :FXVec_to_s
239
+
240
+ class FXVec2d
241
+ include FXVec_to_s
242
+ # Convert to array
243
+ def to_a
244
+ [x, y]
245
+ end
246
+ end
243
247
 
244
248
  class FXVec2f
249
+ include FXVec_to_s
245
250
  # Convert to array
246
251
  def to_a; [x, y]; end
247
-
248
- # Convert to string
249
- def to_s; to_a.to_s; end
250
-
251
- def inspect; to_a.inspect; end
252
252
  end
253
253
 
254
254
  class FXVec3d
255
+ include FXVec_to_s
255
256
  # Convert to array
256
257
  def to_a; [x, y, z]; end
257
-
258
- # Convert to string
259
- def to_s; to_a.to_s; end
260
-
261
- def inspect; to_a.inspect; end
262
258
  end
263
259
 
264
260
  class FXVec3f
261
+ include FXVec_to_s
265
262
  # Convert to array
266
263
  def to_a; [x, y, z]; end
267
-
268
- # Convert to string
269
- def to_s; to_a.to_s; end
270
-
271
- def inspect; to_a.inspect; end
272
264
  end
273
265
 
274
266
  class FXVec4d
267
+ include FXVec_to_s
275
268
  # Convert to array
276
269
  def to_a; [x, y, z, w]; end
270
+ end
277
271
 
278
- # Convert to string
279
- def to_s; to_a.to_s; end
272
+ class FXVec4f
273
+ include FXVec_to_s
274
+ # Convert to array
275
+ def to_a; [x, y, z, w]; end
276
+ end
280
277
 
281
- def inspect; to_a.inspect; end
278
+ class FXVec2d
279
+ include FXVec_to_s
280
+ # Convert to array
281
+ def to_a
282
+ [x, y]
283
+ end
284
+ end
285
+
286
+ class FXVec2f
287
+ include FXVec_to_s
288
+ # Convert to array
289
+ def to_a; [x, y]; end
290
+ end
291
+
292
+ class FXVec3d
293
+ include FXVec_to_s
294
+ # Convert to array
295
+ def to_a; [x, y, z]; end
296
+ end
297
+
298
+ class FXVec3f
299
+ include FXVec_to_s
300
+ # Convert to array
301
+ def to_a; [x, y, z]; end
302
+ end
303
+
304
+ class FXVec4d
305
+ include FXVec_to_s
306
+ # Convert to array
307
+ def to_a; [x, y, z, w]; end
282
308
  end
283
309
 
284
310
  class FXVec4f
311
+ include FXVec_to_s
285
312
  # Convert to array
286
313
  def to_a; [x, y, z, w]; end
314
+ end
287
315
 
288
- # Convert to string
289
- def to_s; to_a.to_s; end
316
+ module Equality_to_a
317
+ def ==(other)
318
+ other.respond_to?(:to_a) &&
319
+ to_a == other.to_a
320
+ end
290
321
 
291
322
  def inspect; to_a.inspect; end
292
323
  end
324
+ private_constant :Equality_to_a
325
+
326
+ module FXMat3_to_a
327
+ include Equality_to_a
328
+ def to_a
329
+ [self[0].to_a,
330
+ self[1].to_a,
331
+ self[2].to_a]
332
+ end
333
+ end
334
+ private_constant :FXMat3_to_a
335
+
336
+ module FXMat4_to_a
337
+ include Equality_to_a
338
+ def to_a
339
+ [self[0].to_a,
340
+ self[1].to_a,
341
+ self[2].to_a,
342
+ self[3].to_a]
343
+ end
344
+ end
345
+ private_constant :FXMat4_to_a
346
+
347
+ class FXMat3d
348
+ include FXMat3_to_a
349
+ end
350
+
351
+ class FXMat3f
352
+ include FXMat3_to_a
353
+ end
354
+
355
+ class FXMat4d
356
+ include FXMat4_to_a
357
+ end
358
+
359
+ class FXMat4f
360
+ include FXMat4_to_a
361
+ end
293
362
 
294
363
  class FXWindow
295
364
  #
@@ -691,12 +760,14 @@ module Fox
691
760
 
692
761
  class FXImage
693
762
  alias initialize_without_data_string initialize
763
+ private :initialize_without_data_string
694
764
  def initialize(a, pix, *args)
695
765
  initialize_without_data_string(a, pix, *args)
696
766
  @data_string = (options & IMAGE_OWNED) != 0 ? nil : pix
697
767
  end
698
768
 
699
769
  alias setPixels_without_data_string setPixels
770
+ private :setPixels_without_data_string
700
771
  def setPixels(pix, *args)
701
772
  setPixels_without_data_string(pix, *args)
702
773
  @data_string = (options & IMAGE_OWNED) != 0 ? nil : pix
@@ -158,12 +158,12 @@ module Fox
158
158
  #
159
159
  def undo
160
160
  unless @undolist.empty?
161
- command = @undolist.pop
162
- @size -= command.size
163
- command.undo
164
- @redolist.push(command)
165
- @marker = @marker - 1 unless @marker.nil?
166
- return true
161
+ command = @undolist.pop
162
+ @size -= command.size
163
+ command.undo
164
+ @redolist.push(command)
165
+ @marker = @marker - 1 unless @marker.nil?
166
+ return true
167
167
  end
168
168
  return false
169
169
  end
@@ -173,12 +173,12 @@ module Fox
173
173
  #
174
174
  def redo
175
175
  unless @redolist.empty?
176
- command = @redolist.pop
177
- command.redo
178
- @undolist.push(command)
179
- @size += command.size
180
- @marker = @marker + 1 unless @marker.nil?
181
- return true
176
+ command = @redolist.pop
177
+ command.redo
178
+ @undolist.push(command)
179
+ @size += command.size
180
+ @marker = @marker + 1 unless @marker.nil?
181
+ return true
182
182
  end
183
183
  return false
184
184
  end
@@ -202,9 +202,9 @@ module Fox
202
202
  #
203
203
  def revert
204
204
  unless @marker.nil?
205
- undo while (@marker > 0)
206
- redo while (@marker < 0)
207
- return true
205
+ undo while (@marker > 0)
206
+ redo while (@marker < 0)
207
+ return true
208
208
  end
209
209
  return false
210
210
  end
@@ -293,10 +293,10 @@ module Fox
293
293
  #
294
294
  def trimCount(nc)
295
295
  if @undolist.size > nc
296
- numRemoved = @undolist.size - nc
297
- @undolist[0, numRemoved].each { |command| @size -= command.size }
298
- @undolist[0, numRemoved] = nil
299
- @marker = nil if (@marker != nil && @marker > @undolist.size)
296
+ numRemoved = @undolist.size - nc
297
+ @undolist[0, numRemoved].each { |command| @size -= command.size }
298
+ @undolist[0, numRemoved] = nil
299
+ @marker = nil if (@marker != nil && @marker > @undolist.size)
300
300
  end
301
301
  end
302
302
 
@@ -305,14 +305,14 @@ module Fox
305
305
  #
306
306
  def trimSize(sz)
307
307
  if @size > sz
308
- s = 0
309
- @undolist.reverse.each_index { |i|
308
+ s = 0
309
+ @undolist.reverse.each_index { |i|
310
310
  j = @undolist.size - (i + 1)
311
311
  s += @undolist[j].size
312
312
  @undolist[j] = nil if (s > sz)
313
- }
314
- @undolist.compact!
315
- @marker = nil if (@marker != nil && @marker > @undolist.size)
313
+ }
314
+ @undolist.compact!
315
+ @marker = nil if (@marker != nil && @marker > @undolist.size)
316
316
  end
317
317
  end
318
318
 
@@ -344,9 +344,9 @@ module Fox
344
344
 
345
345
  def onUpdUndo(sender, sel, ptr) # :nodoc:
346
346
  if canUndo?
347
- sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
347
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
348
348
  else
349
- sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
349
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
350
350
  end
351
351
  return 1
352
352
  end
@@ -358,9 +358,9 @@ module Fox
358
358
 
359
359
  def onUpdRedo(sender, sel, ptr) # :nodoc:
360
360
  if canRedo?
361
- sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
361
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
362
362
  else
363
- sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
363
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
364
364
  end
365
365
  return 1
366
366
  end
@@ -372,9 +372,9 @@ module Fox
372
372
 
373
373
  def onUpdClear(sender, sel, ptr) # :nodoc:
374
374
  if canUndo? || canRedo?
375
- sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
375
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
376
376
  else
377
- sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
377
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
378
378
  end
379
379
  return 1
380
380
  end
@@ -386,9 +386,9 @@ module Fox
386
386
 
387
387
  def onUpdRevert(sender, sel, ptr) # :nodoc:
388
388
  if canRevert?
389
- sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
389
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_ENABLE, SEL_COMMAND), nil)
390
390
  else
391
- sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
391
+ sender.handle(self, Fox.MKUINT(FXWindow::ID_DISABLE, SEL_COMMAND), nil)
392
392
  end
393
393
  return 1
394
394
  end
data/lib/fox16/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Fox
2
2
  def Fox.fxrubyversion
3
- "1.6.50"
3
+ "1.6.51"
4
4
  end
5
5
  end
@@ -21,6 +21,18 @@ module Fox
21
21
  attr_reader :root_y
22
22
 
23
23
  # Keyboard/modifier state [Integer]
24
+ #
25
+ # Bitmask of these:
26
+ # SHIFTMASK = 0x001, /// Shift key is down
27
+ # CAPSLOCKMASK = 0x002, /// Caps Lock key is down
28
+ # CONTROLMASK = 0x004, /// Ctrl key is down
29
+ # ALTMASK = 0x008, /// Alt key is down
30
+ # METAMASK = 0x040, /// Meta key is down
31
+ # NUMLOCKMASK = 0x010, /// Num Lock key is down
32
+ # SCROLLLOCKMASK = 0x0E0, /// Scroll Lock key is down (seems to vary)
33
+ # LEFTBUTTONMASK = 0x100, /// Left mouse button is down
34
+ # MIDDLEBUTTONMASK = 0x200, /// Middle mouse button is down
35
+ # RIGHTBUTTONMASK = 0x400 /// Right mouse button is down
24
36
  attr_reader :state
25
37
 
26
38
  # Button, keysym or mode; DDE source [Integer]
@@ -218,6 +218,8 @@ module Fox
218
218
  attr_accessor :fontDesc
219
219
 
220
220
  # Font angle [Integer]
221
+ #
222
+ # The angle, in degrees*64 relative to positive x axis
221
223
  attr_accessor :angle
222
224
 
223
225
  # Font description as a string [String]
@@ -16,6 +16,14 @@ module Fox
16
16
  # a menu button connected to the MDI client with the ID_MDI_OVER_X message will be
17
17
  # automatically grayed out if there are less than X MDI child windows.
18
18
  #
19
+ # MDI client can arrange the MDI child windows in various ways:
20
+ # - it may maximize one of the MDI child windows {FXMDIChild#maximize},
21
+ # - arrange them side-by-side {#horizontal}, {#vertical},
22
+ # - cascade them {#cascade},
23
+ # - or iconify them.
24
+ #
25
+ # MDI child windows are notified about changes in the active MDI child window by the MDI client.
26
+ #
19
27
  # === Events
20
28
  #
21
29
  # The following messages are sent by FXMDIClient to its target:
@@ -60,6 +68,13 @@ module Fox
60
68
  # Set active MDI child window for this MDI client to _child_.
61
69
  #
62
70
  def setActiveChild(child=nil, notify=true); end
71
+
72
+ # Arrange childs as cascade
73
+ def cascade(notify=false); end
74
+ # Arrange childs horizontal
75
+ def horizontal(notify=false); end
76
+ # Arrange childs vertical
77
+ def vertical(notify=false); end
63
78
  end
64
79
  end
65
80
 
data/scripts/iface.rb CHANGED
@@ -373,6 +373,7 @@ def main
373
373
 
374
374
  input = $stdin unless input
375
375
  output = $stdout unless output
376
+ output.binmode
376
377
 
377
378
  parser = IFaceParser.new(input, output)
378
379
  iface = parser.process
@@ -177,7 +177,7 @@ public:
177
177
  lp=(lParam==Qtrue) ? 1 : 0;
178
178
  break;
179
179
  case T_DATA:
180
- lp=reinterpret_cast<sptr_t>(DATA_PTR(lParam));
180
+ lp = (sptr_t)FXRbConvertPtr(lParam, NULL, 0);
181
181
  break;
182
182
  default:
183
183
  lp=0;
@@ -722,7 +722,7 @@ public:
722
722
  text->styles=new FXHiliteStyle[text->numStyles];
723
723
  for (long i=0; i<text->numStyles; i++){
724
724
  FXHiliteStyle* ptr;
725
- SWIG_ConvertPtr(rb_ary_entry(styles,i),(void **)&ptr,SWIGTYPE_p_FXHiliteStyle,1);
725
+ SWIG_ConvertPtr(rb_ary_entry(styles,i),(void **)&ptr,SWIGTYPE_p_FXHiliteStyle,SWIG_POINTER_DISOWN);
726
726
  text->styles[i]=*ptr;
727
727
  }
728
728
  self->setHiliteStyles(text->styles);
@@ -54,6 +54,7 @@
54
54
  %freefunc FXChore "FXRbUnregisterRubyObj";
55
55
  %freefunc FXDC "FXRbUnregisterRubyObj";
56
56
  %freefunc FXDCPrint "FXRbUnregisterRubyObj";
57
+ %freefunc FXDCWindow "FXRbUnregisterRubyObj";
57
58
  %freefunc FXEvent "FXRbUnregisterRubyObj";
58
59
  %freefunc FXExtentd "FXRbUnregisterRubyObj";
59
60
  %freefunc FXExtentf "FXRbUnregisterRubyObj";
@@ -247,7 +247,7 @@ inline void* to_FXEvent(VALUE obj){
247
247
  FXEventTypeInfo=SWIG_TypeQuery("FXEvent *");
248
248
  FXASSERT(FXEventTypeInfo!=0);
249
249
  }
250
- SWIG_ConvertPtr(obj,&ptr,FXEventTypeInfo,1);
250
+ SWIG_ConvertPtr(obj,&ptr,FXEventTypeInfo,SWIG_POINTER_DISOWN);
251
251
  return ptr;
252
252
  }
253
253
  %}
@@ -278,7 +278,7 @@ inline void* to_FXEvent(VALUE obj){
278
278
  }
279
279
 
280
280
  /* Convert a Ruby FXDirItem instance into a pointer to a C++ FXDirItem */
281
- %typemap(in) void* PTR_DIRITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXDirItem,1);";
281
+ %typemap(in) void* PTR_DIRITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXDirItem,SWIG_POINTER_DISOWN);";
282
282
 
283
283
  %typemap(in) void* PTR_EVENT "$1 = to_FXEvent($input);";
284
284
 
@@ -293,7 +293,7 @@ inline void* to_FXEvent(VALUE obj){
293
293
 
294
294
  /* Convert a Ruby FXIcon reference to a pointer to an FXIcon */
295
295
  %typemap(in) void* PTR_ICON(void *tmp) {
296
- tmp = FXRbConvertPtr($input, FXRbTypeQuery("FXIcon *"));
296
+ tmp = FXRbConvertPtr($input, FXRbTypeQuery("FXIcon *"), SWIG_POINTER_DISOWN);
297
297
  $1 = (void *) &tmp;
298
298
  }
299
299
 
@@ -329,10 +329,10 @@ inline void* to_FXEvent(VALUE obj){
329
329
  %typemap(in) void* PTR_NULL "$1 = 0;";
330
330
 
331
331
  /* Convert a Ruby FXObject instance into a pointer to a C++ FXObject */
332
- %typemap(in) void* PTR_OBJECT "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXObject,1);";
332
+ %typemap(in) void* PTR_OBJECT "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXObject,SWIG_POINTER_DISOWN);";
333
333
 
334
334
  /* Convert a Ruby FXPoint instance into a pointer to a C++ FXPoint */
335
- %typemap(in) void* PTR_POINT "$1 = FXRbConvertPtr($input, FXRbTypeQuery(\"FXPoint *\"));";
335
+ %typemap(in) void* PTR_POINT "$1 = FXRbConvertPtr($input, FXRbTypeQuery(\"FXPoint *\"), SWIG_POINTER_DISOWN);";
336
336
 
337
337
  /* Convert a Ruby number into a pointer to an FXdouble */
338
338
  %typemap(in) void* PTR_PDOUBLE(FXdouble value) {
@@ -353,7 +353,7 @@ inline void* to_FXEvent(VALUE obj){
353
353
  }
354
354
 
355
355
  /* Convert a Ruby FXTreeItem instance into a pointer to a C++ FXTreeItem */
356
- %typemap(in) void* PTR_TREEITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXTreeItem,1);";
356
+ %typemap(in) void* PTR_TREEITEM "SWIG_ConvertPtr($input,&$1,SWIGTYPE_p_FXTreeItem,SWIG_POINTER_DISOWN);";
357
357
 
358
358
  /* Convert a Ruby number into an FXuchar */
359
359
  %typemap(in) void* PTR_UCHAR "$1 = reinterpret_cast<void*>(NUM2UINT($input));";
@@ -371,7 +371,7 @@ inline void* to_FXEvent(VALUE obj){
371
371
  $1 = new FXVec3f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)));
372
372
  } else {
373
373
  FXVec3f *p;
374
- SWIG_ConvertPtr($input, (void **)&p, SWIGTYPE_p_FXVec3f, 1);
374
+ SWIG_ConvertPtr($input, (void **)&p, SWIGTYPE_p_FXVec3f, SWIG_POINTER_DISOWN);
375
375
  $1 = new FXVec3f(*p);
376
376
  }
377
377
  }
@@ -383,7 +383,7 @@ inline void* to_FXEvent(VALUE obj){
383
383
  tmp = FXVec3f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)));
384
384
  $1 = &tmp;
385
385
  } else {
386
- SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec3f, 1);
386
+ SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec3f, SWIG_POINTER_DISOWN);
387
387
  }
388
388
  }
389
389
 
@@ -397,7 +397,7 @@ inline void* to_FXEvent(VALUE obj){
397
397
  $1 = new FXVec4f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)), NUM2DBL(rb_ary_entry($input, 3)));
398
398
  } else {
399
399
  FXVec4f *p;
400
- SWIG_ConvertPtr($input,(void **)&p,SWIGTYPE_p_FXVec4f,1);
400
+ SWIG_ConvertPtr($input,(void **)&p,SWIGTYPE_p_FXVec4f,SWIG_POINTER_DISOWN);
401
401
  $1 = new FXVec4f(*p);
402
402
  }
403
403
  }
@@ -409,7 +409,7 @@ inline void* to_FXEvent(VALUE obj){
409
409
  tmp = FXVec4f(NUM2DBL(rb_ary_entry($input, 0)), NUM2DBL(rb_ary_entry($input, 1)), NUM2DBL(rb_ary_entry($input, 2)), NUM2DBL(rb_ary_entry($input, 3)));
410
410
  $1 = &tmp;
411
411
  } else {
412
- SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec4f, 1);
412
+ SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXVec4f, SWIG_POINTER_DISOWN);
413
413
  }
414
414
  }
415
415
 
@@ -651,8 +651,8 @@ inline void* to_FXEvent(VALUE obj){
651
651
  $1 = new FXPoint[RARRAY_LEN($input)];
652
652
  $2 = static_cast<FXuint>( RARRAY_LEN($input) );
653
653
  for (FXuint i = 0; i < $2; i++) {
654
- FXPoint *pPoint;
655
- Data_Get_Struct(rb_ary_entry($input, i), FXPoint, pPoint);
654
+ VALUE entry = rb_ary_entry($input, i);
655
+ FXPoint *pPoint = (FXPoint*)FXRbConvertPtr(entry, FXRbTypeQuery("FXPoint *"), 0);
656
656
  $1[i] = *pPoint;
657
657
  }
658
658
  }
@@ -666,8 +666,8 @@ inline void* to_FXEvent(VALUE obj){
666
666
  $1 = new FXSegment[RARRAY_LEN($input)];
667
667
  $2 = static_cast<FXuint>( RARRAY_LEN($input) );
668
668
  for (FXuint i = 0; i < $2; i++) {
669
- FXSegment *pSeg;
670
- Data_Get_Struct(rb_ary_entry($input, i), FXSegment, pSeg);
669
+ VALUE entry = rb_ary_entry($input, i);
670
+ FXSegment *pSeg = (FXSegment*)FXRbConvertPtr(entry, SWIGTYPE_p_FXSegment, 0);
671
671
  $1[i] = *pSeg;
672
672
  }
673
673
  }
@@ -682,8 +682,8 @@ inline void* to_FXEvent(VALUE obj){
682
682
  $1 = new FXRectangle[RARRAY_LEN($input)];
683
683
  $2 = static_cast<FXuint>( RARRAY_LEN($input) );
684
684
  for (FXuint i = 0; i < $2; i++) {
685
- FXRectangle *pRect;
686
- Data_Get_Struct(rb_ary_entry($input, i), FXRectangle, pRect);
685
+ VALUE entry = rb_ary_entry($input, i);
686
+ FXRectangle *pRect = (FXRectangle*)FXRbConvertPtr(entry, SWIGTYPE_p_FXRectangle, 0);
687
687
  $1[i] = *pRect;
688
688
  }
689
689
  }
@@ -698,8 +698,8 @@ inline void* to_FXEvent(VALUE obj){
698
698
  $1 = new FXArc[RARRAY_LEN($input)];
699
699
  $2 = static_cast<FXuint>( RARRAY_LEN($input) );
700
700
  for (FXuint i = 0; i < $2; i++) {
701
- FXArc *pArc;
702
- Data_Get_Struct(rb_ary_entry($input, i), FXArc, pArc);
701
+ VALUE entry = rb_ary_entry($input, i);
702
+ FXArc *pArc = (FXArc*)FXRbConvertPtr(entry, SWIGTYPE_p_FXArc, 0);
703
703
  $1[i] = *pArc;
704
704
  }
705
705
  }
@@ -766,7 +766,7 @@ inline void* to_FXEvent(VALUE obj){
766
766
  if (TYPE($input) == T_FIXNUM || TYPE($input) == T_BIGNUM)) {
767
767
  $1 = reinterpret_cast<FXWindow *>(static_cast<long>(NUM2INT($input)));
768
768
  } else {
769
- SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXWindow, 1);
769
+ SWIG_ConvertPtr($input, (void **) &$1, SWIGTYPE_p_FXWindow, SWIG_POINTER_DISOWN);
770
770
  }
771
771
  }
772
772
 
@@ -15,7 +15,7 @@ class TC_FXBMPImage < Fox::TestCase
15
15
 
16
16
  def test_image_from_pixel_data
17
17
  img = FXBMPImage.new app
18
- img.setPixels +"rgbaRGBA", 0, 1, 2
18
+ img.setPixels(+"rgbaRGBA", 0, 1, 2)
19
19
  bmp_data = FXMemoryStream.open(FXStreamSave, nil) do |outfile|
20
20
  img.savePixels(outfile)
21
21
  outfile.takeBuffer
data/test/TC_FXDC.rb CHANGED
@@ -59,11 +59,23 @@ class TC_FXDC < Test::Unit::TestCase
59
59
  @dc.drawLinesRel(points)
60
60
  end
61
61
 
62
+ def testDrawLinesRel_TypeError
63
+ points = [ FXPoint.new, FXArc.new ]
64
+ msg = assert_raises(TypeError) { @dc.drawLinesRel(points) }
65
+ assert_match(/wrong.* Fox::FXArc.*expected.* Fox::FXPoint/i, msg.to_s)
66
+ end
67
+
62
68
  def testDrawLineSegments
63
69
  segments = [ FXSegment.new, FXSegment.new ]
64
70
  @dc.drawLineSegments(segments)
65
71
  end
66
72
 
73
+ def testDrawLineSegments_TypeError
74
+ segments = [ FXSegment.new, FXPoint.new ]
75
+ msg = assert_raises(TypeError) { @dc.drawLineSegments(segments) }
76
+ assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXSegment/i, msg.to_s)
77
+ end
78
+
67
79
  def testDrawArc
68
80
  x, y, w, h, ang1, ang2 = 0, 0, 10, 10, 45, 135
69
81
  @dc.drawArc(x, y, w, h, ang1, ang2)
@@ -74,6 +86,12 @@ class TC_FXDC < Test::Unit::TestCase
74
86
  @dc.drawArcs(arcs)
75
87
  end
76
88
 
89
+ def testDrawArcs_TypeError
90
+ arcs = [ FXPoint.new, FXPoint.new ]
91
+ msg = assert_raises(TypeError) { @dc.drawArcs(arcs) }
92
+ assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXArc/i, msg.to_s)
93
+ end
94
+
77
95
  def testFillRectangle
78
96
  x, y, w, h = 0, 0, 20, 20
79
97
  @dc.fillRectangle(x, y, w, h)
@@ -84,6 +102,12 @@ class TC_FXDC < Test::Unit::TestCase
84
102
  @dc.fillRectangles(rectangles)
85
103
  end
86
104
 
105
+ def testFillRectangles_TypeError
106
+ rectangles = [ FXRectangle.new, FXPoint.new ]
107
+ msg = assert_raises(TypeError) { @dc.fillRectangles(rectangles) }
108
+ assert_match(/wrong.* Fox::FXPoint.*expected.* Fox::FXRectangle/i, msg.to_s)
109
+ end
110
+
87
111
  def testFillArc
88
112
  x, y, w, h, ang1, ang2 = 0, 0, 10, 10, 45, 135
89
113
  @dc.fillArc(x, y, w, h, ang1, ang2)