forked from Ikcelaks/qmk_sequence_transform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcursor.h
More file actions
22 lines (20 loc) · 1.31 KB
/
cursor.h
File metadata and controls
22 lines (20 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright 2024 Guillaume Stordeur <guillaume.stordeur@gmail.com>
// Copyright 2024 Matt Skalecki <ikcelaks@gmail.com>
// Copyright 2024 QKekos <q.kekos.q@gmail.com>
// SPDX-License-Identifier: Apache-2.0
#pragma once
//////////////////////////////////////////////////////////////////
// Public API
bool st_cursor_init(st_cursor_t *cursor, int history, uint8_t as_output);
uint8_t st_cursor_get_triecode(st_cursor_t *cursor);
uint16_t st_cursor_get_matched_rule(st_cursor_t *cursor);
const st_trie_payload_t *st_cursor_get_action(st_cursor_t *cursor);
uint8_t st_cursor_get_seq_ascii(st_cursor_t *cursor, uint8_t triecode);
bool st_cursor_at_end(const st_cursor_t *cursor);
bool st_cursor_next(st_cursor_t *cursor);
bool st_cursor_convert_to_output(st_cursor_t *cursor);
st_cursor_pos_t st_cursor_save(const st_cursor_t *cursor);
void st_cursor_restore(st_cursor_t *cursor, const st_cursor_pos_t *cursor_pos);
bool st_cursor_longer_than(const st_cursor_t *cursor, const st_cursor_pos_t *past_pos);
bool st_cursor_push_to_stack(st_cursor_t *cursor, st_key_stack_t *key_stack, int count);
void st_cursor_print(st_cursor_t *cursor);