girara
Loading...
Searching...
No Matches
input-history.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: Zlib */
2
3#ifndef GIRARA_INPUT_HISTORY_H
4#define GIRARA_INPUT_HISTORY_H
5
6#include <glib-object.h>
7
8#include "types.h"
9#include "macros.h"
10
12 GTypeInterface parent_iface;
13
14 /* interface methods */
15
22 void (*append)(GiraraInputHistoryIO* io, const char* input);
23
31
32 /* reserved for further methods */
33 void (*reserved1)(void);
34 void (*reserved2)(void);
35 void (*reserved3)(void);
36 void (*reserved4)(void);
37};
38
39#define GIRARA_TYPE_INPUT_HISTORY_IO (girara_input_history_io_get_type())
40#define GIRARA_INPUT_HISTORY_IO(obj) \
41 (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIO))
42#define GIRARA_IS_INPUT_HISTORY_IO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY_IO))
43#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE(obj) \
44 (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))
45
47
49
51
53 GObject parent;
54};
55
57 GObjectClass parent_class;
58
59 /* methods */
60
68 void (*append)(GiraraInputHistory* history, const char* input);
69
76 girara_list_t* (*list)(GiraraInputHistory* history);
77
85 const char* (*next)(GiraraInputHistory* history, const char* current_input);
86
94 const char* (*previous)(GiraraInputHistory* history, const char* current_input);
95
103 void (*reset)(GiraraInputHistory* history);
104
105 /* reserved for further methods */
106 void (*reserved1)(void);
107 void (*reserved2)(void);
108 void (*reserved3)(void);
109 void (*reserved4)(void);
110};
111
112#define GIRARA_TYPE_INPUT_HISTORY (girara_input_history_get_type())
113#define GIRARA_INPUT_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))
114#define GIRARA_INPUT_HISTORY_CLASS(obj) \
115 (G_TYPE_CHECK_CLASS_CAST((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
116#define GIRARA_IS_INPUT_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY))
117#define GIRARA_IS_INPUT_HISTORY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY))
118#define GIRARA_INPUT_HISTORY_GET_CLASS(obj) \
119 (G_TYPE_INSTANCE_GET_CLASS((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
120
127
135
142void girara_input_history_append(GiraraInputHistory* history, const char* input) GIRARA_VISIBLE;
143
151const char* girara_input_history_next(GiraraInputHistory* history, const char* current_input) GIRARA_VISIBLE;
152
160const char* girara_input_history_previous(GiraraInputHistory* history, const char* current_input) GIRARA_VISIBLE;
161
167void girara_input_history_reset(GiraraInputHistory* history) GIRARA_VISIBLE;
168
176
177#endif
const char * girara_input_history_previous(GiraraInputHistory *history, const char *current_input) GIRARA_VISIBLE
const char * girara_input_history_next(GiraraInputHistory *history, const char *current_input) GIRARA_VISIBLE
GiraraInputHistory * girara_input_history_new(GiraraInputHistoryIO *io) GIRARA_VISIBLE
GType girara_input_history_get_type(void) G_GNUC_CONST GIRARA_VISIBLE
void girara_input_history_reset(GiraraInputHistory *history) GIRARA_VISIBLE
GType girara_input_history_io_get_type(void) G_GNUC_CONST GIRARA_VISIBLE
void girara_input_history_append(GiraraInputHistory *history, const char *input) GIRARA_VISIBLE
void girara_input_history_io_append(GiraraInputHistoryIO *io, const char *input) GIRARA_VISIBLE
girara_list_t * girara_input_history_list(GiraraInputHistory *history) GIRARA_VISIBLE
girara_list_t * girara_input_history_io_read(GiraraInputHistoryIO *io) GIRARA_VISIBLE
#define GIRARA_VISIBLE
Definition macros.h:52
void(* append)(GiraraInputHistory *history, const char *input)
void(* reset)(GiraraInputHistory *history)
void(* append)(GiraraInputHistoryIO *io, const char *input)
struct girara_list_s girara_list_t
Definition types.h:10
struct girara_input_history_io_s GiraraInputHistoryIO
Definition types.h:38