#include "wx/stream.h"
#endif
+#include "wx/wfstream.h"
+
#include <gtk/gtk.h>
// ============================================================================
void gdk_pixbuf_area_updated(GdkPixbufLoader *loader,
- gint x,
- gint y,
- gint width,
- gint height,
+ gint WXUNUSED(x),
+ gint WXUNUSED(y),
+ gint WXUNUSED(width),
+ gint WXUNUSED(height),
wxAnimation *anim)
{
if (anim && anim->GetPixbuf() == NULL)
bool wxAnimation::LoadFile(const wxString &name, wxAnimationType WXUNUSED(type))
{
UnRef();
- m_pixbuf = gdk_pixbuf_animation_new_from_file(
- wxConvFileName->cWX2MB(name), NULL);
+ m_pixbuf = gdk_pixbuf_animation_new_from_file(name.fn_str(), NULL);
return IsOk();
}
return true;
}
-wxImage wxAnimation::GetFrame(size_t i) const
+wxImage wxAnimation::GetFrame(unsigned int WXUNUSED(frame)) const
{
return wxNullImage;
}
long style,
const wxString& name)
{
- m_needParent = true;
- m_acceptsFocus = true;
-
if (!PreCreation( parent, pos, size ) ||
!base_type::CreateBase(parent, id, pos, size, style & wxWINDOW_STYLE_MASK,
wxDefaultValidator, name))
SetWindowStyle(style);
m_widget = gtk_image_new();
- gtk_widget_show( GTK_WIDGET(m_widget) );
+ g_object_ref(m_widget);
+ gtk_widget_show(m_widget);
m_parent->DoAddChild( this );
}
bool wxAnimationCtrl::LoadFile(const wxString &filename, wxAnimationType type)
+{
+ wxFileInputStream fis(filename);
+ return Load(fis, type);
+}
+
+bool wxAnimationCtrl::Load(wxInputStream& stream, wxAnimationType type)
{
wxAnimation anim;
- if (!anim.LoadFile(filename, type))
+ if ( !anim.Load(stream, type) || !anim.IsOk() )
return false;
SetAnimation(anim);
// wxAnimationCtrl - event handlers
//-----------------------------------------------------------------------------
-void wxAnimationCtrl::OnTimer(wxTimerEvent &ev)
+void wxAnimationCtrl::OnTimer(wxTimerEvent& WXUNUSED(ev))
{
wxASSERT(m_iter != NULL);