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

gboolean tm_source_file_buffer_update (TMWorkObject *source_file, guchar *text_buf, gint buf_size, gboolean update_parent)
 
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

gboolean tm_source_file_buffer_update ( TMWorkObject source_file,
guchar *  text_buf,
gint  buf_size,
gboolean  update_parent 
)

Updates the source file by reparsing the text-buffer passed as parameter. Ctags will use a parsing based on buffer instead of on files. You should call this function when you don't want a previous saving of the file you're editing. It's useful for a "real-time" updating of the tags. 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 with a buffer.
text_bufA text buffer. The user should take care of allocate and free it after the use here.
buf_sizeThe size of text_buf.
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_project_update(), tm_workspace_update()
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_project_update(), tm_workspace_update()