"""``gtkclassbuilder`` converts Gtk Builder files to python classes.

This is in contrast to what Gtk Builder does, i.e. creating an instance
of the class. Gtk Builder's behavior is problematic since it makes it
difficult to create multiple instances of a widget from the same
``.glade`` file.

===========
Limitations
===========

``gtkclassbuilder`` only supports a small (but growing) subset of the
Gtk Builder file format. To date, ``gtkclassbuilder`` requires that
glade files conform to the following restrictions:

    * The root ``<interface>`` element must have at least one ``<object>``
      element child. The first ``<object>`` child will be used to
      generate the class; everything else in the file is ignored.
    * Each ``<object>`` element must have a ``class`` attribute and an
      ``id`` attribute. The latter will be the name of the generated class,
      which will inherit from the former. The ``class`` attribute must begin
      with "Gtk", and therefore must be from the Gtk package. This has the
      consequence that accessibility is not supported, though adding support
      is considered a priority.
    * Each ``<property>`` element must have a ``name`` attribute, and a
      single child, which must be text (not an element).
    * Each ``<child>`` element's first child must be an ``<object>`` element.
    * If a ``<child>`` has more than one child, the second child must be
      ``<packing>`` element.
    * ``<packing>`` elements may only contain ``<property>`` elements
    * Each ``signal`` element must have both a ``name`` and a ``handler``
      attribute. Signals are only interpreted when they are the children
      ``<object>`` elements.

Note that some of these may be true of all ``.glade`` files; indeed many of
them probably are. The author of this package has not investigated exactly
what a valid ``.glade`` file may contain.

Unless otherwise specified, any additional elements and/or attributes will
be ignored, and a warning will be logged.
"""
from gtkclassbuilder._build import from_string, from_filename
from gtkclassbuilder._check import BadInput

@@ -939,201 +939,113 @@
 ute 
-must begin%0A      with %22Gtk%22, and therefore must be from the Gtk package. This has the%0A      consequence that accessibility is not supported, though adding support%0A      is considered a priority
+is expected%0A      to be CapitalizedCamelCase, and its first word will be treated as the%0A      module name
 .%0A  
@@ -1205,33 +1205,35 @@
 ment
-'s first child must be an
+ must contain a exactly one
  %60%60%3C
@@ -1253,181 +1253,55 @@
 ment
-.
+,
 %0A    
-* If a %60%60%3Cchild%3E%60%60 has more than one child, the second child must be%0A      %60%60%3Cpacking%3E%60%60 element.%0A    * %60%60%3Cpacking%3E%60%60 elements may only contain %60%60%3Cproperty%3E%60%60 elements
+  and one or zero %60%60%3Cpacking%3E%60%60 elements.
 %0A   

Update constraints on glade files.