This (very brief!) section provides a few notes on the internal structure and implementation of Emacs widgets. Avoid relying on this information. (We intend to improve it, but this will take some time.) To the extent that it actually describes APIs, the information will be moved to appropriate sections of the manual in due course.
Widgets and types are currently both implemented as lists.
A symbol may be defined as a type name using
See Defining New Widgets. A type is a list whose car is a
previously defined type name, nil, or (recursively) a type. The car is
the class or parent type of the type, and properties which are not
specified in the new type will be inherited from ancestors. Probably
the only type without a class should be the
default type. The
cdr of a type is a plist whose keys are widget property keywords.
A type or type name may also be referred to as an unconverted widget.
A converted widget or widget instance is a list whose car is a type name or a type, and whose cdr is a property list. Furthermore, all children of the converted widget must be converted. Finally, in the process of appropriate parts of the list structure are copied to ensure that changes in values of one instance do not affect another’s.