view pidgin/eggtrayicon.h @ 22441:c2b9399d95b2

some memleak fixes from Andrew Gaul again: ==9002== 12 bytes in 1 blocks are definitely lost in loss record 19 of 229 ==9002== at 0x4006A6E: malloc (vg_replace_malloc.c:207) ==9002== by 0xA1CAF5: g_malloc (in /lib/libglib-2.0.so.0.1400.6) ==9002== by 0xA35348: g_strdup (in /lib/libglib-2.0.so.0.1400.6) ==9002== by 0x4FD826F: oscar_format_screenname (oscar.c:6227) ==9002== by 0x4FD0C46: purple_bosrights (oscar.c:3632) ==7413== 4 bytes in 1 blocks are definitely lost in loss record 3 of 233 ==7413== at 0x4004B22: calloc (vg_replace_malloc.c:397) ==7413== by 0xA1CA5D: g_malloc0 (in /lib/libglib-2.0.so.0.1400.6) ==7413== by 0x5018159: irc_dccsend_recv (dcc_send.c:116) ==7413== 98 bytes in 9 blocks are definitely lost in loss record 91 of 233 ==7413== at 0x4006A6E: malloc (vg_replace_malloc.c:207) ==7413== by 0x234888A: vasprintf (in /lib/libc-2.7.so) ==7413== by 0xA44996: g_vasprintf (in /lib/libglib-2.0.so.0.1400.6) ==7413== by 0xA35485: g_strdup_vprintf (in /lib/libglib-2.0.so.0.1400.6) ==7413== by 0xA354AA: g_strdup_printf (in /lib/libglib-2.0.so.0.1400.6) ==7413== by 0x45E68DB: purple_str_size_to_units (util.c:3320) ==7413== by 0x80A9D19: pidgin_xfer_dialog_update_xfer (gtkft.c:1058) committer: Ka-Hing Cheung <khc@hxbc.us>
author Andrew Gaul <andrew@gaul.org>
date Sun, 09 Mar 2008 21:34:32 +0000
parents 44b4e8bd759b
children 584063555949
line wrap: on
line source

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* eggtrayicon.h
 * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02111-1301, USA.
 */

#ifndef __EGG_TRAY_ICON_H__
#define __EGG_TRAY_ICON_H__

#include <gtk/gtkplug.h>
#include <gtk/gtkversion.h>
#include <gdk/gdkx.h>

G_BEGIN_DECLS

#define EGG_TYPE_TRAY_ICON		(egg_tray_icon_get_type ())
#define EGG_TRAY_ICON(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
#define EGG_TRAY_ICON_CLASS(klass)	(G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
#define EGG_IS_TRAY_ICON(obj)		(G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
#define EGG_IS_TRAY_ICON_CLASS(klass)	(G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
#define EGG_TRAY_ICON_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
	
typedef struct _EggTrayIcon	  EggTrayIcon;
typedef struct _EggTrayIconClass  EggTrayIconClass;

struct _EggTrayIcon
{
  GtkPlug parent_instance;

  guint stamp;
  
  Atom selection_atom;
  Atom manager_atom;
  Atom system_tray_opcode_atom;
  Atom orientation_atom;
  Window manager_window;

  GtkOrientation orientation;
};

struct _EggTrayIconClass
{
  GtkPlugClass parent_class;
};

GType        egg_tray_icon_get_type       (void);

#if GTK_CHECK_VERSION(2,1,0)
EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen   *screen,
					   const gchar *name);
#endif

EggTrayIcon *egg_tray_icon_new            (const gchar *name);

guint        egg_tray_icon_send_message   (EggTrayIcon *icon,
					   gint         timeout,
					   const char  *message,
					   gint         len);
void         egg_tray_icon_cancel_message (EggTrayIcon *icon,
					   guint        id);

GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
					    
G_END_DECLS

#endif /* __EGG_TRAY_ICON_H__ */