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>
* src/plugins.c:
......
......@@ -14,6 +14,7 @@ plugindir = $(libdir)/geany
demoplugin_la_LDFLAGS = -module -avoid-version
classbuilder_la_LDFLAGS = -module -avoid-version
htmlchars_la_LDFLAGS = -module -avoid-version
export_la_LDFLAGS = -module -avoid-version
if PLUGINS
......@@ -21,7 +22,8 @@ if PLUGINS
plugin_LTLIBRARIES = \
demoplugin.la \
classbuilder.la \
htmlchars.la
htmlchars.la \
export.la
# Plugins not to be installed
#noinst_LTLIBRARIES = \
......@@ -30,10 +32,12 @@ plugin_LTLIBRARIES = \
demoplugin_la_SOURCES = demoplugin.c
classbuilder_la_SOURCES = classbuilder.c
htmlchars_la_SOURCES = htmlchars.c
export_la_SOURCES = export.c
demoplugin_la_LIBADD = $(GTK_LIBS)
classbuilder_la_LIBADD = $(GTK_LIBS)
htmlchars_la_LIBADD = $(GTK_LIBS)
export_la_LIBADD = $(GTK_LIBS)
endif # PLUGINS
......
This diff is collapsed.
......@@ -43,7 +43,8 @@ all: plugins
plugins: \
htmlchars.dll \
demoplugin.dll \
classbuilder.dll
classbuilder.dll \
export.dll
clean:
-$(RM) deps.mak *.o *.dll
......
......@@ -36,3 +36,4 @@ src/vte.c
src/win32.c
plugins/classbuilder.c
plugins/htmlchars.c
plugins/export.c
......@@ -68,7 +68,7 @@
/* The API version should be incremented whenever any plugin data types below are
* 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
* data types below have to be changed or reordered. It should stay the same if fields
......@@ -144,6 +144,8 @@ typedef struct GeanyData
struct UtilsFuncs *utils;
struct UIUtilsFuncs *ui;
struct SupportFuncs *support;
struct DialogFuncs *dialogs;
struct MsgWinFuncs *msgwindow;
}
GeanyData;
......@@ -205,6 +207,9 @@ typedef 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);
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;
......@@ -219,6 +224,10 @@ 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);
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;
......@@ -229,6 +238,13 @@ typedef struct UIUtilsFuncs
}
UIUtilsFuncs;
typedef struct DialogFuncs
{
gboolean (*show_question) (const gchar *text, ...);
void (*show_msgbox) (gint type, const gchar *text, ...);
}
DialogFuncs;
typedef struct SupportFuncs
{
GtkWidget* (*lookup_widget) (GtkWidget *widget, const gchar *widget_name);
......@@ -236,6 +252,13 @@ typedef struct SupportFuncs
SupportFuncs;
typedef struct MsgWinFuncs
{
void (*status_add) (const gchar *format, ...);
}
MsgWinFuncs;
typedef struct GeanyCallback
{
gchar *signal_name;
......
......@@ -43,6 +43,8 @@
#include "sciwrappers.h"
#include "ui_utils.h"
#include "editor.h"
#include "dialogs.h"
#include "msgwindow.h"
#include "geanyobject.h"
#ifdef G_OS_WIN32
......@@ -109,7 +111,10 @@ static ScintillaFuncs sci_funcs = {
&sci_get_line_is_visible,
&sci_ensure_line_is_visible,
&sci_scroll_caret,
&sci_find_bracematch
&sci_find_bracematch,
&sci_get_style_at,
&sci_get_char_at,
&sci_get_zoom
};
static TemplateFuncs template_funcs = {
......@@ -119,7 +124,11 @@ static TemplateFuncs template_funcs = {
static UtilsFuncs utils_funcs = {
&utils_str_equal,
&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 = {
......@@ -127,10 +136,19 @@ static UIUtilsFuncs uiutils_funcs = {
&ui_frame_new_with_alignment
};
static DialogFuncs dialog_funcs = {
&dialogs_show_question,
&dialogs_show_msgbox
};
static SupportFuncs support_funcs = {
&lookup_widget
};
static MsgWinFuncs msgwin_funcs = {
&msgwin_status_add
};
static GeanyData geany_data = {
NULL,
......@@ -144,7 +162,9 @@ static GeanyData geany_data = {
&template_funcs,
&utils_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