summaryrefslogtreecommitdiffstats
path: root/languages/cpp/newclass_templates/gtk_source
blob: aa5f05ea9784e41ac6d4f95ddc137e4076b98d3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "$HEADER$"

$CLASSNAME$* $CLASSNAME$_new(void)
{
    $CLASSNAME$* self;
    self = g_new($CLASSNAME$, 1);
    if(NULL != self)
    {
        if(!$CLASSNAME$_init(self))
        {
            g_free(self);
            self = NULL;
        }
    }
    return self;
}

void $CLASSNAME$_delete($CLASSNAME$* self)
{
    g_return_if_fail(NULL != self);
    $CLASSNAME$_end(self);
    g_free(self);
}

gboolean $CLASSNAME$_init($CLASSNAME$* self)
{
    /* TODO: put init code here */

    return TRUE;
}

void $CLASSNAME$_end($CLASSNAME$* self)
{
    /* TODO: put deinit code here */
}