gladexml-accessor (empty) → 0.0
raw patch · 6 files changed
+605/−0 lines, 6 filesdep +HaXmldep +basedep +gladesetup-changed
Dependencies added: HaXml, base, glade, template-haskell
Files
- Graphics/UI/Gtk/Glade/Accessor.hs +55/−0
- Graphics/UI/Gtk/Glade/Glade20DTD.hs +432/−0
- LICENSE +24/−0
- Setup.lhs +4/−0
- glade-2.0.dtd +76/−0
- gladexml-accessor.cabal +14/−0
+ Graphics/UI/Gtk/Glade/Accessor.hs view
@@ -0,0 +1,55 @@+{-# LANGUAGE TemplateHaskell #-}++-----------------------------------------------------------------------------+-- |+-- Module : Graphics.UI.Gtk.Glade.Accessor+-- Copyright : (c) Yakov Zaytsev 2009+-- License : BSD-style (see the file LICENSE)+--+-- Maintainer : yakov@yakov.cc+-- Stability : experimental+-- Portability : non-portable (TH)+--++-----------------------------------------------------------------------------++module Graphics.UI.Gtk.Glade.Accessor (+ importGladeXml+ ) where++import Text.XML.HaXml.Wrappers+import Text.XML.HaXml.Parse+import Text.XML.HaXml.Combinators+import Text.XML.HaXml.XmlContent+import Text.XML.HaXml.OneOfN+import Language.Haskell.TH+import Graphics.UI.Gtk.Glade (xmlGetWidget)++import Graphics.UI.Gtk.Glade.Glade20DTD++importGladeXml :: FilePath -> Q [Dec]+importGladeXml fp = do wcs <- runIO widgetIdsAndClasses+ mapM (uncurry mkAccessor) wcs+ where+ mkAccessor id ('G':'t':'k':clas)+ = funD (mkName id)+ [clause [varP (mkName "xml")]+ (normalB $ [| xmlGetWidget $(varE $ mkName "xml")+ $(varE $ mkName+ $ "castTo" ++ clas) id |])+ []]++ widgetIdsAndClasses = do cs <- readFile fp+ case readXml cs of+ Right d -> return $ widgetIdClass d+ _ -> return []++ widgetIdClass :: Glade_interface -> [(String, String)]+ widgetIdClass (Glade_interface _ _ ws) = concat $ map goWidget ws++ goWidget :: Widget -> [(String, String)]+ goWidget (Widget (Widget_Attrs { widgetClass = wc, widgetId = wid }) _ _ _ _ ch)+ = ((wid, wc):(concat $ map goChild ch))++ goChild (Child _ (OneOf2 widget) _) = goWidget widget+ goChild (Child _ _ _) = []
+ Graphics/UI/Gtk/Glade/Glade20DTD.hs view
@@ -0,0 +1,432 @@+module Graphics.UI.Gtk.Glade.Glade20DTD where++import Text.XML.HaXml.XmlContent+import Text.XML.HaXml.OneOfN+++{-Type decls-}++data Glade_interface = Glade_interface Glade_interface_Attrs+ [Requires] [Widget]+ deriving (Eq,Show)+data Glade_interface_Attrs = Glade_interface_Attrs+ { glade_interfaceXmlns :: (Defaultable String)+ } deriving (Eq,Show)+data Requires = Requires+ { requiresLib :: String+ } deriving (Eq,Show)+data Widget = Widget Widget_Attrs [Property] (Maybe Accessibility)+ [Signal] [Accelerator] [Child]+ deriving (Eq,Show)+data Widget_Attrs = Widget_Attrs+ { widgetClass :: String+ , widgetId :: String+ } deriving (Eq,Show)+data Property = Property Property_Attrs String+ deriving (Eq,Show)+data Property_Attrs = Property_Attrs+ { propertyName :: String+ , propertyType :: (Maybe String)+ , propertyTranslatable :: (Defaultable Property_translatable)+ , propertyContext :: (Defaultable Property_context)+ , propertyComments :: (Maybe String)+ , propertyAgent :: (Maybe String)+ } deriving (Eq,Show)+data Property_translatable = Property_translatable_yes | + Property_translatable_no+ deriving (Eq,Show)+data Property_context = Property_context_yes | + Property_context_no+ deriving (Eq,Show)+data Atkproperty = Atkproperty Atkproperty_Attrs [Atkproperty_]+ deriving (Eq,Show)+data Atkproperty_Attrs = Atkproperty_Attrs+ { atkpropertyName :: String+ , atkpropertyType :: (Maybe String)+ , atkpropertyTranslatable :: (Defaultable Atkproperty_translatable)+ , atkpropertyContext :: (Defaultable Atkproperty_context)+ , atkpropertyComments :: (Maybe String)+ } deriving (Eq,Show)+data Atkproperty_ = Atkproperty_Str String+ | Atkproperty_Accessibility Accessibility+ deriving (Eq,Show)+data Atkproperty_translatable = Atkproperty_translatable_yes | + Atkproperty_translatable_no+ deriving (Eq,Show)+data Atkproperty_context = Atkproperty_context_yes | + Atkproperty_context_no+ deriving (Eq,Show)+data Atkrelation = Atkrelation+ { atkrelationTarget :: String+ , atkrelationType :: String+ } deriving (Eq,Show)+data Atkaction = Atkaction+ { atkactionAction_name :: String+ , atkactionDescription :: (Maybe String)+ } deriving (Eq,Show)+newtype Accessibility = Accessibility [Accessibility_] deriving (Eq,Show)+data Accessibility_ = Accessibility_Atkrelation Atkrelation+ | Accessibility_Atkaction Atkaction+ | Accessibility_Atkproperty Atkproperty+ deriving (Eq,Show)+data Signal = Signal Signal_Attrs [Property]+ deriving (Eq,Show)+data Signal_Attrs = Signal_Attrs+ { signalName :: String+ , signalHandler :: String+ , signalAfter :: (Defaultable Signal_after)+ , signalObject :: (Maybe String)+ , signalLast_modification_time :: (Maybe String)+ } deriving (Eq,Show)+data Signal_after = Signal_after_yes | Signal_after_no+ deriving (Eq,Show)+data Accelerator = Accelerator+ { acceleratorKey :: String+ , acceleratorModifiers :: String+ , acceleratorSignal :: String+ } deriving (Eq,Show)+data Child = Child Child_Attrs (OneOf2 Widget Placeholder)+ (Maybe Packing)+ deriving (Eq,Show)+data Child_Attrs = Child_Attrs+ { childInternal_child :: (Maybe String)+ } deriving (Eq,Show)+newtype Packing = Packing (List1 Property) deriving (Eq,Show)+data Placeholder = Placeholder deriving (Eq,Show)+++{-Instance decls-}++instance HTypeable Glade_interface where+ toHType x = Defined "glade-interface" [] []+instance XmlContent Glade_interface where+ toContents (Glade_interface as a b) =+ [CElem (Elem "glade-interface" (toAttrs as) (concatMap toContents a+ ++ concatMap toContents b)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["glade-interface"]+ ; interior e $ return (Glade_interface (fromAttrs as))+ `apply` many parseContents `apply` many parseContents+ } `adjustErr` ("in <glade-interface>, "++)+instance XmlAttributes Glade_interface_Attrs where+ fromAttrs as =+ Glade_interface_Attrs+ { glade_interfaceXmlns = defaultA fromAttrToStr "http://glade.gnome.org/glade-2.0.dtd" "xmlns" as+ }+ toAttrs v = catMaybes + [ defaultToAttr toAttrFrStr "xmlns" (glade_interfaceXmlns v)+ ]++instance HTypeable Requires where+ toHType x = Defined "requires" [] []+instance XmlContent Requires where+ toContents as =+ [CElem (Elem "requires" (toAttrs as) []) ()]+ parseContents = do+ { (Elem _ as []) <- element ["requires"]+ ; return (fromAttrs as)+ } `adjustErr` ("in <requires>, "++)+instance XmlAttributes Requires where+ fromAttrs as =+ Requires+ { requiresLib = definiteA fromAttrToStr "requires" "lib" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "lib" (requiresLib v)+ ]++instance HTypeable Widget where+ toHType x = Defined "widget" [] []+instance XmlContent Widget where+ toContents (Widget as a b c d e) =+ [CElem (Elem "widget" (toAttrs as) (concatMap toContents a +++ maybe [] toContents b ++ concatMap toContents c +++ concatMap toContents d ++ concatMap toContents e)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["widget"]+ ; interior e $ return (Widget (fromAttrs as))+ `apply` many parseContents `apply` optional parseContents+ `apply` many parseContents `apply` many parseContents+ `apply` many parseContents+ } `adjustErr` ("in <widget>, "++)+instance XmlAttributes Widget_Attrs where+ fromAttrs as =+ Widget_Attrs+ { widgetClass = definiteA fromAttrToStr "widget" "class" as+ , widgetId = definiteA fromAttrToStr "widget" "id" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "class" (widgetClass v)+ , toAttrFrStr "id" (widgetId v)+ ]++instance HTypeable Property where+ toHType x = Defined "property" [] []+instance XmlContent Property where+ toContents (Property as a) =+ [CElem (Elem "property" (toAttrs as) (toText a)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["property"]+ ; interior e $ return (Property (fromAttrs as))+ `apply` (text `onFail` return "")+ } `adjustErr` ("in <property>, "++)+instance XmlAttributes Property_Attrs where+ fromAttrs as =+ Property_Attrs+ { propertyName = definiteA fromAttrToStr "property" "name" as+ , propertyType = possibleA fromAttrToStr "type" as+ , propertyTranslatable = defaultA fromAttrToTyp Property_translatable_no "translatable" as+ , propertyContext = defaultA fromAttrToTyp Property_context_no "context" as+ , propertyComments = possibleA fromAttrToStr "comments" as+ , propertyAgent = possibleA fromAttrToStr "agent" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "name" (propertyName v)+ , maybeToAttr toAttrFrStr "type" (propertyType v)+ , defaultToAttr toAttrFrTyp "translatable" (propertyTranslatable v)+ , defaultToAttr toAttrFrTyp "context" (propertyContext v)+ , maybeToAttr toAttrFrStr "comments" (propertyComments v)+ , maybeToAttr toAttrFrStr "agent" (propertyAgent v)+ ]++instance XmlAttrType Property_translatable where+ fromAttrToTyp n (n',v)+ | n==n' = translate (attr2str v)+ | otherwise = Nothing+ where translate "yes" = Just Property_translatable_yes+ translate "no" = Just Property_translatable_no+ translate _ = Nothing+ toAttrFrTyp n Property_translatable_yes = Just (n, str2attr "yes")+ toAttrFrTyp n Property_translatable_no = Just (n, str2attr "no")++instance XmlAttrType Property_context where+ fromAttrToTyp n (n',v)+ | n==n' = translate (attr2str v)+ | otherwise = Nothing+ where translate "yes" = Just Property_context_yes+ translate "no" = Just Property_context_no+ translate _ = Nothing+ toAttrFrTyp n Property_context_yes = Just (n, str2attr "yes")+ toAttrFrTyp n Property_context_no = Just (n, str2attr "no")++instance HTypeable Atkproperty where+ toHType x = Defined "atkproperty" [] []+instance XmlContent Atkproperty where+ toContents (Atkproperty as a) =+ [CElem (Elem "atkproperty" (toAttrs as) (concatMap toContents a)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["atkproperty"]+ ; interior e $ return (Atkproperty (fromAttrs as))+ `apply` many parseContents+ } `adjustErr` ("in <atkproperty>, "++)+instance XmlAttributes Atkproperty_Attrs where+ fromAttrs as =+ Atkproperty_Attrs+ { atkpropertyName = definiteA fromAttrToStr "atkproperty" "name" as+ , atkpropertyType = possibleA fromAttrToStr "type" as+ , atkpropertyTranslatable = defaultA fromAttrToTyp Atkproperty_translatable_no "translatable" as+ , atkpropertyContext = defaultA fromAttrToTyp Atkproperty_context_no "context" as+ , atkpropertyComments = possibleA fromAttrToStr "comments" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "name" (atkpropertyName v)+ , maybeToAttr toAttrFrStr "type" (atkpropertyType v)+ , defaultToAttr toAttrFrTyp "translatable" (atkpropertyTranslatable v)+ , defaultToAttr toAttrFrTyp "context" (atkpropertyContext v)+ , maybeToAttr toAttrFrStr "comments" (atkpropertyComments v)+ ]++instance HTypeable Atkproperty_ where+ toHType x = Defined "atkproperty" [] []+instance XmlContent Atkproperty_ where+ toContents (Atkproperty_Str a) = toText a+ toContents (Atkproperty_Accessibility a) = toContents a+ parseContents = oneOf+ [ return (Atkproperty_Str) `apply` (text `onFail` return "")+ , return (Atkproperty_Accessibility) `apply` parseContents+ ] `adjustErr` ("in <atkproperty>, "++)++instance XmlAttrType Atkproperty_translatable where+ fromAttrToTyp n (n',v)+ | n==n' = translate (attr2str v)+ | otherwise = Nothing+ where translate "yes" = Just Atkproperty_translatable_yes+ translate "no" = Just Atkproperty_translatable_no+ translate _ = Nothing+ toAttrFrTyp n Atkproperty_translatable_yes = Just (n, str2attr "yes")+ toAttrFrTyp n Atkproperty_translatable_no = Just (n, str2attr "no")++instance XmlAttrType Atkproperty_context where+ fromAttrToTyp n (n',v)+ | n==n' = translate (attr2str v)+ | otherwise = Nothing+ where translate "yes" = Just Atkproperty_context_yes+ translate "no" = Just Atkproperty_context_no+ translate _ = Nothing+ toAttrFrTyp n Atkproperty_context_yes = Just (n, str2attr "yes")+ toAttrFrTyp n Atkproperty_context_no = Just (n, str2attr "no")++instance HTypeable Atkrelation where+ toHType x = Defined "atkrelation" [] []+instance XmlContent Atkrelation where+ toContents as =+ [CElem (Elem "atkrelation" (toAttrs as) []) ()]+ parseContents = do+ { (Elem _ as []) <- element ["atkrelation"]+ ; return (fromAttrs as)+ } `adjustErr` ("in <atkrelation>, "++)+instance XmlAttributes Atkrelation where+ fromAttrs as =+ Atkrelation+ { atkrelationTarget = definiteA fromAttrToStr "atkrelation" "target" as+ , atkrelationType = definiteA fromAttrToStr "atkrelation" "type" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "target" (atkrelationTarget v)+ , toAttrFrStr "type" (atkrelationType v)+ ]++instance HTypeable Atkaction where+ toHType x = Defined "atkaction" [] []+instance XmlContent Atkaction where+ toContents as =+ [CElem (Elem "atkaction" (toAttrs as) []) ()]+ parseContents = do+ { (Elem _ as []) <- element ["atkaction"]+ ; return (fromAttrs as)+ } `adjustErr` ("in <atkaction>, "++)+instance XmlAttributes Atkaction where+ fromAttrs as =+ Atkaction+ { atkactionAction_name = definiteA fromAttrToStr "atkaction" "action_name" as+ , atkactionDescription = possibleA fromAttrToStr "description" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "action_name" (atkactionAction_name v)+ , maybeToAttr toAttrFrStr "description" (atkactionDescription v)+ ]++instance HTypeable Accessibility where+ toHType x = Defined "accessibility" [] []+instance XmlContent Accessibility where+ toContents (Accessibility a) =+ [CElem (Elem "accessibility" [] (concatMap toContents a)) ()]+ parseContents = do+ { e@(Elem _ [] _) <- element ["accessibility"]+ ; interior e $ return (Accessibility) `apply` many parseContents+ } `adjustErr` ("in <accessibility>, "++)++instance HTypeable Accessibility_ where+ toHType x = Defined "accessibility" [] []+instance XmlContent Accessibility_ where+ toContents (Accessibility_Atkrelation a) = toContents a+ toContents (Accessibility_Atkaction a) = toContents a+ toContents (Accessibility_Atkproperty a) = toContents a+ parseContents = oneOf+ [ return (Accessibility_Atkrelation) `apply` parseContents+ , return (Accessibility_Atkaction) `apply` parseContents+ , return (Accessibility_Atkproperty) `apply` parseContents+ ] `adjustErr` ("in <accessibility>, "++)++instance HTypeable Signal where+ toHType x = Defined "signal" [] []+instance XmlContent Signal where+ toContents (Signal as a) =+ [CElem (Elem "signal" (toAttrs as) (concatMap toContents a)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["signal"]+ ; interior e $ return (Signal (fromAttrs as))+ `apply` many parseContents+ } `adjustErr` ("in <signal>, "++)+instance XmlAttributes Signal_Attrs where+ fromAttrs as =+ Signal_Attrs+ { signalName = definiteA fromAttrToStr "signal" "name" as+ , signalHandler = definiteA fromAttrToStr "signal" "handler" as+ , signalAfter = defaultA fromAttrToTyp Signal_after_no "after" as+ , signalObject = possibleA fromAttrToStr "object" as+ , signalLast_modification_time = possibleA fromAttrToStr "last_modification_time" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "name" (signalName v)+ , toAttrFrStr "handler" (signalHandler v)+ , defaultToAttr toAttrFrTyp "after" (signalAfter v)+ , maybeToAttr toAttrFrStr "object" (signalObject v)+ , maybeToAttr toAttrFrStr "last_modification_time" (signalLast_modification_time v)+ ]++instance XmlAttrType Signal_after where+ fromAttrToTyp n (n',v)+ | n==n' = translate (attr2str v)+ | otherwise = Nothing+ where translate "yes" = Just Signal_after_yes+ translate "no" = Just Signal_after_no+ translate _ = Nothing+ toAttrFrTyp n Signal_after_yes = Just (n, str2attr "yes")+ toAttrFrTyp n Signal_after_no = Just (n, str2attr "no")++instance HTypeable Accelerator where+ toHType x = Defined "accelerator" [] []+instance XmlContent Accelerator where+ toContents as =+ [CElem (Elem "accelerator" (toAttrs as) []) ()]+ parseContents = do+ { (Elem _ as []) <- element ["accelerator"]+ ; return (fromAttrs as)+ } `adjustErr` ("in <accelerator>, "++)+instance XmlAttributes Accelerator where+ fromAttrs as =+ Accelerator+ { acceleratorKey = definiteA fromAttrToStr "accelerator" "key" as+ , acceleratorModifiers = definiteA fromAttrToStr "accelerator" "modifiers" as+ , acceleratorSignal = definiteA fromAttrToStr "accelerator" "signal" as+ }+ toAttrs v = catMaybes + [ toAttrFrStr "key" (acceleratorKey v)+ , toAttrFrStr "modifiers" (acceleratorModifiers v)+ , toAttrFrStr "signal" (acceleratorSignal v)+ ]++instance HTypeable Child where+ toHType x = Defined "child" [] []+instance XmlContent Child where+ toContents (Child as a b) =+ [CElem (Elem "child" (toAttrs as) (toContents a +++ maybe [] toContents b)) ()]+ parseContents = do+ { e@(Elem _ as _) <- element ["child"]+ ; interior e $ return (Child (fromAttrs as)) `apply` parseContents+ `apply` optional parseContents+ } `adjustErr` ("in <child>, "++)+instance XmlAttributes Child_Attrs where+ fromAttrs as =+ Child_Attrs+ { childInternal_child = possibleA fromAttrToStr "internal-child" as+ }+ toAttrs v = catMaybes + [ maybeToAttr toAttrFrStr "internal-child" (childInternal_child v)+ ]++instance HTypeable Packing where+ toHType x = Defined "packing" [] []+instance XmlContent Packing where+ toContents (Packing a) =+ [CElem (Elem "packing" [] (toContents a)) ()]+ parseContents = do+ { e@(Elem _ [] _) <- element ["packing"]+ ; interior e $ return (Packing) `apply` parseContents+ } `adjustErr` ("in <packing>, "++)++instance HTypeable Placeholder where+ toHType x = Defined "placeholder" [] []+instance XmlContent Placeholder where+ toContents Placeholder =+ [CElem (Elem "placeholder" [] []) ()]+ parseContents = do+ { (Elem _ as []) <- element ["placeholder"]+ ; return Placeholder+ } `adjustErr` ("in <placeholder>, "++)++++{-Done-}
+ LICENSE view
@@ -0,0 +1,24 @@+Copyright (c) 2009 Yakov Zaytsev+All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:+1. Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.+2. Redistributions in binary form must reproduce the above copyright+ notice, this list of conditions and the following disclaimer in the+ documentation and/or other materials provided with the distribution.+3. The names of the authors may not be used to endorse or promote products+ derived from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.lhs view
@@ -0,0 +1,4 @@+#! /usr/bin/env runhaskell++> import Distribution.Simple+> main = defaultMainWithHooks defaultUserHooks
+ glade-2.0.dtd view
@@ -0,0 +1,76 @@+<!-- proposed DTD for new glade format -->++<!ELEMENT glade-interface (requires*, widget*) >+<!ATTLIST glade-interface+ xmlns CDATA #FIXED 'http://glade.gnome.org/glade-2.0.dtd' >++<!ELEMENT requires EMPTY >+<!ATTLIST requires+ lib CDATA #REQUIRED >++<!ELEMENT widget (property*, accessibility?, signal*, accelerator*, child*) >+<!ATTLIST widget+ class CDATA #REQUIRED+ id ID #REQUIRED >++<!ELEMENT property (#PCDATA) >+<!-- type is an optional tag, and should be the string name of the+ GType for the property -->+<!-- translatable specifies whether the property should be translated+ before use. -->+<!-- context indicates that the value has a |-separated + context which must be stripped before use, look up g_strip_context() + in the GLib API documentation for details.-->+<!ATTLIST property+ name CDATA #REQUIRED+ type CDATA #IMPLIED+ translatable (yes|no) 'no'+ context (yes|no) 'no'+ comments CDATA #IMPLIED+ agent CDATA #IMPLIED >++<!ELEMENT atkproperty (#PCDATA | accessibility)* >+<!ATTLIST atkproperty+ name CDATA #REQUIRED+ type CDATA #IMPLIED+ translatable (yes|no) 'no'+ context (yes|no) 'no'+ comments CDATA #IMPLIED >++<!ELEMENT atkrelation EMPTY >+<!ATTLIST atkrelation+ target CDATA #REQUIRED+ type CDATA #REQUIRED >++<!-- description is assumed to be a translatable string -->+<!ELEMENT atkaction EMPTY >+<!ATTLIST atkaction+ action_name CDATA #REQUIRED+ description CDATA #IMPLIED >++<!ELEMENT accessibility (atkrelation | atkaction | atkproperty)* >++<!ELEMENT signal (property*) >+<!ATTLIST signal+ name CDATA #REQUIRED+ handler CDATA #REQUIRED+ after (yes|no) 'no'+ object IDREF #IMPLIED+ last_modification_time CDATA #IMPLIED >++<!ELEMENT accelerator EMPTY >+<!ATTLIST accelerator+ key CDATA #REQUIRED+ modifiers CDATA #REQUIRED+ signal CDATA #REQUIRED >++<!ELEMENT child ((widget|placeholder), packing?) >+<!-- internal children should not have any properties set on them.+ (Internal children are things like the scrollbars in a+ GtkScrolledWindow, or the vbox in a GtkDialog). -->+<!ATTLIST child+ internal-child CDATA #IMPLIED >++<!ELEMENT packing (property+) >++<!ELEMENT placeholder EMPTY >
+ gladexml-accessor.cabal view
@@ -0,0 +1,14 @@+name: gladexml-accessor+version: 0.0+license: BSD3+license-file: LICENSE +author: Yakov Zaytsev+maintainer: yakov@yakov.cc+category: GUI+synopsis: Automagically declares getters for widget handles in specified interface file.+build-type: Simple+ghc-options: -Wall+exposed-modules: Graphics.UI.Gtk.Glade.Accessor+other-modules: Graphics.UI.Gtk.Glade.Glade20DTD+build-depends: base >= 4 && < 5, template-haskell, HaXml>=1.19.7, glade>=0.10.1+extra-source-files:LICENSE glade-2.0.dtd