You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/kjsembed/docs/types.html

125 lines
2.2 KiB

<html>
<head>
<link href="kjsembed.css" rel="stylesheet" type="text/css">
<title>KJSEmbed Types</title>
</head>
<body>
<h1>KJSEmbed Types</h1>
<hr>
<h2>Introduction</h2>
KJSEmbed adds a number of custom types to those defined by ECMA in
addition to the objects themselves. These types are used to pass
complex datatypes between scripts and the C++ code that is hosting the
script. This document describes the representations used to pass
information in each direction.
<p>
It should be noted that currently only a single representation is
available to scripts accessing native types. Scripts should not rely
on this behaviour as the restriction may be removed in a future
release of KJSEmbed so this, though the current script API will
continue to be supported.
<h2>Fundamental Types</h2>
<h3>Numbers</h3>
<ul>
<li>int -> Number
<li>uint -> Number
<li>float -> Number
<li>double -> Number
<li>Number -> int
<li>Number -> uint
<li>Number -> float
<li>Number -> double
</ul>
<h3>Strings</h3>
<ul>
<li>TQString -> String
<li>TQCString -> String
<li>const char * -> String
<li>String -> TQString
<li>String -> TQCString
<li>String -> const char *
</ul>
<h2>Qt Object Types</h2>
<h3>TQColor</h3>
Represents a color, possibly including an alpha channel.
<ul>
<li>TQColor -> '#rrggbb'
<li>'#rrggbb' -> TQColor
<li>'#rrggbbaa' -> TQColor
</ul>
<h3>TQPoint</h3>
Represents a point.
<ul>
<li>TQPoint -> [x,y]
<li>[x,y] -> TQPoint
<li>obj.x obj.y -> TQPoint
</ul>
<h3>TQSize</h3>
Represents a size.
<ul>
<li>TQSize -> [w,h]
<li>[w,h] -> TQSize
<li>obj.w obj.h -> TQSize
</ul>
<h3>TQRect</h3>
Represents a rectangle.
<ul>
<li>TQRect -> [x,y,w,h]
<li>[x,y,w,h] -> TQRect
<li>obj.x obj.y obj.w obj.h -> TQRect
</ul>
<h3>TQDate</h3>
Represents a date.
<ul>
<li>TQDate -> ''
</ul>
<h3>TQTime</h3>
Represents a time.
<ul>
<li>TQTime -> ''
</ul>
<h3>TQDateTime</h3>
Represents a date/time pair.
<ul>
<li>TQDateTime -> ''
</ul>
<h3>TQKeySequence</h3>
Represents a sequence of keys, eg. it is used for accelerators.
<ul>
<li>TQKeySequence -> ''
</ul>
<h3>TQFont</h3>
Represents a font.
<ul>
<li>TQFont -> ''
</ul>
<h2>KDE Object Types</h2>
<h3>KURL</h3>
Represents a URL.
<ul>
<li>KURL -> ''
<li>'' -> KURL
</ul>
<hr>
</body>
</html>