hsqml-0.1.0: Haskell binding for Qt Quick

Safe HaskellNone

Graphics.QML.Engine

Description

Functions for starting QML engines, displaying content in a window.

Synopsis

Documentation

data InitialWindowState Source

Specifies the intial state of the display window.

Constructors

ShowWindow

A visible window should be created for the initial document with a default title.

ShowWindowWithTitle String

A visible window should be created for the initial document with the given title.

HideWindow

A window should be created for the initial document, but it will remain hidden until made visible by the QML script.

data EngineConfig a Source

Holds parameters for configuring a QML runtime engine.

Constructors

EngineConfig 

Fields

initialURL :: URI

URL for the first QML document to be loaded.

initialWindowState :: InitialWindowState

Window state for the initial QML document.

contextObject :: Maybe (ObjRef a)

Context Object made available to QML script code.

defaultEngineConfig :: EngineConfig aSource

Default engine configuration. Loads "main.qml" from the current working directory into a visible window with no context object.

createEngine :: Object a => EngineConfig a -> IO ()Source

Create a QML engine from a specification of its configuration.

runEngines :: IO ()Source

Enters the Qt event loop and runs until all engines have terminated.

filePathToURI :: FilePath -> URISource

Convenience function for converting local file paths into URIs.