fltkhs 0.4.0.4 → 0.4.0.5
raw patch · 8 files changed
+64/−23 lines, 8 filesbinary-addedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- README.md +16/−4
- c-src/Makefile.in +1/−1
- fltkhs.cabal +1/−1
- images/arc-windows.png binary
- images/tree-complex-windows.png binary
- images/tree-simple-windows.png binary
- images/widget-table-windows.png binary
- src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs +46/−17
README.md view
@@ -15,16 +15,28 @@ > make install ``` -- Clone and install this repo:+- Install via the `fltkhs-hello-world` skeleton application: ```- > git clone https://github.com/deech/fltkhs- cabal install+ > git clone https://github.com/deech/fltkhs-hello-world+ > cd fltkhs-hello-world+ > stack build ``` -- Test your installation by invoking: 'fltkhs-buttons'.+- Test your installation by invoking: 'stack exec fltkhs-hello-world'. The rest of the documentation (including installation instructions for Windows and API usage) is located in the [FLTKHS module] [3]. This is the primary module that needs to be imported by every Fltkhs app and the entry point into the application. +Screenshots+-----------++[Drawing with FLTKHS](images/arc-windows.png)++[A table of widgets](images/widget-table.png)++[A complex tree](images/tree-complex-windows.png) Done completely using Fluid. Notice how tree nodes can be arbitrary widgets.++Demos+----- A number of demos are also available in the [fltkhs-demos] [4] and the [fltkhs-fluid-demos] [5] packages. [1]: http://www.fltk.org/index.php "FLTK"
c-src/Makefile.in view
@@ -143,7 +143,7 @@ test -d $(LIBDIR) || mkdir $(LIBDIR) @echo "*** Linking $@..." (cd $(SHARED_OBJECT_FILES); \- $(CXX) $(SONAME_FLAGS),$(LIBDIR)/$@ -o $(LIBDIR)/$@ $^ $(shell $(FLTKCONFIG) --use-images --use-glut --use-forms --use-gl --ldflags));+ $(CXX) $(SONAME_FLAGS),$(LIBDIR)/$@ -o $(LIBDIR)/$@ $^ -L/usr/local/lib $(shell $(FLTKCONFIG) --use-images --use-glut --use-forms --use-gl --ldflags)); clean: test -d $(LIBDIR) && rm -rf $(LIBDIR) test -d $(SHARED_OBJECT_FILES) && rm -rf $(SHARED_OBJECT_FILES)
fltkhs.cabal view
@@ -1,5 +1,5 @@ name : fltkhs-version : 0.4.0.4+version : 0.4.0.5 synopsis : FLTK bindings description: Low level bindings for the FLTK GUI toolkit. For installation and quick start instruction please scroll all the way down to the README.
+ images/arc-windows.png view
binary file changed (absent → 11485 bytes)
+ images/tree-complex-windows.png view
binary file changed (absent → 60047 bytes)
+ images/tree-simple-windows.png view
binary file changed (absent → 15457 bytes)
+ images/widget-table-windows.png view
binary file changed (absent → 32201 bytes)
src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs view
@@ -300,7 +300,7 @@ -- -- The quickest way to get started is to download the -- <https://github.com/deech/fltkhs-fluid-hello-world Fluid/Haskell project template>.--- The "Setup.hs" that comes with the skeleton is configured to use+-- The @Setup.hs@ that comes with the skeleton is configured to use -- the 'fltkhs-fluidtohs' utility to automatically convert any Fluid in 'src' -- directory into a Haskell module of the same name during the preprocess step. -- This means using Fluid in a FLTKHS project is as simple as creating a Fluid@@ -328,10 +328,10 @@ -- 9-12 seconds to compile on a 32GB quad-core machine. Surprisingly it only goes up -- to 10-15 seconds on a 8GB machine indicating that GHC pegs one processor and RAM -- does not matter. Educated guess, most of the time is being spent traversing type-level lists--- and chasing down orphan instances. The hope is that this will all go away onece GHC 8 has settled+-- and chasing down orphan instances. The hope is that this will all go away once GHC 8 has settled -- in and all the type-level gymnastics can been replaced with OverloadedRecordFields. ----- == GHCi (All users)+-- == GHCi (Linux, *BSD & OSX Yosemite) -- The GHC 7.10.x series has an unfortunate -- <https://ghc.haskell.org/trac/ghc/ticket/10568 regression> that causes GHCi to -- crash when loading the shared library that contains the C bindings to the C++@@ -345,12 +345,34 @@ -- > STACK_YAML=stack-repl.yaml stack ghci ... -- @ ----- Furthermore once an app is launched via the REPL the app window does not respond--- to close events. The user has to `:quit` GHCi in order to close the window. So--- while the REPL is still useful for querying functions etc. it is not once the--- application is actually launched. Hopefully the fix is simply a case of the--- author knowing how GHCi and the FFI interact.+-- Furthermore once an app is launched via the REPL closing the main app window+-- brings the REPL back to a prompt as it should but does not go away. The window+-- stays around ghosted for the life of the session. The user has to `:quit` GHCi in+-- order to get rid of it. So while the REPL is still useful for querying functions etc.+-- and trying things out it leaves a lot of trash behind. Hopefully the fix is simply a+-- case of the author knowing how GHCi and the FFI interact. --+-- == GHCi + Stack (OSX El Capitan)+-- Running FLTKHS in GHCi via Stack on El Capitan is broken. The reason is that+-- the @Setup.hs@ that comes with FLTKHS requires Cabal-1.2.x. So before running the repl we need to do:+--+-- @+-- > STACK_YAML=stack-repl.yaml stack setup --upgrade-cabal+-- @+--+-- This breaks on El Capitan with an error:+--+-- @+-- > Setup: \/usr\/bin\/ar: permission denied+-- @+--+-- This is a known <https://github.com/haskell/cabal/issues/2653 bug> and unfortunately the+-- <https://ghc.haskell.org/trac/ghc/blog/weekly20150721#MacOSXElCapitansupport workaround> is+-- pretty horrific. Barring that there is no hope for FLTKHS and GHCi on El Capitan.+--+-- To see why it's necessary to use `stack-repl.yaml` please see the previous section+-- "GHCi (Linux, *BSD & OSD Yosemite)".+-- -- == GHC 7.10.3 And Beyond (Windows only) -- FLTKHS does not work with GHC 7.10.3 on Windows. Period. GHC 7.10.2 and 7.8.4 on -- Windows work fine. The problem is the MinGW environment that comes bundled with@@ -457,7 +479,9 @@ -- -- If you are customizing the `configure` step it is important to at least enable shared libraries, OpenGL and Cairo like so: ----- > ./configure --enable-shared --enable-gl+-- @+-- > ./configure --enable-shared --enable-gl+-- @ -- -- If you didn't install FLTK from source you can use the 'fltk-config' tool to ensure that version 1.3.3 is installed: --@@ -474,8 +498,7 @@ -- The reason we install from source is that some package managers seem to be -- behind on versions (as of this writing Ubuntu 14.04 is still on 1.3.2) and -- others put the headers and libraries in a non-standard locations which will--- cause the Haskell bindings to throw compilation errors. -- - Make sure `c2hs` is--- installed with `cabal install c2hs`.+-- cause the Haskell bindings to throw compilation errors. -- -- -- == Download & Install the FLTKHS Hello World Skeleton@@ -485,11 +508,12 @@ -- Rename it: -- -- @--- > mv master.tar.gz fltkhs-hello-world.tar.gz+-- > mv fltkhs-hello-world-master.tar.gz fltkhs-hello-world.tar.gz -- @ -- -- -- Extract and enter the archive:+-- -- @ -- > tar -zxvf fltkhs-hello-world.tar.gz -- @@@ -503,6 +527,7 @@ -- -- === Building -- Build it with Stack:+-- -- @ -- > cd fltkhs-hello-world -- > stack setup@@ -516,9 +541,11 @@ -- is best to build from source. -- -- == Verify The Install--- - Test that the build completed successfully by invoking incredibly unimpressive+-- Test that the build completed successfully by invoking incredibly unimpressive ----- > stack exec fltkhs-hello-world+-- @+-- > stack exec fltkhs-hello-world+-- @ -- -- $InstallationMac@@ -566,7 +593,7 @@ -- -- @ -- > cd \/Users\/\<username\>/Downloads\/--- > mv master.tar.gz fltkhs-hello-world.tar.gz+-- > mv fltkhs-hello-world-master.tar.gz fltkhs-hello-world.tar.gz -- @ -- --@@ -595,7 +622,9 @@ -- == Verify The Install -- Test that the build completed successfully by invoking incredibly unimpressive ----- > stack exec fltkhs-hello-world+-- @+-- > stack exec fltkhs-hello-world+-- @ -- -- $InstallationWindows@@ -810,7 +839,7 @@ -- the REPL needed to link against the C library containing the C++ bindings and -- was having trouble finding it because it was just created by the Cabal build -- step but not yet installed. This seems like a better solution than hacking--- `Setup.hs` to make the library visible.+-- @Setup.hs@ to make the library visible. -- -- There are currently two sets of FLTKHS demos, the ones that are part of the -- <http://hackage.haskell.org/fltkhs-demos fltkhs-demos> package and ones that