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#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 (girara_input_history_io_get_type())
39#define GIRARA_INPUT_HISTORY_IO(obj) \
40 (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIO))
41#define GIRARA_IS_INPUT_HISTORY_IO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY_IO))
42#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE(obj) \
43 (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))
44
46
48
50
52 GObject parent;
53};
54
56 GObjectClass parent_class;
57
58 /* methods */
59
67 void (*append)(GiraraInputHistory* history, const char* input);
68
75 girara_list_t* (*list)(GiraraInputHistory* history);
76
84 const char* (*next)(GiraraInputHistory* history, const char* current_input);
85
93 const char* (*previous)(GiraraInputHistory* history, const char* current_input);
94
102 void (*reset)(GiraraInputHistory* history);
103
104 /* reserved for further methods */
105 void (*reserved1)(void);
106 void (*reserved2)(void);
107 void (*reserved3)(void);
108 void (*reserved4)(void);
109};
110
111#define GIRARA_TYPE_INPUT_HISTORY (girara_input_history_get_type())
112#define GIRARA_INPUT_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))
113#define GIRARA_INPUT_HISTORY_CLASS(obj) \
114 (G_TYPE_CHECK_CLASS_CAST((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
115#define GIRARA_IS_INPUT_HISTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY))
116#define GIRARA_IS_INPUT_HISTORY_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY))
117#define GIRARA_INPUT_HISTORY_GET_CLASS(obj) \
118 (G_TYPE_INSTANCE_GET_CLASS((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
119
126
134
141void girara_input_history_append(GiraraInputHistory* history, const char* input) GIRARA_VISIBLE;
142
150const char* girara_input_history_next(GiraraInputHistory* history, const char* current_input) GIRARA_VISIBLE;
151
159const char* girara_input_history_previous(GiraraInputHistory* history, const char* current_input) GIRARA_VISIBLE;
160
166void girara_input_history_reset(GiraraInputHistory* history) GIRARA_VISIBLE;
167
175
176#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:199