/* Copyright 2003 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <gtk/gtkicontheme.h>
 
namespace Gtk
{

bool IconInfo::get_attach_points(Glib::ArrayHandle<Gdk::Point>& /* points */) const
{
  GdkPoint* c_attach_points = 0;
  gint n_points = 0;
  bool result = gtk_icon_info_get_attach_points (const_cast<GtkIconInfo*>(gobj()), &c_attach_points, &n_points);

  if(c_attach_points)
  {
    //TODO: Why doesn't this compile?
    //points = Glib::ArrayHandle<Gdk::Point>(c_attach_points, n_points, Glib::OWNERSHIP_SHALLOW); //We use OWNERSHIP_SHALLOW because we just need to g_free() the array and nothing more.        
  }
  return result;
}

IconInfo::operator bool()
{
  return gobj() != 0;
}
  

} // namespace Gtk

