summaryrefslogtreecommitdiffstats
path: root/languages/cpp/newclass_templates/gtk_source
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/newclass_templates/gtk_source')
-rw-r--r--languages/cpp/newclass_templates/gtk_source35
1 files changed, 35 insertions, 0 deletions
diff --git a/languages/cpp/newclass_templates/gtk_source b/languages/cpp/newclass_templates/gtk_source
new file mode 100644
index 00000000..aa5f05ea
--- /dev/null
+++ b/languages/cpp/newclass_templates/gtk_source
@@ -0,0 +1,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 */
+}