From a19e05fa8167ffd9db3cc2edb80365fc963ded58 Mon Sep 17 00:00:00 2001 From: Nick Treleaven Date: Fri, 10 Aug 2007 11:45:20 +0000 Subject: [PATCH] Tidy up struct typedefs. git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1784 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- ChangeLog | 2 ++ src/plugindata.h | 43 +++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5418b41f7..9352cc562 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ Implement 'Copy current line'. * doc/geany.txt, doc/geany.html: Update selected line(s) keybindings. + * src/plugindata.h: + Tidy up struct typedefs. 2007-08-10 Enrico Tröger diff --git a/src/plugindata.h b/src/plugindata.h index db0813d20..766dfb597 100644 --- a/src/plugindata.h +++ b/src/plugindata.h @@ -109,12 +109,6 @@ typedef struct PluginFields PluginFields; -typedef struct DocumentFuncs DocumentFuncs; -typedef struct ScintillaFuncs ScintillaFuncs; -typedef struct TemplateFuncs TemplateFuncs; -typedef struct UtilsFuncs UtilsFuncs; -typedef struct UIUtilsFuncs UIUtilsFuncs; - /* These are fields and functions owned by Geany. * Fields and functions will be appended when needed by plugin authors. * Note: Remember to increment api_version (and abi_version if necessary) when @@ -127,12 +121,12 @@ typedef struct GeanyData struct filetype **filetypes; struct EditorPrefs *editor_prefs; - DocumentFuncs *document; - ScintillaFuncs *sci; - TemplateFuncs *templates; - UtilsFuncs *utils; - UIUtilsFuncs *ui; - struct SupportFuncs *support; + struct DocumentFuncs *document; + struct ScintillaFuncs *sci; + struct TemplateFuncs *templates; + struct UtilsFuncs *utils; + struct UIUtilsFuncs *ui; + struct SupportFuncs *support; } GeanyData; @@ -144,16 +138,17 @@ typedef GeanyData PluginData; // for compatibility with API < 7 struct filetype; -struct DocumentFuncs +typedef struct DocumentFuncs { gint (*new_file) (const gchar *filename, struct filetype *ft); gint (*get_cur_idx) (); struct document* (*get_current) (); -}; +} +DocumentFuncs; struct _ScintillaObject; -struct ScintillaFuncs +typedef struct ScintillaFuncs { long int (*send_message) (struct _ScintillaObject* sci, unsigned int iMessage, long unsigned int wParam, long int lParam); @@ -187,25 +182,29 @@ struct ScintillaFuncs void (*ensure_line_is_visible) (struct _ScintillaObject* sci, gint line); void (*scroll_caret) (struct _ScintillaObject* sci); gint (*find_bracematch) (struct _ScintillaObject* sci, gint pos); -}; +} +ScintillaFuncs; -struct TemplateFuncs +typedef struct TemplateFuncs { gchar* (*get_template_fileheader) (gint filetype_idx, const gchar *fname); -}; +} +TemplateFuncs; -struct UtilsFuncs +typedef struct UtilsFuncs { gboolean (*str_equal) (const gchar *a, const gchar *b); gchar* (*str_replace) (gchar *haystack, const gchar *needle, const gchar *replacement); GSList* (*get_file_list) (const gchar *path, guint *length, GError **error); -}; +} +UtilsFuncs; -struct UIUtilsFuncs +typedef struct UIUtilsFuncs { GtkWidget* (*dialog_vbox_new) (GtkDialog *dialog); GtkWidget* (*frame_new_with_alignment) (const gchar *label_text, GtkWidget **alignment); -}; +} +UIUtilsFuncs; typedef struct SupportFuncs {