// File: mathml-dom.idl #ifndef _MATHMLDOM_IDL_ #define _MATHMLDOM_IDL_ #include "dom.idl" #pragma prefix "w3c.org" module mathml_dom { interface MathMLDocument; interface MathMLMathElement; interface MathMLTableRowElement; interface MathMLLabeledRowElement; interface MathMLTableCellElement; interface MathMLBvarElement; interface MathMLConditionElement; interface MathMLDeclareElement; interface MathMLMatrixrowElement; interface MathMLCaseElement; interface MathMLDOMImplementation : DOMImplementation { MathMLDocument createMathMLDocument(); MathMLMathElement createMathMLMathElement(in Document hostDocument) raises(DOMException); }; interface MathMLDocument : Document { readonly attribute DOMString referrer; readonly attribute DOMString domain; readonly attribute DOMString URI; }; interface MathMLNodeList : NodeList { }; interface MathMLElement : Element { attribute DOMString className; attribute DOMString mathElementStyle; attribute DOMString id; attribute DOMString xref; attribute DOMString href; readonly attribute MathMLMathElement ownerMathElement; }; interface MathMLContainer { readonly attribute unsigned long nArguments; readonly attribute MathMLNodeList arguments; readonly attribute MathMLNodeList declarations; MathMLElement getArgument(in unsigned long index) raises(DOMException); MathMLElement setArgument(in MathMLElement newArgument, in unsigned long index) raises(DOMException); MathMLElement insertArgument(in MathMLElement newArgument, in unsigned long index) raises(DOMException); void deleteArgument(in unsigned long index) raises(DOMException); MathMLElement removeArgument(in unsigned long index) raises(DOMException); MathMLDeclareElement getDeclaration(in unsigned long index) raises(DOMException); MathMLDeclareElement setDeclaration(in MathMLDeclareElement newDeclaration, in unsigned long index) raises(DOMException); MathMLDeclareElement insertDeclaration(in MathMLDeclareElement newDeclaration, in unsigned long index) raises(DOMException); MathMLDeclareElement removeDeclaration(in unsigned long index) raises(DOMException); void deleteDeclaration(in unsigned long index) raises(DOMException); }; interface MathMLMathElement : MathMLElement, MathMLContainer { attribute DOMString macros; attribute DOMString display; MathMLElement createMathMLElement(in DOMString tagName) raises(DOMException); }; interface MathMLSemanticsElement : MathMLElement { attribute MathMLElement body; readonly attribute unsigned long nAnnotations; MathMLElement getAnnotation(in unsigned long index); MathMLElement insertAnnotation(in MathMLElement newAnnotation, in unsigned long index) raises(DOMException); MathMLElement setAnnotation(in MathMLElement newAnnotation, in unsigned long index) raises(DOMException); void deleteAnnotation(in unsigned long index); MathMLElement removeAnnotation(in unsigned long index); }; interface MathMLAnnotationElement : MathMLElement { attribute DOMString body; attribute DOMString encoding; }; interface MathMLXMLAnnotationElement : MathMLElement { attribute DOMString encoding; }; interface MathMLPresentationElement : MathMLElement { }; interface MathMLGlyphElement : MathMLPresentationElement { attribute DOMString alt; attribute DOMString fontfamily; attribute unsigned long index; }; interface MathMLSpaceElement : MathMLPresentationElement { attribute DOMString width; attribute DOMString height; attribute DOMString depth; }; interface MathMLPresentationToken : MathMLPresentationElement { attribute DOMString mathvariant; attribute DOMString mathsize; attribute DOMString mathfamily; attribute DOMString mathcolor; attribute DOMString mathbackground; readonly attribute MathMLNodeList contents; }; interface MathMLOperatorElement : MathMLPresentationToken { attribute DOMString form; attribute DOMString fence; attribute DOMString separator; attribute DOMString lspace; attribute DOMString rspace; attribute DOMString stretchy; attribute DOMString symmetric; attribute DOMString maxsize; attribute DOMString minsize; attribute DOMString largeop; attribute DOMString moveablelimits; attribute DOMString accent; }; interface MathMLStringLitElement : MathMLPresentationToken { attribute DOMString lquote; attribute DOMString rquote; }; interface MathMLPresentationContainer : MathMLPresentationElement, MathMLContainer { }; interface MathMLStyleElement : MathMLPresentationContainer { attribute DOMString scriptlevel; attribute DOMString displaystyle; attribute DOMString scriptsizemultiplier; attribute DOMString scriptminsize; attribute DOMString color; attribute DOMString background; }; interface MathMLPaddedElement : MathMLPresentationContainer { attribute DOMString width; attribute DOMString lspace; attribute DOMString height; attribute DOMString depth; }; interface MathMLFencedElement : MathMLPresentationContainer { attribute DOMString open; attribute DOMString close; attribute DOMString separators; }; interface MathMLEncloseElement : MathMLPresentationContainer { attribute DOMString notation; }; interface MathMLActionElement : MathMLPresentationContainer { attribute DOMString actiontype; attribute DOMString selection; }; interface MathMLFractionElement : MathMLPresentationElement { attribute DOMString linethickness; attribute MathMLElement numerator; attribute MathMLElement denominator; }; interface MathMLRadicalElement : MathMLPresentationElement { attribute MathMLElement radicand; attribute MathMLElement index; }; interface MathMLScriptElement : MathMLPresentationElement { attribute DOMString subscriptshift; attribute DOMString superscriptshift; attribute MathMLElement base; attribute MathMLElement subscript; // raises(DOMException) on setting attribute MathMLElement superscript; // raises(DOMException) on setting }; interface MathMLUnderOverElement : MathMLPresentationElement { attribute DOMString accentunder; attribute DOMString accent; attribute MathMLElement base; attribute MathMLElement underscript; // raises(DOMException) on setting attribute MathMLElement overscript; // raises(DOMException) on setting }; interface MathMLMultiScriptsElement : MathMLPresentationElement { attribute DOMString subscriptshift; attribute DOMString superscriptshift; attribute MathMLElement base; readonly attribute MathMLNodeList prescripts; readonly attribute MathMLNodeList scripts; readonly attribute unsigned long numprescriptcolumns; readonly attribute unsigned long numscriptcolumns; MathMLElement getPreSubScript(in unsigned long colIndex); MathMLElement getSubScript(in unsigned long colIndex); MathMLElement getPreSuperScript(in unsigned long colIndex); MathMLElement getSuperScript(in unsigned long colIndex); MathMLElement insertPreSubScriptBefore(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement setPreSubScriptAt(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement insertSubScriptBefore(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement setSubScriptAt(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement insertPreSuperScriptBefore(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement setPreSuperScriptAt(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement insertSuperScriptBefore(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); MathMLElement setSuperScriptAt(in unsigned long colIndex, in MathMLElement newScript) raises(DOMException); }; interface MathMLTableElement : MathMLPresentationElement { attribute DOMString align; attribute DOMString rowalign; attribute DOMString columnalign; attribute DOMString groupalign; attribute DOMString alignmentscope; attribute DOMString columnwidth; attribute DOMString width; attribute DOMString rowspacing; attribute DOMString columnspacing; attribute DOMString rowlines; attribute DOMString columnlines; attribute DOMString frame; attribute DOMString framespacing; attribute DOMString equalrows; attribute DOMString equalcolumns; attribute DOMString displaystyle; attribute DOMString side; attribute DOMString minlabelspacing; readonly attribute MathMLNodeList rows; MathMLTableRowElement insertEmptyRow(in long index) raises(DOMException); MathMLLabeledRowElement insertEmptyLabeledRow(in long index) raises(DOMException); MathMLTableRowElement getRow(in unsigned long index); MathMLTableRowElement insertRow(in long index, in MathMLTableRowElement newRow) raises(DOMException); MathMLTableRowElement setRow(in long index, in MathMLTableRowElement newRow) raises(DOMException); void deleteRow(in unsigned long index) raises(DOMException); MathMLTableRowElement removeRow(in long index) raises(DOMException); }; interface MathMLTableRowElement : MathMLPresentationElement { attribute DOMString rowalign; attribute DOMString columnalign; attribute DOMString groupalign; readonly attribute MathMLNodeList cells; MathMLTableCellElement insertEmptyCell(in unsigned long index) raises(DOMException); MathMLTableCellElement insertCell(in MathMLTableCellElement newCell, in unsigned long index) raises(DOMException); MathMLTableCellElement setCell(in MathMLTableCellElement newCell, in unsigned long index); void deleteCell(in unsigned long index); }; interface MathMLLabeledRowElement : MathMLTableRowElement { attribute MathMLElement label; // raises(DOMException) on setting }; interface MathMLTableCellElement : MathMLPresentationContainer { attribute DOMString rowspan; attribute DOMString columnspan; attribute DOMString rowalign; attribute DOMString columnalign; attribute DOMString groupalign; readonly attribute boolean hasaligngroups; readonly attribute DOMString cellindex; }; interface MathMLAlignGroupElement : MathMLPresentationElement { attribute DOMString groupalign; }; interface MathMLAlignMarkElement : MathMLPresentationElement { attribute DOMString edge; }; interface MathMLContentElement : MathMLElement { }; interface MathMLContentToken : MathMLContentElement { readonly attribute MathMLNodeList arguments; attribute DOMString definitionURL; attribute DOMString encoding; Node getArgument(in unsigned long index); Node insertArgument(in unsigned long index, in Node newArgument); Node setArgument(in unsigned long index, in Node newArgument); void deleteArgument(in unsigned long index); Node removeArgument(in unsigned long index); }; interface MathMLCnElement : MathMLContentToken { attribute DOMString type; attribute DOMString base; readonly attribute unsigned long nargs; }; interface MathMLCiElement : MathMLContentToken { attribute DOMString type; }; interface MathMLCsymbolElement : MathMLContentToken { }; interface MathMLContentContainer : MathMLContentElement, MathMLContainer { readonly attribute unsigned long nBoundVariables; attribute MathMLConditionElement condition; // raises(DOMException) on setting attribute MathMLElement opDegree; // raises(DOMException) on setting attribute MathMLElement domainOfApplication; // raises(DOMException) on setting attribute MathMLElement momentAbout; // raises(DOMException) on setting MathMLBvarElement getBoundVariable(in unsigned long index); MathMLBvarElement insertBoundVariable(in MathMLBvarElement newBVar, in unsigned long index) raises(DOMException); MathMLBvarElement setBoundVariable(in MathMLBvarElement newBVar, in unsigned long index) raises(DOMException); void deleteBoundVariable(in unsigned long index); MathMLBvarElement removeBoundVariable(in unsigned long index); }; interface MathMLApplyElement : MathMLContentContainer { attribute MathMLElement operator; attribute MathMLElement domainOfApplication; // raises(DOMException) on setting attribute MathMLElement lowLimit; // raises(DOMException) on setting attribute MathMLElement upLimit; // raises(DOMException) on setting }; interface MathMLFnElement : MathMLContentContainer { attribute DOMString definitionURL; attribute DOMString encoding; }; interface MathMLLambdaElement : MathMLContentContainer { attribute MathMLElement expression; }; interface MathMLSetElement : MathMLContentContainer { readonly attribute boolean isExplicit; attribute DOMString type; }; interface MathMLListElement : MathMLContentContainer { readonly attribute boolean isExplicit; attribute DOMString ordering; }; interface MathMLBvarElement : MathMLContentContainer { }; interface MathMLPredefinedSymbol : MathMLContentElement { attribute DOMString definitionURL; attribute DOMString encoding; attribute DOMString arity; readonly attribute DOMString symbolName; }; interface MathMLIntervalElement : MathMLContentElement { attribute DOMString closure; attribute MathMLCnElement start; attribute MathMLCnElement end; }; interface MathMLConditionElement : MathMLContentElement { attribute MathMLApplyElement condition; }; interface MathMLDeclareElement : MathMLContentElement { attribute DOMString type; attribute unsigned long nargs; attribute DOMString occurrence; attribute DOMString definitionURL; attribute DOMString encoding; attribute MathMLCiElement identifier; attribute MathMLElement constructor; }; interface MathMLVectorElement : MathMLContentElement { readonly attribute unsigned long ncomponents; MathMLContentElement getComponent(in unsigned long index); MathMLContentElement insertComponent(in MathMLContentElement newComponent, in unsigned long index) raises(DOMException); MathMLContentElement setComponent(in MathMLContentElement newComponent, in unsigned long index) raises(DOMException); deleteComponent(in unsigned long index) raises(DOMException); MathMLContentElement removeComponent(in unsigned long index); }; interface MathMLMatrixElement : MathMLContentElement { readonly attribute unsigned long nrows; readonly attribute unsigned long ncols; readonly attribute MathMLNodeList rows; MathMLMatrixrowElement getRow(in unsigned long index) raises(DOMException); MathMLMatrixrowElement insertRow(in MathMLMatrixrowElement newRow, in unsigned long index) raises(DOMException); MathMLMatrixrowElement setRow(in MathMLMatrixrowElement newRow, in unsigned long index) raises(DOMException); deleteRow(in unsigned long index) raises(DOMException); MathMLMatrixrowElement removeRow(in unsigned long index) raises(DOMException); }; interface MathMLMatrixrowElement : MathMLContentElement { readonly attribute unsigned long nEntries; MathMLContentElement getEntry(in unsigned long index) raises(DOMException); MathMLContentElement insertEntry(in MathMLContentElement newEntry, in unsigned long index) raises(DOMException); MathMLContentElement setEntry(in MathMLContentElement newEntry, in unsigned long index) raises(DOMException); deleteEntry(in unsigned long index) raises(DOMException); MathMLContentElement removeEntry(in unsigned long index) raises(DOMException); }; interface MathMLPiecewiseElement : MathMLContentElement { readonly attribute MathMLNodeList pieces; attribute MathMLContentElement otherwise; MathMLCaseElement getCase(in unsigned long index); MathMLCaseElement setCase(in unsigned long index, in MathMLCaseElement case) raises(DOMException); void deleteCase(in unsigned long index) raises(DOMException); MathMLCaseElement removeCase(in unsigned long index) raises(DOMException); MathMLCaseElement insertCase(in unsigned long index, in MathMLCaseElement newCase) raises(DOMException); MathMLContentElement getCaseValue(in unsigned long index) raises(DOMException); MathMLContentElement setCaseValue(in unsigned long index, in MathMLContentElement value) raises(DOMException); MathMLContentElement getCaseCondition(in unsigned long index) raises(DOMException); MathMLContentElement setCaseCondition(in unsigned long index, in MathMLContentElement condition) raises(DOMException); }; interface MathMLCaseElement : MathMLContentElement { attribute MathMLContentElement caseCondition; attribute MathMLContentElement caseValue; }; }; #endif