1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
<html>
<body>
<h1> Example programs for fungw </h1>
<p>
Fungw examples are ordered: the ones on top are the easier to understand
ones demonstrating features more commonly needed in practice. Any application
developer should read and understand examples numbered lower than 50. The
more advanced, exotic use case examples are above 50.
<p>
<table border=1 cellspacing=0>
<tr><td> <a href="00_hello"> 00_hello </a> <td><p>
The same example script written in each supported scripting language. Useful
for example apps in other examples.
<tr><td> <a href="10_script"> 10_script </a> <td><p>
Script embedding example: register a function scripts can call,
load a script, run the init part of the script then call a function of
the script.
<tr><td> <a href="15_c_call_script"> 15_c_call_script </a> <td><p>
Demonstrates different ways to call a fungw registered (potentially
script) function from C.
<tr><td> <a href="30_lnk_sys_pup"> 30_lnk_sys_pup </a> <td><p>
Demonstrate app build option: dynamic script plugin loading with puplug.
Otherwise does the same as 10_script (loads and runs a script calling
function forth and back).
<tr><td> <a href="31_lnk_sys_dl"> 31_lnk_sys_dl </a> <td><p>
Demonstrate app build option: dynamic script plugin loading with dlopen().
Otherwise does the same as 10_script (loads and runs a script calling
function forth and back).
<tr><td> <a href="32_lnk_sys_dyn"> 32_lnk_sys_dyn </a> <td><p>
Demonstrate app build option: script plugins dynamic linked with -l's.
Otherwise does the same as 10_script (loads and runs a script calling
function forth and back).
<tr><td> <a href="60_engine_c"> 60_engine_c </a> <td><p>
Example engine written in C, implementing a simple math lib with my_sin(),
my_cos() and my_tan(). The app registers the math lib engine and loads
and runs an example fawk script that calls these functions.
<tr><td> <a href="80_multicall"> 80_multicall </a> <td><p>
Demo on registering multiple functions under the same short name within
a context and using them as "event handlers" in a multi-call where
a single call is directed to each function with matching name.
<tr><td> <a href="82_ucc"> 82_ucc </a> <td><p>
Example on using the User Call Context: the app can create a context
struct at the initial call into fungw and the pointer of that context
is passed through the call stack so when an engine or a function of
the app is called back it can look at the context.
<tr><td> <a href="87_custom_type"> 87_custom_type </a> <td><p>
Demonstrates how an app can register custom data types that then
can be used as arguments and return values in fungw registered functions.
</table>
</body>
</html>
|