diff options
Diffstat (limited to 'src/editor.h')
-rw-r--r-- | src/editor.h | 35 |
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 |