diff -r de6836a8b324 -r 54ebd3dcae16 doc/C-HOWTO.dox --- a/doc/C-HOWTO.dox Mon Sep 23 13:50:52 2013 +0530 +++ b/doc/C-HOWTO.dox Mon Sep 23 14:03:05 2013 +0530 @@ -14,20 +14,15 @@ All plugins must have @c PURPLE_PLUGINS defined and the definition must be before including any libpurple, Pidgin, or Finch header files. Failure to do - so can lead to strange errors that are hard to diagnose. Just don't forget! + so can lead to strange errors that are hard to diagnose. Including purple.h + will define this for you. @section hello_world Hello World! I know every tutorial has a hello world, so why should libpurple be any different? @code -#define PURPLE_PLUGINS - -#include - -#include "notify.h" -#include "plugin.h" -#include "version.h" +#include static gboolean plugin_load(PurplePlugin *plugin) { @@ -80,18 +75,9 @@ @endcode - Okay, so what does all this mean? We start off by defining @c PURPLE_PLUGINS - like described before. Next we include glib.h, mainly for gboolean and the - glib wrappers of the standard C types. - - Next, we include plugin.h which has all the plugin specific stuff that we - need. For example: @c PurplePlugin, @c PurplePluginInfo, - @c PURPLE_PLUGIN_MAGIC, and @c PURPLE_INIT_PLUGIN(). - - Our last include is version.h which defines @c PURPLE_MAJOR_VERSION, and - @c PURPLE_MINOR_VERSION. There is not much you need to know about these, - except that they are required and will stop your plugin from crashing Pidgin - when something has changed that your plugin does not know about yet. + Okay, so what does all this mean? We start off by including purple.h. This + file defines @c PURPLE_PLUGINS as described before so that we don't have to + manually define it. It also includes all the libpurple header files. @c plugin_load is not required. It is called when the plugin is loaded so that you can initialize any variables and so on. In this plugin we'll just