packages feed

fltkhs 0.4.0.9 → 0.4.1.0

raw patch · 13 files changed

+57/−41 lines, 13 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Graphics.UI.FLTK.LowLevel.TableRow: TableRowDeselect :: TableRowSelectFlag
+ Graphics.UI.FLTK.LowLevel.TableRow: TableRowSelect :: TableRowSelectFlag
+ Graphics.UI.FLTK.LowLevel.TableRow: TableRowToggle :: TableRowSelectFlag

Files

fltkhs.cabal view
@@ -1,5 +1,5 @@ name : fltkhs-version : 0.4.0.9+version : 0.4.1.0 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.
scripts/header-to-function-definition.hs view
@@ -364,6 +364,9 @@      ("Boxtype", "cFromEnum")     ,("Labeltype", "cFromEnum")     ,("AlignType", "cFromEnum")+    ,("const SettingBool", "cFromEnum")+    ,("const SettingDouble", "cFromEnum")+    ,("const SettingChar", "cFromEnum")     ,("Color", "cFromColor")     ,("CUInt", "id")     ,("FlShortcut", "id")@@ -395,18 +398,22 @@     [      ("void", "()")     ,("int", "Int")+    ,("const unsigned", "Int")     ,("void*", "Ptr ()")     ,("double", "Double")     ,("int*", "Ptr CInt")     ,("char*", "String")+    ,("const char *", "String")     ,("const char*", "String")     ,("char* const*", "String")     ,("const char* const*", "String")+    ,("const char * const", "String")     ,("float", "Float")     ,("uchar", "Word8")     ,("float*", "Ptr CFloat")     ,("unsigned", "Int")     ,("unsigned int", "Int")+    ,("long long", "Double")     ,("fl_Region", "Ptr ()")     ,("Fl_Boxtype", "Boxtype")     ,("Fl_Mode", "Mode")@@ -449,6 +456,7 @@     ,("fl_Image", "Ptr ()")     ,("fl_Image_Surface", "Ptr ()")     ,("fl_Bitmap", "Ptr ()")+    ,("webviewC",   "Ptr()")     ,("Fl_Color", "Color")     ,("Fl_Font", "Font")     ,("Fl_Fontsize", "Fontsize")@@ -520,7 +528,8 @@      ("fl_Image_Surface"  , "ImageSurface"),      ("fl_Menu_Item"      , "MenuItem"),      ("fl_Menu_"          , "MenuPrim"),-     ("fl_Bitmap"         , "Bitmap")+     ("fl_Bitmap"         , "Bitmap"),+     ("webviewC"          , "Webview")     ] upcase = map toUpper makeArgument className argType argName =@@ -618,9 +627,9 @@              <|>              do {p; x <- scan; return x} -parseCPP = do+parseCPP p = do   manyTill anyChar (try (string "EXPORT {"))-  impls <- many (try (ignoreUntil parseImplementation (noneOf "{}")))+  impls <- many (try (ignoreUntil p (noneOf "{}")))   manyTill anyChar (char '}')   return impls 
src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs view
@@ -374,6 +374,9 @@ -- "GHCi (Linux, *BSD & OSD Yosemite)". -- -- == GHC 7.10.3 And Beyond (Windows only)+-- _UPDATE_: This issue has been resolved by updates to 'language-c' and 'c2hs'. This+-- section will be removed in a subsequent release.+-- -- 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 -- GHC 7.10.3 has brought to a light and unfortunate
src/Graphics/UI/FLTK/LowLevel/FileBrowser.chs view
@@ -16,7 +16,7 @@       -- * Functions      ---     -- $FileBrowserfunctions+     -- $FileBrowserFunctions      --     ) where@@ -79,7 +79,7 @@ {# fun fl_casenumericsort_reference as caseNumericSort {} -> `FileSortF' #}  -- $hierarchy---+-- @ -- "Graphics.UI.FLTK.LowLevel.Widget" --  | --  v@@ -90,9 +90,10 @@ --  | --  v -- "Graphics.UI.FLTK.LowLevel.FileBrowser"+-- @  -- $FileBrowserFunctions---+-- @ -- getFiletype :: 'Ref' 'FileBrowser' -> 'IO' ('FileBrowserType') -- -- getFilter :: 'Ref' 'FileBrowser' -> 'IO' ('String')@@ -110,3 +111,4 @@ -- setIconsize :: 'Ref' 'FileBrowser' -> 'CUChar' -> 'IO' () -- -- setTextsize :: 'Ref' 'FileBrowser' -> 'FontSize' -> 'IO' ()+-- @
src/Graphics/UI/FLTK/LowLevel/FileInput.chs view
@@ -6,6 +6,10 @@      -- * Hierarchy      --      -- $hierarchy++     -- * Functions+     --+     -- $functions     ) where #include "Fl_ExportMacros.h"@@ -51,8 +55,26 @@  -- $hierarchy -- @+-- "Graphics.UI.FLTK.LowLevel.Widget"+--  |+--  v+-- "Graphics.UI.FLTK.LowLevel.Input"+--  |+--  v+-- "Graphics.UI.FLTK.LowLevel.FileInput" -- @  -- $functions -- @+-- getDownBox :: 'Ref' 'FileInput' -> 'IO' ('Boxtype')+--+-- getErrorColor :: 'Ref' 'FileInput' -> 'IO' ('Color')+--+-- getValue :: 'Ref' 'FileInput' -> 'IO' ('String')+--+-- setDownBox :: 'Ref' 'FileInput' -> 'Boxtype' -> 'IO' ()+--+-- setErrorColor :: 'Ref' 'FileInput' -> 'Color' -> 'IO' ()+--+-- setValue :: 'Ref' 'FileInput' -> 'String' -> 'IO' () -- @
src/Graphics/UI/FLTK/LowLevel/NiceSlider.chs view
@@ -6,10 +6,6 @@      -- * Hierarchy      --      -- $hierarchy--     -- * Functions-     ---     -- $functions     ) where #include "Fl_ExportMacros.h"@@ -31,12 +27,6 @@                              toRef         Just l -> niceSliderNewWithLabel' x_pos y_pos width height l >>=                              toRef--- $functions--- @------- @- -- $hierarchy -- @ -- "Graphics.UI.FLTK.LowLevel.Widget"
src/Graphics/UI/FLTK/LowLevel/RGBImage.chs view
@@ -38,6 +38,10 @@     (Just (Depth imageDepth), Just (LineSize l')) -> rgbImageNew_WithD_LD' (castPtr asCString) width' height' imageDepth l' >>= toRef     (Nothing, Nothing) -> rgbImageNew' (castPtr asCString) width' height' >>= toRef +-- | Check that the given RGBImage (or subclass of RGBImage) has a non-zero width.+--+-- For the most part you don't have worry about all the ugly constraints.+-- If you're interested, they check that the given reference is an RGBImage, which supports 'getW' and 'destroy'. checkImage :: (                 Parent orig RGBImage,                 Match x ~ FindOp orig orig (GetW ()),
src/Graphics/UI/FLTK/LowLevel/RadioLightButton.chs view
@@ -6,10 +6,6 @@      -- * Hierarchy      --      -- $hierarchy--     -- * Functions-     ---     -- $functions     ) where #include "Fl_ExportMacros.h"@@ -30,11 +26,6 @@     in case l' of         Nothing -> widgetNew' x_pos y_pos width height >>= toRef         Just l -> widgetNewWithLabel' x_pos y_pos width height l >>= toRef--- $functions--- @------- @  -- $hierarchy -- @
src/Graphics/UI/FLTK/LowLevel/Spinner.chs view
@@ -11,7 +11,7 @@       -- * Functions      ---     -- $Spinnerfunctions+     -- $functions      --     ) where
src/Graphics/UI/FLTK/LowLevel/TableRow.chs view
@@ -3,7 +3,7 @@ module Graphics.UI.FLTK.LowLevel.TableRow     (      tableRowNew,-     TableRowSelectFlag+     TableRowSelectFlag(..)      -- * Hierarchy      --      -- $hierarchy
src/Graphics/UI/FLTK/LowLevel/Tree.chs view
@@ -664,7 +664,6 @@ -- showItemWithYoff :: 'Ref' 'Tree' -> 'Ref' 'TreeItem' -> 'Maybe' 'Int' -> 'IO' () -- -- showSelf :: 'Ref' 'Tree' -> 'IO' ()- -- @  -- $hierarchy
src/Graphics/UI/FLTK/LowLevel/TreeItem.chs view
@@ -498,7 +498,6 @@ -- visible :: 'Ref' 'TreeItem' -> 'IO' ('Bool') -- -- visibleR :: 'Ref' 'TreeItem' -> 'IO' ('Bool')- -- @  
src/Graphics/UI/FLTK/LowLevel/Widget.chs view
@@ -92,8 +92,8 @@       toCallbackPrim `orNullFunPtr` _hide'       >>= {#set fl_Widget_Virtual_Funcs->hide#} structPtr  {# fun Fl_Widget_default_virtual_funcs as virtualFuncs' {} -> `Ptr ()' id #}--- | Given a record of functions, return a pointer to a struct with function pointers back--- to those functions.++-- | Given a record of functions, return a pointer to a struct with function pointers back to those functions. -- -- Only of interest to 'Widget' contributors. customWidgetFunctionStruct :: forall a. (Parent a Widget) =>@@ -128,16 +128,13 @@                -> (Int -> Int -> Int -> Int -> String -> Ptr () -> IO ( Ptr () )) -- ^ Foreign constructor to call if both title and custom functions are given                -> IO (Ref a)                                                      -- ^ Reference to the widget widgetMaker rectangle _label' draw' customFuncs' new' newWithLabel' newWithCustomFuncs' newWithCustomFuncsLabel' =+  do     let (x_pos, y_pos, width, height) = fromRectangle rectangle-    in case (_label', customFuncs') of-        (Nothing,Nothing) -> new' x_pos y_pos width height >>= toRef-        ((Just l), Nothing) -> newWithLabel' x_pos y_pos width height l >>= toRef-        ((Just l), (Just fs)) -> do-          ptr <- customWidgetFunctionStruct draw' fs-          newWithCustomFuncsLabel' x_pos y_pos width height l (castPtr ptr) >>= toRef-        (Nothing, (Just fs)) -> do-          ptr <- customWidgetFunctionStruct draw' fs-          newWithCustomFuncs' x_pos y_pos width height (castPtr ptr) >>= toRef+    ptr <- customWidgetFunctionStruct draw' (maybe defaultCustomWidgetFuncs id customFuncs')+    widget <- maybe (newWithCustomFuncs' x_pos y_pos width height (castPtr ptr))+                    (\l -> newWithCustomFuncsLabel' x_pos y_pos width height l (castPtr ptr))+                    _label'+    toRef widget  {# fun Fl_Widget_New as widgetNew' { `Int',`Int',`Int',`Int' } -> `Ptr ()' id #} {# fun Fl_Widget_New_WithLabel as widgetNewWithLabel' { `Int',`Int',`Int',`Int', unsafeToCString `String'} -> `Ptr ()' id #}