Kaydet (Commit) 704940dc authored tarafından Enrico Tröger's avatar Enrico Tröger

New plugin: Export as HTML and LaTeX.

Add some functions to the plugin API needed by the Export plugin.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1811 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 92b94aed
2007-08-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* plugins/export.c, plugins/Makefile.am, plugins/makefile.win32,
po/POTFILES.in, src/plugins.c, src/plugindata.h:
New plugin: Export as HTML and LaTeX.
Add some functions to the plugin API needed by the Export plugin.
2007-08-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com> 2007-08-17 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/plugins.c: * src/plugins.c:
......
...@@ -14,6 +14,7 @@ plugindir = $(libdir)/geany ...@@ -14,6 +14,7 @@ plugindir = $(libdir)/geany
demoplugin_la_LDFLAGS = -module -avoid-version demoplugin_la_LDFLAGS = -module -avoid-version
classbuilder_la_LDFLAGS = -module -avoid-version classbuilder_la_LDFLAGS = -module -avoid-version
htmlchars_la_LDFLAGS = -module -avoid-version htmlchars_la_LDFLAGS = -module -avoid-version
export_la_LDFLAGS = -module -avoid-version
if PLUGINS if PLUGINS
...@@ -21,7 +22,8 @@ if PLUGINS ...@@ -21,7 +22,8 @@ if PLUGINS
plugin_LTLIBRARIES = \ plugin_LTLIBRARIES = \
demoplugin.la \ demoplugin.la \
classbuilder.la \ classbuilder.la \
htmlchars.la htmlchars.la \
export.la
# Plugins not to be installed # Plugins not to be installed
#noinst_LTLIBRARIES = \ #noinst_LTLIBRARIES = \
...@@ -30,10 +32,12 @@ plugin_LTLIBRARIES = \ ...@@ -30,10 +32,12 @@ plugin_LTLIBRARIES = \
demoplugin_la_SOURCES = demoplugin.c demoplugin_la_SOURCES = demoplugin.c
classbuilder_la_SOURCES = classbuilder.c classbuilder_la_SOURCES = classbuilder.c
htmlchars_la_SOURCES = htmlchars.c htmlchars_la_SOURCES = htmlchars.c
export_la_SOURCES = export.c
demoplugin_la_LIBADD = $(GTK_LIBS) demoplugin_la_LIBADD = $(GTK_LIBS)
classbuilder_la_LIBADD = $(GTK_LIBS) classbuilder_la_LIBADD = $(GTK_LIBS)
htmlchars_la_LIBADD = $(GTK_LIBS) htmlchars_la_LIBADD = $(GTK_LIBS)
export_la_LIBADD = $(GTK_LIBS)
endif # PLUGINS endif # PLUGINS
......
This diff is collapsed.
...@@ -43,7 +43,8 @@ all: plugins ...@@ -43,7 +43,8 @@ all: plugins
plugins: \ plugins: \
htmlchars.dll \ htmlchars.dll \
demoplugin.dll \ demoplugin.dll \
classbuilder.dll classbuilder.dll \
export.dll
clean: clean:
-$(RM) deps.mak *.o *.dll -$(RM) deps.mak *.o *.dll
......
...@@ -36,3 +36,4 @@ src/vte.c ...@@ -36,3 +36,4 @@ src/vte.c
src/win32.c src/win32.c
plugins/classbuilder.c plugins/classbuilder.c
plugins/htmlchars.c plugins/htmlchars.c
plugins/export.c
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
/* The API version should be incremented whenever any plugin data types below are /* The API version should be incremented whenever any plugin data types below are
* modified. */ * modified. */
static const gint api_version = 11; static const gint api_version = 12;
/* The ABI version should be incremented whenever existing fields in the plugin /* The ABI version should be incremented whenever existing fields in the plugin
* data types below have to be changed or reordered. It should stay the same if fields * data types below have to be changed or reordered. It should stay the same if fields
...@@ -144,6 +144,8 @@ typedef struct GeanyData ...@@ -144,6 +144,8 @@ typedef struct GeanyData
struct UtilsFuncs *utils; struct UtilsFuncs *utils;
struct UIUtilsFuncs *ui; struct UIUtilsFuncs *ui;
struct SupportFuncs *support; struct SupportFuncs *support;
struct DialogFuncs *dialogs;
struct MsgWinFuncs *msgwindow;
} }
GeanyData; GeanyData;
...@@ -205,6 +207,9 @@ typedef struct ScintillaFuncs ...@@ -205,6 +207,9 @@ typedef struct ScintillaFuncs
void (*ensure_line_is_visible) (struct _ScintillaObject* sci, gint line); void (*ensure_line_is_visible) (struct _ScintillaObject* sci, gint line);
void (*scroll_caret) (struct _ScintillaObject* sci); void (*scroll_caret) (struct _ScintillaObject* sci);
gint (*find_bracematch) (struct _ScintillaObject* sci, gint pos); gint (*find_bracematch) (struct _ScintillaObject* sci, gint pos);
gint (*get_style_at) (struct _ScintillaObject *sci, gint position);
gchar (*get_char_at) (struct _ScintillaObject *sci, gint pos);
gint (*get_zoom) (struct _ScintillaObject * sci);
} }
ScintillaFuncs; ScintillaFuncs;
...@@ -219,6 +224,10 @@ typedef struct UtilsFuncs ...@@ -219,6 +224,10 @@ typedef struct UtilsFuncs
gboolean (*str_equal) (const gchar *a, const gchar *b); gboolean (*str_equal) (const gchar *a, const gchar *b);
gchar* (*str_replace) (gchar *haystack, const gchar *needle, const gchar *replacement); gchar* (*str_replace) (gchar *haystack, const gchar *needle, const gchar *replacement);
GSList* (*get_file_list) (const gchar *path, guint *length, GError **error); GSList* (*get_file_list) (const gchar *path, guint *length, GError **error);
gint (*write_file) (const gchar *filename, const gchar *text);
gchar* (*get_locale_from_utf8) (const gchar *utf8_text);
gchar* (*get_utf8_from_locale) (const gchar *locale_text);
gchar* (*remove_ext_from_filename) (const gchar *filename);
} }
UtilsFuncs; UtilsFuncs;
...@@ -229,6 +238,13 @@ typedef struct UIUtilsFuncs ...@@ -229,6 +238,13 @@ typedef struct UIUtilsFuncs
} }
UIUtilsFuncs; UIUtilsFuncs;
typedef struct DialogFuncs
{
gboolean (*show_question) (const gchar *text, ...);
void (*show_msgbox) (gint type, const gchar *text, ...);
}
DialogFuncs;
typedef struct SupportFuncs typedef struct SupportFuncs
{ {
GtkWidget* (*lookup_widget) (GtkWidget *widget, const gchar *widget_name); GtkWidget* (*lookup_widget) (GtkWidget *widget, const gchar *widget_name);
...@@ -236,6 +252,13 @@ typedef struct SupportFuncs ...@@ -236,6 +252,13 @@ typedef struct SupportFuncs
SupportFuncs; SupportFuncs;
typedef struct MsgWinFuncs
{
void (*status_add) (const gchar *format, ...);
}
MsgWinFuncs;
typedef struct GeanyCallback typedef struct GeanyCallback
{ {
gchar *signal_name; gchar *signal_name;
......
...@@ -43,6 +43,8 @@ ...@@ -43,6 +43,8 @@
#include "sciwrappers.h" #include "sciwrappers.h"
#include "ui_utils.h" #include "ui_utils.h"
#include "editor.h" #include "editor.h"
#include "dialogs.h"
#include "msgwindow.h"
#include "geanyobject.h" #include "geanyobject.h"
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
...@@ -109,7 +111,10 @@ static ScintillaFuncs sci_funcs = { ...@@ -109,7 +111,10 @@ static ScintillaFuncs sci_funcs = {
&sci_get_line_is_visible, &sci_get_line_is_visible,
&sci_ensure_line_is_visible, &sci_ensure_line_is_visible,
&sci_scroll_caret, &sci_scroll_caret,
&sci_find_bracematch &sci_find_bracematch,
&sci_get_style_at,
&sci_get_char_at,
&sci_get_zoom
}; };
static TemplateFuncs template_funcs = { static TemplateFuncs template_funcs = {
...@@ -119,7 +124,11 @@ static TemplateFuncs template_funcs = { ...@@ -119,7 +124,11 @@ static TemplateFuncs template_funcs = {
static UtilsFuncs utils_funcs = { static UtilsFuncs utils_funcs = {
&utils_str_equal, &utils_str_equal,
&utils_str_replace, &utils_str_replace,
&utils_get_file_list &utils_get_file_list,
&utils_write_file,
&utils_get_locale_from_utf8,
&utils_get_utf8_from_locale,
&utils_remove_ext_from_filename
}; };
static UIUtilsFuncs uiutils_funcs = { static UIUtilsFuncs uiutils_funcs = {
...@@ -127,10 +136,19 @@ static UIUtilsFuncs uiutils_funcs = { ...@@ -127,10 +136,19 @@ static UIUtilsFuncs uiutils_funcs = {
&ui_frame_new_with_alignment &ui_frame_new_with_alignment
}; };
static DialogFuncs dialog_funcs = {
&dialogs_show_question,
&dialogs_show_msgbox
};
static SupportFuncs support_funcs = { static SupportFuncs support_funcs = {
&lookup_widget &lookup_widget
}; };
static MsgWinFuncs msgwin_funcs = {
&msgwin_status_add
};
static GeanyData geany_data = { static GeanyData geany_data = {
NULL, NULL,
...@@ -144,7 +162,9 @@ static GeanyData geany_data = { ...@@ -144,7 +162,9 @@ static GeanyData geany_data = {
&template_funcs, &template_funcs,
&utils_funcs, &utils_funcs,
&uiutils_funcs, &uiutils_funcs,
&support_funcs &support_funcs,
&dialog_funcs,
&msgwin_funcs
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment