Git init
[framework/uifw/isf.git] / ism / utils / scimtrayicon.h
1 /* scimtrayicon.h
2  * converted from eggtrayicon.h in libegg.
3  *
4  * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22 #ifndef __SCIM_TRAY_ICON_H__
23 #define __SCIM_TRAY_ICON_H__
24
25 #include <gtk/gtkplug.h>
26 #include <gdk/gdkx.h>
27
28 G_BEGIN_DECLS
29
30 #define SCIM_TYPE_TRAY_ICON            (scim_tray_icon_get_type ())
31 #define SCIM_TRAY_ICON(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SCIM_TYPE_TRAY_ICON, ScimTrayIcon))
32 #define SCIM_TRAY_ICON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SCIM_TYPE_TRAY_ICON, ScimTrayIconClass))
33 #define SCIM_IS_TRAY_ICON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SCIM_TYPE_TRAY_ICON))
34 #define SCIM_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SCIM_TYPE_TRAY_ICON))
35 #define SCIM_TRAY_ICON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SCIM_TYPE_TRAY_ICON, ScimTrayIconClass))
36     
37 typedef struct _ScimTrayIcon       ScimTrayIcon;
38 typedef struct _ScimTrayIconClass  ScimTrayIconClass;
39
40 struct _ScimTrayIcon
41 {
42     GtkPlug parent_instance;
43
44     guint stamp;
45   
46     Atom selection_atom;
47     Atom manager_atom;
48     Atom system_tray_opcode_atom;
49     Atom orientation_atom;
50     Window manager_window;
51
52     GtkOrientation orientation;
53 };
54
55 struct _ScimTrayIconClass
56 {
57     GtkPlugClass parent_class;
58 };
59
60 GType         scim_tray_icon_get_type       (void);
61
62 ScimTrayIcon *scim_tray_icon_new_for_screen (GdkScreen    *screen,
63                                              const gchar  *name);
64
65 ScimTrayIcon *scim_tray_icon_new            (const gchar  *name);
66
67 guint         scim_tray_icon_send_message   (ScimTrayIcon *icon,
68                                              gint          timeout,
69                                              const char   *message,
70                                              gint          len);
71
72 void          scim_tray_icon_cancel_message (ScimTrayIcon *icon,
73                                              guint         id);
74
75 GtkOrientation scim_tray_icon_get_orientation (ScimTrayIcon *icon);
76
77 G_END_DECLS
78
79 #endif /* __SCIM_TRAY_ICON_H__ */
80
81 /*
82 vi:ts=4:nowrap:ai:expandtab
83 */