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/bookmark.h | |
| parent | 349991bf6efe473ab9a5cbdae0a8114d72b997e3 (diff) | |
| download | crep-1566b6faa8534118c3566188181367cd0868468f.tar.gz | |
Added partial matching and introduced threads
Diffstat (limited to 'examples/dte/bookmark.h')
| -rw-r--r-- | examples/dte/bookmark.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/dte/bookmark.h b/examples/dte/bookmark.h new file mode 100644 index 0000000..5496589 --- /dev/null +++ b/examples/dte/bookmark.h @@ -0,0 +1,24 @@ +#ifndef BOOKMARK_H +#define BOOKMARK_H + +#include <stdbool.h> +#include "util/macros.h" +#include "util/ptr-array.h" +#include "view.h" +#include "window.h" + +typedef struct { + char *filename; // Needed after buffer is closed + unsigned long buffer_id; // Needed if buffer doesn't have a filename + char *pattern; // Regex from tag file (if set, line and column are 0) + unsigned long line, column; // File position (if non-zero, pattern is NULL) +} FileLocation; + +FileLocation *get_current_file_location(const View *view) NONNULL_ARGS_AND_RETURN; +bool file_location_go(Window *window, const FileLocation *loc) NONNULL_ARGS WARN_UNUSED_RESULT; +void file_location_free(FileLocation *loc) NONNULL_ARGS; + +void bookmark_push(PointerArray *bookmarks, FileLocation *loc) NONNULL_ARGS; +void bookmark_pop(Window *window, PointerArray *bookmarks) NONNULL_ARGS; + +#endif |
