geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tm_source_file.h File Reference

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

#include <stdio.h>
#include <glib.h>
#include <glib-object.h>
#include "tm_parser.h"
Include dependency graph for tm_source_file.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TMSourceFile
 The TMSourceFile structure represents the source file and its tags in the tag manager. More...
 

Macros

#define TM_SOURCE_FILE(source_file)   ((TMSourceFile *) source_file)
 
#define FALLBACK(X, Y)   (X)?(X):(Y)
 

Typedefs

typedef struct TMSourceFile TMSourceFile
 The TMSourceFile structure represents the source file and its tags in the tag manager. More...
 

Functions

GType tm_source_file_get_type (void)
 
TMSourceFiletm_source_file_new (const char *file_name, const char *name)
 Initializes a TMSourceFile structure and returns a pointer to it. More...
 
void tm_source_file_free (TMSourceFile *source_file)
 Decrements the reference count of source_file. More...
 
gchar * tm_get_real_path (const gchar *file_name)
 Given a file name, returns a newly allocated string containing the realpath() of the file. More...
 

Detailed Description

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

Definition in file tm_source_file.h.

Macro Definition Documentation

◆ FALLBACK

#define FALLBACK (   X,
 
)    (X)?(X):(Y)

Definition at line 26 of file tm_source_file.h.

◆ TM_SOURCE_FILE

#define TM_SOURCE_FILE (   source_file)    ((TMSourceFile *) source_file)

Definition at line 23 of file tm_source_file.h.

Typedef Documentation

◆ TMSourceFile

typedef struct TMSourceFile TMSourceFile

The TMSourceFile structure represents the source file and its tags in the tag manager.

Function Documentation

◆ tm_get_real_path()

gchar * tm_get_real_path ( const gchar *  file_name)

Given a file name, returns a newly allocated string containing the realpath() of the file.

Parameters
file_nameThe original file_name
Returns
A newly allocated string containing the real path to the file. NULL if none is available.
Deprecated:
since 1.32 (ABI 235)
See also
utils_get_real_path()

Definition at line 124 of file tm_source_file.c.

References get_path_max(), and NULL.

Referenced by tm_source_file_init(), and utils_get_real_path().

◆ tm_source_file_free()

void tm_source_file_free ( TMSourceFile source_file)

Decrements the reference count of source_file.

If the reference count drops to 0, then source_file is freed, including all contents. Make sure the source_file is already removed from any TMWorkSpace before the this happens.

Parameters
source_fileThe source file to free.
See also
tm_workspace_remove_source_file()

Definition at line 663 of file tm_source_file.c.

References NULL, priv, SOURCE_FILE_FREE, and tm_source_file_destroy().

Referenced by document_load_config(), handle_save_as(), remove_page(), tm_workspace_create_global_tags(), and tm_workspace_free().

◆ tm_source_file_get_type()

GType tm_source_file_get_type ( void  )

◆ tm_source_file_new()

TMSourceFile * tm_source_file_new ( const char *  file_name,
const char *  name 
)

Initializes a TMSourceFile structure and returns a pointer to it.

The TMSourceFile has to be added to TMWorkspace to start its parsing.

Parameters
file_nameThe file name.
nameName of the used programming language, NULL to disable parsing.
Returns
The created unparsed TMSourceFile object.

Definition at line 614 of file tm_source_file.c.

References name, NULL, priv, SOURCE_FILE_FREE, SOURCE_FILE_NEW, and tm_source_file_init().

Referenced by document_update_tags(), and tm_workspace_create_global_tags().