girara
Data Structures | Functions
tabs.h File Reference
#include "types.h"
#include <gtk/gtk.h>

Go to the source code of this file.

Data Structures

struct  girara_tab_t

Functions

void girara_tabs_enable (girara_session_t *session)
girara_tab_t * girara_tab_new (girara_session_t *session, const char *title, GtkWidget *widget, bool next_to_current, void *data)
void girara_tab_remove (girara_session_t *session, girara_tab_t *tab)
girara_tab_t * girara_tab_get (girara_session_t *session, unsigned int index)
int girara_get_number_of_tabs (girara_session_t *session)
void girara_tab_update (girara_session_t *session)
girara_tab_t * girara_tab_current_get (girara_session_t *session)
void girara_tab_current_set (girara_session_t *session, girara_tab_t *tab)
void girara_tab_title_set (girara_tab_t *tab, const char *title)
const char * girara_tab_title_get (girara_tab_t *tab)
int girara_tab_position_get (girara_session_t *session, girara_tab_t *tab)
void girara_tab_position_set (girara_session_t *session, girara_tab_t *tab, unsigned int position)

Function Documentation

int girara_get_number_of_tabs ( girara_session_t *  session)

Returns the number of tabs

Parameters:
sessionThe girara session
Returns:
The number of tabs

Definition at line 133 of file tabs.c.

girara_tab_t* girara_tab_current_get ( girara_session_t *  session)

Returns the current tab

Parameters:
sessionThe girara session
Returns:
The current tab or NULL if an error occured

Definition at line 174 of file tabs.c.

void girara_tab_current_set ( girara_session_t *  session,
girara_tab_t *  tab 
)

Sets the current tab

Parameters:
sessionThe girara session
tabThe new current tab

Definition at line 191 of file tabs.c.

girara_tab_t* girara_tab_get ( girara_session_t *  session,
unsigned int  index 
)

Returns the tab at the given index

Parameters:
sessionThe girara session
indexIndex of the tab
Returns:
The tab object or NULL if an error occured

Definition at line 121 of file tabs.c.

girara_tab_t* girara_tab_new ( girara_session_t *  session,
const char *  title,
GtkWidget *  widget,
bool  next_to_current,
void *  data 
)

Creates and adds a new tab to the tab view

Parameters:
sessionThe girara session
titleTitle of the tab (optional)
widgetDisplayed widget
next_to_currentTab should be created right next to the current one
dataCustom data
Returns:
A new tab object or NULL if an error occured

Definition at line 40 of file tabs.c.

int girara_tab_position_get ( girara_session_t *  session,
girara_tab_t *  tab 
)

Returns the position of the tab

Parameters:
sessionGirara session
tabThe tab
Returns:
The id of the tab or -1 if an error occured

Definition at line 234 of file tabs.c.

void girara_tab_position_set ( girara_session_t *  session,
girara_tab_t *  tab,
unsigned int  position 
)

Sets the new position of the tab

Parameters:
sessionGirara session
tabThe tab
positionThe new position

Definition at line 245 of file tabs.c.

void girara_tab_remove ( girara_session_t *  session,
girara_tab_t *  tab 
)

Removes and destroys a tab from the tab view

Parameters:
sessionThe girara session
tabTab

Definition at line 94 of file tabs.c.

const char* girara_tab_title_get ( girara_tab_t *  tab)

Returns the title of the tab

Parameters:
tabThe tab
Returns:
The title of the tab or NULL if an error occured

Definition at line 224 of file tabs.c.

void girara_tab_title_set ( girara_tab_t *  tab,
const char *  title 
)

Sets the shown title of the tab

Parameters:
tabThe tab
titleThe new title

Definition at line 208 of file tabs.c.

void girara_tab_update ( girara_session_t *  session)

Updates the color and states of all tabs

Parameters:
sessionThe girara session

Definition at line 143 of file tabs.c.

void girara_tabs_enable ( girara_session_t *  session)

Enables the tab view. If girara_set_view is used, the tab bar will automatically vanish and girara_tabs_enable has to be called another time to re-enable it again.

Parameters:
sessionThe girara session

Definition at line 24 of file tabs.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines