fxruby 1.6.28-x86-mingw32 → 1.6.29-x86-mingw32
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.
- checksums.yaml +7 -7
 - checksums.yaml.gz.sig +0 -0
 - data.tar.gz.sig +0 -0
 - data/.gitignore +1 -1
 - data/History.txt +13 -1
 - data/Manifest.txt +1 -1
 - data/Rakefile +49 -39
 - data/examples/RAA.rb +8 -2
 - data/examples/WhatAQuietStiff.rb +2 -2
 - data/examples/babelfish.rb +9 -2
 - data/examples/browser.rb +1 -1
 - data/examples/button.rb +3 -9
 - data/examples/canvasdemo.rb +3 -3
 - data/examples/charts.rb +9 -2
 - data/examples/dctest.rb +4 -10
 - data/examples/gembrowser.rb +4 -4
 - data/examples/gltest.rb +3 -3
 - data/examples/glviewer.rb +3 -9
 - data/examples/groupbox.rb +3 -9
 - data/examples/header.rb +1 -1
 - data/examples/hello2.rb +1 -1
 - data/examples/iRAA.rb +7 -1
 - data/examples/iconlist.rb +3 -9
 - data/examples/imageviewer.rb +3 -9
 - data/examples/mditest.rb +1 -1
 - data/examples/raabrowser.rb +8 -2
 - data/examples/rmagick.rb +7 -1
 - data/examples/shutter.rb +3 -9
 - data/examples/splitter.rb +3 -9
 - data/examples/table.rb +26 -3
 - data/examples/textedit/textedit.rb +3 -3
 - data/ext/fox16_c/FXRbApp.cpp +1 -1
 - data/ext/fox16_c/FXRuby.cpp +18 -9
 - data/ext/fox16_c/extconf.rb +252 -11
 - data/ext/fox16_c/include/FXRbTreeList.h +3 -3
 - data/ext/fox16_c/include/FXRuby.h +7 -6
 - data/ext/fox16_c/markfuncs.cpp +3 -22
 - data/ext/fox16_c/unregisterOwnedObjects.cpp +1 -2
 - data/lib/1.8/fox16_c.so +0 -0
 - data/lib/1.9/fox16_c.so +0 -0
 - data/lib/2.0/fox16_c.so +0 -0
 - data/lib/2.1/fox16_c.so +0 -0
 - data/lib/2.2/fox16_c.so +0 -0
 - data/lib/fox16.rb +16 -6
 - data/lib/fox16/core.rb +14 -0
 - data/lib/fox16/glshapes.rb +1 -0
 - data/lib/fox16/version.rb +1 -1
 - data/lib/x86-mingw32/libFOX-1.6-0.dll +0 -0
 - data/lib/x86-mingw32/libfxscintilla-20.dll +0 -0
 - data/lib/x86-mingw32/libgcc_s_sjlj-1.dll +0 -0
 - data/lib/x86-mingw32/libjpeg-8.dll +0 -0
 - data/lib/x86-mingw32/libpng15-15.dll +0 -0
 - data/lib/x86-mingw32/libstdc++-6.dll +0 -0
 - data/lib/x86-mingw32/libtiff-5.dll +0 -0
 - data/lib/x86-mingw32/libwinpthread-1.dll +0 -0
 - data/lib/x86-mingw32/zlib1.dll +0 -0
 - data/rdoc-sources/FXBMPIcon.rb +1 -1
 - data/rdoc-sources/FXImage.rb +8 -2
 - data/swig-interfaces/FX4Splitter.i +0 -6
 - data/swig-interfaces/FX7Segment.i +0 -8
 - data/swig-interfaces/FXAccelTable.i +0 -7
 - data/swig-interfaces/FXApp.i +15 -23
 - data/swig-interfaces/FXArrowButton.i +0 -10
 - data/swig-interfaces/FXBMPIcon.i +0 -2
 - data/swig-interfaces/FXBMPImage.i +0 -2
 - data/swig-interfaces/FXBitmap.i +0 -6
 - data/swig-interfaces/FXButton.i +0 -4
 - data/swig-interfaces/FXCURCursor.i +0 -2
 - data/swig-interfaces/FXCanvas.i +0 -2
 - data/swig-interfaces/FXCheckButton.i +0 -7
 - data/swig-interfaces/FXChoiceBox.i +0 -8
 - data/swig-interfaces/FXColorBar.i +0 -8
 - data/swig-interfaces/FXColorDialog.i +0 -4
 - data/swig-interfaces/FXColorList.i +0 -9
 - data/swig-interfaces/FXColorRing.i +0 -40
 - data/swig-interfaces/FXColorSelector.i +0 -25
 - data/swig-interfaces/FXColorWell.i +0 -10
 - data/swig-interfaces/FXColorWheel.i +0 -15
 - data/swig-interfaces/FXComboBox.i +0 -7
 - data/swig-interfaces/FXComposeContext.i +0 -5
 - data/swig-interfaces/FXComposite.i +0 -4
 - data/swig-interfaces/FXCursor.i +0 -9
 - data/swig-interfaces/FXDC.i +0 -26
 - data/swig-interfaces/FXDCPrint.i +0 -19
 - data/swig-interfaces/FXDataTarget.i +0 -5
 - data/swig-interfaces/FXDebugTarget.i +0 -4
 - data/swig-interfaces/FXDelegator.i +0 -2
 - data/swig-interfaces/FXDial.i +0 -14
 - data/swig-interfaces/FXDialogBox.i +0 -2
 - data/swig-interfaces/FXDict.i +0 -27
 - data/swig-interfaces/FXDirDialog.i +0 -5
 - data/swig-interfaces/FXDirList.i +0 -31
 - data/swig-interfaces/FXDirSelector.i +0 -19
 - data/swig-interfaces/FXDockBar.i +0 -8
 - data/swig-interfaces/FXDockHandler.i +0 -10
 - data/swig-interfaces/FXDockSite.i +0 -7
 - data/swig-interfaces/FXDockTitle.i +0 -6
 - data/swig-interfaces/FXDragCorner.i +0 -9
 - data/swig-interfaces/FXDrawable.i +0 -7
 - data/swig-interfaces/FXFileDialog.i +0 -5
 - data/swig-interfaces/FXFileDict.i +0 -5
 - data/swig-interfaces/FXFileList.i +0 -23
 - data/swig-interfaces/FXFileSelector.i +0 -33
 - data/swig-interfaces/FXFoldingList.i +6 -19
 - data/swig-interfaces/FXFont.i +0 -20
 - data/swig-interfaces/FXFontDialog.i +3 -7
 - data/swig-interfaces/FXFontSelector.i +3 -29
 - data/swig-interfaces/FXFrame.i +0 -20
 - data/swig-interfaces/FXGIFIcon.i +0 -2
 - data/swig-interfaces/FXGIFImage.i +0 -2
 - data/swig-interfaces/FXGLCanvas.i +0 -4
 - data/swig-interfaces/FXGLContext.i +0 -4
 - data/swig-interfaces/FXGLShape.i +0 -11
 - data/swig-interfaces/FXGLViewer.i +0 -65
 - data/swig-interfaces/FXGradientBar.i +8 -9
 - data/swig-interfaces/FXGroupBox.i +0 -6
 - data/swig-interfaces/FXHeader.i +0 -24
 - data/swig-interfaces/FXHorizontalFrame.i +0 -2
 - data/swig-interfaces/FXICOIcon.i +0 -2
 - data/swig-interfaces/FXICOImage.i +0 -2
 - data/swig-interfaces/FXIcon.i +0 -7
 - data/swig-interfaces/FXIconList.i +0 -51
 - data/swig-interfaces/FXIconSource.i +0 -4
 - data/swig-interfaces/FXId.i +0 -4
 - data/swig-interfaces/FXImage.i +21 -4
 - data/swig-interfaces/FXImageFrame.i +0 -7
 - data/swig-interfaces/FXImageView.i +0 -6
 - data/swig-interfaces/FXInputDialog.i +0 -8
 - data/swig-interfaces/FXJPGIcon.i +0 -4
 - data/swig-interfaces/FXJPGImage.i +0 -4
 - data/swig-interfaces/FXKnob.i +0 -12
 - data/swig-interfaces/FXLabel.i +0 -16
 - data/swig-interfaces/FXList.i +0 -33
 - data/swig-interfaces/FXListBox.i +0 -7
 - data/swig-interfaces/FXMDIButton.i +0 -12
 - data/swig-interfaces/FXMDIChild.i +0 -51
 - data/swig-interfaces/FXMDIClient.i +0 -6
 - data/swig-interfaces/FXMainWindow.i +0 -2
 - data/swig-interfaces/FXMat3d.i +0 -2
 - data/swig-interfaces/FXMat3f.i +0 -2
 - data/swig-interfaces/FXMat4d.i +0 -2
 - data/swig-interfaces/FXMat4f.i +0 -2
 - data/swig-interfaces/FXMatrix.i +0 -4
 - data/swig-interfaces/FXMemoryStream.i +0 -1
 - data/swig-interfaces/FXMenuBar.i +0 -2
 - data/swig-interfaces/FXMenuButton.i +0 -7
 - data/swig-interfaces/FXMenuCaption.i +0 -15
 - data/swig-interfaces/FXMenuCascade.i +0 -5
 - data/swig-interfaces/FXMenuCheck.i +0 -8
 - data/swig-interfaces/FXMenuCommand.i +0 -5
 - data/swig-interfaces/FXMenuPane.i +0 -2
 - data/swig-interfaces/FXMenuRadio.i +0 -8
 - data/swig-interfaces/FXMenuSeparator.i +0 -5
 - data/swig-interfaces/FXMenuTitle.i +0 -4
 - data/swig-interfaces/FXMessageBox.i +13 -10
 - data/swig-interfaces/FXOptionMenu.i +0 -7
 - data/swig-interfaces/FXPCXIcon.i +0 -2
 - data/swig-interfaces/FXPCXImage.i +0 -2
 - data/swig-interfaces/FXPNGIcon.i +0 -2
 - data/swig-interfaces/FXPNGImage.i +0 -2
 - data/swig-interfaces/FXPPMIcon.i +0 -2
 - data/swig-interfaces/FXPPMImage.i +0 -2
 - data/swig-interfaces/FXPacker.i +0 -23
 - data/swig-interfaces/FXPicker.i +0 -2
 - data/swig-interfaces/FXPopup.i +0 -18
 - data/swig-interfaces/FXPrintDialog.i +0 -31
 - data/swig-interfaces/FXProgressBar.i +0 -12
 - data/swig-interfaces/FXProgressDialog.i +0 -8
 - data/swig-interfaces/FXRGBIcon.i +0 -2
 - data/swig-interfaces/FXRGBImage.i +0 -2
 - data/swig-interfaces/FXRadioButton.i +0 -7
 - data/swig-interfaces/FXRecentFiles.i +0 -6
 - data/swig-interfaces/FXRegion.i +0 -2
 - data/swig-interfaces/FXRegistry.i +0 -12
 - data/swig-interfaces/FXReplaceDialog.i +0 -15
 - data/swig-interfaces/FXRootWindow.i +0 -6
 - data/swig-interfaces/FXRuler.i +0 -45
 - data/swig-interfaces/FXScrollArea.i +0 -14
 - data/swig-interfaces/FXScrollBar.i +0 -2
 - data/swig-interfaces/FXScrollPane.i +0 -10
 - data/swig-interfaces/FXScrollWindow.i +0 -2
 - data/swig-interfaces/FXSearchDialog.i +0 -2
 - data/swig-interfaces/FXSeparator.i +0 -9
 - data/swig-interfaces/FXSettings.i +0 -11
 - data/swig-interfaces/FXShell.i +0 -4
 - data/swig-interfaces/FXShutter.i +0 -14
 - data/swig-interfaces/FXSlider.i +0 -19
 - data/swig-interfaces/FXSpinner.i +0 -9
 - data/swig-interfaces/FXSplashWindow.i +0 -8
 - data/swig-interfaces/FXSplitter.i +0 -10
 - data/swig-interfaces/FXSpring.i +0 -8
 - data/swig-interfaces/FXStatusBar.i +0 -5
 - data/swig-interfaces/FXStatusLine.i +0 -8
 - data/swig-interfaces/FXStringDict.i +0 -3
 - data/swig-interfaces/FXSwitcher.i +0 -4
 - data/swig-interfaces/FXTGAIcon.i +0 -2
 - data/swig-interfaces/FXTGAImage.i +0 -2
 - data/swig-interfaces/FXTIFIcon.i +0 -4
 - data/swig-interfaces/FXTIFImage.i +0 -4
 - data/swig-interfaces/FXTabBar.i +0 -5
 - data/swig-interfaces/FXTabBook.i +0 -2
 - data/swig-interfaces/FXTabItem.i +0 -2
 - data/swig-interfaces/FXTable.i +0 -17
 - data/swig-interfaces/FXToggleButton.i +0 -12
 - data/swig-interfaces/FXToolBarGrip.i +0 -4
 - data/swig-interfaces/FXToolBarShell.i +0 -16
 - data/swig-interfaces/FXToolBarTab.i +0 -13
 - data/swig-interfaces/FXToolTip.i +0 -10
 - data/swig-interfaces/FXTopWindow.i +0 -17
 - data/swig-interfaces/FXTranslator.i +0 -2
 - data/swig-interfaces/FXTreeList.i +18 -75
 - data/swig-interfaces/FXTreeListBox.i +18 -38
 - data/swig-interfaces/FXVerticalFrame.i +0 -2
 - data/swig-interfaces/FXVisual.i +0 -38
 - data/swig-interfaces/FXWindow.i +3 -53
 - data/swig-interfaces/FXWizard.i +0 -17
 - data/swig-interfaces/FXXBMIcon.i +0 -2
 - data/swig-interfaces/FXXBMImage.i +0 -2
 - data/swig-interfaces/FXXPMIcon.i +0 -2
 - data/swig-interfaces/FXXPMImage.i +0 -2
 - data/swig-interfaces/fxdefs.i +33 -35
 - data/swig-interfaces/ruby-typemaps.i +19 -2
 - data/test/TC_FXBMPImage.rb +13 -0
 - data/test/TC_FXFileStream.rb +3 -3
 - data/test/TC_FXImage.rb +40 -2
 - data/test/TC_FXSize.rb +12 -0
 - data/test/TC_FXWindow.rb +26 -0
 - data/test/TC_Misc.rb +2 -0
 - metadata +177 -161
 - metadata.gz.sig +0 -0
 - data/Rakefile.cross +0 -421
 
    
        data/examples/header.rb
    CHANGED
    
    
    
        data/examples/hello2.rb
    CHANGED
    
    | 
         @@ -30,7 +30,7 @@ main = FXMainWindow.new(application, "Hello", nil, nil, DECOR_ALL) 
     | 
|
| 
       30 
30 
     | 
    
         
             
            # on disk.
         
     | 
| 
       31 
31 
     | 
    
         | 
| 
       32 
32 
     | 
    
         
             
            icon = nil
         
     | 
| 
       33 
     | 
    
         
            -
            File.open(File. 
     | 
| 
      
 33 
     | 
    
         
            +
            File.open(File.expand_path("../icons/hello2.png", __FILE__), "rb") { |f|
         
     | 
| 
       34 
34 
     | 
    
         
             
              icon = FXPNGIcon.new(application, f.read)
         
     | 
| 
       35 
35 
     | 
    
         
             
            }
         
     | 
| 
       36 
36 
     | 
    
         | 
    
        data/examples/iRAA.rb
    CHANGED
    
    
    
        data/examples/iconlist.rb
    CHANGED
    
    | 
         @@ -6,15 +6,9 @@ class IconListWindow < FXMainWindow 
     | 
|
| 
       6 
6 
     | 
    
         | 
| 
       7 
7 
     | 
    
         
             
              # Load the named PNG icon from a file
         
     | 
| 
       8 
8 
     | 
    
         
             
              def loadIcon(filename)
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
             
     | 
| 
       11 
     | 
    
         
            -
                   
     | 
| 
       12 
     | 
    
         
            -
                  File.open(filename, "rb") do |f|
         
     | 
| 
       13 
     | 
    
         
            -
                    icon = FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       14 
     | 
    
         
            -
                  end
         
     | 
| 
       15 
     | 
    
         
            -
                  icon
         
     | 
| 
       16 
     | 
    
         
            -
                rescue
         
     | 
| 
       17 
     | 
    
         
            -
                  raise RuntimeError, "Couldn't load icon: #{filename}"
         
     | 
| 
      
 9 
     | 
    
         
            +
                filename = File.expand_path("../icons/#{filename}", __FILE__)
         
     | 
| 
      
 10 
     | 
    
         
            +
                File.open(filename, "rb") do |f|
         
     | 
| 
      
 11 
     | 
    
         
            +
                  FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       18 
12 
     | 
    
         
             
                end
         
     | 
| 
       19 
13 
     | 
    
         
             
              end
         
     | 
| 
       20 
14 
     | 
    
         | 
    
        data/examples/imageviewer.rb
    CHANGED
    
    | 
         @@ -240,15 +240,9 @@ class ImageWindow < FXMainWindow 
     | 
|
| 
       240 
240 
     | 
    
         | 
| 
       241 
241 
     | 
    
         
             
              # Convenience function to construct a PNG icon
         
     | 
| 
       242 
242 
     | 
    
         
             
              def getIcon(filename)
         
     | 
| 
       243 
     | 
    
         
            -
                 
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
                   
     | 
| 
       246 
     | 
    
         
            -
                  File.open(filename, "rb") do |f|
         
     | 
| 
       247 
     | 
    
         
            -
                    icon = FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       248 
     | 
    
         
            -
                  end
         
     | 
| 
       249 
     | 
    
         
            -
                  icon
         
     | 
| 
       250 
     | 
    
         
            -
                rescue
         
     | 
| 
       251 
     | 
    
         
            -
                  raise RuntimeError, "Couldn't load icon: #{filename}"
         
     | 
| 
      
 243 
     | 
    
         
            +
                filename = File.expand_path("../icons/#{filename}", __FILE__)
         
     | 
| 
      
 244 
     | 
    
         
            +
                File.open(filename, "rb") do |f|
         
     | 
| 
      
 245 
     | 
    
         
            +
                  FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       252 
246 
     | 
    
         
             
                end
         
     | 
| 
       253 
247 
     | 
    
         
             
              end
         
     | 
| 
       254 
248 
     | 
    
         | 
    
        data/examples/mditest.rb
    CHANGED
    
    | 
         @@ -64,7 +64,7 @@ class MDITestWindow  < FXMainWindow 
     | 
|
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
                # Icon for MDI Child
         
     | 
| 
       66 
66 
     | 
    
         
             
                @mdiicon = nil
         
     | 
| 
       67 
     | 
    
         
            -
                File.open(File. 
     | 
| 
      
 67 
     | 
    
         
            +
                File.open(File.expand_path("../icons/penguin.png", __FILE__), "rb") do |f|
         
     | 
| 
       68 
68 
     | 
    
         
             
                  @mdiicon = FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       69 
69 
     | 
    
         
             
                end
         
     | 
| 
       70 
70 
     | 
    
         | 
    
        data/examples/raabrowser.rb
    CHANGED
    
    
    
        data/examples/rmagick.rb
    CHANGED
    
    
    
        data/examples/shutter.rb
    CHANGED
    
    | 
         @@ -28,15 +28,9 @@ class ShutterWindow < FXMainWindow 
     | 
|
| 
       28 
28 
     | 
    
         
             
              # and constructs and returns a ICO icon object.
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
              def loadIcon(filename)
         
     | 
| 
       31 
     | 
    
         
            -
                 
     | 
| 
       32 
     | 
    
         
            -
             
     | 
| 
       33 
     | 
    
         
            -
                   
     | 
| 
       34 
     | 
    
         
            -
                  File.open(filename, "rb") do |f|
         
     | 
| 
       35 
     | 
    
         
            -
                    icon = FXICOIcon.new(getApp(), f.read)
         
     | 
| 
       36 
     | 
    
         
            -
                  end
         
     | 
| 
       37 
     | 
    
         
            -
                  icon
         
     | 
| 
       38 
     | 
    
         
            -
                rescue
         
     | 
| 
       39 
     | 
    
         
            -
                  raise RuntimeError, "Couldn't load icon: #{filename}"
         
     | 
| 
      
 31 
     | 
    
         
            +
                filename = File.expand_path("../icons/#{filename}", __FILE__)
         
     | 
| 
      
 32 
     | 
    
         
            +
                File.open(filename, "rb") do |f|
         
     | 
| 
      
 33 
     | 
    
         
            +
                  FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       40 
34 
     | 
    
         
             
                end
         
     | 
| 
       41 
35 
     | 
    
         
             
              end
         
     | 
| 
       42 
36 
     | 
    
         | 
    
        data/examples/splitter.rb
    CHANGED
    
    | 
         @@ -8,15 +8,9 @@ class SplitterWindow < FXMainWindow 
     | 
|
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
              # Convenience function to load & construct an icon
         
     | 
| 
       10 
10 
     | 
    
         
             
              def makeIcon(filename)
         
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                   
     | 
| 
       14 
     | 
    
         
            -
                  File.open(filename, "rb") do |f|
         
     | 
| 
       15 
     | 
    
         
            -
                    icon = FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       16 
     | 
    
         
            -
                  end
         
     | 
| 
       17 
     | 
    
         
            -
                  icon
         
     | 
| 
       18 
     | 
    
         
            -
                rescue
         
     | 
| 
       19 
     | 
    
         
            -
                  raise RuntimeError, "Couldn't load icon: #{filename}"
         
     | 
| 
      
 11 
     | 
    
         
            +
                filename = File.expand_path("../icons/#{filename}", __FILE__)
         
     | 
| 
      
 12 
     | 
    
         
            +
                File.open(filename, "rb") do |f|
         
     | 
| 
      
 13 
     | 
    
         
            +
                  FXPNGIcon.new(getApp(), f.read)
         
     | 
| 
       20 
14 
     | 
    
         
             
                end
         
     | 
| 
       21 
15 
     | 
    
         
             
              end
         
     | 
| 
       22 
16 
     | 
    
         | 
    
        data/examples/table.rb
    CHANGED
    
    | 
         @@ -7,6 +7,28 @@ include Fox 
     | 
|
| 
       7 
7 
     | 
    
         | 
| 
       8 
8 
     | 
    
         
             
            class TableWindow < FXMainWindow
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              class MyFXTable < Fox::FXTable
         
     | 
| 
      
 12 
     | 
    
         
            +
                include Responder
         
     | 
| 
      
 13 
     | 
    
         
            +
                def initialize(*args, &block)
         
     | 
| 
      
 14 
     | 
    
         
            +
                  super
         
     | 
| 
      
 15 
     | 
    
         
            +
                  FXMAPFUNC(SEL_COMMAND, FXTable::ID_PASTE_SEL, 'onCmdPasteSel')
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
                def onCmdPasteSel(sender, sel, ptr)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  data = getDNDData(FROM_CLIPBOARD, FXTable.utf8Type)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  if data && anythingSelected?
         
     | 
| 
      
 20 
     | 
    
         
            +
                    rows_cols = data.split("\n").map{|l| l.split("\t") }
         
     | 
| 
      
 21 
     | 
    
         
            +
                    rows_cols.each.with_index(selStartRow) do |cols, row_nr|
         
     | 
| 
      
 22 
     | 
    
         
            +
                      cols.each.with_index(selStartColumn) do |text, col_nr|
         
     | 
| 
      
 23 
     | 
    
         
            +
                        setItemText( row_nr, col_nr, text)
         
     | 
| 
      
 24 
     | 
    
         
            +
                      end
         
     | 
| 
      
 25 
     | 
    
         
            +
                    end
         
     | 
| 
      
 26 
     | 
    
         
            +
                    max_cols = rows_cols.inject(0){|s,cols| [s, cols.length].max }
         
     | 
| 
      
 27 
     | 
    
         
            +
                    selectRange(selStartRow, selStartRow+rows_cols.length-1, selStartColumn, selStartColumn+max_cols-1)
         
     | 
| 
      
 28 
     | 
    
         
            +
                  end
         
     | 
| 
      
 29 
     | 
    
         
            +
                end
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
       10 
32 
     | 
    
         
             
              def initialize(app)
         
     | 
| 
       11 
33 
     | 
    
         
             
                # Call the base class initializer first
         
     | 
| 
       12 
34 
     | 
    
         
             
                super(app, "Table Widget Test", :opts => DECOR_ALL)
         
     | 
| 
         @@ -16,7 +38,7 @@ class TableWindow < FXMainWindow 
     | 
|
| 
       16 
38 
     | 
    
         | 
| 
       17 
39 
     | 
    
         
             
                # Icon used in some cells
         
     | 
| 
       18 
40 
     | 
    
         
             
                penguinicon = nil
         
     | 
| 
       19 
     | 
    
         
            -
                File.open(File. 
     | 
| 
      
 41 
     | 
    
         
            +
                File.open(File.expand_path('../icons/penguin.png', __FILE__), 'rb') do |f|
         
     | 
| 
       20 
42 
     | 
    
         
             
                  penguinicon = FXPNGIcon.new(getApp(), f.read, 0, IMAGE_ALPHAGUESS)
         
     | 
| 
       21 
43 
     | 
    
         
             
                end
         
     | 
| 
       22 
44 
     | 
    
         | 
| 
         @@ -32,8 +54,9 @@ class TableWindow < FXMainWindow 
     | 
|
| 
       32 
54 
     | 
    
         
             
                frame = FXVerticalFrame.new(contents,
         
     | 
| 
       33 
55 
     | 
    
         
             
                  FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0)
         
     | 
| 
       34 
56 
     | 
    
         | 
| 
       35 
     | 
    
         
            -
                #  
     | 
| 
       36 
     | 
    
         
            -
                 
     | 
| 
      
 57 
     | 
    
         
            +
                # Instead of the usual FXTable, we use a derived version, that allows us
         
     | 
| 
      
 58 
     | 
    
         
            +
                # to paste "," into fields. A "," is used as column separator otherwise.
         
     | 
| 
      
 59 
     | 
    
         
            +
                @table = MyFXTable.new(frame,
         
     | 
| 
       37 
60 
     | 
    
         
             
                  :opts => TABLE_COL_SIZABLE|TABLE_ROW_SIZABLE|LAYOUT_FILL_X|LAYOUT_FILL_Y,
         
     | 
| 
       38 
61 
     | 
    
         
             
                  :padding => 2)
         
     | 
| 
       39 
62 
     | 
    
         | 
    
        data/ext/fox16_c/FXRbApp.cpp
    CHANGED
    
    | 
         @@ -55,7 +55,7 @@ FXRbApp::FXRbApp(const FXchar* appname,const FXchar* vendor) : FXApp(appname,ven 
     | 
|
| 
       55 
55 
     | 
    
         
             
            // Constructor that also calls FXApp::init()
         
     | 
| 
       56 
56 
     | 
    
         
             
            FXRbApp* FXRbApp::constructAndInit(const FXchar* appname,const FXchar* vendor){
         
     | 
| 
       57 
57 
     | 
    
         
             
              int argc=1;
         
     | 
| 
       58 
     | 
    
         
            -
              static char* argv[]={"",0};
         
     | 
| 
      
 58 
     | 
    
         
            +
              static char* argv[]={(char*)"",0};
         
     | 
| 
       59 
59 
     | 
    
         
             
              FXRbApp* app=new FXRbApp(appname,vendor);
         
     | 
| 
       60 
60 
     | 
    
         
             
              app->FXApp::init(argc,argv);
         
     | 
| 
       61 
61 
     | 
    
         
             
              return app;
         
     | 
    
        data/ext/fox16_c/FXRuby.cpp
    CHANGED
    
    | 
         @@ -31,6 +31,9 @@ 
     | 
|
| 
       31 
31 
     | 
    
         
             
            #include "FXRbCommon.h"
         
     | 
| 
       32 
32 
     | 
    
         
             
            #include "impl.h"
         
     | 
| 
       33 
33 
     | 
    
         | 
| 
      
 34 
     | 
    
         
            +
            // SWIG runtime functions we need
         
     | 
| 
      
 35 
     | 
    
         
            +
            #include "swigruby.h"
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
       34 
37 
     | 
    
         
             
            #ifdef __CYGWIN__
         
     | 
| 
       35 
38 
     | 
    
         
             
            #include <io.h>		// for get_osf_handle()
         
     | 
| 
       36 
39 
     | 
    
         
             
            #endif
         
     | 
| 
         @@ -63,7 +66,7 @@ swig_type_info *FXRbTypeQuery(const char *desc){ 
     | 
|
| 
       63 
66 
     | 
    
         
             
              static st_table *types=st_init_strtable();
         
     | 
| 
       64 
67 
     | 
    
         
             
              swig_type_info *typeinfo=0;
         
     | 
| 
       65 
68 
     | 
    
         
             
              if(st_lookup(types,reinterpret_cast<st_data_t>(const_cast<char*>(desc)),reinterpret_cast<st_data_t *>(&typeinfo))==0){
         
     | 
| 
       66 
     | 
    
         
            -
                typeinfo= 
     | 
| 
      
 69 
     | 
    
         
            +
                typeinfo=SWIG_TypeQuery(desc);
         
     | 
| 
       67 
70 
     | 
    
         
             
                st_insert(types,reinterpret_cast<st_data_t>(strdup(desc)),reinterpret_cast<st_data_t>(typeinfo));
         
     | 
| 
       68 
71 
     | 
    
         
             
                }
         
     | 
| 
       69 
72 
     | 
    
         
             
              FXASSERT(typeinfo!=0);
         
     | 
| 
         @@ -168,12 +171,12 @@ bool FXRbIsInGC(const void* ptr){ 
     | 
|
| 
       168 
171 
     | 
    
         | 
| 
       169 
172 
     | 
    
         | 
| 
       170 
173 
     | 
    
         
             
            /**
         
     | 
| 
       171 
     | 
    
         
            -
             * FXRbConvertPtr() is just a wrapper around  
     | 
| 
      
 174 
     | 
    
         
            +
             * FXRbConvertPtr() is just a wrapper around SWIG_ConvertPtr().
         
     | 
| 
       172 
175 
     | 
    
         
             
             */
         
     | 
| 
       173 
176 
     | 
    
         | 
| 
       174 
177 
     | 
    
         
             
            void* FXRbConvertPtr(VALUE obj,swig_type_info* ty){
         
     | 
| 
       175 
178 
     | 
    
         
             
              void *ptr;
         
     | 
| 
       176 
     | 
    
         
            -
               
     | 
| 
      
 179 
     | 
    
         
            +
              SWIG_ConvertPtr(obj,&ptr,ty,1);
         
     | 
| 
       177 
180 
     | 
    
         
             
              return ptr;
         
     | 
| 
       178 
181 
     | 
    
         
             
              }
         
     | 
| 
       179 
182 
     | 
    
         | 
| 
         @@ -463,17 +466,23 @@ FXuint FXRbNumberOfFXColors(VALUE string_or_ary){ 
     | 
|
| 
       463 
466 
     | 
    
         
             
              return len;
         
     | 
| 
       464 
467 
     | 
    
         
             
            }
         
     | 
| 
       465 
468 
     | 
    
         | 
| 
       466 
     | 
    
         
            -
            FXColor *FXRbConvertToFXColors(VALUE string_or_ary){
         
     | 
| 
      
 469 
     | 
    
         
            +
            FXColor *FXRbConvertToFXColors(VALUE string_or_ary, FXuint *opts){
         
     | 
| 
       467 
470 
     | 
    
         
             
              FXColor* pix=0;
         
     | 
| 
       468 
471 
     | 
    
         
             
              if(TYPE(string_or_ary) == T_ARRAY){
         
     | 
| 
       469 
472 
     | 
    
         
             
                if(FXMALLOC(&pix,FXColor,RARRAY_LEN(string_or_ary))){
         
     | 
| 
      
 473 
     | 
    
         
            +
                  *opts |= IMAGE_OWNED;
         
     | 
| 
       470 
474 
     | 
    
         
             
                  for(long i=0; i<RARRAY_LEN(string_or_ary); i++){
         
     | 
| 
       471 
475 
     | 
    
         
             
                    pix[i]=static_cast<FXColor>(NUM2UINT(rb_ary_entry(string_or_ary,i)));
         
     | 
| 
       472 
476 
     | 
    
         
             
                  }
         
     | 
| 
       473 
477 
     | 
    
         
             
                }
         
     | 
| 
       474 
478 
     | 
    
         
             
              }else{
         
     | 
| 
       475 
     | 
    
         
            -
                if( 
     | 
| 
       476 
     | 
    
         
            -
                   
     | 
| 
      
 479 
     | 
    
         
            +
                if( *opts & IMAGE_OWNED ){
         
     | 
| 
      
 480 
     | 
    
         
            +
                  if(FXMALLOC(&pix,FXColor,RSTRING_LEN(string_or_ary)/sizeof(FXColor))){
         
     | 
| 
      
 481 
     | 
    
         
            +
                    memcpy(pix, RSTRING_PTR(string_or_ary), RSTRING_LEN(string_or_ary));
         
     | 
| 
      
 482 
     | 
    
         
            +
                  }
         
     | 
| 
      
 483 
     | 
    
         
            +
                }else{
         
     | 
| 
      
 484 
     | 
    
         
            +
                  rb_str_modify(string_or_ary);
         
     | 
| 
      
 485 
     | 
    
         
            +
                  pix = (FXColor*)(RSTRING_PTR(string_or_ary));
         
     | 
| 
       477 
486 
     | 
    
         
             
                }
         
     | 
| 
       478 
487 
     | 
    
         
             
              }
         
     | 
| 
       479 
488 
     | 
    
         
             
              return pix;
         
     | 
| 
         @@ -1018,7 +1027,7 @@ void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE value){ 
     | 
|
| 
       1018 
1027 
     | 
    
         
             
                case SEL_DND_MOTION:
         
     | 
| 
       1019 
1028 
     | 
    
         
             
                case SEL_DND_REQUEST:
         
     | 
| 
       1020 
1029 
     | 
    
         
             
                case SEL_PICKED:
         
     | 
| 
       1021 
     | 
    
         
            -
                   
     | 
| 
      
 1030 
     | 
    
         
            +
                  SWIG_ConvertPtr(value,&ptr,FXRbTypeQuery("FXEvent *"),1);
         
     | 
| 
       1022 
1031 
     | 
    
         
             
                  return ptr;
         
     | 
| 
       1023 
1032 
     | 
    
         
             
                case SEL_IO_READ:
         
     | 
| 
       1024 
1033 
     | 
    
         
             
                case SEL_IO_WRITE:
         
     | 
| 
         @@ -1195,14 +1204,14 @@ void* FXRbGetExpectedData(VALUE recv,FXSelector key,VALUE value){ 
     | 
|
| 
       1195 
1204 
     | 
    
         | 
| 
       1196 
1205 
     | 
    
         
             
              if(type==SEL_CHANGED){
         
     | 
| 
       1197 
1206 
     | 
    
         
             
            	  if(obj->isMemberOf(FXMETACLASS(FXPicker))){
         
     | 
| 
       1198 
     | 
    
         
            -
            			 
     | 
| 
      
 1207 
     | 
    
         
            +
            			SWIG_ConvertPtr(value,&ptr,FXRbTypeQuery("FXPoint *"),1);
         
     | 
| 
       1199 
1208 
     | 
    
         
             
            			return ptr;
         
     | 
| 
       1200 
1209 
     | 
    
         
             
            	    }
         
     | 
| 
       1201 
1210 
     | 
    
         
             
            		return 0;
         
     | 
| 
       1202 
1211 
     | 
    
         
             
                }
         
     | 
| 
       1203 
1212 
     | 
    
         | 
| 
       1204 
1213 
     | 
    
         
             
            	if(type==SEL_DRAGGED){
         
     | 
| 
       1205 
     | 
    
         
            -
            	     
     | 
| 
      
 1214 
     | 
    
         
            +
            	    SWIG_ConvertPtr(value,&ptr,FXRbTypeQuery("FXEvent *"),1);
         
     | 
| 
       1206 
1215 
     | 
    
         
             
            	    return ptr;
         
     | 
| 
       1207 
1216 
     | 
    
         
             
            	    }
         
     | 
| 
       1208 
1217 
     | 
    
         | 
    
        data/ext/fox16_c/extconf.rb
    CHANGED
    
    | 
         @@ -72,16 +72,259 @@ def fxscintilla_support_suppressed? 
     | 
|
| 
       72 
72 
     | 
    
         
             
              ARGV.include? "--without-fxscintilla"
         
     | 
| 
       73 
73 
     | 
    
         
             
            end
         
     | 
| 
       74 
74 
     | 
    
         | 
| 
      
 75 
     | 
    
         
            +
            def with_env(hash)
         
     | 
| 
      
 76 
     | 
    
         
            +
              hash.each do |k, v|
         
     | 
| 
      
 77 
     | 
    
         
            +
                ENV[k] = v
         
     | 
| 
      
 78 
     | 
    
         
            +
              end
         
     | 
| 
      
 79 
     | 
    
         
            +
              begin
         
     | 
| 
      
 80 
     | 
    
         
            +
                yield
         
     | 
| 
      
 81 
     | 
    
         
            +
              ensure
         
     | 
| 
      
 82 
     | 
    
         
            +
                hash.each do |k, v|
         
     | 
| 
      
 83 
     | 
    
         
            +
                  ENV.delete(k)
         
     | 
| 
      
 84 
     | 
    
         
            +
                end
         
     | 
| 
      
 85 
     | 
    
         
            +
              end
         
     | 
| 
      
 86 
     | 
    
         
            +
            end
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
            LIBZ_VERSION = ENV['LIBZ_VERSION'] || '1.2.7'
         
     | 
| 
      
 89 
     | 
    
         
            +
            LIBZ_SOURCE_URI = "http://downloads.sourceforge.net/project/libpng/zlib/#{LIBZ_VERSION}/zlib-#{LIBZ_VERSION}.tar.bz2"
         
     | 
| 
      
 90 
     | 
    
         
            +
             
     | 
| 
      
 91 
     | 
    
         
            +
            LIBPNG_VERSION = ENV['LIBPNG_VERSION'] || '1.5.13'
         
     | 
| 
      
 92 
     | 
    
         
            +
            LIBPNG_SOURCE_URI = "http://prdownloads.sourceforge.net/libpng/libpng-#{LIBPNG_VERSION}.tar.gz"
         
     | 
| 
      
 93 
     | 
    
         
            +
             
     | 
| 
      
 94 
     | 
    
         
            +
            LIBJPEG_VERSION = ENV['LIBJPEG_VERSION'] || '8d'
         
     | 
| 
      
 95 
     | 
    
         
            +
            LIBJPEG_SOURCE_URI = "http://www.ijg.org/files/jpegsrc.v#{LIBJPEG_VERSION}.tar.gz"
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
            LIBTIFF_VERSION = ENV['LIBTIFF_VERSION'] || '4.0.3'
         
     | 
| 
      
 98 
     | 
    
         
            +
            LIBTIFF_SOURCE_URI = "http://download.osgeo.org/libtiff/tiff-#{LIBTIFF_VERSION}.tar.gz"
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
            LIBFOX_VERSION            = ENV['LIBFOX_VERSION'] || '1.6.49'
         
     | 
| 
      
 101 
     | 
    
         
            +
            LIBFOX_SOURCE_URI         = "http://ftp.fox-toolkit.org/pub/fox-#{LIBFOX_VERSION}.tar.gz"
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
            LIBFXSCINTILLA_VERSION            = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
         
     | 
| 
      
 104 
     | 
    
         
            +
            LIBFXSCINTILLA_SOURCE_URI         = "http://download.savannah.gnu.org/releases/fxscintilla/fxscintilla-#{LIBFXSCINTILLA_VERSION}.tar.gz"
         
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
       75 
106 
     | 
    
         
             
            def do_rake_compiler_setup
         
     | 
| 
       76 
     | 
    
         
            -
              if enable_config("win32- 
     | 
| 
      
 107 
     | 
    
         
            +
              if enable_config("win32-cross")
         
     | 
| 
      
 108 
     | 
    
         
            +
                require 'mini_portile'
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
       77 
110 
     | 
    
         
             
                dir_config("installed")
         
     | 
| 
       78 
     | 
    
         
            -
                have_library( 'gdi32', 'CreateDC' ) && append_library( $libs, 'gdi32' )
         
     | 
| 
       79 
     | 
    
         
            -
                have_library( 'opengl32' ) && append_library( $libs, 'opengl32' )
         
     | 
| 
       80 
     | 
    
         
            -
                have_library( 'winspool', 'EnumPrintersA') && append_library( $libs, 'winspool' )
         
     | 
| 
       81 
111 
     | 
    
         | 
| 
       82 
     | 
    
         
            -
                 
     | 
| 
      
 112 
     | 
    
         
            +
                libz_recipe = MiniPortile.new("libz", LIBZ_VERSION).tap do |recipe|
         
     | 
| 
      
 113 
     | 
    
         
            +
                  recipe.files = [LIBZ_SOURCE_URI]
         
     | 
| 
      
 114 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 115 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 116 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 117 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 118 
     | 
    
         
            +
                  class << recipe
         
     | 
| 
      
 119 
     | 
    
         
            +
                    def configure
         
     | 
| 
      
 120 
     | 
    
         
            +
                      Dir.chdir work_path do
         
     | 
| 
      
 121 
     | 
    
         
            +
                        mk = File.read 'win32/Makefile.gcc'
         
     | 
| 
      
 122 
     | 
    
         
            +
                        File.open 'win32/Makefile.gcc', 'wb' do |f|
         
     | 
| 
      
 123 
     | 
    
         
            +
                          f.puts "BINARY_PATH = #{path}/bin"
         
     | 
| 
      
 124 
     | 
    
         
            +
                          f.puts "LIBRARY_PATH = #{path}/lib"
         
     | 
| 
      
 125 
     | 
    
         
            +
                          f.puts "INCLUDE_PATH = #{path}/include"
         
     | 
| 
      
 126 
     | 
    
         
            +
                          mk.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{host}-")
         
     | 
| 
      
 127 
     | 
    
         
            +
                          f.puts mk
         
     | 
| 
      
 128 
     | 
    
         
            +
                        end
         
     | 
| 
      
 129 
     | 
    
         
            +
                      end
         
     | 
| 
      
 130 
     | 
    
         
            +
                    end
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
                    def configured?
         
     | 
| 
      
 133 
     | 
    
         
            +
                      Dir.chdir work_path do
         
     | 
| 
      
 134 
     | 
    
         
            +
                        !! (File.read('win32/Makefile.gcc') =~ /^BINARY_PATH/)
         
     | 
| 
      
 135 
     | 
    
         
            +
                      end
         
     | 
| 
      
 136 
     | 
    
         
            +
                    end
         
     | 
| 
      
 137 
     | 
    
         
            +
             
     | 
| 
      
 138 
     | 
    
         
            +
                    def compile
         
     | 
| 
      
 139 
     | 
    
         
            +
                      execute "compile", "make -f win32/Makefile.gcc SHARED_MODE=1"
         
     | 
| 
      
 140 
     | 
    
         
            +
                    end
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
                    def install
         
     | 
| 
      
 143 
     | 
    
         
            +
                      execute "install", "make -f win32/Makefile.gcc install SHARED_MODE=1"
         
     | 
| 
      
 144 
     | 
    
         
            +
                    end
         
     | 
| 
      
 145 
     | 
    
         
            +
                  end
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 148 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 149 
     | 
    
         
            +
                    recipe.cook
         
     | 
| 
      
 150 
     | 
    
         
            +
                    FileUtils.touch checkpoint
         
     | 
| 
      
 151 
     | 
    
         
            +
                  end
         
     | 
| 
      
 152 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 153 
     | 
    
         
            +
                end
         
     | 
| 
      
 154 
     | 
    
         
            +
             
     | 
| 
      
 155 
     | 
    
         
            +
                libpng_recipe = MiniPortile.new("libpng", LIBPNG_VERSION).tap do |recipe|
         
     | 
| 
      
 156 
     | 
    
         
            +
                  recipe.files = [LIBPNG_SOURCE_URI]
         
     | 
| 
      
 157 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 158 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 159 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 160 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 161 
     | 
    
         
            +
                  recipe.configure_options = [
         
     | 
| 
      
 162 
     | 
    
         
            +
                    "--host=#{recipe.host}",
         
     | 
| 
      
 163 
     | 
    
         
            +
                    "--enable-shared",
         
     | 
| 
      
 164 
     | 
    
         
            +
                    "--disable-static",
         
     | 
| 
      
 165 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 166 
     | 
    
         
            +
             
     | 
| 
      
 167 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 168 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 169 
     | 
    
         
            +
                    with_env(
         
     | 
| 
      
 170 
     | 
    
         
            +
                      'CPPFLAGS' => "-I#{libz_recipe.path}/include",
         
     | 
| 
      
 171 
     | 
    
         
            +
                      'LDFLAGS' => "-L#{libz_recipe.path}/lib"
         
     | 
| 
      
 172 
     | 
    
         
            +
                    ) do
         
     | 
| 
      
 173 
     | 
    
         
            +
                      recipe.cook
         
     | 
| 
      
 174 
     | 
    
         
            +
                      FileUtils.touch checkpoint
         
     | 
| 
      
 175 
     | 
    
         
            +
                    end
         
     | 
| 
      
 176 
     | 
    
         
            +
                  end
         
     | 
| 
      
 177 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 178 
     | 
    
         
            +
                end
         
     | 
| 
      
 179 
     | 
    
         
            +
             
     | 
| 
      
 180 
     | 
    
         
            +
                libjpeg_recipe = MiniPortile.new("libjpeg", LIBJPEG_VERSION).tap do |recipe|
         
     | 
| 
      
 181 
     | 
    
         
            +
                  recipe.files = [LIBJPEG_SOURCE_URI]
         
     | 
| 
      
 182 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 183 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 184 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 185 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 186 
     | 
    
         
            +
                  recipe.configure_options = [
         
     | 
| 
      
 187 
     | 
    
         
            +
                    "--host=#{recipe.host}",
         
     | 
| 
      
 188 
     | 
    
         
            +
                    "--enable-shared",
         
     | 
| 
      
 189 
     | 
    
         
            +
                    "--disable-static",
         
     | 
| 
      
 190 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 191 
     | 
    
         
            +
             
     | 
| 
      
 192 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 193 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 194 
     | 
    
         
            +
                    recipe.cook
         
     | 
| 
      
 195 
     | 
    
         
            +
                    FileUtils.touch checkpoint
         
     | 
| 
      
 196 
     | 
    
         
            +
                  end
         
     | 
| 
      
 197 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 198 
     | 
    
         
            +
                end
         
     | 
| 
      
 199 
     | 
    
         
            +
             
     | 
| 
      
 200 
     | 
    
         
            +
                libtiff_recipe = MiniPortile.new("libtiff", LIBTIFF_VERSION).tap do |recipe|
         
     | 
| 
      
 201 
     | 
    
         
            +
                  recipe.files = [LIBTIFF_SOURCE_URI]
         
     | 
| 
      
 202 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 203 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 204 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 205 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 206 
     | 
    
         
            +
                  recipe.configure_options = [
         
     | 
| 
      
 207 
     | 
    
         
            +
                    "--host=#{recipe.host}",
         
     | 
| 
      
 208 
     | 
    
         
            +
                    "--enable-shared",
         
     | 
| 
      
 209 
     | 
    
         
            +
                    "--disable-static",
         
     | 
| 
      
 210 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 211 
     | 
    
         
            +
             
     | 
| 
      
 212 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 213 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 214 
     | 
    
         
            +
                    recipe.cook
         
     | 
| 
      
 215 
     | 
    
         
            +
                    FileUtils.touch checkpoint
         
     | 
| 
      
 216 
     | 
    
         
            +
                  end
         
     | 
| 
      
 217 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 218 
     | 
    
         
            +
                end
         
     | 
| 
      
 219 
     | 
    
         
            +
             
     | 
| 
      
 220 
     | 
    
         
            +
                libfox_recipe = MiniPortile.new("libfox", LIBFOX_VERSION).tap do |recipe|
         
     | 
| 
      
 221 
     | 
    
         
            +
                  recipe.files = [LIBFOX_SOURCE_URI]
         
     | 
| 
      
 222 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 223 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 224 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 225 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 226 
     | 
    
         
            +
                  recipe.configure_options = [
         
     | 
| 
      
 227 
     | 
    
         
            +
                    "--host=#{recipe.host}",
         
     | 
| 
      
 228 
     | 
    
         
            +
                    "--without-xft",
         
     | 
| 
      
 229 
     | 
    
         
            +
                    "--without-x",
         
     | 
| 
      
 230 
     | 
    
         
            +
                    "--enable-shared",
         
     | 
| 
      
 231 
     | 
    
         
            +
                    "--disable-static",
         
     | 
| 
      
 232 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 233 
     | 
    
         
            +
                  class << recipe
         
     | 
| 
      
 234 
     | 
    
         
            +
                    def compile
         
     | 
| 
      
 235 
     | 
    
         
            +
                      # Add param -no-undefined to libtool to build a win32 shared lib
         
     | 
| 
      
 236 
     | 
    
         
            +
                      execute "compile", "#{ENV['MAKE'] || "make"} libFOX_1_6_la_LDFLAGS='-version-info 0:49:0 -export-dynamic -no-undefined'"
         
     | 
| 
      
 237 
     | 
    
         
            +
                    end
         
     | 
| 
      
 238 
     | 
    
         
            +
                  end
         
     | 
| 
      
 239 
     | 
    
         
            +
             
     | 
| 
      
 240 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 241 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 242 
     | 
    
         
            +
                    with_env(
         
     | 
| 
      
 243 
     | 
    
         
            +
                      "CPPFLAGS" => "-I#{libjpeg_recipe.path}/include -I#{libpng_recipe.path}/include -I#{libtiff_recipe.path}/include -I#{libz_recipe.path}/include",
         
     | 
| 
      
 244 
     | 
    
         
            +
                      "LDFLAGS" => "-L#{libjpeg_recipe.path}/lib -L#{libpng_recipe.path}/lib -L#{libtiff_recipe.path}/lib -L#{libz_recipe.path}/lib"
         
     | 
| 
      
 245 
     | 
    
         
            +
                    ) do
         
     | 
| 
      
 246 
     | 
    
         
            +
                      recipe.cook
         
     | 
| 
      
 247 
     | 
    
         
            +
                      FileUtils.touch checkpoint
         
     | 
| 
      
 248 
     | 
    
         
            +
                    end
         
     | 
| 
      
 249 
     | 
    
         
            +
                  end
         
     | 
| 
      
 250 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 251 
     | 
    
         
            +
                end
         
     | 
| 
      
 252 
     | 
    
         
            +
             
     | 
| 
      
 253 
     | 
    
         
            +
                libfxscintills_recipe = MiniPortile.new("libfxscintilla", LIBFXSCINTILLA_VERSION).tap do |recipe|
         
     | 
| 
      
 254 
     | 
    
         
            +
                  recipe.files = [LIBFXSCINTILLA_SOURCE_URI]
         
     | 
| 
      
 255 
     | 
    
         
            +
                  recipe.target = portsdir = File.expand_path('../../../ports', __FILE__)
         
     | 
| 
      
 256 
     | 
    
         
            +
                  # Prefer host_alias over host in order to use i586-mingw32msvc as
         
     | 
| 
      
 257 
     | 
    
         
            +
                  # correct compiler prefix for cross build, but use host if not set.
         
     | 
| 
      
 258 
     | 
    
         
            +
                  recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
         
     | 
| 
      
 259 
     | 
    
         
            +
                  recipe.configure_options = [
         
     | 
| 
      
 260 
     | 
    
         
            +
                    "--host=#{recipe.host}",
         
     | 
| 
      
 261 
     | 
    
         
            +
                    "--enable-shared",
         
     | 
| 
      
 262 
     | 
    
         
            +
                    "--disable-static",
         
     | 
| 
      
 263 
     | 
    
         
            +
                    ]
         
     | 
| 
      
 264 
     | 
    
         
            +
                  class << recipe
         
     | 
| 
      
 265 
     | 
    
         
            +
                    attr_accessor :libfox_path
         
     | 
| 
      
 266 
     | 
    
         
            +
                    def mk
         
     | 
| 
      
 267 
     | 
    
         
            +
                      "#{ENV['MAKE'] || "make"}"
         
     | 
| 
      
 268 
     | 
    
         
            +
                    end
         
     | 
| 
      
 269 
     | 
    
         
            +
             
     | 
| 
      
 270 
     | 
    
         
            +
                    def compile
         
     | 
| 
      
 271 
     | 
    
         
            +
                      execute "compile_lexers", "cd lexers && #{mk}"
         
     | 
| 
      
 272 
     | 
    
         
            +
                      execute "compile_lexlib", "cd lexlib && #{mk}"
         
     | 
| 
      
 273 
     | 
    
         
            +
                      execute "compile_src", "cd src && #{mk}"
         
     | 
| 
      
 274 
     | 
    
         
            +
                      execute "compile_fox", "cd fox && #{mk} libfxscintilla_la_LDFLAGS='-version-info 23:0:3 -export-dynamic -no-undefined -L#{libfox_path}/lib -lFOX-1.6'"
         
     | 
| 
      
 275 
     | 
    
         
            +
                    end
         
     | 
| 
      
 276 
     | 
    
         
            +
             
     | 
| 
      
 277 
     | 
    
         
            +
                    def install
         
     | 
| 
      
 278 
     | 
    
         
            +
                      execute "install", "cd fox && #{mk} install && cd ../include && #{mk} install"
         
     | 
| 
      
 279 
     | 
    
         
            +
                    end
         
     | 
| 
      
 280 
     | 
    
         
            +
                  end
         
     | 
| 
      
 281 
     | 
    
         
            +
                  recipe.libfox_path = libfox_recipe.path
         
     | 
| 
      
 282 
     | 
    
         
            +
             
     | 
| 
      
 283 
     | 
    
         
            +
                  checkpoint = File.join(portsdir, "#{recipe.name}-#{recipe.version}-#{recipe.host}.installed")
         
     | 
| 
      
 284 
     | 
    
         
            +
                  unless File.exist?(checkpoint)
         
     | 
| 
      
 285 
     | 
    
         
            +
                    recipe.cook
         
     | 
| 
      
 286 
     | 
    
         
            +
                    FileUtils.touch checkpoint
         
     | 
| 
      
 287 
     | 
    
         
            +
                  end
         
     | 
| 
      
 288 
     | 
    
         
            +
                  recipe.activate
         
     | 
| 
      
 289 
     | 
    
         
            +
                end
         
     | 
| 
      
 290 
     | 
    
         
            +
             
     | 
| 
      
 291 
     | 
    
         
            +
            #     have_library( 'gdi32', 'CreateDC' ) && append_library( $libs, 'gdi32' )
         
     | 
| 
      
 292 
     | 
    
         
            +
            #     have_library( 'opengl32' ) && append_library( $libs, 'opengl32' )
         
     | 
| 
      
 293 
     | 
    
         
            +
            #     have_library( 'winspool', 'EnumPrintersA') && append_library( $libs, 'winspool' )
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
            #     dir_config('libz', "#{libz_recipe.path}/include", "#{libz_recipe.path}/lib")
         
     | 
| 
      
 296 
     | 
    
         
            +
            #     dir_config('libpng', "#{libpng_recipe.path}/include", "#{libpng_recipe.path}/lib")
         
     | 
| 
      
 297 
     | 
    
         
            +
            #     dir_config('libtiff', "#{libtiff_recipe.path}/include", "#{libtiff_recipe.path}/lib")
         
     | 
| 
      
 298 
     | 
    
         
            +
            #     dir_config('libjpeg', "#{libjpeg_recipe.path}/include", "#{libjpeg_recipe.path}/lib")
         
     | 
| 
      
 299 
     | 
    
         
            +
                dir_config('libfox', "#{libfox_recipe.path}/include", "#{libfox_recipe.path}/lib")
         
     | 
| 
      
 300 
     | 
    
         
            +
                dir_config('libfxscintilla', "#{libfxscintills_recipe.path}/include", "#{libfxscintills_recipe.path}/lib")
         
     | 
| 
      
 301 
     | 
    
         
            +
             
     | 
| 
      
 302 
     | 
    
         
            +
                shared_dlls = [
         
     | 
| 
      
 303 
     | 
    
         
            +
                    "#{libfxscintills_recipe.path}/bin/libfxscintilla-20.dll",
         
     | 
| 
      
 304 
     | 
    
         
            +
                    "#{libfox_recipe.path}/bin/libFOX-1.6-0.dll",
         
     | 
| 
      
 305 
     | 
    
         
            +
                    "#{libjpeg_recipe.path}/bin/libjpeg-8.dll",
         
     | 
| 
      
 306 
     | 
    
         
            +
                    "#{libpng_recipe.path}/bin/libpng15-15.dll",
         
     | 
| 
      
 307 
     | 
    
         
            +
                    "#{libtiff_recipe.path}/bin/libtiff-5.dll",
         
     | 
| 
      
 308 
     | 
    
         
            +
                    "#{libz_recipe.path}/bin/zlib1.dll",
         
     | 
| 
      
 309 
     | 
    
         
            +
                  ]
         
     | 
| 
      
 310 
     | 
    
         
            +
                shared_dlls.each do |dll|
         
     | 
| 
      
 311 
     | 
    
         
            +
                  FileUtils.cp dll, '.', verbose: true
         
     | 
| 
      
 312 
     | 
    
         
            +
                end
         
     | 
| 
      
 313 
     | 
    
         
            +
             
     | 
| 
      
 314 
     | 
    
         
            +
                gcc_shared_dlls = %w[libwinpthread-1.dll libgcc_s_dw2-1.dll libgcc_s_sjlj-1.dll libgcc_s_seh-1.dll libstdc++-6.dll]
         
     | 
| 
      
 315 
     | 
    
         
            +
                gcc_shared_dlls.each do |dll|
         
     | 
| 
      
 316 
     | 
    
         
            +
                  cmd = "#{CONFIG['CC']} -print-file-name=#{dll}"
         
     | 
| 
      
 317 
     | 
    
         
            +
                  res = `#{cmd}`.chomp
         
     | 
| 
      
 318 
     | 
    
         
            +
                  next if dll == res
         
     | 
| 
      
 319 
     | 
    
         
            +
                  puts "#{cmd} => #{res}"
         
     | 
| 
      
 320 
     | 
    
         
            +
                  FileUtils.cp `#{cmd}`.chomp, '.', verbose: true
         
     | 
| 
      
 321 
     | 
    
         
            +
                end
         
     | 
| 
      
 322 
     | 
    
         
            +
             
     | 
| 
      
 323 
     | 
    
         
            +
                CONFIG['CXX'] = "#{RbConfig::CONFIG["host"]}-g++" # CXX setting must be prefixed for cross build
         
     | 
| 
      
 324 
     | 
    
         
            +
                CONFIG['CC'] += "\nCXX=#{CONFIG['CXX']}" # Hack CXX into Makefile for cross compilation
         
     | 
| 
       83 
325 
     | 
    
         
             
                CONFIG['LDSHARED'].gsub!('gcc', 'g++') # ensure C++ linker is used, so that libstdc++ is linked static
         
     | 
| 
       84 
     | 
    
         
            -
                $LDFLAGS += " -s 
     | 
| 
      
 326 
     | 
    
         
            +
                $LDFLAGS += " -s" # remove symbol table informations from shared lib
         
     | 
| 
      
 327 
     | 
    
         
            +
             
     | 
| 
       85 
328 
     | 
    
         
             
              elsif RUBY_PLATFORM =~ /mingw/
         
     | 
| 
       86 
329 
     | 
    
         
             
                $CFLAGS = $CFLAGS + " -I/usr/local/include"
         
     | 
| 
       87 
330 
     | 
    
         
             
                $LDFLAGS = $LDFLAGS + " -I/usr/local/lib"
         
     | 
| 
         @@ -96,9 +339,8 @@ def do_rake_compiler_setup 
     | 
|
| 
       96 
339 
     | 
    
         
             
              $libs = append_library($libs, "stdc++") unless RUBY_PLATFORM =~ /mingw/ || enable_config("win32-static-build")
         
     | 
| 
       97 
340 
     | 
    
         
             
              have_header("sys/time.h") unless RUBY_PLATFORM =~ /mingw/ || enable_config("win32-static-build")
         
     | 
| 
       98 
341 
     | 
    
         
             
              have_header("signal.h")
         
     | 
| 
       99 
     | 
    
         
            -
               
     | 
| 
       100 
     | 
    
         
            -
             
     | 
| 
       101 
     | 
    
         
            -
              end
         
     | 
| 
      
 342 
     | 
    
         
            +
              have_library("z", "deflate")
         
     | 
| 
      
 343 
     | 
    
         
            +
              have_library("png", "png_create_read_struct")
         
     | 
| 
       102 
344 
     | 
    
         
             
              have_library("jpeg", "jpeg_mem_init")
         
     | 
| 
       103 
345 
     | 
    
         
             
              have_library("tiff", "TIFFSetErrorHandler")
         
     | 
| 
       104 
346 
     | 
    
         
             
              have_library("Xft", "XftInit")
         
     | 
| 
         @@ -106,11 +348,10 @@ def do_rake_compiler_setup 
     | 
|
| 
       106 
348 
     | 
    
         
             
              find_library("X11", "XFindContext", "/usr/X11R6/lib")
         
     | 
| 
       107 
349 
     | 
    
         
             
              find_library("GL", "glXCreateContext", "/usr/X11R6/lib")
         
     | 
| 
       108 
350 
     | 
    
         
             
              find_library("GLU", "gluNewQuadric", "/usr/X11R6/lib")
         
     | 
| 
       109 
     | 
    
         
            -
              $libs = append_library($libs, "FOX-1.6")
         
     | 
| 
       110 
351 
     | 
    
         
             
              $libs = append_library($libs, "Xrandr") unless RUBY_PLATFORM =~ /mingw/ || enable_config("win32-static-build")
         
     | 
| 
       111 
352 
     | 
    
         
             
              $libs = append_library($libs, "Xcursor") unless RUBY_PLATFORM =~ /mingw/ || enable_config("win32-static-build")
         
     | 
| 
       112 
     | 
    
         
            -
              $libs = append_library($libs, "png")
         
     | 
| 
       113 
353 
     | 
    
         
             
              find_header('FXRbCommon.h', File.join(File.dirname(__FILE__), 'include'))
         
     | 
| 
      
 354 
     | 
    
         
            +
              $libs = append_library($libs, "FOX-1.6")
         
     | 
| 
       114 
355 
     | 
    
         
             
              if is_fxscintilla_build?
         
     | 
| 
       115 
356 
     | 
    
         
             
                FileUtils.move('scintilla_wrap.cpp.bak', 'scintilla_wrap.cpp') if FileTest.exist?('scintilla_wrap.cpp.bak')
         
     | 
| 
       116 
357 
     | 
    
         
             
                $CPPFLAGS = $CPPFLAGS + " -DWITH_FXSCINTILLA -DHAVE_FOX_1_6"
         
     |