Sophie

Sophie

distrib > Arklinux > devel > i586 > media > main > by-pkgid > dec60dedc1ff6e8fa4a0987dbc72ed1d > files > 747

ocaml-3.12.1-1ark.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="ThreadUnix.html">
<link rel="next" href="Unix.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Arg" rel="Chapter" href="Arg.html">
<link title="Arith_status" rel="Chapter" href="Arith_status.html">
<link title="Array" rel="Chapter" href="Array.html">
<link title="ArrayLabels" rel="Chapter" href="ArrayLabels.html">
<link title="Big_int" rel="Chapter" href="Big_int.html">
<link title="Bigarray" rel="Chapter" href="Bigarray.html">
<link title="Buffer" rel="Chapter" href="Buffer.html">
<link title="Callback" rel="Chapter" href="Callback.html">
<link title="CamlinternalLazy" rel="Chapter" href="CamlinternalLazy.html">
<link title="CamlinternalMod" rel="Chapter" href="CamlinternalMod.html">
<link title="CamlinternalOO" rel="Chapter" href="CamlinternalOO.html">
<link title="Char" rel="Chapter" href="Char.html">
<link title="Complex" rel="Chapter" href="Complex.html">
<link title="Condition" rel="Chapter" href="Condition.html">
<link title="Dbm" rel="Chapter" href="Dbm.html">
<link title="Digest" rel="Chapter" href="Digest.html">
<link title="Dynlink" rel="Chapter" href="Dynlink.html">
<link title="Event" rel="Chapter" href="Event.html">
<link title="Filename" rel="Chapter" href="Filename.html">
<link title="Format" rel="Chapter" href="Format.html">
<link title="Gc" rel="Chapter" href="Gc.html">
<link title="Genlex" rel="Chapter" href="Genlex.html">
<link title="Graphics" rel="Chapter" href="Graphics.html">
<link title="GraphicsX11" rel="Chapter" href="GraphicsX11.html">
<link title="Hashtbl" rel="Chapter" href="Hashtbl.html">
<link title="Int32" rel="Chapter" href="Int32.html">
<link title="Int64" rel="Chapter" href="Int64.html">
<link title="Lazy" rel="Chapter" href="Lazy.html">
<link title="Lexing" rel="Chapter" href="Lexing.html">
<link title="List" rel="Chapter" href="List.html">
<link title="ListLabels" rel="Chapter" href="ListLabels.html">
<link title="Map" rel="Chapter" href="Map.html">
<link title="Marshal" rel="Chapter" href="Marshal.html">
<link title="MoreLabels" rel="Chapter" href="MoreLabels.html">
<link title="Mutex" rel="Chapter" href="Mutex.html">
<link title="Nativeint" rel="Chapter" href="Nativeint.html">
<link title="Num" rel="Chapter" href="Num.html">
<link title="Obj" rel="Chapter" href="Obj.html">
<link title="Oo" rel="Chapter" href="Oo.html">
<link title="Parsing" rel="Chapter" href="Parsing.html">
<link title="Pervasives" rel="Chapter" href="Pervasives.html">
<link title="Printexc" rel="Chapter" href="Printexc.html">
<link title="Printf" rel="Chapter" href="Printf.html">
<link title="Queue" rel="Chapter" href="Queue.html">
<link title="Random" rel="Chapter" href="Random.html">
<link title="Scanf" rel="Chapter" href="Scanf.html">
<link title="Set" rel="Chapter" href="Set.html">
<link title="Sort" rel="Chapter" href="Sort.html">
<link title="Stack" rel="Chapter" href="Stack.html">
<link title="StdLabels" rel="Chapter" href="StdLabels.html">
<link title="Str" rel="Chapter" href="Str.html">
<link title="Stream" rel="Chapter" href="Stream.html">
<link title="String" rel="Chapter" href="String.html">
<link title="StringLabels" rel="Chapter" href="StringLabels.html">
<link title="Sys" rel="Chapter" href="Sys.html">
<link title="Thread" rel="Chapter" href="Thread.html">
<link title="ThreadUnix" rel="Chapter" href="ThreadUnix.html">
<link title="Tk" rel="Chapter" href="Tk.html">
<link title="Unix" rel="Chapter" href="Unix.html">
<link title="UnixLabels" rel="Chapter" href="UnixLabels.html">
<link title="Weak" rel="Chapter" href="Weak.html"><link title="Initialization and termination" rel="Section" href="#6_Initializationandtermination">
<link title="Application wide commands" rel="Section" href="#6_Applicationwidecommands">
<link title="Dimensions" rel="Section" href="#6_Dimensions">
<link title="Widget layout commands" rel="Section" href="#6_Widgetlayoutcommands">
<link title="Event handling" rel="Section" href="#6_Eventhandling">
<title>Tk</title>
</head>
<body>
<div class="navbar"><a href="ThreadUnix.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Unix.html">Next</a>
</div>
<center><h1>Module <a href="type_Tk.html">Tk</a></h1></center>
<br>
<pre><span class="keyword">module</span> Tk: <code class="code"><span class="keyword">sig</span></code> <a href="Tk.html">..</a> <code class="code"><span class="keyword">end</span></code></pre>Basic functions and types for LablTk<br>
<hr width="100%">
<br>
<span id="6_Initializationandtermination"><h6>Initialization and termination</h6></span><br>
<pre><span id="VALopenTk"><span class="keyword">val</span> openTk</span> : <code class="type">?display:string -> ?clas:string -> unit -> Widget.toplevel Widget.widget</code></pre><div class="info">
Initialize LablTk and open a toplevel window.
          <code class="code">display</code> is described according to the X11 conventions.
          <code class="code">clas</code> is used for the X11 resource mechanism.<br>
</div>
<pre><span id="VALmainLoop"><span class="keyword">val</span> mainLoop</span> : <code class="type">unit -> unit</code></pre><div class="info">
Start the main event loop<br>
</div>
<pre><span id="VALcloseTk"><span class="keyword">val</span> closeTk</span> : <code class="type">unit -> unit</code></pre><div class="info">
Quit the main loop and close all open windows.<br>
</div>
<pre><span id="VALdestroy"><span class="keyword">val</span> destroy</span> : <code class="type">'a Widget.widget -> unit</code></pre><div class="info">
Destroy an individual widget.<br>
</div>
<br>
<span id="6_Applicationwidecommands"><h6>Application wide commands</h6></span><br>
<pre><span id="VALupdate"><span class="keyword">val</span> update</span> : <code class="type">unit -> unit</code></pre><div class="info">
Synchronize display with internal state.<br>
</div>
<pre><span id="VALappname_get"><span class="keyword">val</span> appname_get</span> : <code class="type">unit -> string</code></pre><pre><span id="VALappname_set"><span class="keyword">val</span> appname_set</span> : <code class="type">string -> unit</code></pre><div class="info">
Get or set the application name.<br>
</div>
<br>
<span id="6_Dimensions"><h6>Dimensions</h6></span><br>
<pre><span id="TYPEunits"><span class="keyword">type</span> <code class="type"></code>units</span> = <code class="type">[ `Cm of float | `In of float | `Mm of float | `Pix of int | `Pt of float ]</code> </pre>

<pre><span id="VALpixels"><span class="keyword">val</span> pixels</span> : <code class="type"><a href="Tk.html#TYPEunits">units</a> -> int</code></pre><div class="info">
Converts various on-screen units to pixels,
          respective to the default display. Available units are
          pixels, centimeters, inches, millimeters and points<br>
</div>
<br>
<span id="6_Widgetlayoutcommands"><h6>Widget layout commands</h6></span><br>
<pre><span id="TYPEanchor"><span class="keyword">type</span> <code class="type"></code>anchor</span> = <code class="type">[ `Center | `E | `N | `Ne | `Nw | `S | `Se | `Sw | `W ]</code> </pre>

<pre><span id="TYPEfillMode"><span class="keyword">type</span> <code class="type"></code>fillMode</span> = <code class="type">[ `Both | `None | `X | `Y ]</code> </pre>

<pre><span id="TYPEside"><span class="keyword">type</span> <code class="type"></code>side</span> = <code class="type">[ `Bottom | `Left | `Right | `Top ]</code> </pre>

<pre><span id="VALpack"><span class="keyword">val</span> pack</span> : <code class="type">?after:'a Widget.widget -><br>       ?anchor:<a href="Tk.html#TYPEanchor">anchor</a> -><br>       ?before:'b Widget.widget -><br>       ?expand:bool -><br>       ?fill:<a href="Tk.html#TYPEfillMode">fillMode</a> -><br>       ?inside:'c Widget.widget -><br>       ?ipadx:int -><br>       ?ipady:int -><br>       ?padx:int -> ?pady:int -> ?side:<a href="Tk.html#TYPEside">side</a> -> 'd Widget.widget list -> unit</code></pre><div class="info">
Pack a widget inside its parent,
           using the standard layout engine.<br>
</div>
<pre><span id="VALgrid"><span class="keyword">val</span> grid</span> : <code class="type">?column:int -><br>       ?columnspan:int -><br>       ?inside:'a Widget.widget -><br>       ?ipadx:int -><br>       ?ipady:int -><br>       ?padx:int -><br>       ?pady:int -><br>       ?row:int -> ?rowspan:int -> ?sticky:string -> 'b Widget.widget list -> unit</code></pre><div class="info">
Pack a widget inside its parent, using the grid layout engine.<br>
</div>
<pre><span id="TYPEborderMode"><span class="keyword">type</span> <code class="type"></code>borderMode</span> = <code class="type">[ `Ignore | `Inside | `Outside ]</code> </pre>

<pre><span id="VALplace"><span class="keyword">val</span> place</span> : <code class="type">?anchor:<a href="Tk.html#TYPEanchor">anchor</a> -><br>       ?bordermode:<a href="Tk.html#TYPEborderMode">borderMode</a> -><br>       ?height:int -><br>       ?inside:'a Widget.widget -><br>       ?relheight:float -><br>       ?relwidth:float -><br>       ?relx:float -><br>       ?rely:float -> ?width:int -> ?x:int -> ?y:int -> 'b Widget.widget -> unit</code></pre><div class="info">
Pack a widget inside its parent, at absolute coordinates.<br>
</div>
<pre><span id="VALraise_window"><span class="keyword">val</span> raise_window</span> : <code class="type">?above:'a Widget.widget -> 'b Widget.widget -> unit</code></pre><pre><span id="VALlower_window"><span class="keyword">val</span> lower_window</span> : <code class="type">?below:'a Widget.widget -> 'b Widget.widget -> unit</code></pre><div class="info">
Raise or lower the window associated to a widget.<br>
</div>
<br>
<span id="6_Eventhandling"><h6>Event handling</h6></span><br>
<pre><span id="TYPEmodifier"><span class="keyword">type</span> <code class="type"></code>modifier</span> = <code class="type">[ `Alt<br>       | `Button1<br>       | `Button2<br>       | `Button3<br>       | `Button4<br>       | `Button5<br>       | `Control<br>       | `Double<br>       | `Lock<br>       | `Meta<br>       | `Mod1<br>       | `Mod2<br>       | `Mod3<br>       | `Mod4<br>       | `Mod5<br>       | `Shift<br>       | `Triple ]</code> </pre>

<pre><span id="TYPEevent"><span class="keyword">type</span> <code class="type"></code>event</span> = <code class="type">[ `ButtonPress<br>       | `ButtonPressDetail of int<br>       | `ButtonRelease<br>       | `ButtonReleaseDetail of int<br>       | `Circulate<br>       | `ColorMap<br>       | `Configure<br>       | `Destroy<br>       | `Enter<br>       | `Expose<br>       | `FocusIn<br>       | `FocusOut<br>       | `Gravity<br>       | `KeyPress<br>       | `KeyPressDetail of string<br>       | `KeyRelease<br>       | `KeyReleaseDetail of string<br>       | `Leave<br>       | `Map<br>       | `Modified of <a href="Tk.html#TYPEmodifier">modifier</a> list * <a href="Tk.html#TYPEevent">event</a><br>       | `Motion<br>       | `Property<br>       | `Reparent<br>       | `Unmap<br>       | `Visibility ]</code> </pre>

<br>
An event can be either a basic X event, or modified by a
   key or mouse modifier.<br>
<br><code><span id="TYPEeventInfo"><span class="keyword">type</span> <code class="type"></code>eventInfo</span> = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Above&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_ButtonNumber&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Count&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Detail&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Focus&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Height&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_KeyCode&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Mode&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_OverrideRedirect&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Place&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_State&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Time&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Width&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_MouseX&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_MouseY&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Char&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_BorderWidth&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_SendEvent&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_KeySymString&nbsp;: <code class="type">string</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_KeySymInt&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_RootWindow&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_SubWindow&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Type&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_Widget&nbsp;: <code class="type">Widget.any Widget.widget</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_RootX&nbsp;: <code class="type">int</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span class="keyword">mutable&nbsp;</span>ev_RootY&nbsp;: <code class="type">int</code>;</code></td>

</tr></table>
}


<br>
Event related information accessible in callbacks.<br>
<pre><span id="TYPEeventField"><span class="keyword">type</span> <code class="type"></code>eventField</span> = <code class="type">[ `Above<br>       | `BorderWidth<br>       | `ButtonNumber<br>       | `Char<br>       | `Count<br>       | `Detail<br>       | `Focus<br>       | `Height<br>       | `KeyCode<br>       | `KeySymInt<br>       | `KeySymString<br>       | `Mode<br>       | `MouseX<br>       | `MouseY<br>       | `OverrideRedirect<br>       | `Place<br>       | `RootWindow<br>       | `RootX<br>       | `RootY<br>       | `SendEvent<br>       | `State<br>       | `SubWindow<br>       | `Time<br>       | `Type<br>       | `Widget<br>       | `Width ]</code> </pre>

<br>
In order to access the above event information, one has to pass
   a list of required event fields to the <code class="code">bind</code> function.<br>
<pre><span id="VALbind"><span class="keyword">val</span> bind</span> : <code class="type">events:<a href="Tk.html#TYPEevent">event</a> list -><br>       ?extend:bool -><br>       ?breakable:bool -><br>       ?fields:<a href="Tk.html#TYPEeventField">eventField</a> list -><br>       ?action:(<a href="Tk.html#TYPEeventInfo">eventInfo</a> -> unit) -> 'a Widget.widget -> unit</code></pre><div class="info">
Bind a succession of <code class="code">events</code> on a widget to an <code class="code">action</code>.
           If <code class="code">extend</code> is true then then binding is added after existing
           ones, otherwise it replaces them.
           <code class="code">breakable</code> should be true when <code class="code">break</code> is to be called inside
           the action.
           <code class="code">action</code> is called with the <code class="code">fields</code> required set in
           an <code class="code">eventInfo</code> structure. Other fields should not be accessed.
           If <code class="code">action</code> is omitted then existing bindings are removed.<br>
</div>
<pre><span id="VALbind_class"><span class="keyword">val</span> bind_class</span> : <code class="type">events:<a href="Tk.html#TYPEevent">event</a> list -><br>       ?extend:bool -><br>       ?breakable:bool -><br>       ?fields:<a href="Tk.html#TYPEeventField">eventField</a> list -><br>       ?action:(<a href="Tk.html#TYPEeventInfo">eventInfo</a> -> unit) -> ?on:'a Widget.widget -> string -> unit</code></pre><div class="info">
Same thing for all widgets of a given class. If a widget
           is given with label <code class="code">~on:</code>, the binding will be removed as
           soon as it is destroyed.<br>
</div>
<pre><span id="VALbind_tag"><span class="keyword">val</span> bind_tag</span> : <code class="type">events:<a href="Tk.html#TYPEevent">event</a> list -><br>       ?extend:bool -><br>       ?breakable:bool -><br>       ?fields:<a href="Tk.html#TYPEeventField">eventField</a> list -><br>       ?action:(<a href="Tk.html#TYPEeventInfo">eventInfo</a> -> unit) -> ?on:'a Widget.widget -> string -> unit</code></pre><div class="info">
Same thing for all widgets having a given tag<br>
</div>
<pre><span id="VALbreak"><span class="keyword">val</span> break</span> : <code class="type">unit -> unit</code></pre><div class="info">
Used inside a bound action, do not call other actions
           after this one. This is only possible if this action
           was bound with <code class="code">~breakable:<span class="keyword">true</span></code>.<br>
</div>
</body></html>