girara
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Functions
input-history.h File Reference
#include <glib-object.h>
#include "types.h"
Include dependency graph for input-history.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GiraraInputHistoryIOInterface
 
struct  GiraraInputHistory
 
struct  GiraraInputHistoryClass
 

Macros

#define GIRARA_TYPE_INPUT_HISTORY_IO   (girara_input_history_io_get_type())
 
#define GIRARA_INPUT_HISTORY_IO(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIO))
 
#define GIRARA_IS_INPUT_HISTORY_IO(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY_IO))
 
#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))
 
#define GIRARA_TYPE_INPUT_HISTORY   (girara_input_history_get_type ())
 
#define GIRARA_INPUT_HISTORY(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))
 
#define GIRARA_INPUT_HISTORY_CLASS(obj)   (G_TYPE_CHECK_CLASS_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
 
#define GIRARA_IS_INPUT_HISTORY(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
 
#define GIRARA_IS_INPUT_HISTORY_CLASS(obj)   (G_TYPE_CHECK_CLASS_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))
 
#define GIRARA_INPUT_HISTORY_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))
 

Functions

GType girara_input_history_io_get_type (void)
 
void girara_input_history_io_append (GiraraInputHistoryIO *io, const char *input)
 
girara_list_t * girara_input_history_io_read (GiraraInputHistoryIO *io)
 
GType girara_input_history_get_type (void)
 
GiraraInputHistory * girara_input_history_new (GiraraInputHistoryIO *io)
 
void girara_input_history_append (GiraraInputHistory *history, const char *input)
 
const char * girara_input_history_next (GiraraInputHistory *history, const char *current_input)
 
const char * girara_input_history_previous (GiraraInputHistory *history, const char *current_input)
 
void girara_input_history_reset (GiraraInputHistory *history)
 
girara_list_t * girara_input_history_list (GiraraInputHistory *history)
 

Macro Definition Documentation

#define GIRARA_INPUT_HISTORY (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistory))

Definition at line 115 of file input-history.h.

#define GIRARA_INPUT_HISTORY_CLASS (   obj)    (G_TYPE_CHECK_CLASS_CAST ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))

Definition at line 117 of file input-history.h.

#define GIRARA_INPUT_HISTORY_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GIRARA_TYPE_INPUT_HISTORY, GiraraInputHistoryClass))

Definition at line 123 of file input-history.h.

#define GIRARA_INPUT_HISTORY_IO (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIO))

Definition at line 39 of file input-history.h.

#define GIRARA_INPUT_HISTORY_IO_GET_INTERFACE (   obj)    (G_TYPE_INSTANCE_GET_INTERFACE((obj), GIRARA_TYPE_INPUT_HISTORY_IO, GiraraInputHistoryIOInterface))

Definition at line 43 of file input-history.h.

#define GIRARA_IS_INPUT_HISTORY (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))

Definition at line 119 of file input-history.h.

#define GIRARA_IS_INPUT_HISTORY_CLASS (   obj)    (G_TYPE_CHECK_CLASS_TYPE ((obj), GIRARA_TYPE_INPUT_HISTORY))

Definition at line 121 of file input-history.h.

#define GIRARA_IS_INPUT_HISTORY_IO (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GIRARA_TYPE_INPUT_HISTORY_IO))

Definition at line 41 of file input-history.h.

#define GIRARA_TYPE_INPUT_HISTORY   (girara_input_history_get_type ())

Definition at line 113 of file input-history.h.

#define GIRARA_TYPE_INPUT_HISTORY_IO   (girara_input_history_io_get_type())

Definition at line 37 of file input-history.h.

Function Documentation

void girara_input_history_append ( GiraraInputHistory *  history,
const char *  input 
)

Append a new line of input.

Parameters
historyan input history instance
inputthe input

Definition at line 303 of file input-history.c.

GType girara_input_history_get_type ( void  )

Returns the type of the input history.

Returns
the type
void girara_input_history_io_append ( GiraraInputHistoryIO io,
const char *  input 
)

Definition at line 14 of file input-history-io.c.

GType girara_input_history_io_get_type ( void  )
girara_list_t* girara_input_history_io_read ( GiraraInputHistoryIO io)

Definition at line 20 of file input-history-io.c.

girara_list_t* girara_input_history_list ( GiraraInputHistory *  history)

Get a list of all the inputs stored.

Parameters
historyan input history instance
Returns
a list containing all inputs

Definition at line 310 of file input-history.c.

GiraraInputHistory* girara_input_history_new ( GiraraInputHistoryIO io)

Create new input history object.

Parameters
ioa GiraraInputHistoryIO instance, may be NULL
Returns
an input history object

Definition at line 150 of file input-history.c.

const char* girara_input_history_next ( GiraraInputHistory *  history,
const char *  current_input 
)

Get the "next" input from the history

Parameters
historyan input history instance
current_inputinput used to find the "next" input
Returns
"next" input

Definition at line 317 of file input-history.c.

const char* girara_input_history_previous ( GiraraInputHistory *  history,
const char *  current_input 
)

Get the "previous" input from the history

Parameters
historyan input history instance
current_inputinput used to find the "next" input
Returns
"previous" input

Definition at line 324 of file input-history.c.

void girara_input_history_reset ( GiraraInputHistory *  history)

Reset state of the input history

Parameters
historyan input history instance

Definition at line 331 of file input-history.c.