From b66704114ef4888c0538919d9027a5f7889813de Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sat, 18 Sep 2010 08:55:13 +0200
Subject: Little improvements, overall cleanup.
---
src/ld-document.h | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
(limited to 'src/ld-document.h')
diff --git a/src/ld-document.h b/src/ld-document.h
index 999a423..cc7266b 100644
--- a/src/ld-document.h
+++ b/src/ld-document.h
@@ -27,12 +27,13 @@ G_BEGIN_DECLS
((obj), LD_DOCUMENT, LdDocumentClass))
typedef struct _LdDocument LdDocument;
-/*typedef struct _LdDocumentPrivate LdDocumentPrivate;*/
typedef struct _LdDocumentClass LdDocumentClass;
/**
* LdDocument:
+ *
+ * A document object.
*/
struct _LdDocument
{
@@ -55,34 +56,45 @@ gboolean ld_document_new_from_file (const char *file_name, GError *error);
gboolean ld_document_save_to_file (const char *file_name, GError *error);
#if 0
+/* ===== Data proposal ===================================================== */
+typedef struct _LdDocumentPrivate LdDocumentPrivate;
+
/*
* LdDocumentPrivate:
* @objects: All the objects in the document.
+ * @selection: All currently selected objects.
*/
struct _LdDocumentPrivate
{
GSList *objects;
+ GSList *selection;
};
-/** The contents of the document have changed. */
-signal documentChanged (...);
+/* ===== Interface proposal ================================================ */
+/* The contents of the document have changed. */
+signal document-changed (...)
+
+/* Add a symbol to the document at specified coordinates. */
+/* TODO: Should the coordinates be double or int? */
+void
+ld_document_add_symbol (LdSymbol *symbol, x, y);
+
+/* Parse a document in JSON and insert it into the document. */
+gboolean
+ld_document_insert_json (LdDocument *self, GError *error);
-/* TODO: A list of objects: */
+/* TODO: Create an interface for a list of this object: */
+/* NOTE: In the future, labels will be also supported. */
LdDocumentSymbol
-LdDocumentLabel
-ld_document_add_symbol (LdSymbol *symbol, x, y);
+/* TODO: Create an interface for wires between pins of various symbols. */
-/* XXX: Separated lists of objects
- * or a single list for all objects?
- */
-/* TODO: Wires. */
+/* TODO: Create an interface for object selection. */
ld_document_selection_...
+
+gchar *
ld_document_selection_get_json (LdDocument *self);
-ld_document_insert_json (LdDocument *self);
-/** Go back or forward in the history of changes. */
-/* TODO: An interface that informs about the history. */
-ld_document_history_go (LdDocument *self);
+
#endif /* 0 */
--
cgit v1.2.3-70-g09d2