girara
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#include "macros.h"
8#include "types.h"
9
11 GTypeInterface parent_iface;
12
13 /* interface methods */
14
21 void (*append)(GiraraInputHistoryIO* io, const char* input);
22
30
31 /* reserved for further methods */
32 void (*reserved1)(void);
33 void (*reserved2)(void);
34 void (*reserved3)(void);
35 void (*reserved4)(void);
36};
37
38#define GIRARA_TYPE_INPUT_HISTORY_IO \
39 (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) \
43 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY_IO))
44#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE(obj) \
45 (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))
46
48
50
52
53
55 GObject parent;
56};
57
59 GObjectClass parent_class;
60
61 /* methods */
62
70 void (*append)(GiraraInputHistory* history, const char* input);
71
78 girara_list_t* (*list)(GiraraInputHistory* history);
79
87 const char* (*next)(GiraraInputHistory* history, const char* current_input);
88
96 const char* (*previous)(GiraraInputHistory* history, const char* current_input);
97
105 void (*reset)(GiraraInputHistory* history);
106
107 /* reserved for further methods */
108 void (*reserved1)(void);
109 void (*reserved2)(void);
110 void (*reserved3)(void);
111 void (*reserved4)(void);
112};
113
114#define GIRARA_TYPE_INPUT_HISTORY \
115 (girara_input_history_get_type())
116#define GIRARA_INPUT_HISTORY(obj) \
117 (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))
118#define GIRARA_INPUT_HISTORY_CLASS(obj) \
119 (G_TYPE_CHECK_CLASS_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
120#define GIRARA_IS_INPUT_HISTORY(obj) \
121 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
122#define GIRARA_IS_INPUT_HISTORY_CLASS(obj) \
123 (G_TYPE_CHECK_CLASS_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
124#define GIRARA_INPUT_HISTORY_GET_CLASS(obj) \
125 (G_TYPE_INSTANCE_GET_CLASS ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
126
133
141
148void girara_input_history_append(GiraraInputHistory* history, const char* input) GIRARA_VISIBLE;
149
157const char* girara_input_history_next(GiraraInputHistory* history,
158 const char* current_input) GIRARA_VISIBLE;
159
167const char* girara_input_history_previous(GiraraInputHistory* history,
168 const char* current_input) GIRARA_VISIBLE;
169
175void girara_input_history_reset(GiraraInputHistory* history) GIRARA_VISIBLE;
176
184
185#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:54
void(* append)(GiraraInputHistory *history, const char *input)
Definition: input-history.h:70
void(* reset)(GiraraInputHistory *history)
void(* append)(GiraraInputHistoryIO *io, const char *input)
Definition: input-history.h:21
struct girara_list_s girara_list_t
Definition: types.h:10
struct girara_input_history_io_s GiraraInputHistoryIO
Definition: types.h:208