Chapter 16. Automagically generated reference

This chapter is automagically generated from the source code and shouldn't be outdated.

16.1. write_config_str

This function saves in the config file (usually Gabyrc) the option item with the value str under a section which will be named type:name.

Returns: TRUE if ok

16.2. write_config_bool

This function saves in the config file (usually Gabyrc) the option item with the boolean value val under a section which will be named type:name. The option will be written as 'TRUE' or 'FALSE' in the config file.

Returns: TRUE if ok

16.3. write_config_int

This function saves in the config file (usually Gabyrc) the option item with the integer value val under a section which will be named type:name.

Returns: TRUE if ok

16.4. get_config_str

This function gets from the config file (usually Gabyrc) the option item under a section which will be named type:name.

Returns: the value of the option, def if it was not present (the caller has to g_free the allocated string)

16.5. get_config_bool

This function gets from the config file (usually Gabyrc) the option item under a section which will be named type:name.

Returns: the value of the option, def if it was not present

16.6. get_config_int

This function gets from the config file (usually Gabyrc) the option item under a section which will be named type:name.

Returns: the value of the option, def if it was not present

16.7. field_get_property

This functions allows you to get values for any property the user (or the creator of the desc file) has defined for the field.

Returns: the property you want, NULL if not found

16.8. table_get_field_no

This functions returns the number of the field named str in the table t.

Returns: field number

16.9. subtable_get_field_no

This functions returns the number of the field named str in the subtable st.

Returns: field number (-2 if not found)

16.10. format_plugin_can_do

this function looks if a given plug-in is able to load (or save) a file for a given table.

Returns: TRUE, FALSE, not much choice

16.11. get_plugin_options

This function load a given section from the 'plugins_options' section of the current desc file.

Returns: A Glist filled with g_malloc'ed gchar* (please free them)

16.12. free_everything

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)

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)

16.13. gaby_perror_in_a_box

If gaby_errno is set (to something else than 0), this function shows a box with a message explaining the error gaby_errno (if the GUI isn't currently available the message is simply printed on console). Note that with some value of gaby_errno (CUSTOM_*) it will use the text which is in gaby_message.

16.14. new_view_create

This function creates a new window holding a view plug-in

Returns: the window (gabywindow*) created

16.15. select_subtable_dialog

This function creates a dialog with a list filled with subtable names.

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)

16.16. actions_menu_for_table

This functions creates a menu (GtkMenu) filled with the actions available for the given table, win is used to get the current view and id (it may be NULL if _no_ actions need them)

Returns: GtkWidget* menu (NULL if there were no actions)

16.17. page_select_fields

this creates a standard field selection page to use in print plug-ins

Returns: the widget to put in the page

16.18. page_select_fields_get_info

this returns the info from a select_fields page

16.19. get_record_no

Search for a given record.

Returns: Pointer to a record (NULL if not found)

16.20. get_table_stringed_field

This function returns a string with the information of the field field_no form the record r whatever the type of the field is. This allows plug-ins to not worry about dates, number, ... (doesn't include T_RECORD).

Returns: Pointer to a string with the information (you have to g_string_free it)

16.21. get_table_stringed_field_id

This functions does the same job that get_subtable_record_field() does excepted that the second parameter is a int. This is useful when you don't have a faster way to acceed the record structure than get_record_no() (which is used in this function).

Returns: a string with the information you want, you have to free it

16.22. get_subtable_stringed_field

This function returns a string with the information of the field field_no form the record r 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)

Returns: Pointer to a string with the information (you have to free it)

16.23. get_subtable_stringed_field_id

This functions does the same job that get_subtable_record_field() does excepted that the second parameter is a int. This is useful when you don't have a faster way to acceed the record structure than get_record_no() (which is used in this function).

Returns: a string with the information you want, you have to free it

16.24. get_related_records

This functions searchs in a table for the record related to the given one.

Returns: a GList filled with positions (not id !) of records in the related table (or filled with -1 if no related records)

16.25. get_conditional_records_list

This functions searchs for records matching the subtable's conditions as well as other conditions (eventually).

Returns: a GList filled with positions (not id !) of records

16.26. get_value_for_that_string

This functions converts a given str according its gaby type

16.27. set_table_stringed_field

This function set the field field_no of the record r to the value given by the string str whatever the type of the field is.

16.28. set_subtable_stringed_field

This function set the field field_no of the record r to the value given by the string str whatever the type of the field is. (this is a wrapper for set_table_stringed_field)

16.29. record_add

This function append the record r to the table t, if check is TRUE, the record is checked against the rules specified in the description file.

Returns: id of the new record, -1 if failed

16.30. record_free

This function frees memory allocated for the record r's fields.

16.31. record_remove_id

This function delete the record with the id id from the table t.

Returns: TRUE if it worked, FALSE if it didn't.

16.32. record_remove

This function delete the record r from the table t.

Returns: TRUE if this works, FALSE if it doesn't.

16.33. record_modify

This functions modifies a record in the table t according to the record r (its id and its contents)

Returns: TRUE if ok

16.34. record_defaults

Description This function returns a record filled with the default value for the table t.

Returns: the record (record*)

16.35. record_duplicate

Description This function returns a new record filled with the values previously in r

Returns: the new record (record*)

16.36. table_search_record

This functions searchs for a record whose field nf matches (actually starts with) what in table t

Returns: record position in table->records, -1 if not found

16.37. subtable_search_record

This functions searchs for a record whose field nf matches (actually starts with) what in subtable st. (this is actually a stupid wrapper for table_search_record)

Returns: record position in subtable->table->records, -1 if not found

16.38. table_next

This function returns the record directly following the record you gave as second parameter. no_field 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.

Returns: the record you want to go to.

16.39. table_prev

This function returns the record directly preceding the record you gave as second parameter. no_field 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.

Returns: the record you want to go to.

16.40. table_first

This function returns the first record of the table t. no_field 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.

Returns: the record you want to go to.

16.41. table_last

This function returns the last record of the table t. no_field 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.

Returns: the record you want to go to.

16.42. table_next_with_conditions

same as table_next but only stops on records fulfilling the given conditions

Returns: the record you want to go to.

16.43. table_prev_with_conditions

same as table_prev but only stops on records fulfilling the given conditions

Returns: the record you want to go to.

16.44. table_first_with_conditions

same as table_first but goes to the first record fulfilling the given conditions

Returns: the record you want to go to.

16.45. table_last_with_conditions

same as table_last but goes to the last record fulfilling the given conditions

Returns: the record you want to go to.

16.46. table_get_records_count

This function counts the number of records in a given table.

16.47. update_windows

This function update every windows after a change (usually a new, modified or deleted record) which happens in window.

16.48. get_window_by_name

This functions searchs for a window named st ( "s [s]", subtable name, view name).

Returns: the window

16.49. update_bound_windows

This function sets the record id of every windows bound to win to the value it has in win.