libghostty
Toggle main menu visibility
Loading...
Searching...
No Matches
search.h
Go to the documentation of this file.
1
6
7
#ifndef GHOSTTY_VT_SEARCH_H
8
#define GHOSTTY_VT_SEARCH_H
9
10
#include <stddef.h>
11
#include <
ghostty/vt/allocator.h
>
12
#include <
ghostty/vt/selection.h
>
13
#include <
ghostty/vt/types.h
>
14
15
#ifdef __cplusplus
16
extern
"C"
{
17
#endif
18
116
122
typedef
enum
GHOSTTY_ENUM_TYPED
{
126
GHOSTTY_SEARCH_STATUS_RUNNING
= 0,
127
133
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
= 1,
134
141
GHOSTTY_SEARCH_STATUS_COMPLETE
= 2,
142
143
GHOSTTY_SEARCH_STATUS_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
144
}
GhosttySearchStatus
;
145
152
typedef
enum
GHOSTTY_ENUM_TYPED
{
155
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
= 0,
156
158
GHOSTTY_SEARCH_SCROLL_NONE
= 1,
159
160
GHOSTTY_SEARCH_SCROLL_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
161
}
GhosttySearchScroll
;
162
175
typedef
enum
GHOSTTY_ENUM_TYPED
{
177
GHOSTTY_SEARCH_DATA_STATUS
= 0,
178
185
GHOSTTY_SEARCH_DATA_NEEDLE
= 1,
186
191
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
= 2,
192
200
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
= 3,
201
207
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
= 4,
208
216
GHOSTTY_SEARCH_DATA_MATCHES
= 5,
217
232
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
= 6,
233
235
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
= 7,
236
237
GHOSTTY_SEARCH_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
238
}
GhosttySearchData
;
239
246
typedef
enum
GHOSTTY_ENUM_TYPED
{
264
GHOSTTY_SEARCH_OPT_NEEDLE
= 0,
265
281
GHOSTTY_SEARCH_OPT_SELECT_NEXT
= 1,
282
288
GHOSTTY_SEARCH_OPT_SELECT_PREV
= 2,
289
296
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
= 3,
297
298
GHOSTTY_SEARCH_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
299
}
GhosttySearchOption
;
300
325
GHOSTTY_API
GhosttyResult
ghostty_search_new
(
326
const
GhosttyAllocator
* allocator,
327
GhosttySearch
* out_search,
328
GhosttyTerminal
terminal);
329
343
GHOSTTY_API
void
ghostty_search_free
(
GhosttySearch
search);
344
362
GHOSTTY_API
GhosttyResult
ghostty_search_tick
(
363
GhosttySearch
search,
364
GhosttySearchStatus
* out_status);
365
387
GHOSTTY_API
GhosttyResult
ghostty_search_feed
(
GhosttySearch
search);
388
408
GHOSTTY_API
GhosttyResult
ghostty_search_run
(
GhosttySearch
search);
409
431
GHOSTTY_API
GhosttyResult
ghostty_search_set
(
432
GhosttySearch
search,
433
GhosttySearchOption
option,
434
const
void
* value);
435
457
GHOSTTY_API
GhosttyResult
ghostty_search_get
(
458
GhosttySearch
search,
459
GhosttySearchData
data,
460
void
* value);
461
488
GHOSTTY_API
GhosttyResult
ghostty_search_get_multi
(
489
GhosttySearch
search,
490
size_t
count,
491
const
GhosttySearchData
* keys,
492
void
** values,
493
size_t
* out_written);
494
496
497
#ifdef __cplusplus
498
}
499
#endif
500
501
#endif
/* GHOSTTY_VT_SEARCH_H */
allocator.h
GhosttySearchScroll
GhosttySearchScroll
Definition
search.h:152
GhosttySearchOption
GhosttySearchOption
Definition
search.h:246
ghostty_search_new
GHOSTTY_API GhosttyResult ghostty_search_new(const GhosttyAllocator *allocator, GhosttySearch *out_search, GhosttyTerminal terminal)
GhosttySearch
struct GhosttySearchImpl * GhosttySearch
Definition
types.h:202
ghostty_search_run
GHOSTTY_API GhosttyResult ghostty_search_run(GhosttySearch search)
ghostty_search_tick
GHOSTTY_API GhosttyResult ghostty_search_tick(GhosttySearch search, GhosttySearchStatus *out_status)
ghostty_search_get_multi
GHOSTTY_API GhosttyResult ghostty_search_get_multi(GhosttySearch search, size_t count, const GhosttySearchData *keys, void **values, size_t *out_written)
ghostty_search_set
GHOSTTY_API GhosttyResult ghostty_search_set(GhosttySearch search, GhosttySearchOption option, const void *value)
ghostty_search_get
GHOSTTY_API GhosttyResult ghostty_search_get(GhosttySearch search, GhosttySearchData data, void *value)
GhosttySearchStatus
GhosttySearchStatus
Definition
search.h:122
ghostty_search_free
GHOSTTY_API void ghostty_search_free(GhosttySearch search)
ghostty_search_feed
GHOSTTY_API GhosttyResult ghostty_search_feed(GhosttySearch search)
GhosttySearchData
GhosttySearchData
Definition
search.h:175
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
@ GHOSTTY_SEARCH_SCROLL_IF_NEEDED
Definition
search.h:155
GHOSTTY_SEARCH_SCROLL_NONE
@ GHOSTTY_SEARCH_SCROLL_NONE
Definition
search.h:158
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
@ GHOSTTY_SEARCH_OPT_SELECT_SCROLL
Definition
search.h:296
GHOSTTY_SEARCH_OPT_NEEDLE
@ GHOSTTY_SEARCH_OPT_NEEDLE
Definition
search.h:264
GHOSTTY_SEARCH_OPT_SELECT_PREV
@ GHOSTTY_SEARCH_OPT_SELECT_PREV
Definition
search.h:288
GHOSTTY_SEARCH_OPT_SELECT_NEXT
@ GHOSTTY_SEARCH_OPT_SELECT_NEXT
Definition
search.h:281
GHOSTTY_SEARCH_STATUS_COMPLETE
@ GHOSTTY_SEARCH_STATUS_COMPLETE
Definition
search.h:141
GHOSTTY_SEARCH_STATUS_RUNNING
@ GHOSTTY_SEARCH_STATUS_RUNNING
Definition
search.h:126
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
@ GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
Definition
search.h:133
GHOSTTY_SEARCH_DATA_STATUS
@ GHOSTTY_SEARCH_DATA_STATUS
Definition
search.h:177
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
@ GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
Definition
search.h:232
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
@ GHOSTTY_SEARCH_DATA_SELECT_SCROLL
Definition
search.h:235
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
@ GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
Definition
search.h:191
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
@ GHOSTTY_SEARCH_DATA_SELECTED_MATCH
Definition
search.h:207
GHOSTTY_SEARCH_DATA_NEEDLE
@ GHOSTTY_SEARCH_DATA_NEEDLE
Definition
search.h:185
GHOSTTY_SEARCH_DATA_MATCHES
@ GHOSTTY_SEARCH_DATA_MATCHES
Definition
search.h:216
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
@ GHOSTTY_SEARCH_DATA_SELECTED_INDEX
Definition
search.h:200
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:119
selection.h
GhosttyAllocator
Definition
allocator.h:203
types.h
GhosttyResult
GhosttyResult
Definition
types.h:88
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:81
include
ghostty
vt
search.h
Generated by
1.18.0