basic UI added
[melted_gui] / src / ui_utils.h
diff --git a/src/ui_utils.h b/src/ui_utils.h
new file mode 100644 (file)
index 0000000..9ebfce7
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ * ui_utils.h -- GTK+ 2 omnplay
+ * Copyright (C) 2011 Maksym Veremeyenko <verem@m1stereo.tv>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef UI_UTILS_H
+#define UI_UTILS_H
+
+#define GLADE_HOOKUP_OBJECT(component,widget,name)                      \
+    g_object_set_data_full (G_OBJECT (component), name,                 \
+        gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+
+#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name)               \
+    g_object_set_data (G_OBJECT (component), name, widget)
+
+#endif /* UI_UTILS_H */