To embed a user interface component inside a window, two methods are possible:
wopen :: [String] -> Component (a, DisplayHandle) -> IO (a, Window)The first argument contain the customisation options (See section Creating and customising a component for more info) to apply to the user interface component being realised in the new window. The component returns the toplevel DisplayHandle together with an arbitrary application value.
realiseDH :: DC -> DisplayHandle -> IO ()The other half of mkDC, taking the DisplayContext environment and the DisplayHandle put up inside the window. The DisplayHandle will normally be the root of the hierarchy of DisplayHandles.
The use of wopen vs. the use of the mkDC/realiseDH pair is largely a question of taste, although wopen can cause some excessive plumbing as all values of interest produced within the second argument of wopen has to be passed out at the end, i.e.,
... wopen  (\ env -> foo env >>= \ a -> bar env >>= \ b -> ... return ((a,b),...)) >>= \ ((a,b),...) -> return ()
tedious, and slightly error prone.