Main Page   Modules   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

luaif.c File Reference

LUA engine handling functions. More...

#include "../config.h"
#include <gtk/gtk.h>
#include <lua.h>
#include <lualib.h>
#include "guiapi.h"

Include dependency graph for luaif.c:

Include dependency graph

Go to the source code of this file.

Functions

int lua_supported (void)
 test if LUA is supported.

int lic_addQuery (lua_State *luaVM)
 Handle the addQuery(text) call.

int lic_columnCount (lua_State *luaVM)
 Handle the columnCount() call.

int lic_connect (lua_State *luaVM)
 Handle the connect(url) call.

int lic_deleteQueries (lua_State *luaVM)
 Handle the addQuery(text) call.

void disconnect_error (char *title, char *msg)
 Disconnect error callback.

int lic_disconnect (lua_State *luaVM)
 Handle the disconnect() call.

int lic_exit (lua_State *luaVM)
 Handle the exit(text) call.

int lic_getField (lua_State *luaVM)
 Handle the getField() call.

int lic_help (lua_State *luaVM)
 Handle the exit(text) call.

int lic_loadQuery (lua_State *luaVM)
 Handle the loadQuery(text) call.

int lic_moveWindow (lua_State *luaVM)
 Handle the moveWindow(x, y) call.

int lic_rowCount (lua_State *luaVM)
 Handle the rowCount() call.

int lic_runQuery (lua_State *luaVM)
 Handle the runQuery() call.

int lic_sizeWindow (lua_State *luaVM)
 Handle the sizeWindow() call.

void luaif_init (void)
 Initialise the LUA module.

void luaif_runfile (char *fn)
 Run a script from a file.

void luaif_runstring (char *s)
 Run a script from a string.


Detailed Description

LUA engine handling functions.

Author:
Darryl Luff

Definition in file luaif.c.


Function Documentation

int lic_addQuery lua_State *    luaVM
 

Handle the addQuery(text) call.

LUA usage "addQuery("querytext")"

Parameters:
luaVM  The LUA state variable.

Definition at line 54 of file luaif.c.

References gui_add_query(), gui_connection_ok(), gui_set_query_name(), and gui_set_query_text().

Referenced by luaif_init().

int lic_columnCount lua_State *    luaVM
 

Handle the columnCount() call.

LUA usage "n = columnCount()"

Parameters:
luaVM  The LUA state variable.

Definition at line 77 of file luaif.c.

References gui_get_result_columns().

Referenced by luaif_init().

int lic_connect lua_State *    luaVM
 

Handle the connect(url) call.

LUA usage: "connect(url)". 'url' is of the form "mysql://user:pass@hostname/db=fred"

Parameters:
luaVM  The LUA state variable.

Definition at line 98 of file luaif.c.

References db_connect_url(), gui_delete_all_queries(), and gui_set_connection().

Referenced by luaif_init().

int lic_deleteQueries lua_State *    luaVM
 

Handle the addQuery(text) call.

LUA usage: "deleteQueries()"

Parameters:
luaVM  The LUA state variable.

Definition at line 122 of file luaif.c.

References gui_delete_all_queries().

Referenced by luaif_init().

int lic_disconnect lua_State *    luaVM
 

Handle the disconnect() call.

LUA usage "disconnect()"

Parameters:
luaVM  The LUA state variable.

Definition at line 146 of file luaif.c.

References gui_connection_ok(), and gui_disconnect().

Referenced by luaif_init().

int lic_exit lua_State *    luaVM
 

Handle the exit(text) call.

LUA usage: "exit()"

Parameters:
luaVM  The LUA state variable.

Definition at line 163 of file luaif.c.

Referenced by luaif_init().

int lic_getField lua_State *    luaVM
 

Handle the getField() call.

LUA usage "field = getField(row, column)"

Parameters:
luaVM  The LUA state variable.

Definition at line 183 of file luaif.c.

References gui_get_result_field().

Referenced by luaif_init().

int lic_help lua_State *    luaVM
 

Handle the exit(text) call.

LUA usage: "exit()"

Parameters:
luaVM  The LUA state variable.

Definition at line 205 of file luaif.c.

Referenced by luaif_init().

int lic_loadQuery lua_State *    luaVM
 

Handle the loadQuery(text) call.

LUA usage "loadQuery("filename")"

Parameters:
luaVM  The LUA state variable.

Definition at line 231 of file luaif.c.

References gui_add_query(), and gui_load_query_from_file().

Referenced by luaif_init().

int lic_moveWindow lua_State *    luaVM
 

Handle the moveWindow(x, y) call.

LUA usage "moveWindow(x, y)"

Parameters:
luaVM  The LUA state variable.

Definition at line 252 of file luaif.c.

Referenced by luaif_init().

int lic_rowCount lua_State *    luaVM
 

Handle the rowCount() call.

LUA usage "rows = rowCount()"

Parameters:
luaVM  The LUA state variable.

Definition at line 275 of file luaif.c.

References gui_get_result_rows().

Referenced by luaif_init().

int lic_runQuery lua_State *    luaVM
 

Handle the runQuery() call.

LUA usage "runQuery("query text")". The query text is optional. if not present, the current query will be run.

Parameters:
luaVM  The LUA state variable.

Definition at line 294 of file luaif.c.

References gui_add_query(), gui_connection_ok(), gui_get_query_count(), gui_send_query(), and gui_set_query_text().

Referenced by luaif_init().

int lic_sizeWindow lua_State *    luaVM
 

Handle the sizeWindow() call.

LUA usage "sizeWindow(width, height)"

Parameters:
luaVM  The LUA state variable.

Definition at line 322 of file luaif.c.

Referenced by luaif_init().


Generated on Sun May 9 19:19:24 2004 for GtkSQL by doxygen1.2.18