~ubuntu-branches/ubuntu/maverick/gnome-session/maverick

« back to all changes in this revision

Viewing changes to gnome-session/gsm-client-row.h

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette
  • Date: 2009-04-14 19:24:09 UTC
  • mto: (1.3.1 upstream) (2.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: james.westby@ubuntu.com-20090414192409-koxw9bt1lf1zr01z
ImportĀ upstreamĀ versionĀ 2.26.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* gsm-client-row.h - a gsm-client object for entry into a clist
2
 
 
3
 
   Copyright 1999 Free Software Foundation, Inc.
4
 
 
5
 
   This program is free software; you can redistribute it and/or modify
6
 
   it under the terms of the GNU General Public License as published by
7
 
   the Free Software Foundation; either version 2, or (at your option)
8
 
   any later version.
9
 
 
10
 
   This program is distributed in the hope that it will be useful,
11
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
   GNU General Public License for more details.
14
 
 
15
 
   You should have received a copy of the GNU General Public License
16
 
   along with this program; if not, write to the Free Software
17
 
   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18
 
   02111-1307, USA. 
19
 
 
20
 
   Authors: Felix Bellaby */
21
 
 
22
 
#ifndef GSM_CLIENT_ROW_H
23
 
#define GSM_CLIENT_ROW_H
24
 
 
25
 
#include "gsm-protocol.h"
26
 
#include "gsm-client-list.h"
27
 
 
28
 
#define GSM_TYPE_CLIENT_ROW         (gsm_client_row_get_type ())
29
 
#define GSM_CLIENT_ROW(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GSM_TYPE_CLIENT_ROW, GsmClientRow))
30
 
#define GSM_CLIENT_ROW_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GSM_TYPE_CLIENT_ROW, GsmClientRowClass))
31
 
#define GSM_IS_CLIENT_ROW(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSM_TYPE_CLIENT_ROW))
32
 
#define GSM_IS_CLIENT_ROW_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GSM_TYPE_CLIENT_ROW))
33
 
#define GSM_CLIENT_ROW_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSM_TYPE_CLIENT_ROW, GsmClientRowClass))
34
 
 
35
 
typedef enum {
36
 
  GSM_CLIENT_ROW_ADD,
37
 
  GSM_CLIENT_ROW_REMOVE,
38
 
  GSM_CLIENT_ROW_EDIT,
39
 
  GSM_CLIENT_ROW_NONE
40
 
} GsmClientRowChange;
41
 
typedef enum {
42
 
  GSM_CLIENT_ROW_NEW,
43
 
  GSM_CLIENT_ROW_ADDED, /* iter is valid */
44
 
  GSM_CLIENT_ROW_REMOVED
45
 
} GsmClientRowState;
46
 
 
47
 
typedef struct {
48
 
  GsmClient          client;
49
 
 
50
 
  GsmClientList     *client_list;
51
 
  GtkTreeModel      *model;
52
 
  GtkTreeIter        iter;
53
 
  GsmClientRowState  state;
54
 
 
55
 
  /* used in implementing reversion */
56
 
  GsmClientRowChange change;
57
 
  gint               revert_order;
58
 
  gint               revert_style;
59
 
} GsmClientRow;
60
 
 
61
 
typedef struct {
62
 
  GsmClientClass parent_class;
63
 
} GsmClientRowClass;
64
 
 
65
 
GType gsm_client_row_get_type  (void);
66
 
 
67
 
/* creates a client row to appear in the GsmClientList */
68
 
GsmClientRow *gsm_client_row_new (GsmClientList* client_list);
69
 
 
70
 
/* removes the row from its GsmClientList */
71
 
void gsm_client_row_remove (GsmClientRow* client_row);
72
 
 
73
 
/* adds the row into its GsmClientList */
74
 
void gsm_client_row_add (GsmClientRow* client_row);
75
 
 
76
 
/* changes the restart style for the row */
77
 
void       gsm_client_row_set_style (GsmClientRow *client_row, GsmStyle style);
78
 
 
79
 
/* changes the start order for the row */
80
 
void       gsm_client_row_set_order (GsmClientRow *client_row, guint order);
81
 
 
82
 
#endif /* GSM_CLIENT_ROW_H */