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
117
123
typedef
enum
GHOSTTY_ENUM_TYPED
{
127
GHOSTTY_SEARCH_STATUS_RUNNING
= 0,
128
134
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
= 1,
135
142
GHOSTTY_SEARCH_STATUS_COMPLETE
= 2,
143
144
GHOSTTY_SEARCH_STATUS_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
145
}
GhosttySearchStatus
;
146
153
typedef
enum
GHOSTTY_ENUM_TYPED
{
156
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
= 0,
157
159
GHOSTTY_SEARCH_SCROLL_NONE
= 1,
160
161
GHOSTTY_SEARCH_SCROLL_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
162
}
GhosttySearchScroll
;
163
176
typedef
enum
GHOSTTY_ENUM_TYPED
{
178
GHOSTTY_SEARCH_DATA_STATUS
= 0,
179
186
GHOSTTY_SEARCH_DATA_NEEDLE
= 1,
187
192
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
= 2,
193
201
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
= 3,
202
208
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
= 4,
209
217
GHOSTTY_SEARCH_DATA_MATCHES
= 5,
218
233
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
= 6,
234
236
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
= 7,
237
238
GHOSTTY_SEARCH_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
239
}
GhosttySearchData
;
240
247
typedef
enum
GHOSTTY_ENUM_TYPED
{
265
GHOSTTY_SEARCH_OPT_NEEDLE
= 0,
266
282
GHOSTTY_SEARCH_OPT_SELECT_NEXT
= 1,
283
289
GHOSTTY_SEARCH_OPT_SELECT_PREV
= 2,
290
297
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
= 3,
298
299
GHOSTTY_SEARCH_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
300
}
GhosttySearchOption
;
301
326
GHOSTTY_API
GhosttyResult
ghostty_search_new
(
327
const
GhosttyAllocator
* allocator,
328
GhosttySearch
* out_search,
329
GhosttyTerminal
terminal);
330
344
GHOSTTY_API
void
ghostty_search_free
(
GhosttySearch
search);
345
363
GHOSTTY_API
GhosttyResult
ghostty_search_tick
(
364
GhosttySearch
search,
365
GhosttySearchStatus
* out_status);
366
388
GHOSTTY_API
GhosttyResult
ghostty_search_feed
(
GhosttySearch
search);
389
409
GHOSTTY_API
GhosttyResult
ghostty_search_run
(
GhosttySearch
search);
410
432
GHOSTTY_API
GhosttyResult
ghostty_search_set
(
433
GhosttySearch
search,
434
GhosttySearchOption
option,
435
const
void
* value);
436
458
GHOSTTY_API
GhosttyResult
ghostty_search_get
(
459
GhosttySearch
search,
460
GhosttySearchData
data,
461
void
* value);
462
489
GHOSTTY_API
GhosttyResult
ghostty_search_get_multi
(
490
GhosttySearch
search,
491
size_t
count,
492
const
GhosttySearchData
* keys,
493
void
** values,
494
size_t
* out_written);
495
497
498
#ifdef __cplusplus
499
}
500
#endif
501
502
#endif
/* GHOSTTY_VT_SEARCH_H */
allocator.h
GhosttySearchScroll
GhosttySearchScroll
Definition
search.h:153
GhosttySearchOption
GhosttySearchOption
Definition
search.h:247
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:123
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:176
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
@ GHOSTTY_SEARCH_SCROLL_IF_NEEDED
Definition
search.h:156
GHOSTTY_SEARCH_SCROLL_NONE
@ GHOSTTY_SEARCH_SCROLL_NONE
Definition
search.h:159
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
@ GHOSTTY_SEARCH_OPT_SELECT_SCROLL
Definition
search.h:297
GHOSTTY_SEARCH_OPT_NEEDLE
@ GHOSTTY_SEARCH_OPT_NEEDLE
Definition
search.h:265
GHOSTTY_SEARCH_OPT_SELECT_PREV
@ GHOSTTY_SEARCH_OPT_SELECT_PREV
Definition
search.h:289
GHOSTTY_SEARCH_OPT_SELECT_NEXT
@ GHOSTTY_SEARCH_OPT_SELECT_NEXT
Definition
search.h:282
GHOSTTY_SEARCH_STATUS_COMPLETE
@ GHOSTTY_SEARCH_STATUS_COMPLETE
Definition
search.h:142
GHOSTTY_SEARCH_STATUS_RUNNING
@ GHOSTTY_SEARCH_STATUS_RUNNING
Definition
search.h:127
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
@ GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
Definition
search.h:134
GHOSTTY_SEARCH_DATA_STATUS
@ GHOSTTY_SEARCH_DATA_STATUS
Definition
search.h:178
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
@ GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
Definition
search.h:233
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
@ GHOSTTY_SEARCH_DATA_SELECT_SCROLL
Definition
search.h:236
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
@ GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
Definition
search.h:192
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
@ GHOSTTY_SEARCH_DATA_SELECTED_MATCH
Definition
search.h:208
GHOSTTY_SEARCH_DATA_NEEDLE
@ GHOSTTY_SEARCH_DATA_NEEDLE
Definition
search.h:186
GHOSTTY_SEARCH_DATA_MATCHES
@ GHOSTTY_SEARCH_DATA_MATCHES
Definition
search.h:217
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
@ GHOSTTY_SEARCH_DATA_SELECTED_INDEX
Definition
search.h:201
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