diff --git a/ChangeLog b/ChangeLog
index 74196e9d7..03478e6cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2004-12-03 Dan Winship
+
+ * gdk/gdk-symbols.xml: alias GdkBitmap to GdkPixmap [Fixes #68824]
+
+ * gdk/Gdk.metadata: Remove the earlier GdkBitmap hack now that
+ it's aliased. Also move Gdk.Bitmap.CreateFromData to
+ Gdk.Pixmap.CreateBitmapFromData
+
+ * gdk/Pixbuf.custom (RenderPixmapAndMask,
+ RenderPixmapAndMaskForColormap, RenderThresholdAlpha):
+ s/Bitmap/Pixmap/
+
+ * sample/GtkDemo/DemoTextView.cs: uncomment the fg/bg stipple
+ code, since that works now
+
+ * parser/gapi-fixup.cs: Add an "add-node" rule. This turned out to
+ not actually be needed for this fix, but we know we'll need it
+ later, so here it is.
+
2004-12-03 Jorge Garcia
* glib/Type.cs: add Int64 and UInt64 support.
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 63c0cc2dc..306107d9d 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -3,6 +3,18 @@
* en/Gtk/TextBuffer.xml:
* en/Gtk/TextView.xml: update for TextIter pass-by-ref changes
+ * en/Gdk/Bitmap.xml: gone
+
+ * en/Gdk/GC.xml:
+ * en/Gdk/PangoAttrStipple.xml:
+ * en/Gdk/Pixbuf.xml:
+ * en/Gdk/Pixmap.xml:
+ * en/Gdk/Window.xml:
+ * en/Gtk/Drag.xml:
+ * en/Gtk/Image.xml:
+ * en/Gtk/TextAppearance.xml:
+ * en/Gtk/Widget.xml: update for Gdk.Bitmap -> Gdk.Pixmap aliasing
+
2004-12-02 Shane Landrum
* en/Gtk/EntryCompletionMatchFunc.xml
diff --git a/doc/en/Gdk/Bitmap.xml b/doc/en/Gdk/Bitmap.xml
deleted file mode 100644
index 11b4fdfba..000000000
--- a/doc/en/Gdk/Bitmap.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- gdk-sharp
-
-
- 0.0.0.0
- neutral
-
-
- Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.
-
- This represents an X server bitmap.
- To be added
-
-
- Gdk.Drawable
-
-
-
- GLib.IWrapper
-
-
- System.IDisposable
-
-
-
-
-
-
- Method
-
- System.Void
-
-
-
- Disposes the resources associated with the object.
-
-
-
-
-
- Constructor
-
-
-
-
-
- Internal constructor
- Pointer to the C object.
- An instance of Bitmap, wrapping the C object.
-
- This is an internal constructor, and should not be used by user code.
-
-
-
-
-
- Method
-
- Gdk.Bitmap
-
-
-
-
-
-
-
-
- Creates a new bitmap from data in XBM format.
- A , used to determine default values for the new pixmap. Can be null, in which case the root window is used.
- A string representing the XBM data.
- The width of the new pixmap in pixels.
- The height of the new pixmap in pixels.
- The .
- None.
-
-
-
-
- Constructor
-
-
-
-
-
- Internal constructor
- a
- a
- This is a constructor used by derivative types of that would have their own GLib.GType assigned to it. This is not typically used by C# code.
-
-
-
-
- Constructor
-
-
-
- Default constructor.
- A new
- None.
-
-
-
-
\ No newline at end of file
diff --git a/doc/en/Gdk/GC.xml b/doc/en/Gdk/GC.xml
index 028b5319e..6894443d8 100644
--- a/doc/en/Gdk/GC.xml
+++ b/doc/en/Gdk/GC.xml
@@ -319,10 +319,10 @@
-
+ Property
- Gdk.Bitmap
+ Gdk.Pixmap
diff --git a/doc/en/Gdk/PangoAttrStipple.xml b/doc/en/Gdk/PangoAttrStipple.xml
index 0ddd5ea28..da5ab79d9 100644
--- a/doc/en/Gdk/PangoAttrStipple.xml
+++ b/doc/en/Gdk/PangoAttrStipple.xml
@@ -32,17 +32,17 @@
-
+ MethodGdk.PangoAttrStipple
-
+ To be added
- To be added: an object of type 'Gdk.Bitmap'
+ To be added: an object of type 'Gdk.Pixmap'
To be added: an object of type 'Gdk.PangoAttrStipple'To be added
@@ -64,17 +64,17 @@
-
+ Property
- Gdk.Bitmap
+ Gdk.PixmapTo be added
- To be added: an object of type 'Gdk.Bitmap'
- To be added: an object of type 'Gdk.Bitmap'
+ To be added: an object of type 'Gdk.Pixmap'
+ To be added: an object of type 'Gdk.Pixmap'To be added
diff --git a/doc/en/Gdk/Pixbuf.xml b/doc/en/Gdk/Pixbuf.xml
index 24d073ba9..a41c7107f 100644
--- a/doc/en/Gdk/Pixbuf.xml
+++ b/doc/en/Gdk/Pixbuf.xml
@@ -564,13 +564,13 @@
-
+ MethodSystem.Void
-
+
@@ -580,12 +580,11 @@
- Render pixbuf alpha channel as a bi-level clip mask to a
- The destination object of type 'Gdk.Bitmap'
+ Render pixbuf alpha channel as a bi-level clip mask to a
+ The destination, a 1-bit-depth .
Source X coordinate.
Source Y coordinate.
- Destination X coordinate.
-
+ Destination X coordinate.
Destination Y coordinate.
The width of the region to modify, or -1 to use .
The height of the region to reder or -1 to use
@@ -1483,14 +1482,14 @@ Gdk.Pixbuf pb = new Gdk.Pixbuf(memorystream);
-
+ MethodSystem.Void
-
+
@@ -1505,20 +1504,20 @@ Gdk.Pixbuf pb = new Gdk.Pixbuf(memorystream);
.
a
- a
+ a
a , threshold value for opacity.
The pixmap that is created is created for the colormap returned
by . You normally will want to instead use
the actual colormap for a widget, and use
,
- If the pixbuf does not have an alpha channel, then * will be set
+ If the pixbuf does not have an alpha channel, then will be set
to .
-
+ MethodSystem.Void
@@ -1526,7 +1525,7 @@ Gdk.Pixbuf pb = new Gdk.Pixbuf(memorystream);
-
+
@@ -1543,13 +1542,13 @@ Gdk.Pixbuf pb = new Gdk.Pixbuf(memorystream);
a
a
- a
+ a
a
The pixmap that is created uses the specified by .
This colormap must match the colormap of the window where the pixmap
will eventually be used or an error will result.
- If the pixbuf does not have an alpha channel, then * will be set
+ If the pixbuf does not have an alpha channel, then will be set
to .
diff --git a/doc/en/Gdk/Pixmap.xml b/doc/en/Gdk/Pixmap.xml
index e826cf20a..0df918ddc 100644
--- a/doc/en/Gdk/Pixmap.xml
+++ b/doc/en/Gdk/Pixmap.xml
@@ -396,5 +396,27 @@ For example in the X backend, a native pixmap handle is an Xlib XID.
To be added
+
+
+ Method
+
+ Gdk.Pixmap
+
+
+
+
+
+
+
+
+ Creates a new bitmap from data in XBM format.
+ A , used to determine default values for the new pixmap.
+ A string representing the XBM data.
+ The width of the new pixmap in pixels.
+ The height of the new pixmap in pixels.
+ The bitmap.
+ None.
+
+
\ No newline at end of file
diff --git a/doc/en/Gdk/Window.xml b/doc/en/Gdk/Window.xml
index c2c25dd8a..790d3af8b 100644
--- a/doc/en/Gdk/Window.xml
+++ b/doc/en/Gdk/Window.xml
@@ -785,7 +785,7 @@ in a child).
-
+ MethodSystem.Void
@@ -793,7 +793,7 @@ in a child).
-
+
@@ -801,7 +801,7 @@ in a child).
A
A
- A
+ mask bitmap
If using GTK+, investigate
first, and then
@@ -1093,13 +1093,13 @@ in a child).
-
+ MethodSystem.Void
-
+
@@ -1115,7 +1115,7 @@ in a child).
/ parameters are not
used.
- A , a shape mask
+ A , a shape mask
A , X position of shape mask with respect to this window
A , Y position of shape mask with respect to this window
diff --git a/doc/en/Gtk/Drag.xml b/doc/en/Gtk/Drag.xml
index 5d2a2c913..a3fa3d671 100644
--- a/doc/en/Gtk/Drag.xml
+++ b/doc/en/Gtk/Drag.xml
@@ -317,7 +317,7 @@
-
+ MethodSystem.Void
@@ -326,7 +326,7 @@
-
+
@@ -398,7 +398,7 @@
-
+ MethodSystem.Void
@@ -407,7 +407,7 @@
-
+ Sets the icon that will be used for drags from a particular from a pixmap/mask.
@@ -550,7 +550,7 @@
-
+ MethodSystem.Void
@@ -558,7 +558,7 @@
-
+
@@ -566,7 +566,7 @@
To be added
a
a
- a
+ a
a
a To be added
diff --git a/doc/en/Gtk/Image.xml b/doc/en/Gtk/Image.xml
index 32faf4297..74642b830 100644
--- a/doc/en/Gtk/Image.xml
+++ b/doc/en/Gtk/Image.xml
@@ -62,19 +62,19 @@
-
+ MethodSystem.Void
-
+ Creates a widget displaying an image with a mask.
an object of type
- an object of type
+ an object of type
Creates a widget displaying an image with a mask.
A is a client-side image buffer in the pixel format of the current display.
@@ -105,19 +105,19 @@
-
+ MethodSystem.Void
-
+ Creates a widget displaying an image with a mask.
an object of type
- an object of type
+ an object of type
Creates a widget displaying an image with a mask.
A is a client-side image buffer in the pixel format of the current display.
@@ -219,22 +219,22 @@
-
+ Constructor
-
+ This constructor is used to create an instance of
containing the
- and the passed to it.
+ passed to it, masked by the given .
to be displayed
by the Image.
- mask to be used.
+ mask to be used.
An instance of type .
@@ -258,21 +258,22 @@
-
+ Constructor
-
+ This constructor is used to create an instance of
- containing the and the mask passed to it.
+ containing the passed to it,
+masked by the given .
displayed by
the Image.
- mask used by
+ mask used by
the Image.
An instance of type .
@@ -566,36 +567,36 @@
-
+ MethodSystem.Void
-
+ To be added
a
- a
+ a To be added
-
+ MethodSystem.Void
-
+ To be added
a
- a
+ a To be added
diff --git a/doc/en/Gtk/TextAppearance.xml b/doc/en/Gtk/TextAppearance.xml
index 3d8cad265..f857b6a22 100644
--- a/doc/en/Gtk/TextAppearance.xml
+++ b/doc/en/Gtk/TextAppearance.xml
@@ -48,32 +48,32 @@
-
+ Property
- Gdk.Bitmap
+ Gdk.PixmapA stipple (dotted) pattern for the foreground color.
- a
- a
+ a 1-bit-deep
+ a
-
+ Property
- Gdk.Bitmap
+ Gdk.PixmapA stipple (dotted) pattern for the background color.
- a
- a
+ a 1-bit-deep
+ a
diff --git a/doc/en/Gtk/Widget.xml b/doc/en/Gtk/Widget.xml
index 01c181374..46486cb72 100644
--- a/doc/en/Gtk/Widget.xml
+++ b/doc/en/Gtk/Widget.xml
@@ -966,13 +966,13 @@
-
+ MethodSystem.Void
-
+
diff --git a/gdk/Gdk.metadata b/gdk/Gdk.metadata
index 23856b0bf..06920e04f 100644
--- a/gdk/Gdk.metadata
+++ b/gdk/Gdk.metadata
@@ -1,6 +1,5 @@
- GdkPixmap**111
@@ -35,7 +34,9 @@
1InputOutputInputOnly
- GdkDrawable
+ 1
+ CreateBitmapFromData
+ /api/namespace/object[@cname='GdkPixmap']ref11
diff --git a/gdk/Pixbuf.custom b/gdk/Pixbuf.custom
index 6cec90154..30ad106b3 100644
--- a/gdk/Pixbuf.custom
+++ b/gdk/Pixbuf.custom
@@ -60,21 +60,21 @@
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_pixbuf_render_pixmap_and_mask(IntPtr raw, IntPtr pixmap_return, IntPtr mask_return, int alpha_threshold);
- public void RenderPixmapAndMask(Gdk.Pixmap pixmap_return, Gdk.Bitmap mask_return, int alpha_threshold) {
+ public void RenderPixmapAndMask(Gdk.Pixmap pixmap_return, Gdk.Pixmap mask_return, int alpha_threshold) {
gdk_pixbuf_render_pixmap_and_mask(Handle, pixmap_return.Handle, mask_return.Handle, alpha_threshold);
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_pixbuf_render_pixmap_and_mask_for_colormap(IntPtr raw, IntPtr colormap, IntPtr pixmap_return, IntPtr mask_return, int alpha_threshold);
- public void RenderPixmapAndMaskForColormap(Gdk.Colormap colormap, Gdk.Pixmap pixmap_return, Gdk.Bitmap mask_return, int alpha_threshold) {
+ public void RenderPixmapAndMaskForColormap(Gdk.Colormap colormap, Gdk.Pixmap pixmap_return, Gdk.Pixmap mask_return, int alpha_threshold) {
gdk_pixbuf_render_pixmap_and_mask_for_colormap(Handle, colormap.Handle, pixmap_return.Handle, mask_return.Handle, alpha_threshold);
}
[DllImport("libgdk-win32-2.0-0.dll")]
static extern void gdk_pixbuf_render_threshold_alpha(IntPtr raw, IntPtr bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold);
- public void RenderThresholdAlpha(Gdk.Bitmap bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold) {
+ public void RenderThresholdAlpha(Gdk.Pixmap bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold) {
gdk_pixbuf_render_threshold_alpha(Handle, bitmap.Handle, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold);
}
diff --git a/gdk/gdk-symbols.xml b/gdk/gdk-symbols.xml
index 620bd3412..b3e18f5f2 100644
--- a/gdk/gdk-symbols.xml
+++ b/gdk/gdk-symbols.xml
@@ -1,5 +1,6 @@
+
diff --git a/parser/gapi-fixup.cs b/parser/gapi-fixup.cs
index b24532a22..12a49e1eb 100644
--- a/parser/gapi-fixup.cs
+++ b/parser/gapi-fixup.cs
@@ -77,6 +77,17 @@ namespace GtkSharp.Parsing {
XPathNavigator meta_nav = meta_doc.CreateNavigator ();
XPathNavigator api_nav = api_doc.CreateNavigator ();
+ XPathNodeIterator add_iter = meta_nav.Select ("/metadata/add-node");
+ while (add_iter.MoveNext ()) {
+ string path = add_iter.Current.GetAttribute ("path", "");
+ XPathNodeIterator api_iter = api_nav.Select (path);
+ while (api_iter.MoveNext ()) {
+ XmlElement api_node = ((IHasXmlNode)api_iter.Current).GetNode () as XmlElement;
+ foreach (XmlNode child in ((IHasXmlNode)add_iter.Current).GetNode().ChildNodes)
+ api_node.AppendChild (api_doc.ImportNode (child, true));
+ }
+ }
+
XPathNodeIterator attr_iter = meta_nav.Select ("/metadata/attr");
while (attr_iter.MoveNext ()) {
string path = attr_iter.Current.GetAttribute ("path", "");
diff --git a/sample/GtkDemo/DemoMain.cs b/sample/GtkDemo/DemoMain.cs
index f9337079c..bc76878a1 100644
--- a/sample/GtkDemo/DemoMain.cs
+++ b/sample/GtkDemo/DemoMain.cs
@@ -172,9 +172,9 @@ namespace GtkDemo
store.AppendValues ("Stock Item and Icon Browser (10% complete)", "DemoStockBrowser.cs", false);
parent = store.AppendValues ("Text Widget");
store.AppendValues (parent, "HyperText (50%)", "DemoHyperText.cs", false);
- store.AppendValues (parent, "Multiple Views (95%)", "DemoTextView.cs", false);
+ store.AppendValues (parent, "Multiple Views", "DemoTextView.cs", false);
parent = store.AppendValues ("Tree View");
- store.AppendValues (parent, "Editable Cells", "DemoEditableCells", false);
+ store.AppendValues (parent, "Editable Cells", "DemoEditableCells.cs", false);
store.AppendValues (parent, "List Store", "DemoListStore.cs", false);
store.AppendValues (parent, "Tree Store", "DemoTreeStore.cs", false);
diff --git a/sample/GtkDemo/DemoTextView.cs b/sample/GtkDemo/DemoTextView.cs
index 2dca30545..f1e6d50c7 100644
--- a/sample/GtkDemo/DemoTextView.cs
+++ b/sample/GtkDemo/DemoTextView.cs
@@ -167,16 +167,19 @@ namespace GtkDemo
int gray50_width = 2;
int gray50_height = 2;
string gray50_bits = new string ((char) 0x02, (char) 0x01);
- // Pixmap stipple = Pixmap.CreateFromData (null, (string) gray50_bits, gray50_width, gray50_height, 16, Color.Zero, Color.Zero);
+
+ // The C gtk-demo passes NULL for the drawable param, which isn't
+ // multi-head safe, so it seems bad to allow it in the C# API.
+ // But the Window isn't realized at this point, so we can't get
+ // an actual Drawable from it. So we kludge for now.
+ Pixmap stipple = Pixmap.CreateBitmapFromData (Gdk.Screen.Default.RootWindow, (string) gray50_bits, gray50_width, gray50_height);
tag = new TextTag ("background_stipple");
- // tag.BackgroundStipple = stipple;
- // Cannot convert type 'Gdk.Bitmap' to 'Gdk.Pixmap'
+ tag.BackgroundStipple = stipple;
buffer.TagTable.Add (tag);
tag = new TextTag ("foreground_stipple");
- // Cannot convert type 'Gdk.Bitmap' to 'Gdk.Pixmap'
- // tag.ForegroundStipple = stipple;
+ tag.ForegroundStipple = stipple;
buffer.TagTable.Add (tag);
tag = new TextTag ("big_gap_before_line");