Geany  dev
Data Structures | Functions
tm_source_file.h File Reference

The TMSourceFile structure and associated functions are used to maintain tags for individual files. More...

Data Structures

struct  TMSourceFile
 

Functions

TMWorkObjecttm_source_file_new (const char *file_name, gboolean update, const char *name)
 
gboolean tm_source_file_update (TMWorkObject *source_file, gboolean force, gboolean recurse, gboolean update_parent)
 

Detailed Description

The TMSourceFile structure and associated functions are used to maintain tags for individual files.

Function Documentation

TMWorkObject* tm_source_file_new ( const char *  file_name,
gboolean  update,
const char *  name 
)

Initializes a TMSourceFile structure and returns a pointer to it.

Parameters
file_nameThe file name.
updateUpdate the tag array of the file.
nameName of the used programming language, NULL for autodetection.
Returns
The created TMSourceFile object.
gboolean tm_source_file_update ( TMWorkObject source_file,
gboolean  force,
gboolean  recurse,
gboolean  update_parent 
)

Updates the source file by reparsing if the modification time is greater than the timestamp in the structure, or if force is TRUE. The tags array and the tags themselves are destroyed and re-created, hence any other tag arrays pointing to these tags should be rebuilt as well. All sorting information is also lost. The language parameter is automatically set the first time the file is parsed.

Parameters
source_fileThe source file to update.
forceIgnored. The source file is always updated.
recurseThis parameter is ignored for source files and is only there for consistency.
update_parentIf set to TRUE, sends an update signal to parent if required. You should always set this to TRUE if you are calling this function directly.
Returns
TRUE if the file was parsed, FALSE otherwise.
See Also
tm_work_object_update(), tm_workspace_update()