GnuCash 2.4.99
gncmod-stylesheets.c
00001 /*********************************************************************
00002  * gncmod-stylesheets.c
00003  * module definition/initialization for the standard reports
00004  *
00005  * Copyright (c) 2001 Linux Developers Group, Inc.
00006  *********************************************************************/
00007 
00008 #include "config.h"
00009 
00010 #include <gmodule.h>
00011 #include <libguile.h>
00012 
00013 #include "gnc-module.h"
00014 #include "gnc-module-api.h"
00015 #include "gnc-plugin-stylesheets.h"
00016 
00017 GNC_MODULE_API_DECL(libgncmod_stylesheets)
00018 
00019 /* version of the gnc module system interface we require */
00020 int libgncmod_stylesheets_gnc_module_system_interface = 0;
00021 
00022 /* module versioning uses libtool semantics. */
00023 int libgncmod_stylesheets_gnc_module_current  = 0;
00024 int libgncmod_stylesheets_gnc_module_revision = 0;
00025 int libgncmod_stylesheets_gnc_module_age      = 0;
00026 
00027 
00028 char *
00029 libgncmod_stylesheets_gnc_module_path(void)
00030 {
00031     return g_strdup("gnucash/report/stylesheets");
00032 }
00033 
00034 char *
00035 libgncmod_stylesheets_gnc_module_description(void)
00036 {
00037     return g_strdup("Standard report stylesheet definitions");
00038 }
00039 
00040 int
00041 libgncmod_stylesheets_gnc_module_init(int refcount)
00042 {
00043     /* load the report system */
00044     if (!gnc_module_load("gnucash/report/report-system", 0))
00045     {
00046         return FALSE;
00047     }
00048 
00049     /* load the report generation scheme code */
00050     if (scm_c_eval_string("(use-modules (gnucash report stylesheets))") ==
00051             SCM_BOOL_F)
00052     {
00053         return FALSE;
00054     }
00055 
00056     /* Add menu items with C callbacks */
00057     gnc_plugin_stylesheets_create_plugin();
00058 
00059     return TRUE;
00060 }
00061 
00062 int
00063 libgncmod_stylesheets_gnc_module_end(int refcount)
00064 {
00065     return TRUE;
00066 }
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines