{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE TypeFamilies #-}
module GI.Gtk.Declarative.Container.Class where
import Data.Int ( Int32 )
import Data.Vector ( Vector )
import qualified GI.Gtk as Gtk
class IsContainer container child | container -> child where
appendChild
:: container
-> child event
-> Gtk.Widget
-> IO ()
replaceChild
:: container
-> child event
-> Int32
-> Gtk.Widget
-> Gtk.Widget
-> IO ()
newtype Children child event = Children { Children child event -> Vector (child event)
unChildren :: Vector (child event) }
deriving (a -> Children child b -> Children child a
(a -> b) -> Children child a -> Children child b
(forall a b. (a -> b) -> Children child a -> Children child b)
-> (forall a b. a -> Children child b -> Children child a)
-> Functor (Children child)
forall a b. a -> Children child b -> Children child a
forall a b. (a -> b) -> Children child a -> Children child b
forall (child :: * -> *) a b.
Functor child =>
a -> Children child b -> Children child a
forall (child :: * -> *) a b.
Functor child =>
(a -> b) -> Children child a -> Children child b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: a -> Children child b -> Children child a
$c<$ :: forall (child :: * -> *) a b.
Functor child =>
a -> Children child b -> Children child a
fmap :: (a -> b) -> Children child a -> Children child b
$cfmap :: forall (child :: * -> *) a b.
Functor child =>
(a -> b) -> Children child a -> Children child b
Functor)
class ToChildren widget parent child | widget -> parent, widget -> child where
toChildren :: (Gtk.ManagedPtr widget -> widget) -> parent (child event) -> Children child event
default toChildren :: parent ~ Vector => (Gtk.ManagedPtr widget -> widget) -> parent (child event) -> Children child event
toChildren _ = parent (child event) -> Children child event
forall (child :: * -> *) event.
Vector (child event) -> Children child event
Children