]> git.draconx.ca Git - upkg.git/commitdiff
uobject: Rename some interface-related identifiers.
authorNick Bowler <nbowler@draconx.ca>
Mon, 28 Mar 2011 22:53:36 +0000 (18:53 -0400)
committerNick Bowler <nbowler@draconx.ca>
Mon, 28 Mar 2011 22:53:36 +0000 (18:53 -0400)
More changes to align with GOB2's expectations.

src/engine/music.c
src/uobject/exportable.c
src/uobject/exportable.h
src/uobject/loadable.c
src/uobject/loadable.h

index 55253feee7a8c86444d58d92cd27b1356b094f50..345fc3536499575eed27f1e31bf5c5f38668ddf6 100644 (file)
@@ -35,12 +35,12 @@ struct music_priv {
        unsigned loaded;
 };
 
-static void exportable_init(UObjectExportable *);
-static void loadable_init(UObjectLoadable *);
+static void exportable_init(UObjectExportableIface *);
+static void loadable_init(UObjectLoadableIface *);
 
 G_DEFINE_DYNAMIC_TYPE_EXTENDED(EngineMusic, engine_music, U_TYPE_OBJECT, 0,
-       G_IMPLEMENT_INTERFACE(U_OBJECT_TYPE_EXPORTABLE, exportable_init)
-       G_IMPLEMENT_INTERFACE(U_OBJECT_TYPE_LOADABLE, loadable_init)
+       G_IMPLEMENT_INTERFACE(U_TYPE_OBJECT_EXPORTABLE, exportable_init)
+       G_IMPLEMENT_INTERFACE(U_TYPE_OBJECT_LOADABLE, loadable_init)
 );
 
 static int load(GObject *o)
@@ -109,13 +109,13 @@ static int export_name(GObject *o, char *buf, size_t n)
        return rc;
 }
 
-static void exportable_init(UObjectExportable *e)
+static void exportable_init(UObjectExportableIface *e)
 {
        e->export      = export;
        e->export_name = export_name;
 }
 
-static void loadable_init(UObjectLoadable *l)
+static void loadable_init(UObjectLoadableIface *l)
 {
        l->load   = load;
        l->unload = unload;
index e927ba66b57fec2f2bbfc80f905e81717834b4c8..9cb1de1240a7580fc9d0ee56f8dec983f8660d42 100644 (file)
@@ -25,7 +25,7 @@ GType u_object_exportable_get_type(void)
        static GType type = 0;
        if (type == 0) {
                static const GTypeInfo info = {
-                       sizeof (UObjectExportable),
+                       sizeof (UObjectExportableIface),
                        NULL,
                        NULL,
                };
index 2d427df578dffff5a2653947ecdaed9de551d120..d3e9ce869c9c781cee1b72da79dc821fee7ef5c1 100644 (file)
 #include <stdio.h>
 #include <glib-object.h>
 
-#define U_OBJECT_TYPE_EXPORTABLE (u_object_exportable_get_type())
+#define U_TYPE_OBJECT_EXPORTABLE (u_object_exportable_get_type())
 #define U_OBJECT_EXPORTABLE(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, \
-       U_OBJECT_TYPE_EXPORTABLE, UObjectExportable)
+       U_TYPE_OBJECT_EXPORTABLE, UObjectExportableIface)
 #define U_OBJECT_IS_EXPORTABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, \
-       U_OBJECT_TYPE_EXPORTABLE)
+       U_TYPE_OBJECT_EXPORTABLE)
 #define U_OBJECT_EXPORTABLE_GET_INTERFACE(inst) G_TYPE_INSTANCE_GET_INTERFACE \
-       (inst, U_OBJECT_TYPE_EXPORTABLE, UObjectExportable)
+       (inst, U_TYPE_OBJECT_EXPORTABLE, UObjectExportableIface)
 
-typedef struct UObjectExportable UObjectExportable;
+typedef struct UObjectExportableIface UObjectExportableIface;
 
 /*
  * Interface for UObjects that support exporting to a file.  For example, a
  * texture might be saved to disk as a PNG image for editing.
  */
-struct UObjectExportable {
+struct UObjectExportableIface {
        GTypeInterface parent;
 
        int (*export)(GObject *obj, FILE *f);
index 0475d9ad73df8150aa17c89c271fe653c4ae3300..8ed00ffdb3ad7d0bbdc0a33a0ce3b1a7391ed446 100644 (file)
@@ -25,7 +25,7 @@ GType u_object_loadable_get_type(void)
        static GType type = 0;
        if (type == 0) {
                static const GTypeInfo info = {
-                       sizeof (UObjectLoadable),
+                       sizeof (UObjectLoadableIface),
                        NULL,
                        NULL,
                };
index e5de5ad00af78199161cc123d32b11e3622ee9f3..296366b6272c6d7c4ecf0566c39d6700ae221891 100644 (file)
 #include <stdio.h>
 #include <glib-object.h>
 
-#define U_OBJECT_TYPE_LOADABLE (u_object_loadable_get_type())
+#define U_TYPE_OBJECT_LOADABLE (u_object_loadable_get_type())
 #define U_OBJECT_LOADABLE(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, \
-       U_OBJECT_TYPE_LOADABLE, UObjectLoadable)
+       U_TYPE_OBJECT_LOADABLE, UObjectLoadableIface)
 #define U_OBJECT_IS_LOADABLE(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, \
-       U_OBJECT_TYPE_LOADABLE)
+       U_TYPE_OBJECT_LOADABLE)
 #define U_OBJECT_LOADABLE_GET_INTERFACE(inst) G_TYPE_INSTANCE_GET_INTERFACE \
-       (inst, U_OBJECT_TYPE_LOADABLE, UObjectLoadable)
+       (inst, U_TYPE_OBJECT_LOADABLE, UObjectLoadableIface)
 
-typedef struct UObjectLoadable UObjectLoadable;
+typedef struct UObjectLoadableIface UObjectLoadableIface;
 
 /*
  * Interface for UObjects supporting "load" and "unload".  These are generally
@@ -38,7 +38,7 @@ typedef struct UObjectLoadable UObjectLoadable;
  * useful -- textures and sounds, for example -- where you might want to keep
  * around instances but the actual texture or sound data is not needed.
  */
-struct UObjectLoadable {
+struct UObjectLoadableIface {
        GTypeInterface parent;
 
        int (*load)(GObject *obj);