mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-25 17:15:34 +00:00
ab07fa8056
svn path=/trunk/gtk-sharp/; revision=46164
317 lines
12 KiB
XML
317 lines
12 KiB
XML
<Type Name="PixbufAnimation" FullName="Gdk.PixbufAnimation">
|
|
<TypeSignature Language="C#" Maintainer="auto" Value="public class PixbufAnimation : GLib.Object" />
|
|
<AssemblyInfo>
|
|
<AssemblyName>gdk-sharp</AssemblyName>
|
|
<AssemblyPublicKey>
|
|
</AssemblyPublicKey>
|
|
<AssemblyVersion>2.6.0.0</AssemblyVersion>
|
|
</AssemblyInfo>
|
|
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
|
|
<Docs>
|
|
<summary>A base class for animations that are rendered using <see cref="T:Gdk.Pixbuf" /></summary>
|
|
<remarks />
|
|
</Docs>
|
|
<Base>
|
|
<BaseTypeName>GLib.Object</BaseTypeName>
|
|
</Base>
|
|
<Interfaces>
|
|
</Interfaces>
|
|
<Members>
|
|
<Member MemberName="GetIter">
|
|
<MemberSignature Language="C#" Value="public Gdk.PixbufAnimationIter GetIter (IntPtr start_time);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gdk.PixbufAnimationIter</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="start_time" Type="System.IntPtr" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>
|
|
Get an iterator for displaying an animation. The iterator provides
|
|
the frames that should be displayed at a given time.
|
|
It should be freed after use with g_object_unref().
|
|
</summary>
|
|
<param name="start_time">A <see cref="T:IntPtr" /></param>
|
|
<returns>A <see cref="T:Gdk.PixbufAnimationIter" /> to move over the animation</returns>
|
|
<remarks>
|
|
<p>
|
|
<paramref name="start_time" /> would normally come from
|
|
g_get_current_time() (FIXME: this function isn't bound into C#;
|
|
this needs a look), and
|
|
marks the beginning of animation playback. After creating an
|
|
iterator, you should immediately display the pixbuf returned by
|
|
<see cref="P:Gdk.PixbufAnimationIter.Pixbuf" />. Then, you should install a
|
|
timeout (with g_timeout_add() (FIXME)) or by some other mechanism ensure
|
|
that you'll update the image after
|
|
<see cref="P:Gdk.PixbufAnimation.DelayTime" /> milliseconds. Each time
|
|
the image is updated, you should reinstall the timeout with the new,
|
|
possibly-changed delay time.
|
|
</p>
|
|
<p>
|
|
As a shortcut, if <paramref name="start_time" /> is <see langword="null" />, the result of
|
|
g_get_current_time() will be used automatically.
|
|
</p>
|
|
<p>
|
|
To update the image (i.e. possibly change the result of
|
|
gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation),
|
|
call gdk_pixbuf_animation_iter_advance().
|
|
</p>
|
|
<p>
|
|
|
|
If you're using <see cref="T:Gdk.PixbufLoader" />, in addition
|
|
to updating the image
|
|
after the delay time, you should also update it whenever you
|
|
receive the area_updated signal and
|
|
<see cref="M:Gdk.PixbufAnimationIter.OnCurrentlyLoadingFrame" /> returns
|
|
true. In this case, the frame currently being fed into the loader
|
|
has received new data, so needs to be refreshed. The delay time for
|
|
a frame may also be modified after an
|
|
<see cref="E:Gdk.PixbufLoader.AreaUpdated" /> signal, for
|
|
example if the delay time for a frame is encoded in the data after
|
|
the frame itself. So your timeout should be reinstalled after any
|
|
<see cref="E:Gdk.PixbufLoader.AreaUpdated" /> signal.
|
|
</p>
|
|
<p>
|
|
A delay time of -1 is possible, indicating "infinite."
|
|
</p>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public PixbufAnimation (IntPtr raw);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="raw" Type="System.IntPtr" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="raw">Pointer to the C object.</param>
|
|
<remarks>
|
|
<para>This is an internal constructor, and should not be used by user code.</para>
|
|
</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public PixbufAnimation (string filename);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="filename" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Public constructor; creates a new animation by
|
|
loading it from a file. The file format is
|
|
detected automatically. If the file's format does not support
|
|
multi-frame images, then an animation with a single frame will
|
|
be created. Possible errors are in the
|
|
<see cref="T:Gdk.PixbufError" /> and <see cref="T:Gdk.Error" /> domains.
|
|
</summary>
|
|
<param name="filename">A <see cref="T:System.String" />, the filename to load into this object.</param>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Width">
|
|
<MemberSignature Language="C#" Value="public int Width { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>The width of the animation.</summary>
|
|
<value>A <see cref="T:System.Int32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="StaticImage">
|
|
<MemberSignature Language="C#" Value="public Gdk.Pixbuf StaticImage { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gdk.Pixbuf</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>Gets the image if this animation is actually a static,
|
|
unanimaged file.</summary>
|
|
<value>A <see cref="T:Gdk.Pixbuf" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Height">
|
|
<MemberSignature Language="C#" Value="public int Height { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Int32</ReturnType>
|
|
</ReturnValue>
|
|
<Docs>
|
|
<summary>The height of the animation.</summary>
|
|
<value>A <see cref="T:System.Int32" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="IsStaticImage">
|
|
<MemberSignature Language="C#" Value="public bool IsStaticImage { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Boolean</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>
|
|
If you load a file with <see cref="M:Gdk.PixbufAnimation.ctor" />
|
|
and it turns out to be a plain, unanimated image, then this
|
|
function will return
|
|
TRUE. Use <see cref="P:Gdk.PixbufAnimation.StaticImage" /> to
|
|
retrieve the image.
|
|
</summary>
|
|
<value>a <see cref="T:System.Boolean" /></value>
|
|
<remarks />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="GType">
|
|
<MemberSignature Language="C#" Value="public static GLib.GType GType { get; };" />
|
|
<MemberType>Property</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>GLib.GType</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>GType Property.</summary>
|
|
<value>a <see cref="T:GLib.GType" /></value>
|
|
<remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gdk.PixbufAnimation" />.</remarks>
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="protected PixbufAnimation (GLib.GType gtype);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="gtype" Type="GLib.GType" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Internal constructor</summary>
|
|
<param name="gtype">a <see cref="T:GLib.GType" /></param>
|
|
<remarks>This is a constructor used by derivative types of <see cref="T:Gdk.PixbufAnimation" /> that would have their own GLib.GType assigned to it. This is not typically used by C# code.</remarks>
|
|
</Docs>
|
|
<Attributes>
|
|
<Attribute>
|
|
<AttributeName>System.Obsolete(Message=null, IsError=False)</AttributeName>
|
|
</Attribute>
|
|
</Attributes>
|
|
</Member>
|
|
<Member MemberName="Ref">
|
|
<MemberSignature Language="C#" Value="public Gdk.PixbufAnimation Ref ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gdk.PixbufAnimation</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>To be added</summary>
|
|
<returns>a <see cref="T:Gdk.PixbufAnimation" /></returns>
|
|
<remarks>To be added</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="Unref">
|
|
<MemberSignature Language="C#" Value="public void Unref ();" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>System.Void</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters />
|
|
<Docs>
|
|
<summary>To be added</summary>
|
|
<remarks>To be added</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName="LoadFromResource">
|
|
<MemberSignature Language="C#" Value="public static Gdk.PixbufAnimation LoadFromResource (string resource);" />
|
|
<MemberType>Method</MemberType>
|
|
<ReturnValue>
|
|
<ReturnType>Gdk.PixbufAnimation</ReturnType>
|
|
</ReturnValue>
|
|
<Parameters>
|
|
<Parameter Name="resource" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Loads a pixbuf from a resource file.</summary>
|
|
<param name="resource">the name of the resource</param>
|
|
<returns>a <see cref="T:Gdk.PixbufAnimation" /></returns>
|
|
<remarks>
|
|
This loads an animation from a resource in the calling assembly. This is equivalent to
|
|
using the <see cref="C:Gdk.PixbufAnimation(System.Reflection.Assembly, System.String)" />
|
|
constructor with a <see langword="null" /> assembly.
|
|
</remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public PixbufAnimation (System.IO.Stream stream);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="stream" Type="System.IO.Stream" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Makes a new animation object from a <see cref="T:System.IO.Stream" />.</summary>
|
|
<param name="stream">a <see cref="T:System.IO.Stream" /></param>
|
|
<remarks>Useful for creating an animation from an image file that resides in memory.
|
|
|
|
<example>
|
|
<code lang="C#">
|
|
/* buffer containing an image */
|
|
System.Byte[] buffer = new System.Byte[256];
|
|
|
|
/* create a memory stream to the buffer */
|
|
System.IO.MemoryStream memorystream = new System.IO.MemoryStream(buffer);
|
|
|
|
/* create an animation from the stream as if it was a file */
|
|
Gdk.PixbufAnimation pba = new Gdk.PixbufAnimation(memorystream);
|
|
</code>
|
|
</example></remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
<Member MemberName=".ctor">
|
|
<MemberSignature Language="C#" Value="public PixbufAnimation (System.Reflection.Assembly assembly, string resource);" />
|
|
<MemberType>Constructor</MemberType>
|
|
<ReturnValue />
|
|
<Parameters>
|
|
<Parameter Name="assembly" Type="System.Reflection.Assembly" />
|
|
<Parameter Name="resource" Type="System.String" />
|
|
</Parameters>
|
|
<Docs>
|
|
<summary>Constructor for images embedded in an assembly</summary>
|
|
<param name="assembly">The <see cref="T:System.Reflection.Assembly" /> that contains the image.
|
|
<para>
|
|
If the value is <see langword="null" />, the image will be looked up on the calling assembly.</para></param>
|
|
<param name="resource">The name given as the resource in the assembly</param>
|
|
<remarks>
|
|
<para>
|
|
This method is used to construct a <see cref="T:Gdk.PixbufAnimation" /> from an embedded resource in an assembly.
|
|
</para>
|
|
<para>
|
|
Typically this is used when application developers want to distribute images in a single executable.
|
|
</para>
|
|
|
|
If the assembly parameter is <see langword="null" />, the image will be looked up on the calling assembly.
|
|
|
|
<para>
|
|
For example:
|
|
</para><example>
|
|
<code lang="C#">
|
|
Gdk.PixbufAnimation p = new PixbufAnimation (null, "anim.gif");
|
|
</code>
|
|
</example><para>Compile with:</para><example>
|
|
<code lang="Compilation">
|
|
mcs -resource:anim.gif sample.cs
|
|
</code>
|
|
</example></remarks>
|
|
<since version="Gtk# 2.4" />
|
|
</Docs>
|
|
</Member>
|
|
</Members>
|
|
</Type>
|