Normalize use of header guards and extern "C" guards

* Always define GEANY_FOO_H to 1 in the header guards
* Always put a G_BEGIN_DECLS/G_END_DECLS guard in every header for
consistency, even private ones where it doesn't matter.
* Always include either <glib.h>, <gtk/gtk.h> or some other header
that will provide G_BEGIN_DECLS before using it. In a lot of headers
that use glib.h and gtk/gtk.h stuff anyway, this resolves an implicit
dependency they had on them being included before that header.
* Always put a comment at the #endif part of the guard so it's
easier to see what it applies to.
* Always use an underscore between the header guard identifier's words
even though the filename doesn't have one.
This commit is contained in:
Matthew Brush 2014-05-18 17:07:50 -07:00
parent fec15c61c4
commit 6f87aac118
48 changed files with 248 additions and 87 deletions

View File

@ -20,10 +20,15 @@
*/ */
#ifndef GEANY_ABOUT_DIALOG_H #ifndef GEANY_ABOUT_H
#define GEANY_ABOUT_DIALOG_H #define GEANY_ABOUT_H 1
#include <glib.h>
G_BEGIN_DECLS
void about_dialog_show(void); void about_dialog_show(void);
#endif G_END_DECLS
#endif /* GEANY_ABOUT_H */

View File

@ -24,6 +24,8 @@
#ifndef GEANY_BUILD_H #ifndef GEANY_BUILD_H
#define GEANY_BUILD_H 1 #define GEANY_BUILD_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* Forward-declared to avoid including their headers here */ /* Forward-declared to avoid including their headers here */
@ -210,4 +212,4 @@ gchar **build_get_regex(GeanyBuildGroup grp, struct GeanyFiletype *ft, guint *fr
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_BUILD_H */

View File

@ -19,9 +19,13 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef GEANY_CALLBACKS_H
#define GEANY_CALLBACKS_H 1
#include <glib.h>
#include "geany.h" /* necessary for interface.c */ #include "geany.h" /* necessary for interface.c */
G_BEGIN_DECLS
G_MODULE_EXPORT gboolean G_MODULE_EXPORT gboolean
on_exit_clicked (GtkWidget *widget, gpointer gdata); on_exit_clicked (GtkWidget *widget, gpointer gdata);
@ -678,3 +682,7 @@ on_detect_type_from_file_activate (GtkMenuItem *menuitem,
G_MODULE_EXPORT void G_MODULE_EXPORT void
on_detect_width_from_file_activate (GtkMenuItem *menuitem, on_detect_width_from_file_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
G_END_DECLS
#endif /* GEANY_CALLBACKS_H */

View File

@ -28,6 +28,10 @@
#ifndef GEANY_DIALOGS_H #ifndef GEANY_DIALOGS_H
#define GEANY_DIALOGS_H 1 #define GEANY_DIALOGS_H 1
#include <glib.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -75,4 +79,6 @@ void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) G_GNUC_PRI
void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary); void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, const gchar *secondary);
#endif G_END_DECLS
#endif /* GEANY_DIALOGS_H */

View File

@ -29,6 +29,8 @@
#ifndef GEANY_DOCUMENT_H #ifndef GEANY_DOCUMENT_H
#define GEANY_DOCUMENT_H 1 #define GEANY_DOCUMENT_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#include "Scintilla.h" #include "Scintilla.h"
@ -301,4 +303,4 @@ GeanyDocument *document_clone(GeanyDocument *old_doc);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_DOCUMENT_H */

View File

@ -21,8 +21,11 @@
#ifndef GEANY_DOCUMENT_PRIVATE_H #ifndef GEANY_DOCUMENT_PRIVATE_H
#define GEANY_DOCUMENT_PRIVATE_H #define GEANY_DOCUMENT_PRIVATE_H 1
#include <glib.h>
G_BEGIN_DECLS
/* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's /* available UNDO actions, UNDO_SCINTILLA is a pseudo action to trigger Scintilla's
* undo management */ * undo management */
@ -86,4 +89,6 @@ typedef struct GeanyDocumentPrivate
} }
GeanyDocumentPrivate; GeanyDocumentPrivate;
#endif G_END_DECLS
#endif /* GEANY_DOCUMENT_PRIVATE_H */

View File

@ -23,6 +23,7 @@
#ifndef GEANY_EDITOR_H #ifndef GEANY_EDITOR_H
#define GEANY_EDITOR_H 1 #define GEANY_EDITOR_H 1
#include <glib.h>
#include "Scintilla.h" #include "Scintilla.h"
#include "ScintillaWidget.h" #include "ScintillaWidget.h"
@ -325,4 +326,4 @@ void editor_insert_snippet(GeanyEditor *editor, gint pos, const gchar *snippet);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_EDITOR_H */

View File

@ -34,7 +34,9 @@
/* Stolen from anjuta */ /* Stolen from anjuta */
#ifndef GEANY_ENCODINGS_H #ifndef GEANY_ENCODINGS_H
#define GEANY_ENCODINGS_H #define GEANY_ENCODINGS_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -199,4 +201,4 @@ GeanyEncodingIndex encodings_get_idx_from_charset(const gchar *charset);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_ENCODINGS_H */

View File

@ -23,6 +23,7 @@
#ifndef GEANY_FILETYPES_H #ifndef GEANY_FILETYPES_H
#define GEANY_FILETYPES_H 1 #define GEANY_FILETYPES_H 1
#include <glib.h>
#include "Scintilla.h" #include "Scintilla.h"
#include "ScintillaWidget.h" #include "ScintillaWidget.h"
@ -206,4 +207,4 @@ gboolean filetype_get_comment_open_close(const GeanyFiletype *ft, gboolean singl
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_FILETYPES_H */

View File

@ -21,11 +21,14 @@
#ifndef GEANY_FILETYPES_PRIVATE_H #ifndef GEANY_FILETYPES_PRIVATE_H
#define GEANY_FILETYPES_PRIVATE_H #define GEANY_FILETYPES_PRIVATE_H 1
#include <glib.h>
#include "filetypes.h" #include "filetypes.h"
#include "build.h" #include "build.h"
G_BEGIN_DECLS
/* Private GeanyFiletype fields */ /* Private GeanyFiletype fields */
typedef struct GeanyFiletypePrivate typedef struct GeanyFiletypePrivate
{ {
@ -53,4 +56,6 @@ typedef struct GeanyFiletypePrivate
} }
GeanyFiletypePrivate; GeanyFiletypePrivate;
#endif G_END_DECLS
#endif /* GEANY_FILETYPES_PRIVATE_H */

View File

@ -23,7 +23,7 @@
* externs and function prototypes are implemented in main.c. */ * externs and function prototypes are implemented in main.c. */
#ifndef GEANY_H #ifndef GEANY_H
#define GEANY_H #define GEANY_H 1
#include <gtk/gtk.h> #include <gtk/gtk.h>
@ -93,4 +93,4 @@ void geany_debug(gchar const *format, ...) G_GNUC_PRINTF (1, 2);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_H */

View File

@ -21,7 +21,9 @@
#ifndef GEANY_ENTRY_ACTION_H #ifndef GEANY_ENTRY_ACTION_H
#define GEANY_ENTRY_ACTION_H #define GEANY_ENTRY_ACTION_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -21,7 +21,9 @@
#ifndef GEANY_MENU_BUTTON_ACTION_H #ifndef GEANY_MENU_BUTTON_ACTION_H
#define GEANY_MENU_BUTTON_ACTION_H #define GEANY_MENU_BUTTON_ACTION_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -20,8 +20,8 @@
*/ */
#ifndef GEANYOBJECT_H #ifndef GEANY_OBJECT_H
#define GEANYOBJECT_H #define GEANY_OBJECT_H 1
#include <glib-object.h> #include <glib-object.h>
@ -111,4 +111,4 @@ GObject* geany_object_new (void);
G_END_DECLS G_END_DECLS
#endif /* GEANYOBJECT_H */ #endif /* GEANY_OBJECT_H */

View File

@ -20,7 +20,9 @@
*/ */
#ifndef GEANY_WRAP_LABEL_H #ifndef GEANY_WRAP_LABEL_H
#define GEANY_WRAP_LABEL_H #define GEANY_WRAP_LABEL_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS

View File

@ -21,7 +21,7 @@
/* Compatibility macros to support older GTK+ versions */ /* Compatibility macros to support older GTK+ versions */
#ifndef GTK_COMPAT_H #ifndef GTK_COMPAT_H
#define GTK_COMPAT_H #define GTK_COMPAT_H 1
#include <gtk/gtk.h> #include <gtk/gtk.h>
#if GTK_CHECK_VERSION(3, 0, 0) #if GTK_CHECK_VERSION(3, 0, 0)

View File

@ -23,11 +23,12 @@
#ifndef GEANY_HIGHLIGHTING_H #ifndef GEANY_HIGHLIGHTING_H
#define GEANY_HIGHLIGHTING_H 1 #define GEANY_HIGHLIGHTING_H 1
G_BEGIN_DECLS #include <glib.h>
#include "Scintilla.h" #include "Scintilla.h"
#include "ScintillaWidget.h" #include "ScintillaWidget.h"
G_BEGIN_DECLS
/* Forward-declared to avoid including filetypes.h here */ /* Forward-declared to avoid including filetypes.h here */
struct GeanyFiletype; struct GeanyFiletype;
@ -59,4 +60,4 @@ void highlighting_show_color_scheme_dialog(void);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_HIGHLIGHTING_H */

View File

@ -21,11 +21,13 @@
*/ */
#ifndef GEANY_HIGHLIGHTINGMAPPINGS_H #ifndef GEANY_HIGHLIGHTING_MAPPINGS_H
#define GEANY_HIGHLIGHTINGMAPPINGS_H 1 #define GEANY_HIGHLIGHTING_MAPPINGS_H 1
#include <glib.h>
#include "Scintilla.h" #include "Scintilla.h"
G_BEGIN_DECLS
/* contains all filtypes informations in the form of: /* contains all filtypes informations in the form of:
* - highlighting_lexer_LANG: the SCI lexer * - highlighting_lexer_LANG: the SCI lexer
@ -1560,5 +1562,6 @@ static const HLKeyword highlighting_keywords_YAML[] =
}; };
#define highlighting_properties_YAML EMPTY_PROPERTIES #define highlighting_properties_YAML EMPTY_PROPERTIES
G_END_DECLS
#endif /* guard */ #endif /* GEANY_HIGHLIGHTING_MAPPINGS_H */

View File

@ -22,6 +22,8 @@
#ifndef GEANY_KEYBINDINGS_H #ifndef GEANY_KEYBINDINGS_H
#define GEANY_KEYBINDINGS_H 1 #define GEANY_KEYBINDINGS_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** Function pointer type used for keybinding callbacks. */ /** Function pointer type used for keybinding callbacks. */
@ -276,4 +278,4 @@ void keybindings_dialog_show_prefs_scroll(const gchar *name);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_KEYBINDINGS_H */

View File

@ -23,6 +23,9 @@
#ifndef GEANY_KEYFILE_H #ifndef GEANY_KEYFILE_H
#define GEANY_KEYFILE_H 1 #define GEANY_KEYFILE_H 1
#include <glib.h>
G_BEGIN_DECLS
extern GPtrArray *pref_groups; extern GPtrArray *pref_groups;
@ -55,4 +58,6 @@ void configuration_save_session_files(GKeyFile *config);
* realisation of the main window */ * realisation of the main window */
void configuration_apply_settings(void); void configuration_apply_settings(void);
#endif G_END_DECLS
#endif /* GEANY_KEYFILE_H */

View File

@ -21,7 +21,11 @@
#ifndef GEANY_LOG_H #ifndef GEANY_LOG_H
#define GEANY_LOG_H #define GEANY_LOG_H 1
#include <glib.h>
G_BEGIN_DECLS
void log_handlers_init(void); void log_handlers_init(void);
@ -29,4 +33,6 @@ void log_finalize(void);
void log_show_debug_messages_dialog(void); void log_show_debug_messages_dialog(void);
#endif G_END_DECLS
#endif /* GEANY_LOG_H */

View File

@ -21,7 +21,11 @@
#ifndef GEANY_MAIN_H #ifndef GEANY_MAIN_H
#define GEANY_MAIN_H #define GEANY_MAIN_H 1
#include <glib.h>
G_BEGIN_DECLS
typedef struct typedef struct
{ {
@ -68,4 +72,6 @@ gboolean main_is_realized(void);
void main_load_project_from_command_line(const gchar *locale_filename, gboolean use_session); void main_load_project_from_command_line(const gchar *locale_filename, gboolean use_session);
#endif G_END_DECLS
#endif /* GEANY_MAIN_H */

View File

@ -22,6 +22,8 @@
#ifndef GEANY_MSGWINDOW_H #ifndef GEANY_MSGWINDOW_H
#define GEANY_MSGWINDOW_H 1 #define GEANY_MSGWINDOW_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** /**
@ -104,4 +106,4 @@ gboolean msgwin_goto_messages_file_line(gboolean focus_editor);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_MSGWINDOW_H */

View File

@ -29,6 +29,9 @@
#ifndef GEANY_NAVQUEUE_H #ifndef GEANY_NAVQUEUE_H
#define GEANY_NAVQUEUE_H 1 #define GEANY_NAVQUEUE_H 1
#include <glib.h>
G_BEGIN_DECLS
void navqueue_init(void); void navqueue_init(void);
@ -36,12 +39,12 @@ void navqueue_free(void);
void navqueue_remove_file(const gchar *filename); void navqueue_remove_file(const gchar *filename);
gboolean navqueue_goto_line(GeanyDocument *old_doc, GeanyDocument *new_doc, gint line); gboolean navqueue_goto_line(GeanyDocument *old_doc, GeanyDocument *new_doc, gint line);
void navqueue_go_back(void); void navqueue_go_back(void);
void navqueue_go_forward(void); void navqueue_go_forward(void);
G_END_DECLS
#endif #endif /* GEANY_NAVQUEUE_H */

View File

@ -22,6 +22,10 @@
#ifndef GEANY_NOTEBOOK_H #ifndef GEANY_NOTEBOOK_H
#define GEANY_NOTEBOOK_H 1 #define GEANY_NOTEBOOK_H 1
#include <glib.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -43,4 +47,6 @@ void notebook_switch_tablastused(void);
* document yet). */ * document yet). */
gboolean notebook_switch_in_progress(void); gboolean notebook_switch_in_progress(void);
#endif G_END_DECLS
#endif /* GEANY_NOTEBOOK_H */

View File

@ -29,8 +29,15 @@
* when making changes (see 'Keeping the plugin ABI stable' in the HACKING file). */ * when making changes (see 'Keeping the plugin ABI stable' in the HACKING file). */
#ifndef GEANY_PLUGINDATA_H #ifndef GEANY_PLUGIN_DATA_H
#define GEANY_PLUGINDATA_H #define GEANY_PLUGIN_DATA_H 1
#include <glib.h>
#include "build.h" /* GeanyBuildGroup, GeanyBuildSource, GeanyBuildCmdEntries enums */
#include "document.h" /* GeanyDocument */
#include "editor.h" /* GeanyEditor, GeanyIndentType */
#include "filetypes.h" /* GeanyFiletype */
#include "gtkcompat.h"
G_BEGIN_DECLS G_BEGIN_DECLS
@ -39,12 +46,6 @@ G_BEGIN_DECLS
#undef GEANY #undef GEANY
#define GEANY(symbol_name) geany->symbol_name #define GEANY(symbol_name) geany->symbol_name
#include "build.h" /* GeanyBuildGroup, GeanyBuildSource, GeanyBuildCmdEntries enums */
#include "document.h" /* GeanyDocument */
#include "editor.h" /* GeanyEditor, GeanyIndentType */
#include "filetypes.h" /* GeanyFiletype */
#include "gtkcompat.h"
/** The Application Programming Interface (API) version, incremented /** The Application Programming Interface (API) version, incremented
* whenever any plugin data types are modified or appended to. * whenever any plugin data types are modified or appended to.
@ -754,4 +755,4 @@ BuildFuncs;
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_PLUGIN_DATA_H */

View File

@ -20,13 +20,15 @@
*/ */
#ifndef GEANY_PLUGINPRIVATE_H #ifndef GEANY_PLUGIN_PRIVATE_H
#define GEANY_PLUGINPRIVATE_H #define GEANY_PLUGIN_PRIVATE_H 1
#include <gtk/gtk.h>
#include "plugindata.h" #include "plugindata.h"
#include "ui_utils.h" /* GeanyAutoSeparator */ #include "ui_utils.h" /* GeanyAutoSeparator */
#include "keybindings.h" /* GeanyKeyGroup */ #include "keybindings.h" /* GeanyKeyGroup */
G_BEGIN_DECLS
typedef struct SignalConnection typedef struct SignalConnection
{ {
@ -63,5 +65,6 @@ typedef GeanyPluginPrivate Plugin; /* shorter alias */
void plugin_watch_object(Plugin *plugin, gpointer object); void plugin_watch_object(Plugin *plugin, gpointer object);
G_END_DECLS
#endif /* GEANY_PLUGINPRIVATE_H */ #endif /* GEANY_PLUGIN_PRIVATE_H */

View File

@ -21,10 +21,14 @@
#ifndef GEANY_PLUGINS_H #ifndef GEANY_PLUGINS_H
#define GEANY_PLUGINS_H #define GEANY_PLUGINS_H 1
#ifdef HAVE_PLUGINS #ifdef HAVE_PLUGINS
#include <glib.h>
G_BEGIN_DECLS
extern GList *active_plugin_list; extern GList *active_plugin_list;
@ -36,6 +40,8 @@ void plugins_load_active(void);
gboolean plugins_have_preferences(void); gboolean plugins_have_preferences(void);
#endif G_END_DECLS
#endif #endif /* HAVE_PLUGINS */
#endif /* GEANY_PLUGINS_H */

View File

@ -20,13 +20,15 @@
*/ */
#ifndef GEANY_PLUGINUTILS_H #ifndef GEANY_PLUGIN_UTILS_H
#define GEANY_PLUGINUTILS_H #define GEANY_PLUGIN_UTILS_H 1
#ifdef HAVE_PLUGINS #ifdef HAVE_PLUGINS
#include <gtk/gtk.h>
#include "keybindings.h" /* GeanyKeyGroupCallback */ #include "keybindings.h" /* GeanyKeyGroupCallback */
G_BEGIN_DECLS
/* avoid including plugindata.h otherwise this redefines the GEANY() macro */ /* avoid including plugindata.h otherwise this redefines the GEANY() macro */
struct GeanyPlugin; struct GeanyPlugin;
@ -56,5 +58,7 @@ void plugin_show_configure(struct GeanyPlugin *plugin);
void plugin_builder_connect_signals(struct GeanyPlugin *plugin, void plugin_builder_connect_signals(struct GeanyPlugin *plugin,
GtkBuilder *builder, gpointer user_data); GtkBuilder *builder, gpointer user_data);
G_END_DECLS
#endif /* HAVE_PLUGINS */ #endif /* HAVE_PLUGINS */
#endif /* GEANY_PLUGINUTILS_H */ #endif /* GEANY_PLUGIN_UTILS_H */

View File

@ -15,7 +15,7 @@
*/ */
#ifndef GEANY_PREFIX_H #ifndef GEANY_PREFIX_H
#define GEANY_PREFIX_H #define GEANY_PREFIX_H 1
/* /*
@ -24,6 +24,10 @@
*/ */
#ifdef ENABLE_BINRELOC #ifdef ENABLE_BINRELOC
#include <glib.h>
G_BEGIN_DECLS
/* WARNING, BEFORE YOU MODIFY PREFIX.C: /* WARNING, BEFORE YOU MODIFY PREFIX.C:
* *
@ -90,6 +94,7 @@ char *br_locate (void *symbol);
char *br_locate_prefix (void *symbol); char *br_locate_prefix (void *symbol);
char *br_prepend_prefix (void *symbol, char *path); char *br_prepend_prefix (void *symbol, char *path);
G_END_DECLS
#endif /* ENABLE_BINRELOC */ #endif /* ENABLE_BINRELOC */

View File

@ -22,6 +22,8 @@
#ifndef GEANY_PREFS_H #ifndef GEANY_PREFS_H
#define GEANY_PREFS_H 1 #define GEANY_PREFS_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/** General Preferences dialog settings. */ /** General Preferences dialog settings. */
@ -62,4 +64,4 @@ void prefs_kb_search_name(const gchar *search);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_PREFS_H */

View File

@ -23,6 +23,10 @@
#ifndef GEANY_PRINTING_H #ifndef GEANY_PRINTING_H
#define GEANY_PRINTING_H 1 #define GEANY_PRINTING_H 1
#include <glib.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -45,4 +49,6 @@ void printing_page_setup_gtk(void);
void printing_print_doc(struct GeanyDocument *doc); void printing_print_doc(struct GeanyDocument *doc);
#endif G_END_DECLS
#endif /* GEANY_PRINTING_H */

View File

@ -23,6 +23,8 @@
#ifndef GEANY_PROJECT_H #ifndef GEANY_PROJECT_H
#define GEANY_PROJECT_H 1 #define GEANY_PROJECT_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define GEANY_PROJECT_EXT "geany" #define GEANY_PROJECT_EXT "geany"
@ -92,4 +94,4 @@ void project_apply_prefs(void);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_PROJECT_H */

View File

@ -23,8 +23,11 @@
#ifndef GEANY_PROJECTPRIVATE_H #ifndef GEANY_PROJECTPRIVATE_H
#define GEANY_PROJECTPRIVATE_H 1 #define GEANY_PROJECTPRIVATE_H 1
#include <glib.h>
#include "project.h" #include "project.h"
G_BEGIN_DECLS
typedef struct GeanyProjectPrivate typedef struct GeanyProjectPrivate
{ {
struct GeanyIndentPrefs *indentation; struct GeanyIndentPrefs *indentation;
@ -38,5 +41,6 @@ typedef struct GeanyProjectPrivate
} }
GeanyProjectPrivate; GeanyProjectPrivate;
G_END_DECLS
#endif #endif /* GEANY_PROJECT_H */

View File

@ -19,12 +19,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef GEANY_SCIWRAPPERS_H #ifndef GEANY_SCI_WRAPPERS_H
#define GEANY_SCIWRAPPERS_H 1 #define GEANY_SCI_WRAPPERS_H 1
#include <gtk/gtk.h>
#include "Scintilla.h" #include "Scintilla.h"
#include "ScintillaWidget.h" #include "ScintillaWidget.h"
G_BEGIN_DECLS
gchar* sci_get_string (ScintillaObject *sci, guint msg, gulong wParam); gchar* sci_get_string (ScintillaObject *sci, guint msg, gulong wParam);
@ -189,4 +191,6 @@ gint sci_text_width (ScintillaObject *sci, gint styleNumber, const gchar *
void sci_move_selected_lines_down (ScintillaObject *sci); void sci_move_selected_lines_down (ScintillaObject *sci);
void sci_move_selected_lines_up (ScintillaObject *sci); void sci_move_selected_lines_up (ScintillaObject *sci);
#endif G_END_DECLS
#endif /* GEANY_SCI_WRAPPERS_H */

View File

@ -28,10 +28,14 @@
#ifndef GEANY_SEARCH_H #ifndef GEANY_SEARCH_H
#define GEANY_SEARCH_H 1 #define GEANY_SEARCH_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including their headers here */
struct GeanyDocument; struct GeanyDocument;
struct _ScintillaObject;
struct Sci_TextToFind;
/* the flags given in the search dialog for "find next", also used by the search bar */ /* the flags given in the search dialog for "find next", also used by the search bar */
typedef struct GeanySearchData typedef struct GeanySearchData
@ -99,10 +103,6 @@ void search_show_find_in_files_dialog(const gchar *dir);
void search_show_find_in_files_dialog_full(const gchar *text, const gchar *dir); void search_show_find_in_files_dialog_full(const gchar *text, const gchar *dir);
struct _ScintillaObject;
struct Sci_TextToFind;
void geany_match_info_free(GeanyMatchInfo *info); void geany_match_info_free(GeanyMatchInfo *info);
gint search_find_prev(struct _ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_); gint search_find_prev(struct _ScintillaObject *sci, const gchar *str, gint flags, GeanyMatchInfo **match_);
@ -126,4 +126,4 @@ guint search_replace_range(struct _ScintillaObject *sci, struct Sci_TextToFind *
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_SEARCH_H */

View File

@ -24,6 +24,10 @@
#ifndef GEANY_SIDEBAR_H #ifndef GEANY_SIDEBAR_H
#define GEANY_SIDEBAR_H 1 #define GEANY_SIDEBAR_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -68,4 +72,6 @@ void sidebar_focus_openfiles_tab(void);
void sidebar_focus_symbols_tab(void); void sidebar_focus_symbols_tab(void);
#endif G_END_DECLS
#endif /* GEANY_SIDEBAR_H */

View File

@ -23,6 +23,9 @@
#ifndef GEANY_SOCKET_H #ifndef GEANY_SOCKET_H
#define GEANY_SOCKET_H 1 #define GEANY_SOCKET_H 1
#include <glib.h>
G_BEGIN_DECLS
struct socket_info_struct struct socket_info_struct
{ {
@ -41,5 +44,6 @@ gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpoint
gint socket_finalize(void); gint socket_finalize(void);
G_END_DECLS
#endif #endif /* GEANY_SOCKET_H */

View File

@ -20,7 +20,9 @@
*/ */
#ifndef GEANY_STASH_H #ifndef GEANY_STASH_H
#define GEANY_STASH_H #define GEANY_STASH_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -101,4 +103,4 @@ void stash_tree_update(GtkTreeView *tree);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_STASH_H */

View File

@ -25,6 +25,9 @@
* @see GLib's @c gi18n-lib.h. * @see GLib's @c gi18n-lib.h.
**/ **/
#ifndef GEANY_SUPPORT_H
#define GEANY_SUPPORT_H 1
#include <glib.h> #include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -42,3 +45,5 @@ G_BEGIN_DECLS
#endif #endif
G_END_DECLS G_END_DECLS
#endif /* GEANY_SUPPORT_H */

View File

@ -23,6 +23,10 @@
#ifndef GEANY_SYMBOLS_H #ifndef GEANY_SYMBOLS_H
#define GEANY_SYMBOLS_H 1 #define GEANY_SYMBOLS_H 1
#include <glib.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -66,4 +70,6 @@ gint symbols_get_current_function(struct GeanyDocument *doc, const gchar **tagna
gint symbols_get_current_scope(struct GeanyDocument *doc, const gchar **tagname); gint symbols_get_current_scope(struct GeanyDocument *doc, const gchar **tagname);
#endif G_END_DECLS
#endif /* GEANY_SYMBOLS_H */

View File

@ -28,6 +28,8 @@
#ifndef GEANY_TEMPLATES_H #ifndef GEANY_TEMPLATES_H
#define GEANY_TEMPLATES_H 1 #define GEANY_TEMPLATES_H 1
#include <glib.h>
G_BEGIN_DECLS G_BEGIN_DECLS
/* Forward-declared to avoid including their headers here */ /* Forward-declared to avoid including their headers here */
@ -89,4 +91,4 @@ void templates_free_templates(void);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_TEMPLATES_H */

View File

@ -20,7 +20,9 @@
*/ */
#ifndef GEANY_TOOLBAR_H #ifndef GEANY_TOOLBAR_H
#define GEANY_TOOLBAR_H #define GEANY_TOOLBAR_H 1
#include <gtk/gtk.h>
G_BEGIN_DECLS G_BEGIN_DECLS
@ -63,4 +65,4 @@ void toolbar_configure(GtkWindow *parent);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_TOOLBAR_H */

View File

@ -23,6 +23,10 @@
#ifndef GEANY_TOOLS_H #ifndef GEANY_TOOLS_H
#define GEANY_TOOLS_H 1 #define GEANY_TOOLS_H 1
#include <glib.h>
G_BEGIN_DECLS
/* Forward-declared to avoid including document.h here */ /* Forward-declared to avoid including document.h here */
struct GeanyDocument; struct GeanyDocument;
@ -34,4 +38,6 @@ void tools_word_count(void);
void tools_color_chooser(const gchar *color); void tools_color_chooser(const gchar *color);
#endif G_END_DECLS
#endif /* GEANY_TOOLS_H */

View File

@ -352,4 +352,4 @@ gboolean ui_encodings_combo_box_set_active_encoding(GtkComboBox *combo, gint enc
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_UI_UTILS_H */

View File

@ -27,10 +27,10 @@
#ifndef GEANY_UTILS_H #ifndef GEANY_UTILS_H
#define GEANY_UTILS_H 1 #define GEANY_UTILS_H 1
G_BEGIN_DECLS #include <glib.h>
#include <time.h> #include <time.h>
G_BEGIN_DECLS
/** Returns @c TRUE if @a ptr is @c NULL or @c *ptr is @c FALSE. */ /** Returns @c TRUE if @a ptr is @c NULL or @c *ptr is @c FALSE. */
#define EMPTY(ptr) \ #define EMPTY(ptr) \
@ -288,4 +288,4 @@ gchar *utils_parse_and_format_build_date(const gchar *input);
G_END_DECLS G_END_DECLS
#endif #endif /* GEANY_UTILS_H */

View File

@ -25,6 +25,9 @@
#ifdef HAVE_VTE #ifdef HAVE_VTE
#include <gtk/gtk.h>
G_BEGIN_DECLS
typedef struct typedef struct
{ {
@ -81,6 +84,8 @@ void vte_send_selection_to_vte(void);
void vte_select_all(void); void vte_select_all(void);
#endif G_END_DECLS
#endif #endif /* HAVE_VTE */
#endif /* GEANY_VTE_H */

View File

@ -19,9 +19,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
#ifndef GEANY_WIN32_H
#define GEANY_WIN32_H 1
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#include <gtk/gtk.h>
G_BEGIN_DECLS
void win32_show_pref_file_dialog(GtkEntry *item); void win32_show_pref_file_dialog(GtkEntry *item);
@ -63,4 +68,8 @@ gchar *win32_get_installation_dir(void);
gchar *win32_expand_environment_variables(const gchar *str); gchar *win32_expand_environment_variables(const gchar *str);
#endif G_END_DECLS
#endif /* G_OS_WIN32 */
#endif /* GEANY_WIN32_H */