gtkmm r1077 - in trunk: . docs/reference gdk/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkmm r1077 - in trunk: . docs/reference gdk/src
- Date: Fri, 16 Jan 2009 15:31:00 +0000 (UTC)
Author: murrayc
Date: Fri Jan 16 15:31:00 2009
New Revision: 1077
URL: http://svn.gnome.org/viewvc/gtkmm?rev=1077&view=rev
Log:
2009-01-16 Murray Cumming <murrayc murrayc com>
* gdk/src/pixbuf.hg: render_to_pixbuf(): Mark this as deprecated,
because it is deprecated in GTK+.
* gdk/src/drawable.ccg:
* gdk/src/drawable.hg: draw_pixbuf(): Add an override without a GC
parameter, becauase it can be NULL in C.
* gdk/src/gdk_docs_override.xml: Remove mention of the NULL GC from the
documentation for the main override.
* gdk/src/screen.hg: Added get_monitor_width_mm(),
get_monitor_height_mm(), get_monitor_plug_name().
Modified:
trunk/ChangeLog
trunk/docs/reference/Doxyfile.in
trunk/gdk/src/drawable.ccg
trunk/gdk/src/drawable.hg
trunk/gdk/src/gdk_docs_override.xml
trunk/gdk/src/pixbuf.hg
trunk/gdk/src/screen.hg
Modified: trunk/docs/reference/Doxyfile.in
==============================================================================
--- trunk/docs/reference/Doxyfile.in (original)
+++ trunk/docs/reference/Doxyfile.in Fri Jan 16 15:31:00 2009
@@ -41,7 +41,8 @@
"newin2p10=\xrefitem newin2p10s \"Since gtkmm 2.10\" \"New API in gtkmm 2.10\" \n" \
"newin2p12=\xrefitem newin2p12s \"Since gtkmm 2.12\" \"New API in gtkmm 2.12\" \n" \
"newin2p14=\xrefitem newin2p14s \"Since gtkmm 2.14\" \"New API in gtkmm 2.14\" \n" \
- "newin2p16=\xrefitem newin2p16s \"Since gtkmm 2.16\" \"New API in gtkmm 2.16\" \n"
+ "newin2p16=\xrefitem newin2p16s \"Since gtkmm 2.16\" \"New API in gtkmm 2.16\" \n" \
+ "newin2p18=\xrefitem newin2p18s \"Since gtkmm 2.18\" \"New API in gtkmm 2.18\" \n"
OPTIMIZE_OUTPUT_FOR_C = NO
OPTIMIZE_OUTPUT_JAVA = NO
BUILTIN_STL_SUPPORT = NO
Modified: trunk/gdk/src/drawable.ccg
==============================================================================
--- trunk/gdk/src/drawable.ccg (original)
+++ trunk/gdk/src/drawable.ccg Fri Jan 16 15:31:00 2009
@@ -59,6 +59,11 @@
gdk_drawable_copy_to_image(const_cast<GdkDrawable*>(gobj()), Glib::unwrap(image), src_x, src_y, dest_x, dest_y, width, height);
}
+void Drawable::draw_pixbuf(const Glib::RefPtr<Pixbuf>& pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
+{
+gdk_draw_pixbuf(gobj(), 0, Glib::unwrap(pixbuf), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither);
+}
+
} // namespace Gdk
Modified: trunk/gdk/src/drawable.hg
==============================================================================
--- trunk/gdk/src/drawable.hg (original)
+++ trunk/gdk/src/drawable.hg Fri Jan 16 15:31:00 2009
@@ -107,6 +107,38 @@
int width, int height,
RgbDither dither, int x_dither, int y_dither), gdk_draw_pixbuf)
+ /** Renders a rectangular portion of a pixbuf to a drawable. The destination
+ * drawable must have a colormap. All windows have a colormap, however, pixmaps
+ * only have colormap by default if they were created with a non-<tt>0</tt> window
+ * argument. Otherwise a colormap must be set on them with
+ * Gdk::Drawable::set_colormap().
+ *
+ * On older X servers, rendering pixbufs with an alpha channel involves round
+ * trips to the X server, and may be somewhat slow.
+ *
+ * If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
+ * function is accelerated using mediaLib, which provides hardware
+ * acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
+ * support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
+ * variable.
+ *
+ * @newin2p16
+ * @param pixbuf A Gdk::Pixbuf.
+ * @param src_x Source X coordinate within pixbuf.
+ * @param src_y Source Y coordinates within pixbuf.
+ * @param dest_x Destination X coordinate within drawable.
+ * @param dest_y Destination Y coordinate within drawable.
+ * @param width Width of region to render, in pixels, or -1 to use pixbuf width.
+ * @param height Height of region to render, in pixels, or -1 to use pixbuf height.
+ * @param dither Dithering mode for Gdk::RGB.
+ * @param x_dither X offset for dither.
+ * @param y_dither Y offset for dither.
+ */
+ void draw_pixbuf(const Glib::RefPtr<Pixbuf>& pixbuf,
+ int src_x, int src_y, int dest_x, int dest_y,
+ int width, int height,
+ RgbDither dither, int x_dither, int y_dither);
+
// Note: This has no 'refreturn' because get_image() returns a newly created Image object.
_WRAP_METHOD(Glib::RefPtr<Image> get_image(int x, int y, int width, int height) const, gdk_drawable_get_image)
Modified: trunk/gdk/src/gdk_docs_override.xml
==============================================================================
--- trunk/gdk/src/gdk_docs_override.xml (original)
+++ trunk/gdk/src/gdk_docs_override.xml Fri Jan 16 15:31:00 2009
@@ -416,6 +416,79 @@
<function name="gdk_draw_pixbuf">
<mapping class="Drawable" />
+<description>
+Renders a rectangular portion of a pixbuf to a drawable. The destination
+drawable must have a colormap. All windows have a colormap, however, pixmaps
+only have colormap by default if they were created with a non-%NULL window
+argument. Otherwise a colormap must be set on them with
+gdk_drawable_set_colormap().
+
+On older X servers, rendering pixbufs with an alpha channel involves round
+trips to the X server, and may be somewhat slow.
+
+The clip mask of @gc is ignored, but clip rectangles and clip regions work
+fine.
+
+If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
+function is accelerated using mediaLib, which provides hardware
+acceleration on Intel, AMD, and Sparc chipsets. If desired, mediaLib
+support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
+variable.
+
+Since: 2.2
+
+</description>
+<parameters>
+<parameter name="drawable">
+<parameter_description> Destination drawable.
+</parameter_description>
+</parameter>
+<parameter name="gc">
+<parameter_description> a #GdkGC, used for clipping.
+</parameter_description>
+</parameter>
+<parameter name="pixbuf">
+<parameter_description> a #GdkPixbuf
+</parameter_description>
+</parameter>
+<parameter name="src_x">
+<parameter_description> Source X coordinate within pixbuf.
+</parameter_description>
+</parameter>
+<parameter name="src_y">
+<parameter_description> Source Y coordinates within pixbuf.
+</parameter_description>
+</parameter>
+<parameter name="dest_x">
+<parameter_description> Destination X coordinate within drawable.
+</parameter_description>
+</parameter>
+<parameter name="dest_y">
+<parameter_description> Destination Y coordinate within drawable.
+</parameter_description>
+</parameter>
+<parameter name="width">
+<parameter_description> Width of region to render, in pixels, or -1 to use pixbuf width.
+</parameter_description>
+</parameter>
+<parameter name="height">
+<parameter_description> Height of region to render, in pixels, or -1 to use pixbuf height.
+</parameter_description>
+</parameter>
+<parameter name="dither">
+<parameter_description> Dithering mode for #GdkRGB.
+</parameter_description>
+</parameter>
+<parameter name="x_dither">
+<parameter_description> X offset for dither.
+</parameter_description>
+</parameter>
+<parameter name="y_dither">
+<parameter_description> Y offset for dither.
+</parameter_description>
+</parameter>
+</parameters>
+<return></return>
</function>
<function name="gdk_draw_rgb_32_image_dithalign">
Modified: trunk/gdk/src/pixbuf.hg
==============================================================================
--- trunk/gdk/src/pixbuf.hg (original)
+++ trunk/gdk/src/pixbuf.hg Fri Jan 16 15:31:00 2009
@@ -592,7 +592,7 @@
int dest_x, int dest_y,
int width, int height,
RgbDither dither,
- int x_dither, int y_dither), gdk_pixbuf_render_to_drawable)
+ int x_dither, int y_dither), gdk_pixbuf_render_to_drawable, deprecated "Use Gdk::Drawable::draw_pixbuf() instead.")
_WRAP_METHOD(void render_to_drawable_alpha(const Glib::RefPtr<Drawable>& drawable,
int src_x, int src_y,
int dest_x, int dest_y,
@@ -600,7 +600,7 @@
PixbufAlphaMode alpha_mode,
int alpha_threshold,
RgbDither dither,
- int x_dither, int y_dither), gdk_pixbuf_render_to_drawable_alpha)
+ int x_dither, int y_dither), gdk_pixbuf_render_to_drawable_alpha, deprecated "Use Gdk::Drawable::draw_pixbuf() instead.")
void render_pixmap_and_mask_for_colormap(const Glib::RefPtr<Colormap>& colormap,
Glib::RefPtr<Pixmap>& pixmap_return,
Modified: trunk/gdk/src/screen.hg
==============================================================================
--- trunk/gdk/src/screen.hg (original)
+++ trunk/gdk/src/screen.hg Fri Jan 16 15:31:00 2009
@@ -97,6 +97,10 @@
_WRAP_METHOD(int get_monitor_at_point(int x, int y) const, gdk_screen_get_monitor_at_point)
_WRAP_METHOD(int get_monitor_at_window(const Glib::RefPtr<Window>& window) const, gdk_screen_get_monitor_at_window)
+ _WRAP_METHOD(int get_monitor_width_mm(int monitor_num) const, gdk_screen_get_monitor_width_mm)
+ _WRAP_METHOD(int get_monitor_height_mm(int monitor_num) const, gdk_screen_get_monitor_height_mm)
+ _WRAP_METHOD(Glib::ustring get_monitor_plug_name(int monitor_num) const, gdk_screen_get_monitor_plug_name)
+
_WRAP_METHOD(void broadcast_client_message(GdkEvent* event), gdk_screen_broadcast_client_message)
_WRAP_METHOD(static Glib::RefPtr<Screen> get_default(), gdk_screen_get_default, refreturn)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]