girara
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions
completion.c File Reference
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "completion.h"
#include "internal.h"
#include "session.h"
#include "settings.h"
#include "datastructures.h"
#include "utils.h"

Go to the source code of this file.

Data Structures

struct  girara_internal_completion_entry_t
struct  girara_completion_element_t
struct  girara_completion_group_t
struct  girara_completion_t

Functions

girara_completion_t * girara_completion_init ()
girara_completion_group_t * girara_completion_group_create (girara_session_t *UNUSED(session), const char *name)
void girara_completion_add_group (girara_completion_t *completion, girara_completion_group_t *group)
void girara_completion_group_free (girara_completion_group_t *group)
void girara_completion_free (girara_completion_t *completion)
void girara_completion_group_add_element (girara_completion_group_t *group, const char *name, const char *description)
bool girara_isc_completion (girara_session_t *session, girara_argument_t *argument, girara_event_t *UNUSED(event), unsigned int UNUSED(t))

Function Documentation

void girara_completion_add_group ( girara_completion_t *  completion,
girara_completion_group_t *  group 
)

Adds an group to a completion object

Parameters
completionThe completion object
groupThe completion group

Definition at line 94 of file completion.c.

void girara_completion_free ( girara_completion_t *  completion)

Frees an completion and all of its groups and elements

Parameters
completionThe completion

Definition at line 115 of file completion.c.

void girara_completion_group_add_element ( girara_completion_group_t *  group,
const char *  value,
const char *  description 
)

Adds an element to a completion group

Parameters
groupThe completion group
valueValue of the entry
descriptionDescription of the entry

Definition at line 125 of file completion.c.

girara_completion_group_t* girara_completion_group_create ( girara_session_t *  UNUSEDsession,
const char *  name 
)

Definition at line 77 of file completion.c.

void girara_completion_group_free ( girara_completion_group_t *  group)

Frees a completion group

Parameters
groupThe group

Definition at line 103 of file completion.c.

girara_completion_t* girara_completion_init ( )

Creates an girara completion object

Returns
Completion object
NULL An error occured

Definition at line 67 of file completion.c.

bool girara_isc_completion ( girara_session_t *  session,
girara_argument_t *  argument,
girara_event_t *  UNUSEDevent,
unsigned int   UNUSED
)

Definition at line 139 of file completion.c.