~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to systray/src/na-tray-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-26 21:07:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090826210739-gyjuuqezrzuluao4
Tags: upstream-2.0.8.1
ImportĀ upstreamĀ versionĀ 2.0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
7
* This program is free software; you can redistribute it and/or
 
8
* modify it under the terms of the GNU General Public License
 
9
* as published by the Free Software Foundation; either version 3
 
10
* of the License, or (at your option) any later version.
 
11
*
 
12
* This program is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
 
21
/* na-tray-manager.h
 
22
 * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
 
23
 * Copyright (C) 2003-2006 Vincent Untz
 
24
 *
 
25
 * This library is free software; you can redistribute it and/or
 
26
 * modify it under the terms of the GNU Lesser General Public
 
27
 * License as published by the Free Software Foundation; either
 
28
 * version 2 of the License, or (at your option) any later version.
 
29
 *
 
30
 * This library is distributed in the hope that it will be useful,
 
31
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
32
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
33
 * Lesser General Public License for more details.
 
34
 *
 
35
 * You should have received a copy of the GNU Lesser General Public
 
36
 * License along with this library; if not, write to the
 
37
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
38
 * Boston, MA 02111-1307, USA.
 
39
 *
 
40
 * Used to be: eggtraymanager.h
 
41
 */
 
42
 
 
43
#ifndef __NA_TRAY_MANAGER_H__
 
44
#define __NA_TRAY_MANAGER_H__
 
45
 
 
46
#include <gtk/gtkwidget.h>
 
47
#ifdef GDK_WINDOWING_X11
 
48
#include <gdk/gdkx.h>
 
49
#endif
 
50
 
 
51
G_BEGIN_DECLS
 
52
 
 
53
#define NA_TYPE_TRAY_MANAGER                    (na_tray_manager_get_type ())
 
54
#define NA_TRAY_MANAGER(obj)                    (G_TYPE_CHECK_INSTANCE_CAST ((obj), NA_TYPE_TRAY_MANAGER, NaTrayManager))
 
55
#define NA_TRAY_MANAGER_CLASS(klass)            (G_TYPE_CHECK_CLASS_CAST ((klass), NA_TYPE_TRAY_MANAGER, NaTrayManagerClass))
 
56
#define NA_IS_TRAY_MANAGER(obj)                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NA_TYPE_TRAY_MANAGER))
 
57
#define NA_IS_TRAY_MANAGER_CLASS(klass)         (G_TYPE_CHECK_CLASS_TYPE ((klass), NA_TYPE_TRAY_MANAGER))
 
58
#define NA_TRAY_MANAGER_GET_CLASS(obj)          (G_TYPE_INSTANCE_GET_CLASS ((obj), NA_TYPE_TRAY_MANAGER, NaTrayManagerClass))
 
59
        
 
60
typedef struct _NaTrayManager       NaTrayManager;
 
61
typedef struct _NaTrayManagerClass  NaTrayManagerClass;
 
62
typedef struct _NaTrayManagerChild  NaTrayManagerChild;
 
63
 
 
64
struct _NaTrayManager
 
65
{
 
66
  GObject parent_instance;
 
67
 
 
68
#ifdef GDK_WINDOWING_X11
 
69
  GdkAtom selection_atom;
 
70
  Atom    opcode_atom;
 
71
#endif
 
72
  
 
73
  GtkWidget *invisible;
 
74
  GdkScreen *screen;
 
75
  GtkOrientation orientation;
 
76
 
 
77
  GList *messages;
 
78
  GHashTable *socket_table;
 
79
};
 
80
 
 
81
struct _NaTrayManagerClass
 
82
{
 
83
  GObjectClass parent_class;
 
84
 
 
85
  void (* tray_icon_added)   (NaTrayManager      *manager,
 
86
                              NaTrayManagerChild *child);
 
87
  void (* tray_icon_removed) (NaTrayManager      *manager,
 
88
                              NaTrayManagerChild *child);
 
89
 
 
90
  void (* message_sent)      (NaTrayManager      *manager,
 
91
                              NaTrayManagerChild *child,
 
92
                              const gchar        *message,
 
93
                              glong               id,
 
94
                              glong               timeout);
 
95
  
 
96
  void (* message_cancelled) (NaTrayManager      *manager,
 
97
                              NaTrayManagerChild *child,
 
98
                              glong               id);
 
99
 
 
100
  void (* lost_selection)    (NaTrayManager      *manager);
 
101
};
 
102
 
 
103
GType           na_tray_manager_get_type        (void);
 
104
 
 
105
gboolean        na_tray_manager_check_running   (GdkScreen          *screen);
 
106
NaTrayManager  *na_tray_manager_new             (void);
 
107
gboolean        na_tray_manager_manage_screen   (NaTrayManager      *manager,
 
108
                                                 GdkScreen          *screen);
 
109
char           *na_tray_manager_get_child_title (NaTrayManager      *manager,
 
110
                                                 NaTrayManagerChild *child);
 
111
void            na_tray_manager_set_orientation (NaTrayManager      *manager,
 
112
                                                 GtkOrientation      orientation);
 
113
GtkOrientation  na_tray_manager_get_orientation (NaTrayManager      *manager);
 
114
 
 
115
G_END_DECLS
 
116
 
 
117
#endif /* __NA_TRAY_MANAGER_H__ */