libghostty-vt
0.0.0
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
39
45
typedef
enum
GHOSTTY_ENUM_TYPED
{
49
GHOSTTY_SEARCH_STATUS_RUNNING
= 0,
50
56
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
= 1,
57
64
GHOSTTY_SEARCH_STATUS_COMPLETE
= 2,
65
66
GHOSTTY_SEARCH_STATUS_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
67
}
GhosttySearchStatus
;
68
75
typedef
enum
GHOSTTY_ENUM_TYPED
{
78
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
= 0,
79
81
GHOSTTY_SEARCH_SCROLL_NONE
= 1,
82
83
GHOSTTY_SEARCH_SCROLL_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
84
}
GhosttySearchScroll
;
85
98
typedef
enum
GHOSTTY_ENUM_TYPED
{
104
GHOSTTY_SEARCH_DATA_INVALID
= 0,
105
107
GHOSTTY_SEARCH_DATA_STATUS
= 1,
108
115
GHOSTTY_SEARCH_DATA_NEEDLE
= 2,
116
121
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
= 3,
122
130
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
= 4,
131
137
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
= 5,
138
146
GHOSTTY_SEARCH_DATA_MATCHES
= 6,
147
162
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
= 7,
163
165
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
= 8,
166
167
GHOSTTY_SEARCH_DATA_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
168
}
GhosttySearchData
;
169
176
typedef
enum
GHOSTTY_ENUM_TYPED
{
182
GHOSTTY_SEARCH_OPT_INVALID
= 0,
183
201
GHOSTTY_SEARCH_OPT_NEEDLE
= 1,
202
210
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
= 4,
211
212
GHOSTTY_SEARCH_OPT_MAX_VALUE = GHOSTTY_ENUM_MAX_VALUE,
213
}
GhosttySearchOption
;
214
239
GHOSTTY_API
GhosttyResult
ghostty_search_new
(
240
const
GhosttyAllocator
* allocator,
241
GhosttySearch
* out_search,
242
GhosttyTerminal
terminal);
243
257
GHOSTTY_API
void
ghostty_search_free
(
GhosttySearch
search);
258
276
GHOSTTY_API
GhosttyResult
ghostty_search_tick
(
277
GhosttySearch
search,
278
GhosttySearchStatus
* out_status);
279
301
GHOSTTY_API
GhosttyResult
ghostty_search_feed
(
GhosttySearch
search);
302
322
GHOSTTY_API
GhosttyResult
ghostty_search_run
(
GhosttySearch
search);
323
356
GHOSTTY_API
GhosttyResult
ghostty_search_select_next
(
GhosttySearch
search);
357
374
GHOSTTY_API
GhosttyResult
ghostty_search_select_prev
(
GhosttySearch
search);
375
400
GHOSTTY_API
GhosttyResult
ghostty_search_set
(
401
GhosttySearch
search,
402
GhosttySearchOption
option,
403
const
void
* value);
404
427
GHOSTTY_API
GhosttyResult
ghostty_search_get
(
428
GhosttySearch
search,
429
GhosttySearchData
data,
430
void
* value);
431
464
GHOSTTY_API
GhosttyResult
ghostty_search_get_multi
(
465
GhosttySearch
search,
466
size_t
count,
467
const
GhosttySearchData
* keys,
468
void
** values,
469
size_t
* out_written);
470
472
473
#ifdef __cplusplus
474
}
475
#endif
476
477
#endif
/* GHOSTTY_VT_SEARCH_H */
allocator.h
GhosttyResult
GhosttyResult
Definition
types.h:143
GHOSTTY_ENUM_TYPED
#define GHOSTTY_ENUM_TYPED
Definition
types.h:124
GhosttySearchScroll
GhosttySearchScroll
Definition
search.h:75
GhosttySearchOption
GhosttySearchOption
Definition
search.h:176
ghostty_search_select_next
GHOSTTY_API GhosttyResult ghostty_search_select_next(GhosttySearch search)
ghostty_search_new
GHOSTTY_API GhosttyResult ghostty_search_new(const GhosttyAllocator *allocator, GhosttySearch *out_search, GhosttyTerminal terminal)
GhosttySearch
struct GhosttySearchImpl * GhosttySearch
Definition
types.h:287
ghostty_search_select_prev
GHOSTTY_API GhosttyResult ghostty_search_select_prev(GhosttySearch search)
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:45
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:98
GHOSTTY_SEARCH_SCROLL_IF_NEEDED
@ GHOSTTY_SEARCH_SCROLL_IF_NEEDED
Definition
search.h:78
GHOSTTY_SEARCH_SCROLL_NONE
@ GHOSTTY_SEARCH_SCROLL_NONE
Definition
search.h:81
GHOSTTY_SEARCH_OPT_SELECT_SCROLL
@ GHOSTTY_SEARCH_OPT_SELECT_SCROLL
Definition
search.h:210
GHOSTTY_SEARCH_OPT_NEEDLE
@ GHOSTTY_SEARCH_OPT_NEEDLE
Definition
search.h:201
GHOSTTY_SEARCH_OPT_INVALID
@ GHOSTTY_SEARCH_OPT_INVALID
Definition
search.h:182
GHOSTTY_SEARCH_STATUS_COMPLETE
@ GHOSTTY_SEARCH_STATUS_COMPLETE
Definition
search.h:64
GHOSTTY_SEARCH_STATUS_RUNNING
@ GHOSTTY_SEARCH_STATUS_RUNNING
Definition
search.h:49
GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
@ GHOSTTY_SEARCH_STATUS_FEED_REQUIRED
Definition
search.h:56
GHOSTTY_SEARCH_DATA_STATUS
@ GHOSTTY_SEARCH_DATA_STATUS
Definition
search.h:107
GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
@ GHOSTTY_SEARCH_DATA_VIEWPORT_MATCHES
Definition
search.h:162
GHOSTTY_SEARCH_DATA_INVALID
@ GHOSTTY_SEARCH_DATA_INVALID
Definition
search.h:104
GHOSTTY_SEARCH_DATA_SELECT_SCROLL
@ GHOSTTY_SEARCH_DATA_SELECT_SCROLL
Definition
search.h:165
GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
@ GHOSTTY_SEARCH_DATA_TOTAL_MATCHES
Definition
search.h:121
GHOSTTY_SEARCH_DATA_SELECTED_MATCH
@ GHOSTTY_SEARCH_DATA_SELECTED_MATCH
Definition
search.h:137
GHOSTTY_SEARCH_DATA_NEEDLE
@ GHOSTTY_SEARCH_DATA_NEEDLE
Definition
search.h:115
GHOSTTY_SEARCH_DATA_MATCHES
@ GHOSTTY_SEARCH_DATA_MATCHES
Definition
search.h:146
GHOSTTY_SEARCH_DATA_SELECTED_INDEX
@ GHOSTTY_SEARCH_DATA_SELECTED_INDEX
Definition
search.h:130
GhosttyTerminal
struct GhosttyTerminalImpl * GhosttyTerminal
Definition
types.h:196
selection.h
GhosttyAllocator
Definition
allocator.h:164
types.h
include
ghostty
vt
search.h
Generated by
1.17.0