13
0
livetrax/libs/glibmm2/gio/giomm/loadableicon.h
Paul Davis a73d15e989 switch glibmm/giomm to 2.18
git-svn-id: svn://localhost/ardour2/branches/3.0@5306 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-02 16:00:45 +00:00

195 lines
5.8 KiB
C++

// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _GIOMM_LOADABLEICON_H
#define _GIOMM_LOADABLEICON_H
#include <glibmm.h>
// -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* Copyright (C) 2007 The giomm 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 <giomm/icon.h>
#include <giomm/inputstream.h>
#include <giomm/icon.h>
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GLoadableIconIface GLoadableIconIface;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GLoadableIcon GLoadableIcon;
typedef struct _GLoadableIconClass GLoadableIconClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
namespace Gio
{ class LoadableIcon_Class; } // namespace Gio
namespace Gio
{
/** Extends the Icon interface and adds the ability to load icons from streams.
*
* @newin2p16
*/
class LoadableIcon : public Icon
{
#ifndef DOXYGEN_SHOULD_SKIP_THIS
public:
typedef LoadableIcon CppObjectType;
typedef LoadableIcon_Class CppClassType;
typedef GLoadableIcon BaseObjectType;
typedef GLoadableIconIface BaseClassType;
private:
friend class LoadableIcon_Class;
static CppClassType loadableicon_class_;
// noncopyable
LoadableIcon(const LoadableIcon&);
LoadableIcon& operator=(const LoadableIcon&);
protected:
LoadableIcon(); // you must derive from this class
/** Called by constructors of derived classes. Provide the result of
* the Class init() function to ensure that it is properly
* initialized.
*
* @param interface_class The Class object for the derived type.
*/
explicit LoadableIcon(const Glib::Interface_Class& interface_class);
public:
// This is public so that C++ wrapper instances can be
// created for C instances of unwrapped types.
// For instance, if an unexpected C type implements the C interface.
explicit LoadableIcon(GLoadableIcon* castitem);
protected:
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
public:
virtual ~LoadableIcon();
static void add_interface(GType gtype_implementer);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
static GType get_base_type() G_GNUC_CONST;
#endif
///Provides access to the underlying C GObject.
GLoadableIcon* gobj() { return reinterpret_cast<GLoadableIcon*>(gobject_); }
///Provides access to the underlying C GObject.
const GLoadableIcon* gobj() const { return reinterpret_cast<GLoadableIcon*>(gobject_); }
private:
public:
/**
* Loads a loadable icon. For the asynchronous version of this function,
* see load_async().
*
* @param size an integer.
* @param type a location to store the type of the loaded icon
* @param cancellable a Cancellable object
*
* @return a InputStream to read the icon from.
**/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<InputStream> load(int size, Glib::ustring& type, const Glib::RefPtr<Cancellable>& cancellable);
#else
Glib::RefPtr<InputStream> load(int size, Glib::ustring& type, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
/** Non-cancellable version of load()
*/
#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<InputStream> load(int size, Glib::ustring& type);
#else
Glib::RefPtr<InputStream> load(int size, Glib::ustring& type, std::auto_ptr<Glib::Error>& error);
#endif //GLIBMM_EXCEPTIONS_ENABLED
//TODO: 'type' can be NULL as well, but I don't really want to add 2 more
//overloads -- one cancellable, and one not...
/**
* Loads an icon asynchronously. To finish this function, see load_finish().
* For the synchronous, blocking version of this function, see load().
*
* @param size an integer.
* @param cancellable a Cancellable object
* @param slot a function to call when the request is satisfied
**/
void load_async(int size, const SlotAsyncReady& slot, const Glib::RefPtr<Cancellable>& cancellable);
/** Non-cancellable version of load_async()
*/
void load_async(int size, const SlotAsyncReady& slot);
//_WRAP_METHOD(Glib::RefPtr<InputStream> load_finish(const Glib::RefPtr<AsyncResult>& res, Glib::ustring& type), g_loadable_icon_load_finish, errthrow)
protected:
//_WRAP_VFUNC(Glib::RefPtr<InputStream> load(int size, Glib::ustring& type, const Glib::RefPtr<Cancellable>& cancellable), "load")
public:
public:
//C++ methods used to invoke GTK+ virtual functions:
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED
protected:
//GTK+ Virtual Functions (override these to change behaviour):
#ifdef GLIBMM_VFUNCS_ENABLED
#endif //GLIBMM_VFUNCS_ENABLED
//Default Signal Handlers::
#ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
#endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
};
} // namespace Gio
namespace Glib
{
/** A Glib::wrap() method for this object.
*
* @param object The C instance.
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*
* @relates Gio::LoadableIcon
*/
Glib::RefPtr<Gio::LoadableIcon> wrap(GLoadableIcon* object, bool take_copy = false);
} // namespace Glib
#endif /* _GIOMM_LOADABLEICON_H */