aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/menus/gal-view-factory.h
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/menus/gal-view-factory.h')
-rw-r--r--widgets/menus/gal-view-factory.h70
1 files changed, 39 insertions, 31 deletions
diff --git a/widgets/menus/gal-view-factory.h b/widgets/menus/gal-view-factory.h
index 376ea2ed88..7b523cb407 100644
--- a/widgets/menus/gal-view-factory.h
+++ b/widgets/menus/gal-view-factory.h
@@ -21,54 +21,62 @@
*
*/
-#ifndef _GAL_VIEW_FACTORY_H_
-#define _GAL_VIEW_FACTORY_H_
+#ifndef GAL_VIEW_FACTORY_H
+#define GAL_VIEW_FACTORY_H
#include <glib-object.h>
#include <menus/gal-view.h>
+/* Standard GObject macros */
+#define GAL_TYPE_VIEW_FACTORY \
+ (gal_view_factory_get_type ())
+#define GAL_VIEW_FACTORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), GAL_TYPE_VIEW_FACTORY, GalViewFactory))
+#define GAL_VIEW_FACTORY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), GAL_TYPE_VIEW_FACTORY, GalViewFactoryClass))
+#define GAL_IS_VIEW_FACTORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), GAL_TYPE_VIEW_FACTORY))
+#define GAL_IS_VIEW_FACTORY_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), GAL_TYPE_VIEW_FACTORY))
+#define GAL_VIEW_FACTORY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), GAL_TYPE_VIEW_FACTORY, GalViewFactoryClass))
+
G_BEGIN_DECLS
-#define GAL_VIEW_FACTORY_TYPE (gal_view_factory_get_type ())
-#define GAL_VIEW_FACTORY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GAL_VIEW_FACTORY_TYPE, GalViewFactory))
-#define GAL_VIEW_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GAL_VIEW_FACTORY_TYPE, GalViewFactoryClass))
-#define GAL_IS_VIEW_FACTORY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GAL_VIEW_FACTORY_TYPE))
-#define GAL_IS_VIEW_FACTORY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GAL_VIEW_FACTORY_TYPE))
-#define GAL_VIEW_FACTORY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GAL_VIEW_FACTORY_TYPE, GalViewFactoryClass))
+typedef struct _GalViewFactory GalViewFactory;
+typedef struct _GalViewFactoryClass GalViewFactoryClass;
-typedef struct {
- GObject base;
-} GalViewFactory;
+struct _GalViewFactory {
+ GObject parent;
+};
-typedef struct {
+struct _GalViewFactoryClass {
GObjectClass parent_class;
- /*
- * Virtual methods
- */
- const gchar *(*get_title) (GalViewFactory *factory);
- const gchar *(*get_type_code) (GalViewFactory *factory);
- GalView *(*new_view) (GalViewFactory *factory,
- const gchar *name);
-} GalViewFactoryClass;
-
-/* Standard functions */
-GType gal_view_factory_get_type (void);
+ /* Methods */
+ const gchar * (*get_title) (GalViewFactory *factory);
+ const gchar * (*get_type_code) (GalViewFactory *factory);
+ GalView * (*new_view) (GalViewFactory *factory,
+ const gchar *name);
+};
-/* Query functions */
-/* Returns already translated title. */
-const gchar *gal_view_factory_get_title (GalViewFactory *factory);
+GType gal_view_factory_get_type (void);
+const gchar * gal_view_factory_get_title (GalViewFactory *factory);
/* Returns the code for use in identifying this type of object in the
* view list. This identifier should identify this as being the
* unique factory for xml files which were written out with this
* identifier. Thus each factory should have a unique type code. */
-const gchar *gal_view_factory_get_type_code (GalViewFactory *factory);
+const gchar * gal_view_factory_get_type_code (GalViewFactory *factory);
-/* Create a new view */
-GalView *gal_view_factory_new_view (GalViewFactory *factory,
- const gchar *name);
+GalView * gal_view_factory_new_view (GalViewFactory *factory,
+ const gchar *name);
G_END_DECLS
-#endif /* _GAL_VIEW_FACTORY_H_ */
+#endif /* GAL_VIEW_FACTORY_H */