2005-05-10 Mike Kestner <mkestner@novell.com>
* gdk/Pixbuf.custom : use non-obsolete PixbufLoader.Write overload. * gdk/PixbufLoader.custom : add obsolete PixbufLoader.Write overload for the uint case for backcompat. Update other uses to the new ulong overload. * sample/GtkDemo/DemoImage.cs : use PixbufLoader.Write (byte[]) overload. svn path=/trunk/gtk-sharp/; revision=44332
This commit is contained in:
parent
3a004064f7
commit
a51e811f17
4 changed files with 36 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-05-10 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* gdk/Pixbuf.custom : use non-obsolete PixbufLoader.Write overload.
|
||||
* gdk/PixbufLoader.custom : add obsolete PixbufLoader.Write overload
|
||||
for the uint case for backcompat. Update other uses to the new ulong
|
||||
overload.
|
||||
* sample/GtkDemo/DemoImage.cs : use PixbufLoader.Write (byte[])
|
||||
overload.
|
||||
|
||||
2005-05-09 Mike Kestner <mkestner@novell.com>
|
||||
|
||||
* glib/Object.cs : add a try/catch block to g_object_unref calls to
|
||||
|
|
|
@ -625,5 +625,23 @@ If the value is <see langword="null" />, the image will be looked up on the call
|
|||
<remarks>To be added</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="Write">
|
||||
<MemberSignature Language="C#" Value="public bool Write (byte [] bytes, uint count);" />
|
||||
<MemberType>Method</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>System.Boolean</ReturnType>
|
||||
</ReturnValue>
|
||||
<Parameters>
|
||||
<Parameter Name="bytes" Type="System.Byte[]" />
|
||||
<Parameter Name="count" Type="System.UInt32" />
|
||||
</Parameters>
|
||||
<Docs>
|
||||
<summary>Writes a Pixbuf to a buffer.</summary>
|
||||
<param name="bytes">a <see cref="T:System.Byte" /></param>
|
||||
<param name="count">a <see cref="T:System.UInt32" /></param>
|
||||
<returns>a <see cref="T:System.Boolean" /></returns>
|
||||
<remarks>This overload is obsolete and has been replaced by a ulong version for 64 bit compatibility.</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
|
|
|
@ -36,9 +36,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
public bool Write (byte[] bytes)
|
||||
public bool Write (byte[] bytes)
|
||||
{
|
||||
return this.Write (bytes, (ulong) bytes.Length);
|
||||
}
|
||||
|
||||
[Obsolete ("Replaced by Write (byte[], ulong) for 64 bit portability")]
|
||||
public bool Write (byte[] bytes, uint count)
|
||||
{
|
||||
return this.Write (bytes, (uint) bytes.Length);
|
||||
return this.Write (bytes, (ulong) count);
|
||||
}
|
||||
|
||||
private void LoadFromStream (System.IO.Stream input)
|
||||
|
|
|
@ -158,7 +158,7 @@ namespace GtkDemo
|
|||
|
||||
if (imageStream.PeekChar () != -1) {
|
||||
byte[] bytes = imageStream.ReadBytes (256);
|
||||
pixbufLoader.Write (bytes, (uint) bytes.Length);
|
||||
pixbufLoader.Write (bytes);
|
||||
return true; // leave the timeout active
|
||||
} else {
|
||||
imageStream.Close ();
|
||||
|
|
Loading…
Add table
Reference in a new issue