Add contribution from kerrick@asu.edu

svn path=/trunk/gtk-sharp/; revision=29944
This commit is contained in:
Miguel de Icaza 2004-06-19 15:23:28 +00:00
parent b39bc105e6
commit bccf57ab07
2 changed files with 86 additions and 27 deletions

View File

@ -10,8 +10,8 @@
</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>To be added</summary>
<remarks>To be added</remarks>
<summary>Contains functions for inlined pixbuf handling. It allows for pixbuf data to be accessed in a raw form, serialized, and stored.</summary>
<remarks>At the time of this writing, gtk-sharp 0.98 has a bug where <see cref="M:Gdk.Pixdata.Serialize" /> and <see cref="M:Gdk.Pixdata.Deserialize" /> use <see cref="T:System.Byte" /> where Byte [] should be used making them function improperly. This problem should be fixed in a future release.</remarks>
</Docs>
<Base>
<BaseTypeName>System.ValueType</BaseTypeName>
@ -27,7 +27,7 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added</summary>
<summary>A blank Gdk.Pixdata, equivilent to Gdk.Pixdata Zero = new Gdk.Pixdata ();</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
@ -41,9 +41,9 @@
<Parameter Name="raw" Type="System.IntPtr" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="raw">To be added: an object of type 'IntPtr'</param>
<returns>To be added: an object of type 'Gdk.Pixdata'</returns>
<summary>Creates a new Gdk.Pixdata from a pointer to a raw GdkPixdata.</summary>
<param name="raw">An <see cref="T:System.IntPtr" /> pointing to a raw GdkPixdata.</param>
<returns>A new 'Gdk.Pixdata' synonymous with the "raw" parameter.</returns>
<remarks>To be added</remarks>
</Docs>
</Member>
@ -58,10 +58,10 @@
<Parameter Name="use_rle" Type="System.Boolean" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="pixbuf">To be added: an object of type 'Gdk.Pixbuf'</param>
<param name="use_rle">To be added: an object of type 'bool'</param>
<returns>To be added: an object of type 'IntPtr'</returns>
<summary>Fils in the Gdk.Pixdata with data from an existing <see cref="T:Gdk.Pixbuf" />.</summary>
<param name="pixbuf">The 'Gdk.Pixbuf' which the Gdk.Pixdata is to be derived from.</param>
<param name="use_rle">Whether to use run-length encoding for the pixel data.</param>
<returns> If "ure_rle" is set to true, an <see cref="T:System.IntPtr" /> pointing to the new run-length encoded pixel data is returned, otherwise, <see cref="F:System.IntPtr.Zero" /></returns>
<remarks>To be added</remarks>
</Docs>
</Member>
@ -76,11 +76,11 @@
<Parameter Name="stream" Type="System.Byte&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="stream_length">a <see cref="T:System.UInt32" /></param>
<summary>Converts a serialized datastream, generated by <see cref="M:Gdk.Pixdata.Serialize" />, into pixdata.</summary>
<param name="stream_length">A <see cref="T:System.UInt32" /> describing the length of "stream".</param>
<param name="stream">a <see cref="T:System.Byte&amp;" /></param>
<returns>a <see cref="T:System.Boolean" /></returns>
<remarks>To be added</remarks>
<returns>A <see cref="T:System.Boolean" />. True is successful, false if there was an error.</returns>
<remarks>As of gtk-sharp 0.98, this function uses a <see cref="T:Byte" /> for "stream" when it should be using a Byte []. Until this is fixed, this function will not work as intended.</remarks>
</Docs>
</Member>
<Member MemberName="Serialize">
@ -93,10 +93,10 @@
<Parameter Name="stream_length_p" Type="System.UInt32&amp;" RefType="out" />
</Parameters>
<Docs>
<summary>To be added</summary>
<param name="stream_length_p">a <see cref="T:System.UInt32&amp;" /></param>
<summary>Generates serialized pixdata that can then be stored and converted back into a <see cref="T:Gdk.Pixdata" /> with <see cref="M:Gdk.Pixdata.Deserialize" />.</summary>
<param name="stream_length_p">A <see cref="T:System.UInt32&amp;" /> set to the length of the returned <see cref="T:System.Byte" />[].</param>
<returns>a <see cref="T:System.Byte" /></returns>
<remarks>To be added</remarks>
<remarks>As of gtk-sharp 0.98, this function returns a <see cref="T:Byte" /> when it should be returning a Byte []. Until this is fixed, this function will not work as intended.</remarks>
</Docs>
</Member>
<Member MemberName="Magic">
@ -108,8 +108,8 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
<summary>The GdkPixbuf magic number.</summary>
<remarks>All valid Gdk.Pixdata objects must have this set to 0x47646b50, which is 'GdkP' in ASCII.</remarks>
</Docs>
</Member>
<Member MemberName="Length">
@ -121,8 +121,8 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
<summary>The length of the raw structure.</summary>
<remarks>This is either set to less than one to disable length checks or set to the length of the raw GdkPixbuf header, which is currently 24, plus the length of the pixel data.</remarks>
</Docs>
</Member>
<Member MemberName="PixdataType">
@ -134,8 +134,47 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
<summary>An enumeration containing three sets of flax for the <see cref="T:Gdk.Pixdata" />. One used for colorspace, one for the width of the samples, and one for the encoding of the pixel data.</summary>
<remarks>
<list type="table">
<listheader>
<term>Value</term>
<description>Description</description>
</listheader>
<item>
<term>0x01</term>
<description>Each pixel has red, green, and blue samples.</description>
</item>
<item>
<term>0x02</term>
<description>Each pixel has red, green, and blue samples, and an alpha value.</description>
</item>
<item>
<term>0xFF</term>
<description>A mask for the colortype flags.</description>
</item>
<item>
<term>0x01 &lt;&lt; 16</term>
<description>Each sample has 8 bits.</description>
</item>
<item>
<term>0x0f &lt;&lt; 16</term>
<description>A mask for the sample width flags.</description>
</item>
<item>
<term>0x01 &lt;&lt; 24</term>
<description>The pixel data is in raw form.</description>
</item>
<item>
<term>0x02 &lt;&lt; 24</term>
<description>The pixel data is run-length encoded. Runs may be up to 127 bytes long; their length is stored in a single byte preceding the pixel data for the run. If a run is constant, its length byte has the high bit set and the pixel data consists of a single pixel which must be repeated.</description>
</item>
<item>
<term>0x0f &lt;&lt; 24</term>
<description>A mask for the encoding flags.</description>
</item>
</list>
</remarks>
</Docs>
</Member>
<Member MemberName="Rowstride">
@ -147,7 +186,7 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<summary>The distance in bytes between rows.</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
@ -160,7 +199,7 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<summary>The width of the image in pixels.</summary>
<remarks>To be added</remarks>
</Docs>
</Member>
@ -173,7 +212,7 @@
<Parameters>
</Parameters>
<Docs>
<summary>To be added</summary>
<summary>The height of the image in pixels.</summary>
<remarks>To be added</remarks>
</Docs>
</Member>

View File

@ -26,7 +26,9 @@
in the <see cref="T:Gtk.Dialog" /> is clicked or the <see cref="T:Gtk.MessageDialog" /> is closed.
</para>
<para>
A message dialog
After <see cref="M:Gtk.Dialog.Run()" /> returns, you are responsible for hiding (using <see cref="M:Gtk.Widget.Hide()" />) or destroying (using <see cref="M:Gtk.Widget.Destroy()" />) the dialog if you wish to do so.</para>
<para>
A simple message dialog
<example>
<code lang="C#">
MessageDialog md = new MessageDialog (parent_window,
@ -35,6 +37,24 @@ MessageDialog md = new MessageDialog (parent_window,
ButtonsType.Close, "Error loading file");
int result = md.Run ();
md.Destroy();
</code>
</example></para>
<para>
A yes/no message dialog
<example>
<code lang="C#">
MessageDialog md = new MessageDialog (parent_window,
DialogFlags.DestroyWithParent,
MessageType.Question,
ButtonsType.YesNo, "Are you sure you want to quit?");
ResponseType result = (ResponseType)md.Run ();
if (result == ResponseType.Yes)
Application.Quit();
else
md.Destroy();
</code>
</example></para>
<para>