<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <HTML ><HEAD ><TITLE >Automagically generated reference</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Gaby's documentation" HREF="index.html"><LINK REL="UP" TITLE="Gaby Developers' Guide" HREF="p489.html"><LINK REL="PREVIOUS" TITLE="The Python script" HREF="x944.html"></HEAD ><BODY CLASS="CHAPTER" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Gaby's documentation</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="x944.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" > </TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="CHAPTER" ><H1 ><A NAME="FUNCTIONS-AUTO" ></A >Chapter 13. Automagically generated reference</H1 ><P >This chapter is automagically generated from the source code and shouldn't be outdated.</P ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN970" >13.1. <CODE CLASS="FUNCTION" >write_config_str</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN973" ></A ><CODE CLASS="FUNCDEF" >gboolean write_config_str </CODE >(gchar * type, gchar * name, gchar * item, gchar * str);<P ></P ></DIV ><P > This function saves in the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > with the value <VAR CLASS="PARAMETER" >str</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. </P ><P >Returns: TRUE if ok </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN990" >13.2. <CODE CLASS="FUNCTION" >write_config_bool</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN993" ></A ><CODE CLASS="FUNCDEF" >gboolean write_config_bool </CODE >(gchar * type, gchar * name, gchar * item, gboolean val);<P ></P ></DIV ><P > This function saves in the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > with the boolean value <VAR CLASS="PARAMETER" >val</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. The option will be written as 'TRUE' or 'FALSE' in the config file. </P ><P >Returns: TRUE if ok </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1010" >13.3. <CODE CLASS="FUNCTION" >write_config_int</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1013" ></A ><CODE CLASS="FUNCDEF" >gboolean write_config_int </CODE >(gchar * type, gchar * name, gchar * item, gint val);<P ></P ></DIV ><P > This function saves in the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > with the integer value <VAR CLASS="PARAMETER" >val</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. </P ><P >Returns: TRUE if ok </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1030" >13.4. <CODE CLASS="FUNCTION" >get_config_str</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1033" ></A ><CODE CLASS="FUNCDEF" >gchar* get_config_str </CODE >(gchar * type, gchar * name, gchar * item, gchar * def);<P ></P ></DIV ><P > This function gets from the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. </P ><P >Returns: the value of the option, <VAR CLASS="PARAMETER" >def</VAR > if it was not present (the caller has to g_free the allocated string) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1050" >13.5. <CODE CLASS="FUNCTION" >get_config_bool</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1053" ></A ><CODE CLASS="FUNCDEF" >gboolean get_config_bool </CODE >(gchar * type, gchar * name, gchar * item, gboolean def);<P ></P ></DIV ><P > This function gets from the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. </P ><P >Returns: the value of the option, <VAR CLASS="PARAMETER" >def</VAR > if it was not present </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1070" >13.6. <CODE CLASS="FUNCTION" >get_config_int</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1073" ></A ><CODE CLASS="FUNCDEF" >gint get_config_int </CODE >(gchar * type, gchar * name, gchar * item, gint def);<P ></P ></DIV ><P > This function gets from the config file (usually Gabyrc) the option <VAR CLASS="PARAMETER" >item</VAR > under a section which will be named <VAR CLASS="PARAMETER" >type</VAR >:<VAR CLASS="PARAMETER" >name</VAR >. </P ><P >Returns: the value of the option, <VAR CLASS="PARAMETER" >def</VAR > if it was not present </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1090" >13.7. <CODE CLASS="FUNCTION" >field_get_property</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1093" ></A ><CODE CLASS="FUNCDEF" >property* field_get_property </CODE >(field * f, gchar * ident);<P ></P ></DIV ><P > This functions allows you to get values for any property the user (or the creator of the desc file) has defined for the field. </P ><P >Returns: the property you want, NULL if not found </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1102" >13.8. <CODE CLASS="FUNCTION" >table_get_field_no</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1105" ></A ><CODE CLASS="FUNCDEF" >int table_get_field_no </CODE >(table * t, char * st);<P ></P ></DIV ><P > This functions returns the number of the field named <VAR CLASS="PARAMETER" >str</VAR > in the table <VAR CLASS="PARAMETER" >t</VAR >. </P ><P >Returns: field number </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1116" >13.9. <CODE CLASS="FUNCTION" >subtable_get_field_no</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1119" ></A ><CODE CLASS="FUNCDEF" >int subtable_get_field_no </CODE >(subtable * st, char * str);<P ></P ></DIV ><P > This functions returns the number of the field named <VAR CLASS="PARAMETER" >str</VAR > in the subtable <VAR CLASS="PARAMETER" >st</VAR >. </P ><P >Returns: field number (-2 if not found) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1130" >13.10. <CODE CLASS="FUNCTION" >format_plugin_can_do</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1133" ></A ><CODE CLASS="FUNCDEF" >gboolean format_plugin_can_do </CODE >(FILE * f, char * name, table * t, gint way);<P ></P ></DIV ><P > this function looks if a given plug-in is able to load (or save) a file for a given table. </P ><P >Returns: TRUE, FALSE, not much choice </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1146" >13.11. <CODE CLASS="FUNCTION" >get_plugin_options</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1149" ></A ><CODE CLASS="FUNCDEF" >GList* get_plugin_options </CODE >(char * section);<P ></P ></DIV ><P > This function load a given section from the 'plugins_options' section of the current desc file. </P ><P >Returns: A Glist filled with g_malloc'ed gchar* (please free them) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1156" >13.12. <CODE CLASS="FUNCTION" >free_everything</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1159" ></A ><CODE CLASS="FUNCDEF" >void free_everything </CODE >(void);<P ></P ></DIV ><P > This function will free every little structure allocated by Gaby. Its use should be very limited but is mandatory for PyApache. (actually it only frees records, tables and subtables) </P ><P > This function will free every little structure allocated by Gaby. Its use should be very limited but is mandatory for PyApache. (actually it only frees records, tables and subtables) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1165" >13.13. <CODE CLASS="FUNCTION" >gaby_perror_in_a_box</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1168" ></A ><CODE CLASS="FUNCDEF" >void gaby_perror_in_a_box </CODE >(void);<P ></P ></DIV ><P > If gaby_errno is set (to something else than 0), this function shows a box with a message explaining the error <VAR CLASS="PARAMETER" >gaby_errno</VAR > (if the GUI isn't currently available the message is simply printed on console). Note that with some value of <VAR CLASS="PARAMETER" >gaby_errno</VAR > (CUSTOM_*) it will use the text which is in <VAR CLASS="PARAMETER" >gaby_message</VAR >. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1176" >13.14. <CODE CLASS="FUNCTION" >new_view_create</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1179" ></A ><CODE CLASS="FUNCDEF" >gabywindow* new_view_create </CODE >(struct window_info * wi);<P ></P ></DIV ><P > This function creates a new window holding a view plug-in </P ><P >Returns: the window (gabywindow*) created </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1186" >13.15. <CODE CLASS="FUNCTION" >select_subtable_dialog</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1189" ></A ><CODE CLASS="FUNCDEF" >gboolean* select_subtable_dialog </CODE >(char * text, void (* callback);<P ></P ></DIV ><P > This function creates a dialog with a list filled with subtable names. </P ><P >Returns: a gboolean pointer you can use together with wait_dialog_to_finish (don't forget to g_free it if you don't use this function) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1198" >13.16. <CODE CLASS="FUNCTION" >actions_menu_for_table</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1201" ></A ><CODE CLASS="FUNCDEF" >GtkWidget* actions_menu_for_table </CODE >(table * table, gabywindow * window);<P ></P ></DIV ><P > This functions creates a menu (GtkMenu) filled with the actions available for the given table, <VAR CLASS="PARAMETER" >win</VAR > is used to get the current view and id (it may be NULL if _no_ actions need them) </P ><P >Returns: GtkWidget* menu (NULL if there were no actions) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1211" >13.17. <CODE CLASS="FUNCTION" >page_select_fields</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1214" ></A ><CODE CLASS="FUNCDEF" >static GtkWidget* page_select_fields </CODE >(subtable * st, char * checkbox, int selected);<P ></P ></DIV ><P > this creates a standard field selection page to use in print plug-ins </P ><P >Returns: the widget to put in the page </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1225" >13.18. <CODE CLASS="FUNCTION" >page_select_fields_get_info</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1228" ></A ><CODE CLASS="FUNCDEF" >void page_select_fields_get_info </CODE >(subtable * st, GtkWidget * page, gboolean * active, int * selected);<P ></P ></DIV ><P > this returns the info from a select_fields page </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1240" >13.19. <CODE CLASS="FUNCTION" >get_record_no</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1243" ></A ><CODE CLASS="FUNCDEF" >record* get_record_no </CODE >(table * t, int id);<P ></P ></DIV ><P > Search for a given record. </P ><P >Returns: Pointer to a record (NULL if not found) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1252" >13.20. <CODE CLASS="FUNCTION" >get_table_stringed_field</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1255" ></A ><CODE CLASS="FUNCDEF" >GString* get_table_stringed_field </CODE >(table * t, record * r, int field_no);<P ></P ></DIV ><P > This function returns a string with the information of the field <VAR CLASS="PARAMETER" >field_no</VAR > form the record <VAR CLASS="PARAMETER" >r</VAR > whatever the type of the field is. This allows plug-ins to not worry about dates, number, ... (doesn't include T_RECORD). </P ><P >Returns: Pointer to a string with the information (you have to g_string_free it) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1268" >13.21. <CODE CLASS="FUNCTION" >get_table_stringed_field_id</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1271" ></A ><CODE CLASS="FUNCDEF" >GString* get_table_stringed_field_id </CODE >(table * t, int id, int field_no);<P ></P ></DIV ><P > This functions does the same job that <CODE CLASS="FUNCTION" >get_subtable_record_field()</CODE > does excepted that the second parameter is a <CODE CLASS="STRUCTNAME" >int</CODE >. This is useful when you don't have a faster way to acceed the <CODE CLASS="STRUCTNAME" >record</CODE > structure than <CODE CLASS="FUNCTION" >get_record_no()</CODE > (which is used in this function). </P ><P >Returns: a string with the information you want, you have to free it </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1286" >13.22. <CODE CLASS="FUNCTION" >get_subtable_stringed_field</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1289" ></A ><CODE CLASS="FUNCDEF" >GString* get_subtable_stringed_field </CODE >(subtable * st, record * r, int field_no);<P ></P ></DIV ><P > This function returns a string with the information of the field <VAR CLASS="PARAMETER" >field_no</VAR > form the record <VAR CLASS="PARAMETER" >r</VAR > whatever the type of the field is. This allows plug-ins to not worry about dates, integer and (important) links to other tables (type 'record'). (this is a wrapper for get_table_stringed_field) </P ><P >Returns: Pointer to a string with the information (you have to free it) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1302" >13.23. <CODE CLASS="FUNCTION" >get_subtable_stringed_field_id</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1305" ></A ><CODE CLASS="FUNCDEF" >GString* get_subtable_stringed_field_id </CODE >(subtable * st, int id, int field_no);<P ></P ></DIV ><P > This functions does the same job that <CODE CLASS="FUNCTION" >get_subtable_record_field()</CODE > does excepted that the second parameter is a <CODE CLASS="STRUCTNAME" >int</CODE >. This is useful when you don't have a faster way to acceed the <CODE CLASS="STRUCTNAME" >record</CODE > structure than <CODE CLASS="FUNCTION" >get_record_no()</CODE > (which is used in this function). </P ><P >Returns: a string with the information you want, you have to free it </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1320" >13.24. <CODE CLASS="FUNCTION" >get_related_records</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1323" ></A ><CODE CLASS="FUNCDEF" >GList* get_related_records </CODE >(st_field * sf, int id);<P ></P ></DIV ><P > This functions searchs in a table for the record related to the given one. </P ><P >Returns: a GList filled with positions (not id !) of records in the related table (or filled with -1 if no related records) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1332" >13.25. <CODE CLASS="FUNCTION" >get_conditional_records_list</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1335" ></A ><CODE CLASS="FUNCDEF" >GList* get_conditional_records_list </CODE >(subtable * st, condition * other);<P ></P ></DIV ><P > This functions searchs for records matching the subtable's conditions as well as other conditions (eventually). </P ><P >Returns: a GList filled with positions (not id !) of records </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1344" >13.26. <CODE CLASS="FUNCTION" >get_value_for_that_string</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1347" ></A ><CODE CLASS="FUNCDEF" >void get_value_for_that_string </CODE >(union data * val, field_type type, gchar * str);<P ></P ></DIV ><P > This functions converts a given <VAR CLASS="PARAMETER" >str</VAR > according its gaby type </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1358" >13.27. <CODE CLASS="FUNCTION" >set_table_stringed_field</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1361" ></A ><CODE CLASS="FUNCDEF" >void set_table_stringed_field </CODE >(table * t, record * r, int field_no, gchar * str);<P ></P ></DIV ><P > This function set the field <VAR CLASS="PARAMETER" >field_no</VAR > of the <CODE CLASS="STRUCTNAME" >record</CODE > <VAR CLASS="PARAMETER" >r</VAR > to the value given by the string <VAR CLASS="PARAMETER" >str</VAR > whatever the type of the field is. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1377" >13.28. <CODE CLASS="FUNCTION" >set_subtable_stringed_field</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1380" ></A ><CODE CLASS="FUNCDEF" >void set_subtable_stringed_field </CODE >(subtable * st, record * r, int field_no, gchar * str);<P ></P ></DIV ><P > This function set the field <VAR CLASS="PARAMETER" >field_no</VAR > of the <CODE CLASS="STRUCTNAME" >record</CODE > <VAR CLASS="PARAMETER" >r</VAR > to the value given by the string <VAR CLASS="PARAMETER" >str</VAR > whatever the type of the field is. (this is a wrapper for set_table_stringed_field) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1396" >13.29. <CODE CLASS="FUNCTION" >record_add</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1399" ></A ><CODE CLASS="FUNCDEF" >int record_add </CODE >(table * t, record * r, gboolean check, gboolean loading);<P ></P ></DIV ><P > This function append the record <VAR CLASS="PARAMETER" >r</VAR > to the table <VAR CLASS="PARAMETER" >t</VAR >, if <VAR CLASS="PARAMETER" >check</VAR > is TRUE, the record is checked against the rules specified in the description file. </P ><P >Returns: id of the new record, -1 if failed </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1415" >13.30. <CODE CLASS="FUNCTION" >record_free</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1418" ></A ><CODE CLASS="FUNCDEF" >void record_free </CODE >(table * t, record * r);<P ></P ></DIV ><P > This function frees memory allocated for the record <VAR CLASS="PARAMETER" >r</VAR >'s fields. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1427" >13.31. <CODE CLASS="FUNCTION" >record_remove_id</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1430" ></A ><CODE CLASS="FUNCDEF" >gboolean record_remove_id </CODE >(table * t, int id);<P ></P ></DIV ><P > This function delete the record with the id <VAR CLASS="PARAMETER" >id</VAR > from the table <VAR CLASS="PARAMETER" >t</VAR >. </P ><P >Returns: TRUE if it worked, FALSE if it didn't. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1441" >13.32. <CODE CLASS="FUNCTION" >record_remove</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1444" ></A ><CODE CLASS="FUNCDEF" >gboolean record_remove </CODE >(table * t, record * r);<P ></P ></DIV ><P > This function delete the record <VAR CLASS="PARAMETER" >r</VAR > from the table <VAR CLASS="PARAMETER" >t</VAR >. </P ><P >Returns: TRUE if this works, FALSE if it doesn't. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1455" >13.33. <CODE CLASS="FUNCTION" >record_modify</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1458" ></A ><CODE CLASS="FUNCDEF" >gboolean record_modify </CODE >(table * t, record * r);<P ></P ></DIV ><P > This functions modifies a record in the table <VAR CLASS="PARAMETER" >t</VAR > according to the record <VAR CLASS="PARAMETER" >r</VAR > (its id and its contents) </P ><P >Returns: TRUE if ok </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1469" >13.34. <CODE CLASS="FUNCTION" >record_defaults</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1472" ></A ><CODE CLASS="FUNCDEF" >record* record_defaults </CODE >(table * t);<P ></P ></DIV ><P > Description This function returns a record filled with the default value for the table <VAR CLASS="PARAMETER" >t</VAR >. </P ><P >Returns: the record (record*) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1480" >13.35. <CODE CLASS="FUNCTION" >record_duplicate</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1483" ></A ><CODE CLASS="FUNCDEF" >record* record_duplicate </CODE >(table * t, record * r);<P ></P ></DIV ><P > Description This function returns a new record filled with the values previously in <VAR CLASS="PARAMETER" >r</VAR > </P ><P >Returns: the new record (record*) </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1493" >13.36. <CODE CLASS="FUNCTION" >table_search_record</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1496" ></A ><CODE CLASS="FUNCDEF" >int table_search_record </CODE >(table * t, int nf, char* what, int from);<P ></P ></DIV ><P > This functions searchs for a record whose field <VAR CLASS="PARAMETER" >nf</VAR > matches (actually starts with) <VAR CLASS="PARAMETER" >what</VAR > in table <VAR CLASS="PARAMETER" >t</VAR > </P ><P >Returns: record position in table->records, -1 if not found </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1512" >13.37. <CODE CLASS="FUNCTION" >subtable_search_record</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1515" ></A ><CODE CLASS="FUNCDEF" >int subtable_search_record </CODE >(subtable * st, int nf, char* what, int from);<P ></P ></DIV ><P > This functions searchs for a record whose field <VAR CLASS="PARAMETER" >nf</VAR > matches (actually starts with) <VAR CLASS="PARAMETER" >what</VAR > in subtable <VAR CLASS="PARAMETER" >st</VAR >. (this is actually a stupid wrapper for table_search_record) </P ><P >Returns: record position in subtable->table->records, -1 if not found </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1531" >13.38. <CODE CLASS="FUNCTION" >table_next</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1534" ></A ><CODE CLASS="FUNCDEF" >record* table_next </CODE >(table * t, record * r, int no_field);<P ></P ></DIV ><P > This function returns the <CODE CLASS="STRUCTNAME" >record</CODE > directly following the <CODE CLASS="STRUCTNAME" >record</CODE > you gave as second parameter. <VAR CLASS="PARAMETER" >no_field</VAR > allows you to specify a field on which the table is sorted (or -1 if you don't want the table to be sorted). Note that the first time you specify a field number Gaby will have to create an index for this field and this may be long but this will only happens once (by session). Note that if you were on the last record you will stay there. </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1549" >13.39. <CODE CLASS="FUNCTION" >table_prev</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1552" ></A ><CODE CLASS="FUNCDEF" >record* table_prev </CODE >(table * t, record * r, int no_field);<P ></P ></DIV ><P > This function returns the <CODE CLASS="STRUCTNAME" >record</CODE > directly preceding the <CODE CLASS="STRUCTNAME" >record</CODE > you gave as second parameter. <VAR CLASS="PARAMETER" >no_field</VAR > allows you to specify a field on which the table is sorted (or -1 if you don't want the table to be sorted). Note that the first time you specify a field number Gaby will have to create an index for this field and this may be long but this will only happens once (by session). Note that if you were on the first record you will stay there. </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1567" >13.40. <CODE CLASS="FUNCTION" >table_first</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1570" ></A ><CODE CLASS="FUNCDEF" >record* table_first </CODE >(table * t, int no_field);<P ></P ></DIV ><P > This function returns the first <CODE CLASS="STRUCTNAME" >record</CODE > of the table <VAR CLASS="PARAMETER" >t</VAR >. <VAR CLASS="PARAMETER" >no_field</VAR > allows you to specify a field on which the table is sorted (or -1 if you don't want the table to be sorted). Note that the first time you specify a field number Gaby will have to create an index for this field and this may be long but this will only happens once (by session). Note that if you were on the first record you will stay there. </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1583" >13.41. <CODE CLASS="FUNCTION" >table_last</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1586" ></A ><CODE CLASS="FUNCDEF" >record* table_last </CODE >(table * t, int no_field);<P ></P ></DIV ><P > This function returns the last <CODE CLASS="STRUCTNAME" >record</CODE > of the table <VAR CLASS="PARAMETER" >t</VAR >. <VAR CLASS="PARAMETER" >no_field</VAR > allows you to specify a field on which the table is sorted (or -1 if you don't want the table to be sorted). Note that the first time you specify a field number Gaby will have to create an index for this field and this may be long but this will only happens once (by session). Note that if you were on the last record you will stay there. </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1599" >13.42. <CODE CLASS="FUNCTION" >table_next_with_conditions</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1602" ></A ><CODE CLASS="FUNCDEF" >record* table_next_with_conditions </CODE >(table * t, record * r, int no_field, condition * c);<P ></P ></DIV ><P > same as table_next but only stops on records fulfilling the given conditions </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1616" >13.43. <CODE CLASS="FUNCTION" >table_prev_with_conditions</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1619" ></A ><CODE CLASS="FUNCDEF" >record* table_prev_with_conditions </CODE >(table * t, record * r, int no_field, condition * c);<P ></P ></DIV ><P > same as table_prev but only stops on records fulfilling the given conditions </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1633" >13.44. <CODE CLASS="FUNCTION" >table_first_with_conditions</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1636" ></A ><CODE CLASS="FUNCDEF" >record* table_first_with_conditions </CODE >(table * t, int no_field, condition * c);<P ></P ></DIV ><P > same as table_first but goes to the first record fulfilling the given conditions </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1648" >13.45. <CODE CLASS="FUNCTION" >table_last_with_conditions</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1651" ></A ><CODE CLASS="FUNCDEF" >record* table_last_with_conditions </CODE >(table * t, int no_field, condition * c);<P ></P ></DIV ><P > same as table_last but goes to the last record fulfilling the given conditions </P ><P >Returns: the <CODE CLASS="STRUCTNAME" >record</CODE > you want to go to. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1663" >13.46. <CODE CLASS="FUNCTION" >table_get_records_count</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1666" ></A ><CODE CLASS="FUNCDEF" >int table_get_records_count </CODE >(table * t);<P ></P ></DIV ><P > This function counts the number of records in a given table. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1672" >13.47. <CODE CLASS="FUNCTION" >update_windows</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1675" ></A ><CODE CLASS="FUNCDEF" >void update_windows </CODE >(gabywindow * window);<P ></P ></DIV ><P > This function update every windows after a change (usually a new, modified or deleted record) which happens in <VAR CLASS="PARAMETER" >window</VAR >. </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1682" >13.48. <CODE CLASS="FUNCTION" >get_window_by_name</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1685" ></A ><CODE CLASS="FUNCDEF" >gabywindow* get_window_by_name </CODE >(gchar * st);<P ></P ></DIV ><P > This functions searchs for a window named <VAR CLASS="PARAMETER" >st</VAR > ( "<VAR CLASS="REPLACEABLE" >s</VAR > [<VAR CLASS="REPLACEABLE" >s</VAR >]", subtable name, view name). </P ><P >Returns: the window </P ></DIV ><DIV CLASS="SIMPLESECT" ><H4 CLASS="SIMPLESECT" ><A NAME="AEN1695" >13.49. <CODE CLASS="FUNCTION" >update_bound_windows</CODE ></A ></H4 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1698" ></A ><CODE CLASS="FUNCDEF" >void update_bound_windows </CODE >(gabywindow * window);<P ></P ></DIV ><P > This function sets the record id of every windows bound to <VAR CLASS="PARAMETER" >win</VAR > to the value it has in <VAR CLASS="PARAMETER" >win</VAR >. </P ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="x944.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" > </TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >The Python script</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="p489.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" > </TD ></TR ></TABLE ></DIV ></BODY ></HTML >