aboutsummaryrefslogtreecommitdiff
path: root/src/ld-symbol-category.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ld-symbol-category.h')
-rw-r--r--src/ld-symbol-category.h42
1 files changed, 20 insertions, 22 deletions
diff --git a/src/ld-symbol-category.h b/src/ld-symbol-category.h
index 42ad8ac..21286c9 100644
--- a/src/ld-symbol-category.h
+++ b/src/ld-symbol-category.h
@@ -27,33 +27,24 @@ G_BEGIN_DECLS
((obj), LD_SYMBOL_CATEGORY, LdSymbolCategoryClass))
typedef struct _LdSymbolCategory LdSymbolCategory;
+typedef struct _LdSymbolCategoryPrivate LdSymbolCategoryPrivate;
typedef struct _LdSymbolCategoryClass LdSymbolCategoryClass;
/**
* LdSymbolCategory:
- * @parent: The parent object, may be #LdLibrary
- * or another #LdSymbolCategory.
- * @name: The name of the category.
- * @image_path: Path to the image for this category.
- * @children: Children of this category.
- */
-/* TODO: Make the public fields private and set them as properties
- * + implement setters and getters. On change the category
- * shall emit a "changed" signal in the Library.
*/
struct _LdSymbolCategory
{
/*< private >*/
GObject parent_instance;
-
-/*< public >*/
- gpointer parent;
- gchar *name;
- gchar *image_path;
- GHashTable *children;
+ LdSymbolCategoryPrivate *priv;
};
+/* TODO: If required sometime, categories (and maybe symbols) should implement
+ * a "changed" signal. This can be somewhat tricky. The library might be
+ * a good candidate for what they call a proxy. See GtkUIManager.
+ */
struct _LdSymbolCategoryClass
{
GObjectClass parent_class;
@@ -62,13 +53,20 @@ struct _LdSymbolCategoryClass
GType ld_symbol_category_get_type (void) G_GNUC_CONST;
-LdSymbolCategory *
-ld_symbol_category_new (LdLibrary *parent);
-
-/* TODO: Methods for inserting and removing children. */
-/* TODO: Create a separate ld-symbol-private.h, include it in this ld-s-c.c
- * and then assign and ref the parent category here.
- */
+LdSymbolCategory *ld_symbol_category_new (const gchar *name);
+
+/* TODO: Create properties for "name" and "image_path". */
+void ld_symbol_category_set_name (LdSymbolCategory *self, const gchar *name);
+const gchar *ld_symbol_category_get_name (LdSymbolCategory *self);
+void ld_symbol_category_set_image_path (LdSymbolCategory *self,
+ const gchar *image_path);
+const gchar *ld_symbol_category_get_image_path (LdSymbolCategory *self);
+/* TODO: Implement. */
+void ld_symbol_category_insert_child (LdSymbolCategory *self,
+ GObject *child, gint pos);
+void ld_symbol_category_remove_child (LdSymbolCategory *self,
+ GObject *child);
+GSList *ld_symbol_category_get_children (LdSymbolCategory *self);
G_END_DECLS