From 6c4d699eeb7fb385b775041ba59487666e550612 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Fri, 22 Aug 2025 21:17:23 +0200 Subject: editor: start with the editor interface --- src/editor.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/editor.h (limited to 'src/editor.h') 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 + * + * 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 . + */ + +#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 -- cgit v1.2.3