Geany dev
Data Fields
GeanyData Struct Reference

This contains pointers to global variables owned by Geany for plugins to use. More...

#include <plugindata.h>

Data Fields

struct GeanyAppapp
 Geany application data fields.
 
GPtrArray * documents_array
 Dynamic array of GeanyDocument pointers. More...
 
struct GeanyEditorPrefseditor_prefs
 Editor settings.
 
struct GeanyFilePrefsfile_prefs
 File-related settings.
 
GPtrArray * filetypes_array
 Dynamic array of filetype pointers. More...
 
GSList * filetypes_by_title
 List of filetype pointers sorted by name, but with filetypes_index(GEANY_FILETYPES_NONE) first, as this is usually treated specially. More...
 
struct GeanyInterfacePrefsinterface_prefs
 Interface settings.
 
struct GeanyMainWidgetsmain_widgets
 Important widgets in the main window.
 
struct GeanyPrefsprefs
 General settings.
 
struct GeanySearchPrefssearch_prefs
 Search-related settings.
 
struct GeanyTemplatePrefstemplate_prefs
 Template settings.
 
struct GeanyToolPrefstool_prefs
 Tool settings.
 
struct GeanyToolbarPrefstoolbar_prefs
 Toolbar settings.
 

Detailed Description

This contains pointers to global variables owned by Geany for plugins to use.

Core variable pointers can be appended when needed by plugin authors, if appropriate.

Field Documentation

◆ documents_array

GPtrArray* GeanyData::documents_array

Dynamic array of GeanyDocument pointers.

Once a pointer is added to this, it is never freed. This means the same document pointer can represent a different document later on, or it may have been closed and become invalid. For this reason, you should use document_find_by_id() instead of storing document pointers over time if there is a chance the user can close the document.

Warning
You must check GeanyDocument::is_valid when iterating over this array. This is done automatically if you use the foreach_document() macro.
Note
Never assume that the order of document pointers is the same as the order of notebook tabs. One reason is that notebook tabs can be reordered. Use document_get_from_page() to lookup a document from a notebook tab number.
See also
documents.

(element-type: GeanyDocument)

◆ filetypes_array

GPtrArray* GeanyData::filetypes_array

Dynamic array of filetype pointers.

List the list is dynamically expanded for custom filetypes filetypes so don't expect the list of known filetypes to be a constant.

(element-type: GeanyFiletype)

◆ filetypes_by_title

GSList* GeanyData::filetypes_by_title

List of filetype pointers sorted by name, but with filetypes_index(GEANY_FILETYPES_NONE) first, as this is usually treated specially.

The list does not change (after filetypes have been initialized), so you can use

g_slist_nth_data(filetypes_by_title, n)
GSList * filetypes_by_title
List of filetype pointers sorted by name, but with filetypes_index(GEANY_FILETYPES_NONE) first,...
Definition: plugindata.h:214

and expect the same result at different times.

See also
filetypes_get_sorted_by_name().

(element-type: GeanyFiletype)