calltree.h 1.89 KB
Newer Older
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
1 2
/*
 *  Copyright (C) 2007 Savoir-Faire Linux inc.
3
 *  Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
4
 *
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
5 6
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
7
 *  the Free Software Foundation; either version 3 of the License, or
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
8
 *  (at your option) any later version.
9
 *
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
10 11 12 13
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
14
 *
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
15 16 17 18
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
19

Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
20 21 22 23
#ifndef __CALLTREE_H__
#define __CALLTREE_H__

#include <gtk/gtk.h>
Emmanuel Milou's avatar
Emmanuel Milou committed
24

25
#include <calllist.h>
areversat's avatar
areversat committed
26
#include <calltab.h>
Emmanuel Milou's avatar
Emmanuel Milou committed
27
#include <timestamp.h>
28

Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
29

Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
30 31 32
/** @file calltree.h
  * @brief The GtkTreeView that list calls in the main window.
  */
areversat's avatar
areversat committed
33

areversat's avatar
areversat committed
34
GtkToolItem * historyButton;
35
GtkToolItem * contactButton;
areversat's avatar
areversat committed
36

areversat's avatar
areversat committed
37
calltab_t* active_calltree;
38 39 40 41
/**
 * Create a new widget calltree
 * @return GtkWidget* A new widget
 */
42
void create_call_tree(calltab_t* tab);
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
43

44 45 46
/**
 * Update the toolbar's buttons state, according to the call state
 */
47 48
void toolbar_update_buttons();

49 50 51 52
/**
 * Add a call in the calltree
 * @param c The call to add
 */
53
void update_call_tree_add (calltab_t* ct, call_t * c);
Emmanuel Milou's avatar
Emmanuel Milou committed
54 55

/*
56 57
 * Update the call tree if the call state changes
 * @param c The call to update
58
 */
59
void update_call_tree (calltab_t* ct, call_t * c);
60 61 62 63
/**
 * Remove a call from the call tree
 * @param c The call to remove
 */
64
void update_call_tree_remove (calltab_t* ct, call_t * c);
Pierre-Luc Beaudoin's avatar
Pierre-Luc Beaudoin committed
65

66 67
void reset_call_tree (calltab_t* tab);

68 69 70 71
/**
 * Build the toolbar
 * @return GtkWidget* The toolbar
 */
72 73
GtkWidget * create_toolbar();

74 75
void switch_tab( void );

76
#endif