girara
input-history.h
Go to the documentation of this file.
1 /* See LICENSE file for license and copyright information */
2 
3 #ifndef GIRARA_INPUT_HISTORY_H
4 #define GIRARA_INPUT_HISTORY_H
5 
6 #include <glib-object.h>
7 #include "types.h"
8 
10  GTypeInterface parent_iface;
11 
12  /* interface methods */
13 
20  void (*append)(GiraraInputHistoryIO* io, const char* input);
21 
29 
30  /* reserved for further methods */
31  void (*reserved1)(void);
32  void (*reserved2)(void);
33  void (*reserved3)(void);
34  void (*reserved4)(void);
35 };
36 
37 #define GIRARA_TYPE_INPUT_HISTORY_IO \
38  (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) \
42  (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 
46 GType girara_input_history_io_get_type(void) G_GNUC_CONST;
47 
48 void girara_input_history_io_append(GiraraInputHistoryIO* io, const char* input);
49 
51 
52 
54  GObject parent;
55 };
56 
58  GObjectClass parent_class;
59 
60  /* methods */
61 
69  void (*append)(GiraraInputHistory* history, const char* input);
70 
77  girara_list_t* (*list)(GiraraInputHistory* history);
78 
86  const char* (*next)(GiraraInputHistory* history, const char* current_input);
87 
95  const char* (*previous)(GiraraInputHistory* history, const char* current_input);
96 
104  void (*reset)(GiraraInputHistory* history);
105 
106  /* reserved for further methods */
107  void (*reserved1)(void);
108  void (*reserved2)(void);
109  void (*reserved3)(void);
110  void (*reserved4)(void);
111 };
112 
113 #define GIRARA_TYPE_INPUT_HISTORY \
114  (girara_input_history_get_type())
115 #define GIRARA_INPUT_HISTORY(obj) \
116  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))
117 #define GIRARA_INPUT_HISTORY_CLASS(obj) \
118  (G_TYPE_CHECK_CLASS_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
119 #define GIRARA_IS_INPUT_HISTORY(obj) \
120  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
121 #define GIRARA_IS_INPUT_HISTORY_CLASS(obj) \
122  (G_TYPE_CHECK_CLASS_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
123 #define GIRARA_INPUT_HISTORY_GET_CLASS(obj) \
124  (G_TYPE_INSTANCE_GET_CLASS ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
125 
131 GType girara_input_history_get_type(void) G_GNUC_CONST;
132 
139 GiraraInputHistory* girara_input_history_new(GiraraInputHistoryIO* io);
140 
147 void girara_input_history_append(GiraraInputHistory* history, const char* input);
148 
156 const char* girara_input_history_next(GiraraInputHistory* history,
157  const char* current_input);
158 
166 const char* girara_input_history_previous(GiraraInputHistory* history,
167  const char* current_input);
168 
174 void girara_input_history_reset(GiraraInputHistory* history);
175 
182 girara_list_t* girara_input_history_list(GiraraInputHistory* history);
183 
184 #endif
GiraraInputHistory * girara_input_history_new(GiraraInputHistoryIO *io)
const char * girara_input_history_previous(GiraraInputHistory *history, const char *current_input)
void girara_input_history_append(GiraraInputHistory *history, const char *input)
void girara_input_history_reset(GiraraInputHistory *history)
struct girara_input_history_io_s GiraraInputHistoryIO
Definition: types.h:208
const char * girara_input_history_next(GiraraInputHistory *history, const char *current_input)
void girara_input_history_io_append(GiraraInputHistoryIO *io, const char *input)
girara_list_t * girara_input_history_list(GiraraInputHistory *history)
GType girara_input_history_get_type(void) G_GNUC_CONST
GType girara_input_history_io_get_type(void) G_GNUC_CONST
void(* append)(GiraraInputHistoryIO *io, const char *input)
Definition: input-history.h:20
girara_list_t * girara_input_history_io_read(GiraraInputHistoryIO *io)
struct girara_list_s girara_list_t
Definition: types.h:10