summaryrefslogtreecommitdiff
path: root/src/editor.h
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2025-08-22 21:17:23 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2025-08-22 21:17:23 +0200
commit6c4d699eeb7fb385b775041ba59487666e550612 (patch)
treebbeed327d0b05b33c4c57809af2918be445728e2 /src/editor.h
parent3926c3df7f94d8c99f1dc8d4996b1aa117aac5f9 (diff)
editor: start with the editor interface
Diffstat (limited to 'src/editor.h')
-rw-r--r--src/editor.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/editor.h b/src/editor.h
new file mode 100644
index 0000000..d0b382f
--- /dev/null
+++ b/src/editor.h
@@ -0,0 +1,35 @@
+/* parc
+ * Copyright (C) 2025 Ekaitz Zarraga <ekaitz@elenq.tech>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef EDITOR_H
+#define EDITOR_H
+
+typedef struct _editor editor;
+
+editor *editor_create (void);
+void editor_open (editor *ed, const char *path);
+void editor_destroy (editor *ed);
+
+/* TODO */
+void editor_move_cursor (editor *ed, size_t where);
+void editor_insert_at (editor *ed, size_t where, const char *x);
+void editor_delete_at (editor *ed, size_t where, size_t count);
+
+/* Debug only */
+void editor_display (editor *ed);
+
+#endif