diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-11-09 23:19:53 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2023-11-09 23:19:53 +0100 |
| commit | 1566b6faa8534118c3566188181367cd0868468f (patch) | |
| tree | 1de8d4b369efb5e592685a31088f798a6b63ffa1 /examples/dte/msg.h | |
| parent | 349991bf6efe473ab9a5cbdae0a8114d72b997e3 (diff) | |
| download | crep-1566b6faa8534118c3566188181367cd0868468f.tar.gz | |
Added partial matching and introduced threads
Diffstat (limited to 'examples/dte/msg.h')
| -rw-r--r-- | examples/dte/msg.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/dte/msg.h b/examples/dte/msg.h new file mode 100644 index 0000000..b23fa25 --- /dev/null +++ b/examples/dte/msg.h @@ -0,0 +1,30 @@ +#ifndef MSG_H +#define MSG_H + +#include <stdbool.h> +#include <stddef.h> +#include "bookmark.h" +#include "util/macros.h" +#include "util/ptr-array.h" +#include "util/string.h" + +typedef struct { + FileLocation *loc; + char msg[]; +} Message; + +typedef struct { + PointerArray array; + size_t pos; +} MessageArray; + +struct EditorState; + +Message *new_message(const char *msg, size_t len) RETURNS_NONNULL; +void add_message(MessageArray *msgs, Message *m) NONNULL_ARGS; +bool activate_current_message(struct EditorState *e) NONNULL_ARGS; +bool activate_current_message_save(struct EditorState *e) NONNULL_ARGS; +void clear_messages(MessageArray *msgs) NONNULL_ARGS; +String dump_messages(const MessageArray *messages) NONNULL_ARGS; + +#endif |
