<?xml version="1.0"?>
<!--
	Basically, you have to implement 10+n types:
	 - Integer (int)
	 - Unsigned integer (unsigned int)
	 - Short integer (short)
	 - Unsigned short integer (unsigned short)
	 - String (char*)
	 - Pointer (void*)
	 - Struct and pointer to it
	 - Widget (MwWidget, which is void*)
	 - Class (MwClass, which is void*)
	 - Handler (void(*)(MwWidget handle, void* user_data, void* client_data))
	 - Error handler (void(*)(int code, const char* message, void* user_data))

	For widget functions, you must pass widget and arguments to MwVaWidgetExecute.
-->
<milsko>
	<structs>
		<struct name="MwPoint">
			<integer name="x" />
			<integer name="y" />
		</struct>
		<struct name="MwRect">
			<integer name="x" />
			<integer name="y" />
			<integer name="width" />
			<integer name="height" />
		</struct>
		<struct name="MwSizeHints">
			<integer name="min_width" />
			<integer name="min_height" />
			<integer name="max_width" />
			<integer name="max_height" />
		</struct>
		<struct name="MwRGB">
			<short name="red" unsigned="yes" />
			<short name="green" unsigned="yes" />
			<short name="blue" unsigned="yes" />
		</struct>
	</structs>
	<!--
		All widgets have:
		 - MwNbackground
		 - MwNforeground
		 - MwNx
		 - MwNy
		 - MwNwidth
		 - MwNheight
		 - MwNborderWidth
		 - MwNbackgroundPixmap
		 - MwNratio
		 - MwNfixedSize
		 - MwNbitmapFont
		 - MwNforceInverted

		Integer properties must be prefixed with I.
		String properties must be prefixed with S.
		Handler properties must be prefixed with C.
		Other properties must be prefixed with V.
	-->
	<properties>
		<integer name="x" />
		<integer name="y" />
		<integer name="width" />
		<integer name="height" />
		<integer name="orientation" />
		<integer name="minValue" />
		<integer name="maxValue" />
		<integer name="value" />
		<integer name="changedBy" />
		<integer name="areaShown" />
		<integer name="checked" />
		<integer name="alignment" />
		<integer name="bold" />
		<integer name="main" />
		<integer name="leftPadding" />
		<integer name="hasHeading" />
		<integer name="hasBorder" />
		<integer name="inverted" />
		<integer name="modernLook" />
		<integer name="waitMS" />
		<integer name="hideInput" />
		<integer name="singleClickSelectable" />
		<integer name="flat" />
		<integer name="showArrows" />
		<integer name="padding" />
		<integer name="borderWidth" />
		<integer name="ratio" />
		<integer name="fixedSize" />
		<integer name="margin" />
		<integer name="bitmapFont" />
		<integer name="sevenSegment" />
		<integer name="length" />
		<integer name="forceInverted" />

		<string name="title" />
		<string name="text" />
		<string name="background" />
		<string name="foreground" />

		<pixmap name="pixmap" />
		<pixmap name="iconPixmap" />
		<struct defname="MwSizeHints" pointer="yes" name="sizeHints" />
		<pointer name="font" />
		<pointer name="boldFont" />

		<handler name="activate" />
		<handler name="resize" />
		<handler name="tick" />
		<handler name="menu" />
		<handler name="mouseDown" />
		<handler name="mouseUp" />
		<handler name="mouseMove" />
		<handler name="changed" />
		<handler name="key" />
		<handler name="keyRelease" />
		<handler name="close" />
		<handler name="focusIn" />
		<handler name="focusOut" />
		<handler name="fileChosen" />
		<handler name="directoryChosen" />
		<handler name="colorChosen" />
		<handler name="draw" />
		<handler name="clipboard" />
	</properties>
	<enumerations>
		<enumeration name="MwDIRECTION">
			<integer name="MwNORTH">0</integer>
			<integer name="MwSOUTH" />
			<integer name="MwEAST" />
			<integer name="MwWEST" />
		</enumeration>
		<enumeration name="MwORIENTATION">
			<integer name="MwVERTICAL">0</integer>
			<integer name="MwHORIZONTAL" />
		</enumeration>
		<enumeration name="MwALIGNMENT">
			<integer name="MwALIGNMENT_CENTER">0</integer>
			<integer name="MwALIGNMENT_BEGINNING" />
			<integer name="MwALIGNMENT_END" />
		</enumeration>
		<enumeration name="MwMB_ICON">
			<integer name="MwMB_ICONWARNING">0x1</integer>
			<integer name="MwMB_ICONINFO" />
			<integer name="MwMB_ICONNOTE" />
			<integer name="MwMB_ICONQUESTION" />
			<integer name="MwMB_ICONNEWS" />
			<integer name="MwMB_ICONERROR" />
			<integer name="MwMB_ICONCLOCK" />
		</enumeration>
	</enumerations>
	<constants>
		<integer name="MwDEFAULT">0x0fffffff</integer>
		<integer name="MwMB_ICONMASK">0xf</integer>
		<integer name="MwMB_BUTTONMASK">0xf0</integer>
		<integer name="MwMB_BUTTONOK">0x10</integer>
		<integer name="MwMB_BUTTONCANCEL">0x20</integer>
		<integer name="MwMB_BUTTONYES">0x40</integer>
		<integer name="MwMB_BUTTONNO">0x80</integer>
	</constants>
	<headers>
		<header name="ColorChooser">
			<functions>
				<function name="MwColorChooser">
					<return>
						<widget />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="title" />
					</arguments>
				</function>
			</functions>
		</header>
		<header name="Core">
			<functions>
				<function name="MwCreateWidget">
					<return>
						<widget />
					</return>
					<arguments>
						<class name="widget_class" />
						<string name="name" />
						<widget name="parent" />
						<integer name="x" />
						<integer name="y" />
						<integer name="width" unsigned="yes" />
						<integer name="height" unsigned="yes" />
					</arguments>
				</function>
				<function name="MwVaCreateWidget">
					<return>
						<widget />
					</return>
					<arguments>
						<class name="widget_class" />
						<string name="name" />
						<widget name="parent" />
						<integer name="x" />
						<integer name="y" />
						<integer name="width" unsigned="yes" />
						<integer name="height" unsigned="yes" />
						<variable />
					</arguments>
				</function>
				<function name="MwVaWidgetExecute">
					<arguments>
						<widget name="handle" />
						<string name="func_name" />
						<pointer name="output" />
						<variable />
					</arguments>
				</function>
				<function name="MwDestroyWidget">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwLoop">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwStep">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwPending">
					<return>
						<integer />
					</return>
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwSetInteger">
					<arguments>
						<widget name="handle" />
						<string name="key" />
						<integer name="n" />
					</arguments>
				</function>
				<function name="MwSetText">
					<arguments>
						<widget name="handle" />
						<string name="key" />
						<string name="value" />
					</arguments>
				</function>
				<function name="MwSetVoid">
					<arguments>
						<widget name="handle" />
						<string name="key" />
						<pointer name="value" />
					</arguments>
				</function>
				<function name="MwGetInteger">
					<return>
						<integer />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="key" />
					</arguments>
				</function>
				<function name="MwGetText">
					<return>
						<string />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="key" />
					</arguments>
				</function>
				<function name="MwGetVoid">
					<return>
						<pointer />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="key" />
					</arguments>
				</function>
				<function name="MwSetDefault">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwVaApply">
					<arguments>
						<widget name="handle" />
						<variable />
					</arguments>
				</function>
				<function name="MwAddUserHandler">
					<arguments>
						<widget name="handle" />
						<string name="key" />
						<handler name="handler" />
						<pointer name="user_data" />
					</arguments>
				</function>
				<function name="MwDispatchUserHandler">
					<arguments>
						<widget name="handle" />
						<string name="key" />
						<pointer name="handler_data" />
					</arguments>
				</function>
				<function name="MwSetErrorHandler">
					<arguments>
						<error_handler name="handler" />
						<pointer name="user_data" />
					</arguments>
				</function>
				<function name="MwDispatchError">
					<arguments>
						<integer name="code" />
						<string name="message" />
					</arguments>
				</function>
				<function name="MwForceRender">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwForceRender2">
					<arguments>
						<widget name="handle" />
						<pointer name="ptr" />
					</arguments>
				</function>
				<function name="MwAddTickList">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwFocus">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwGrabPointer">
					<arguments>
						<widget name="handle" />
						<integer name="toggle" />
					</arguments>
				</function>
				<function name="MwHideCursor">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwSetDarkTheme">
					<arguments>
						<widget name="handle" />
						<integer name="toggle" />
					</arguments>
				</function>
				<function name="MwGetParent">
					<return>
						<widget />
					</return>
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwLibraryInit" />
				<function name="MwShow">
					<arguments>
						<widget name="handle" />
						<integer name="toggle" />
					</arguments>
				</function>
				<function name="MwGetName">
					<return>
						<string />
					</return>
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwGetChildren">
					<return>
						<widget pointer="yes" />
					</return>
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
				<function name="MwGetCursorCoord">
					<arguments>
						<widget name="handle" />
						<struct defname="MwPoint" pointer="yes" name="point" />
					</arguments>
				</function>
				<function name="MwGetScreenSize">
					<arguments>
						<widget name="handle" />
						<struct defname="MwRect" pointer="yes" name="rect" />
					</arguments>
				</function>
			</functions>
		</header>
		<header name="Error">
			<functions>
				<function name="MwGetLastError">
					<return>
						<string />
					</return>
				</function>
			</functions>
		</header>
		<header name="FileChooser">
			<functions>
				<function name="MwFileChooser">
					<return>
						<widget />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="title" />
					</arguments>
				</function>
			</functions>
		</header>
		<header name="MessageBox">
			<functions>
				<function name="MwMessageBox">
					<return>
						<widget />
					</return>
					<arguments>
						<widget name="handle" />
						<string name="text" />
						<string name="title" />
						<integer name="flag" unsigned="yes" />
					</arguments>
				</function>
				<function name="MwMessageBoxGetChild">
					<return>
						<widget />
					</return>
					<arguments>
						<widget name="handle" />
						<integer name="child" />
					</arguments>
				</function>
				<function name="MwMessageBoxDestroy">
					<arguments>
						<widget name="handle" />
					</arguments>
				</function>
			</functions>
		</header>
		<header name="Widget/ListBox.h">
			<functions>
				<function name="MwListBoxCreatePacket">
					<return>
						<pointer />
					</return>
				</function>
				<function name="MwListBoxDestroyPacket">
					<arguments>
						<pointer name="packet" />
					</arguments>
				</function>
				<function name="MwListBoxPacketInsert">
					<return>
						<integer />
					</return>
					<arguments>
						<pointer name="packet" />
						<integer name="index" />
					</arguments>
				</function>
				<function name="MwListBoxPacketSet">
					<arguments>
						<pointer name="packet" />
						<integer name="index" />
						<integer name="col" />
						<string name="text" />
					</arguments>
				</function>
				<function name="MwListBoxPacketSetIcon">
					<arguments>
						<pointer name="packet" />
						<integer name="index" />
						<pixmap name="icon" />
					</arguments>
				</function>
			</functions>
		</header>
	</headers>
	<widgets>
		<widget name="Box">
			<properties>
				<property name="orientation" />
				<property name="margin" />
				<property name="padding" />
				<property name="hasBorder" />
				<property name="inverted" />
			</properties>
		</widget>
		<widget name="Button">
			<properties>
				<property name="pixmap" />
				<property name="text" />
				<property name="flat" />
				<property name="padding" />
				<property name="fillArea" />
			</properties>
		</widget>
		<widget name="CheckBox">
			<properties>
				<property name="checked" />
			</properties>
		</widget>
		<widget name="Entry">
			<properties>
				<property name="text" />
				<property name="hideInput" />
			</properties>
		</widget>
		<widget name="Frame">
			<properties>
				<property name="hasBorder" />
				<property name="inverted" />
			</properties>
		</widget>
		<widget name="Image">
			<properties>
				<property name="pixmap" />
				<property name="hasBorder" />
				<property name="inverted" />
				<property name="fillArea" />
			</properties>
		</widget>
		<widget name="Label">
			<properties>
				<property name="text" />
				<property name="alignment" />
				<property name="bold" />
				<property name="sevenSegment" />
				<property name="length" />
				<property name="leftPadding" />
			</properties>
			<functions>
				<function name="SetSevenSegment">
					<arguments>
						<integer name="index" />
						<integer name="data" />
					</arguments>
				</function>
			</functions>
		</widget>
		<widget name="ListBox">
			<properties>
				<property name="leftPadding" />
				<property name="hasHeading" />
				<property name="singleClickSelectable" />
			</properties>
			<functions>
				<function name="Insert">
					<arguments>
						<integer name="index" />
						<pointer name="packet" />
					</arguments>
				</function>
				<function name="Delete">
					<arguments>
						<integer name="index" />
					</arguments>
				</function>
				<function name="Get">
					<return>
						<string />
					</return>
					<arguments>
						<integer name="index" />
					</arguments>
				</function>
				<function name="SetWidth">
					<arguments>
						<integer name="index" />
						<integer name="width" />
					</arguments>
				</function>
				<function name="Reset" />
			</functions>
		</widget>
		<widget name="Menu">
			<functions>
				<function name="Add">
					<return>
						<pointer />
					</return>
					<arguments>
						<pointer name="menu" />
						<string name="name" />
					</arguments>
				</function>
			</functions>
		</widget>
		<widget name="NumberEntry">
			<properties>
				<property name="text" />
			</properties>
		</widget>
		<widget name="OpenGL">
			<functions>
				<function name="MakeCurrent" />
				<function name="GetProcAddress">
					<return>
						<pointer />
					</return>
					<arguments>
						<string name="name" />
					</arguments>
				</function>
				<function name="SwapBuffer" />
			</functions>
		</widget>
		<widget name="ScrollBar">
			<properties>
				<property name="showArrows" />
				<property name="areaShown" />
				<property name="value" />
				<property name="minValue" />
				<property name="maxValue" />
				<property name="orientation" />
				<property name="showArrows" />
			</properties>
			<functions>
				<function name="GetVisibleLength">
					<return>
						<integer />
					</return>
				</function>
			</functions>
		</widget>
		<widget name="SubMenu">
			<properties>
				<property name="leftPadding" />
			</properties>
			<functions>
				<function name="Appear">
					<arguments>
						<pointer name="menu" />
						<struct defname="MwPoint" pointer="yes" name="point" />
					</arguments>
				</function>
			</functions>
		</widget>
		<widget name="Viewport">
			<functions>
				<function name="GetViewport">
					<return>
						<widget />
					</return>
				</function>
				<function name="SetSize">
					<arguments>
						<integer name="w" />
						<integer name="h" />
					</arguments>
				</function>
			</functions>
		</widget>
		<widget name="Window">
			<properties>
				<property name="title" />
				<property name="main" />
				<property name="iconPixmap" />
				<property name="sizeHints" />
				<property name="hasBorder" />
				<property name="inverted" />
			</properties>
			<functions>
				<function name="MakeBorderless" />
			</functions>
		</widget>
		<widget name="ProgressBar">
			<properties>
				<property name="minValue" />
				<property name="maxValue" />
				<property name="value" />
			</properties>
		</widget>
		<widget name="RadioBox">
			<properties>
				<property name="checked" />
			</properties>
		</widget>
		<widget name="ComboBox">
			<properties>
				<property name="areaShown" />
				<property name="value" />
			</properties>
			<functions>
				<function name="Add">
					<integer name="index" />
					<string name="text" />
				</function>
			</functions>
		</widget>
		<widget name="TreeView">
			<properties>
				<property name="leftPadding" />
				<property name="singleClickSelectable" />
			</properties>
			<functions>
				<function name="Add">
					<pointer name="parent" />
					<pixmap name="pixmap" />
					<string name="item" />
				</function>
				<function name="Delete">
					<pointer name="item" />
				</function>
				<function name="Reset" />
			</functions>
		</widget>
	</widgets>
</milsko>
