<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 06/08/2013 02:31 AM, Chow Loong Jin
wrote:<br>
</div>
<blockquote cite="mid:20130608093155.GA11184@gmail.com" type="cite">
<pre wrap="">On Sat, Jun 08, 2013 at 05:59:51PM +1000, Lex Trotman wrote:
</pre>
<blockquote type="cite">
<pre wrap="">[...]
"for non autotools experts" I said, that includes not knowing how to
program in m4 :-)
Unless you are telling me just cut and paste of the code fragments in
hacking is all thats needed?
</pre>
</blockquote>
<pre wrap="">
Actually cutting and pasting the code fragments in HACKING should be enough for
most cases. There are also plenty of examples (other plugins) to look at if
anything extra needs to be done.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.geany.org">Devel@lists.geany.org</a>
<a class="moz-txt-link-freetext" href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel">https://lists.geany.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
</blockquote>
The example below is what I came up with after a few minutes
checking out your documentation.<br>
<br>
It didn't take me long to create this basic plugin. However, I
reserve the right to bitch about the level of documentation for the
data types GeanyPlugin, GeanyData and GeanyFunctions, although
GeanyFunctions seems really transparent, just exposing Geany
functions (maybe thats how its file name was decided).<br>
<br>
As a nit, I don't understand why the plugin_init function is passed
the GeanyData parameter. Seems superfluous to me. Note that I ignore
it in the example, and in all plugins I've written to date. Is it
not the same as the global *geany_data? If not, then I'd say that
needs documentation.<br>
<br>
One thing I could ask for is a reference in the docs to where I can
find the correspondence between api and abi. Maybe thats the wrong
question, but anyway, how do i know which abi version I need? This
is in regards to PLUGIN_VERSION_CHECK(xxx)<br>
<br>
---------------- main.cpp -----------------------------<br>
/*<br>
* <a class="moz-txt-link-freetext" href="http://www.geany.org/manual/reference/">http://www.geany.org/manual/reference/</a><br>
* <a class="moz-txt-link-freetext" href="http://www.geany.org/manual/reference/howto.html">http://www.geany.org/manual/reference/howto.html</a><br>
* <a class="moz-txt-link-freetext" href="http://www.geany.org/manual/reference/guidelines.html">http://www.geany.org/manual/reference/guidelines.html</a><br>
*/<br>
<br>
#include <geanyplugin.h><br>
<br>
GeanyPlugin *geany_plugin;<br>
GeanyData *geany_data;<br>
GeanyFunctions *geany_functions;<br>
<br>
PLUGIN_VERSION_CHECK(211)<br>
<br>
PLUGIN_SET_INFO("Hello World", "Just another tool to say hello
world",<br>
"1.0", "Joe Doe <a class="moz-txt-link-rfc2396E" href="mailto:joe.doe@example.org"><joe.doe@example.org></a>");<br>
<br>
extern "C" void plugin_init(GeanyData *)<br>
{<br>
}<br>
<br>
extern "C" void plugin_cleanup(void)<br>
{<br>
}<br>
<br>
------------ makefile -----------------------------<br>
<br>
debug/helloworld.so: debug/main.o <br>
@echo Creating library<br>
@gcc -o debug/helloworld.so -shared `pkg-config --libs geany`
debug/main.o <br>
<br>
debug/main.o: ../src/main.cpp <br>
@echo debug/main.o<br>
@g++ -o debug/main.o -c ../src/main.cpp -I../src -std=gnu++0x
-fPIC `pkg-config --cflags geany` -g -ggdb -ggdb3 -ansi -W -Wall
-Wundef -O2 -MT debug/main.o -MF debug/main.o.d -MMD<br>
-include debug/main.o.d<br>
<br>
<br>
<br>
</body>
</html>