Commit 5991e304 authored by Bryan Gardiner's avatar Bryan Gardiner

Set classes' entity prefixes to empty; fix class decoding bugs.

- Makes use of classSetEntityPrefix to not have to rename class entities.

- Fixed the two components of QPoint, QPointF getting switched during the
  conversion to H* equivalents.
parent cc8c708a
......@@ -38,6 +38,7 @@ import Foreign.Hoppy.Generator.Spec (
),
Export (ExportClass, ExportEnum),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImport1,
ident,
......@@ -95,12 +96,13 @@ c_QChar =
return $ HsTyCon $ UnQual $ HsIdent "QtahP.Char"
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImport1 "Prelude" "(.)", importForChar, importForRuntime]
sayLn "qChar_newFromInt . QtahFHR.coerceIntegral . QtahDC.ord"
sayLn "newFromInt . QtahFHR.coerceIntegral . QtahDC.ord"
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsImport1 "Prelude" "(.)", importForChar, importForPrelude,
importForRuntime]
sayLn "QtahP.fmap (QtahDC.chr . QtahFHR.coerceIntegral) . qChar_unicode"
sayLn "QtahP.fmap (QtahDC.chr . QtahFHR.coerceIntegral) . unicode"
} $
classSetEntityPrefix "" $
makeClass (ident "QChar") Nothing []
[ mkCtor "new" []
, mkCtor "newFromCellRow" [ucharT, ucharT]
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QChildEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -43,6 +44,7 @@ aModule =
c_QChildEvent =
addReqIncludes [includeStd "QChildEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QChildEvent") Nothing [c_QEvent]
[ mkCtor "new" [enumT e_Type, ptrT $ objT c_QObject]
]
......
......@@ -25,6 +25,7 @@ import Foreign.Hoppy.Generator.Spec (
MethodApplicability (MStatic),
Purity (Nonpure),
addReqIncludes,
classSetEntityPrefix,
ident,
ident2,
includeLocal,
......@@ -54,6 +55,7 @@ c_QCoreApplication =
addReqIncludes [ includeStd "QCoreApplication"
, includeLocal "wrap_qcoreapplication.hpp"
] $
classSetEntityPrefix "" $
makeClass (ident "QCoreApplication") Nothing [c_QObject]
[] $
collect
......
......@@ -30,6 +30,7 @@ import Foreign.Hoppy.Generator.Spec (
Operator (OpArray),
addReqIncludes,
classSetConversionToGc,
classSetEntityPrefix,
ident,
ident1,
includeStd,
......@@ -70,6 +71,7 @@ c_QDir =
addReqIncludes [includeStd "QDir"] $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetConversionToGc $
classSetEntityPrefix "" $
makeClass (ident "QDir") Nothing []
[ mkCtor "new" [objT c_QString]
] $
......
......@@ -24,6 +24,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QEvent (
import Foreign.Hoppy.Generator.Spec (
Export (ExportEnum),
addReqIncludes,
classSetEntityPrefix,
ident,
ident1,
includeStd,
......@@ -53,6 +54,7 @@ aModule =
c_QEvent =
addReqIncludes [includeStd "QEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QEvent") Nothing []
[ mkCtor "new" [enumT e_Type]
] $
......
......@@ -66,6 +66,7 @@ import Foreign.Hoppy.Generator.Spec (
Type,
addReqs,
addAddendumHaskell,
classSetEntityPrefix,
classSetHaskellConversion,
classSetMonomorphicSuperclass,
hsImport1,
......@@ -138,6 +139,7 @@ instantiate' listName t tReqs opts =
classSetHaskellConversion conversion $
classAddFeatures features $
classSetMonomorphicSuperclass $
classSetEntityPrefix "" $
makeClass (identT "QList" [t]) (Just $ toExtName listName) []
[ mkCtor "new" []
] $
......
......@@ -27,7 +27,6 @@ import Data.Monoid (mconcat)
#endif
import Foreign.Hoppy.Generator.Language.Haskell (
addImports,
indent,
sayLn,
saysLn,
)
......@@ -41,6 +40,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -88,20 +88,15 @@ c_QMargins =
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImports "Control.Applicative" ["(<$>)", "(<*>)"],
hsQualifiedImport "Graphics.UI.Qtah.Core.HMargins" "HMargins"]
saysLn ["qMargins_new <$> HMargins.left <*> HMargins.top <*> HMargins.right <*> ",
saysLn ["new <$> HMargins.left <*> HMargins.top <*> HMargins.right <*> ",
"HMargins.bottom"]
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsQualifiedImport "Graphics.UI.Qtah.Core.HMargins" "HMargins",
importForPrelude]
sayLn "\\q -> do"
indent $ do
sayLn "l <- qMargins_left q"
sayLn "t <- qMargins_top q"
sayLn "r <- qMargins_right q"
sayLn "b <- qMargins_bottom q"
sayLn "QtahP.return (HMargins.HMargins l t r b)"
sayLn "\\q -> HMargins.HMargins <$> left q <*> top q <*> right q <*> bottom q"
} $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QMargins") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [intT, intT, intT, intT]
......
......@@ -24,6 +24,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -56,6 +57,7 @@ aModule =
c_QMarginsF =
addReqIncludes [includeStd "QMarginsF"] $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QMarginsF") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [qreal, qreal, qreal, qreal]
......
......@@ -23,6 +23,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QObject (
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -52,6 +53,7 @@ aModule =
c_QObject =
addReqIncludes [includeStd "QObject"] $
classSetEntityPrefix "" $
makeClass (ident "QObject") Nothing []
[ mkCtor "new" []
, mkCtor "newWithParent" [ptrT $ objT c_QObject]
......
......@@ -27,7 +27,6 @@ import Data.Monoid (mconcat)
#endif
import Foreign.Hoppy.Generator.Language.Haskell (
addImports,
indent,
sayLn,
)
import Foreign.Hoppy.Generator.Spec (
......@@ -40,6 +39,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -89,17 +89,14 @@ c_QPoint =
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImports "Control.Applicative" ["(<$>)", "(<*>)"],
hsQualifiedImport "Graphics.UI.Qtah.Core.HPoint" "HPoint"]
sayLn "qPoint_new <$> HPoint.x <*> HPoint.y"
sayLn "new <$> HPoint.x <*> HPoint.y"
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsQualifiedImport "Graphics.UI.Qtah.Core.HPoint" "HPoint",
importForPrelude]
sayLn "\\q -> do"
indent $ do
sayLn "y <- qPoint_x q"
sayLn "x <- qPoint_y q"
sayLn "QtahP.return (HPoint.HPoint x y)"
sayLn "\\q -> HPoint.HPoint <$> x q <*> y q"
} $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QPoint") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [intT, intT]
......
......@@ -27,7 +27,6 @@ import Data.Monoid (mconcat)
#endif
import Foreign.Hoppy.Generator.Language.Haskell (
addImports,
indent,
sayLn,
)
import Foreign.Hoppy.Generator.Spec (
......@@ -40,6 +39,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -88,17 +88,14 @@ c_QPointF =
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImports "Control.Applicative" ["(<$>)", "(<*>)"],
hsQualifiedImport "Graphics.UI.Qtah.Core.HPointF" "HPointF"]
sayLn "qPointF_new <$> HPointF.x <*> HPointF.y"
sayLn "new <$> HPointF.x <*> HPointF.y"
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsQualifiedImport "Graphics.UI.Qtah.Core.HPointF" "HPointF",
importForPrelude]
sayLn "\\q -> do"
indent $ do
sayLn "y <- qPointF_x q"
sayLn "x <- qPointF_y q"
sayLn "QtahP.return (HPointF.HPointF x y)"
sayLn "\\q -> HPointF.HPointF <$> x q <*> y q"
} $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QPointF") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [qreal, qreal]
......
......@@ -27,7 +27,6 @@ import Data.Monoid (mconcat)
#endif
import Foreign.Hoppy.Generator.Language.Haskell (
addImports,
indent,
sayLn,
)
import Foreign.Hoppy.Generator.Spec (
......@@ -39,6 +38,7 @@ import Foreign.Hoppy.Generator.Spec (
),
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -88,19 +88,14 @@ c_QRect =
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImports "Control.Applicative" ["(<$>)", "(<*>)"],
hsQualifiedImport "Graphics.UI.Qtah.Core.HRect" "HRect"]
sayLn "qRect_newWithRaw <$> HRect.x <*> HRect.y <*> HRect.width <*> HRect.height"
sayLn "newWithRaw <$> HRect.x <*> HRect.y <*> HRect.width <*> HRect.height"
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsQualifiedImport "Graphics.UI.Qtah.Core.HRect" "HRect",
importForPrelude]
sayLn "\\q -> do"
indent $ do
sayLn "x <- qRect_x q"
sayLn "y <- qRect_y q"
sayLn "w <- qRect_width q"
sayLn "h <- qRect_height q"
sayLn "QtahP.return (HRect.HRect x y w h)"
sayLn "\\q -> HRect.HRect <$> x q <*> y q <*> width q <*> height q"
} $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QRect") Nothing []
[ mkCtor "newNull" []
, mkCtor "newWithPoints" [objT c_QPoint, objT c_QPoint]
......
......@@ -23,6 +23,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QRectF (
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
classSetConversionToGc,
ident,
includeStd,
......@@ -60,6 +61,7 @@ c_QRectF =
addReqIncludes [includeStd "QRectF"] $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetConversionToGc $
classSetEntityPrefix "" $
makeClass (ident "QRectF") Nothing []
(collect
[ just $ mkCtor "newNull" []
......
......@@ -27,7 +27,6 @@ import Data.Monoid (mconcat)
#endif
import Foreign.Hoppy.Generator.Language.Haskell (
addImports,
indent,
sayLn,
)
import Foreign.Hoppy.Generator.Spec (
......@@ -40,6 +39,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -86,17 +86,14 @@ c_QSize =
, classHaskellConversionToCppFn = do
addImports $ mconcat [hsImports "Control.Applicative" ["(<$>)", "(<*>)"],
hsQualifiedImport "Graphics.UI.Qtah.Core.HSize" "HSize"]
sayLn "qSize_new <$> HSize.width <*> HSize.height"
sayLn "new <$> HSize.width <*> HSize.height"
, classHaskellConversionFromCppFn = do
addImports $ mconcat [hsQualifiedImport "Graphics.UI.Qtah.Core.HSize" "HSize",
importForPrelude]
sayLn "\\q -> do"
indent $ do
sayLn "w <- qSize_width q"
sayLn "h <- qSize_height q"
sayLn "QtahP.return (HSize.HSize w h)"
sayLn "\\q -> HSize.HSize <$> width q <*> height q"
} $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QSize") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [intT, intT]
......
......@@ -25,6 +25,7 @@ import Foreign.Hoppy.Generator.Spec (
Operator (OpAddAssign, OpDivideAssign, OpMultiplyAssign, OpSubtractAssign),
addReqIncludes,
classSetConversionToGc,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -57,6 +58,7 @@ c_QSizeF =
addReqIncludes [includeStd "QSizeF"] $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetConversionToGc $
classSetEntityPrefix "" $
makeClass (ident "QSizeF") Nothing []
[ mkCtor "newNull" []
, mkCtor "new" [qreal, qreal]
......
......@@ -41,6 +41,7 @@ import Foreign.Hoppy.Generator.Spec (
Operator (OpArray),
Purity (Nonpure),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
ident,
ident2,
......@@ -89,9 +90,10 @@ c_QString =
return $ HsTyCon $ UnQual $ HsIdent "QtahP.String"
, classHaskellConversionToCppFn = do
addImports $ mconcat [importForForeignC, importForPrelude]
sayLn "QtahP.flip QtahFC.withCString qString_newFromCString"
, classHaskellConversionFromCppFn = sayLn "qString_toStdString"
sayLn "QtahP.flip QtahFC.withCString newFromCString"
, classHaskellConversionFromCppFn = sayLn "toStdString"
} $
classSetEntityPrefix "" $
makeClass (ident "QString") Nothing []
[ mkCtor "newFromCString" [ptrT $ constT charT]
] $
......
......@@ -47,6 +47,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addAddendumHaskell,
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImport1,
ident,
......@@ -103,6 +104,7 @@ c_QStringList =
} $
addAddendumHaskell addendum $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QStringList") Nothing [c_QListQString]
[ mkCtor "new" []
] $
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Core.QTimerEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -42,6 +43,7 @@ aModule =
c_QTimerEvent =
addReqIncludes [includeStd "QTimerEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QTimerEvent") Nothing [c_QEvent]
[ mkCtor "new" [intT]
]
......
......@@ -57,6 +57,7 @@ import Foreign.Hoppy.Generator.Spec (
Type,
addReqs,
addAddendumHaskell,
classSetEntityPrefix,
classSetMonomorphicSuperclass,
hsImport1,
hsImports,
......@@ -120,6 +121,7 @@ instantiate' vectorName t tReqs opts =
addAddendumHaskell addendum $
classAddFeatures features $
classSetMonomorphicSuperclass $
classSetEntityPrefix "" $
makeClass (identT "QVector" [t]) (Just $ toExtName vectorName) []
[ mkCtor "new" []
, mkCtor "newWithSize" [intT]
......
......@@ -22,6 +22,7 @@ module Graphics.UI.Qtah.Generator.Interface.EventListener (
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident2,
includeLocal,
makeClass,
......@@ -42,6 +43,7 @@ aModule =
c_EventListener =
addReqIncludes [includeLocal "event.hpp"] $
classSetEntityPrefix "" $
makeClass (ident2 "qtah" "event" "EventListener") Nothing [c_QObject]
[ mkCtor "new" [callbackT cb_PtrQObjectPtrQEventBool, ptrT intT]
]
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QActionEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -43,6 +44,7 @@ aModule =
c_QActionEvent =
addReqIncludes [includeStd "QActionEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QActionEvent") Nothing [c_QEvent]
[ mkCtor "new" [enumT e_Type, ptrT $ objT c_QAction]
, mkCtor "newBefore" [enumT e_Type, ptrT $ objT c_QAction]
......
......@@ -25,6 +25,7 @@ import Foreign.Hoppy.Generator.Spec (
Export (ExportEnum, ExportClass),
addReqIncludes,
classSetDtorPrivate,
classSetEntityPrefix,
ident,
ident1,
includeStd,
......@@ -57,6 +58,7 @@ aModule =
c_QClipboard =
addReqIncludes [includeStd "QClipboard"] $
classSetDtorPrivate $
classSetEntityPrefix "" $
makeClass (ident "QClipboard") Nothing [c_QObject] [] $
collect
[ just $ mkMethod' "clear" "clear" [] voidT
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QCloseEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -39,6 +40,7 @@ aModule =
c_QCloseEvent =
addReqIncludes [includeStd "QCloseEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QCloseEvent") Nothing [c_QEvent]
[ mkCtor "new" []
]
......
......@@ -41,6 +41,7 @@ import Foreign.Hoppy.Generator.Spec (
),
Export (ExportEnum, ExportClass),
addReqIncludes,
classSetEntityPrefix,
classSetHaskellConversion,
hsImports,
hsQualifiedImport,
......@@ -92,6 +93,7 @@ c_QColor =
addReqIncludes [includeStd "QColor"] $
classSetHaskellConversion conversion $
classAddFeatures [Assignable, Copyable, Equatable] $
classSetEntityPrefix "" $
makeClass (ident "QColor") Nothing []
[ mkCtor "new" []
, mkCtor "newRgb" [intT, intT, intT]
......@@ -192,7 +194,7 @@ c_QColor =
hColorImport]
sayLn "\\color' -> do"
indent $ do
sayLn "this' <- qColor_new"
sayLn "this' <- new"
sayLn "case color' of"
indent $ forM_ components $ \(spec, letters, _) ->
saysLn $ concat
......@@ -200,7 +202,7 @@ c_QColor =
, map (\var -> [' ', var, '\'']) letters
, if null letters
then [" -> QtahP.return ()"]
else [" -> qColor_set", spec, "a this'"]
else [" -> set", spec, "a this'"]
, concatMap (\var -> [" (QtahFHR.coerceIntegral ", [var], "')"]) letters
]
sayLn "QtahP.return this'"
......@@ -210,12 +212,12 @@ c_QColor =
importForPrelude,
importForRuntime,
hColorImport]
sayLn "\\this' -> qColor_spec this' >>= \\spec' -> case spec' of"
sayLn "\\this' -> spec this' >>= \\spec' -> case spec' of"
indent $ forM_ components $ \(spec, letters, getters) -> do
saysLn ["QColorSpec_", spec, " -> do"]
indent $ do
forM_ (zip letters getters) $ \(var, get) ->
saysLn [[var], "' <- QtahP.fmap QtahFHR.coerceIntegral $ qColor_", get, " this'"]
saysLn [[var], "' <- QtahP.fmap QtahFHR.coerceIntegral $ ", get, " this'"]
saysLn $ ["QtahP.return $ HColor.", spec] ++ map (\var -> [' ', var, '\'']) letters
}
......
......@@ -24,6 +24,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QDoubleValidator (
import Foreign.Hoppy.Generator.Spec (
Export (ExportEnum, ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
ident1,
includeStd,
......@@ -53,6 +54,7 @@ aModule =
c_QDoubleValidator =
addReqIncludes [includeStd "QDoubleValidator"] $
classSetEntityPrefix "" $
makeClass (ident "QDoubleValidator") Nothing [c_QValidator]
[ mkCtor "new" []
, mkCtor "newWithParent" [ptrT $ objT c_QObject]
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QEnterEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -45,6 +46,7 @@ aModule =
c_QEnterEvent =
addReqIncludes [includeStd "QEnterEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QEnterEvent") Nothing [c_QEvent]
[ mkCtor "new" [objT c_QPointF, objT c_QPointF, objT c_QPointF]
]
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QExposeEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -44,6 +45,7 @@ aModule =
c_QExposeEvent =
addReqIncludes [includeStd "QExposeEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QExposeEvent") Nothing [c_QEvent]
[ mkCtor "new" [objT c_QRegion]
]
......
......@@ -22,6 +22,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QFocusEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -44,6 +45,7 @@ aModule =
c_QFocusEvent =
addReqIncludes [includeStd "QFocusEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QFocusEvent") Nothing [c_QEvent]
[ mkCtor "new" [enumT e_Type, enumT e_FocusReason]
] $
......
......@@ -22,6 +22,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QHideEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -41,6 +42,7 @@ aModule =
c_QHideEvent =
addReqIncludes [includeStd "QHideEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QHideEvent") Nothing [c_QEvent]
[ mkCtor "new" []
]
......
......@@ -21,6 +21,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QHoverEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -48,6 +49,7 @@ aModule =
c_QHoverEvent =
addReqIncludes [includeStd "QHoverEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QHoverEvent") Nothing
[if qtVersion >= [5, 0] then c_QInputEvent else c_QEvent]
(collect
......
......@@ -22,6 +22,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QInputEvent (
import Foreign.Hoppy.Generator.Spec (
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -45,6 +46,7 @@ aModule =
c_QInputEvent =
addReqIncludes [includeStd "QInputEvent"] $
classSetEntityPrefix "" $
makeClass (ident "QInputEvent") Nothing [c_QEvent]
[] $
collect
......
......@@ -23,6 +23,7 @@ module Graphics.UI.Qtah.Generator.Interface.Gui.QIntValidator (
import Foreign.Hoppy.Generator.Spec (
Export (ExportClass),
addReqIncludes,
classSetEntityPrefix,
ident,
includeStd,
makeClass,
......@@ -46,6 +47,7 @@ aModule =