| Gaby's documentation | ||
|---|---|---|
| Prev | ||
This chapter is automagically generated from the source code and shouldn't be outdated.
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
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
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
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)
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
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
field_get_propertyThis 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
table_get_field_no This functions returns the number of the field named str in the table
t.
Returns: field number
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)
format_plugin_can_dothis 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
get_plugin_optionsThis 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)
free_everythingThis 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)
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.
new_view_createThis function creates a new window holding a view plug-in
Returns: the window (gabywindow*) created
select_subtable_dialogThis 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)
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)
page_select_fieldsthis creates a standard field selection page to use in print plug-ins
Returns: the widget to put in the page
page_select_fields_get_infovoid page_select_fields_get_info (subtable * st, GtkWidget * page, gboolean * active, int * selected);this returns the info from a select_fields page
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)
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
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)
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
get_related_recordsThis 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)
get_conditional_records_listThis 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
get_value_for_that_string This functions converts a given str according its gaby type
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.
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)
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
record_free This function frees memory allocated for the record r's fields.
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.
record_remove This function delete the record r from the table t.
Returns: TRUE if this works, FALSE if it doesn't.
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
record_defaults Description
This function returns a record filled with the default value for the table
t.
Returns: the record (record*)
record_duplicate Description
This function returns a new record filled with the values previously in r
Returns: the new record (record*)
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
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
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.
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.
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.
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.
table_next_with_conditionssame as table_next but only stops on records fulfilling the given conditions
Returns: the record you want to go to.
table_prev_with_conditionssame as table_prev but only stops on records fulfilling the given conditions
Returns: the record you want to go to.
table_first_with_conditionssame as table_first but goes to the first record fulfilling the given conditions
Returns: the record you want to go to.
table_last_with_conditionssame as table_last but goes to the last record fulfilling the given conditions
Returns: the record you want to go to.
table_get_records_countThis function counts the number of records in a given table.
update_windows This function update every windows after a change (usually a new, modified
or deleted record) which happens in window.
get_window_by_name This functions searchs for a window named st ( "s [s]", subtable name,
view name).
Returns: the window
update_bound_windows This function sets the record id of every windows bound to win to the
value it has in win.