Fixing warnings from doxygen:
[synfig.git] / synfig-core / trunk / src / modules / lyr_freetype / main.cpp
1 /* === S Y N F I G ========================================================= */
2 /*!     \file lyr_freetype/main.cpp
3 **      \brief Template Header
4 **
5 **      \legal
6 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
7 **
8 **      This package is free software; you can redistribute it and/or
9 **      modify it under the terms of the GNU General Public License as
10 **      published by the Free Software Foundation; either version 2 of
11 **      the License, or (at your option) any later version.
12 **
13 **      This package is distributed in the hope that it will be useful,
14 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
15 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 **      General Public License for more details.
17 **      \endlegal
18 **
19 ** === N O T E S ===========================================================
20 **
21 ** ========================================================================= */
22
23 /* === H E A D E R S ======================================================= */
24
25 #define SYNFIG_MODULE
26
27 #ifdef USING_PCH
28 #       include "pch.h"
29 #else
30 #ifdef HAVE_CONFIG_H
31 #       include <config.h>
32 #endif
33
34 #include <string.h>
35 #include <synfig/module.h>
36 #include "lyr_freetype.h"
37 #include <iostream>
38 #include <ETL/stringf>
39
40 #include <ft2build.h>
41 #include FT_FREETYPE_H
42
43 #endif
44
45 using namespace etl;
46 using namespace std;
47 using namespace synfig;
48
49 FT_Library  ft_library;
50
51 /* === E N T R Y P O I N T ================================================= */
52
53 bool freetype_constructor(synfig::ProgressCallback *cb)
54 {
55         int error;
56         if(cb)cb->task("Initializing FreeType...");
57         if ( (error = FT_Init_FreeType( &ft_library )) )
58         {
59                 if(cb)cb->error(strprintf("lyr_freetype: FreeType initialization failed. (err=%d)",error));
60                 return false;
61         }
62         return true;
63 }
64
65 void freetype_destructor()
66 {
67         std::cerr<<"freetype_destructor()"<<std::endl;
68 }
69
70 /* === E N T R Y P O I N T ================================================= */
71
72 MODULE_DESC_BEGIN(liblyr_freetype)
73         MODULE_NAME("FreeType Font Layer")
74         MODULE_DESCRIPTION("Provides a font rendering layer via FreeType")
75         MODULE_AUTHOR("Robert B. Quattlebaum")
76         MODULE_VERSION("1.0")
77         MODULE_COPYRIGHT(SYNFIG_COPYRIGHT)
78
79         MODULE_CONSTRUCTOR(freetype_constructor)
80         MODULE_DESTRUCTOR(freetype_destructor)
81 MODULE_DESC_END
82
83 MODULE_INVENTORY_BEGIN(liblyr_freetype)
84         BEGIN_LAYERS
85                 LAYER(lyr_freetype)
86                 LAYER_ALIAS(lyr_freetype,"Text")
87         END_LAYERS
88 MODULE_INVENTORY_END