summaryrefslogtreecommitdiff
path: root/src/ld-document.h
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2010-09-18 08:55:13 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2010-09-19 19:12:36 +0200
commitb66704114ef4888c0538919d9027a5f7889813de (patch)
treedf3669fb308510ff952a4fe7c7e921b1b700e679 /src/ld-document.h
parent65bbe06267a129e56f26a74297f7a837841a41eb (diff)
downloadlogdiag-b66704114ef4888c0538919d9027a5f7889813de.tar.gz
logdiag-b66704114ef4888c0538919d9027a5f7889813de.tar.xz
logdiag-b66704114ef4888c0538919d9027a5f7889813de.zip
Little improvements, overall cleanup.
Diffstat (limited to 'src/ld-document.h')
-rw-r--r--src/ld-document.h40
1 files changed, 26 insertions, 14 deletions
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 */