Commit 6a4b4544 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

added gimp_preview_get_area() for the rare case when one needs access to

2005-07-21  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimppreview.[ch]: added gimp_preview_get_area()
	for the rare case when one needs access to the GimpPreviewArea
	used in the preview.

	* libgimpwidgets/gimpwidgets.def: updated.
parent 2b575849
2005-07-21 Sven Neumann <sven@gimp.org>
* libgimpwidgets/gimppreview.[ch]: added gimp_preview_get_area()
for the rare case when one needs access to the GimpPreviewArea
used in the preview.
* libgimpwidgets/gimpwidgets.def: updated.
2005-07-21 Pawan Chitrakar <pawan@nplinux.org> 2005-07-21 Pawan Chitrakar <pawan@nplinux.org>
* configure.in: Added ne in ALL_LINGUAS * configure.in: Added ne in ALL_LINGUAS
......
...@@ -577,6 +577,27 @@ gimp_preview_get_position (GimpPreview *preview, ...@@ -577,6 +577,27 @@ gimp_preview_get_position (GimpPreview *preview,
*y = preview->yoff + preview->ymin; *y = preview->yoff + preview->ymin;
} }
/**
* gimp_preview_get_area:
* @preview: a #GimpPreview widget
*
* In most cases, you shouldn't need to access the #GimpPreviewArea
* that is being used in the @preview. Sometimes however, you need to.
* For example if you want to receive mouse events from the area. In
* such cases, use gimp_preview_get_area().
*
* Return value: a pointer to the #GimpPreviewArea used in the @preview.
*
* Since: GIMP 2.4
**/
GtkWidget *
gimp_preview_get_area (GimpPreview *preview)
{
g_return_val_if_fail (GIMP_IS_PREVIEW (preview), NULL);
return preview->area;
}
/** /**
* gimp_preview_draw: * gimp_preview_draw:
* @preview: a #GimpPreview widget * @preview: a #GimpPreview widget
......
...@@ -88,34 +88,36 @@ struct _GimpPreviewClass ...@@ -88,34 +88,36 @@ struct _GimpPreviewClass
}; };
GType gimp_preview_get_type (void) G_GNUC_CONST; GType gimp_preview_get_type (void) G_GNUC_CONST;
void gimp_preview_set_update (GimpPreview *preview, void gimp_preview_set_update (GimpPreview *preview,
gboolean update); gboolean update);
gboolean gimp_preview_get_update (GimpPreview *preview); gboolean gimp_preview_get_update (GimpPreview *preview);
void gimp_preview_set_bounds (GimpPreview *preview, void gimp_preview_set_bounds (GimpPreview *preview,
gint xmin, gint xmin,
gint ymin, gint ymin,
gint xmax, gint xmax,
gint ymax); gint ymax);
void gimp_preview_get_position (GimpPreview *preview, void gimp_preview_get_position (GimpPreview *preview,
gint *x, gint *x,
gint *y); gint *y);
void gimp_preview_get_size (GimpPreview *preview, void gimp_preview_get_size (GimpPreview *preview,
gint *width, gint *width,
gint *height); gint *height);
void gimp_preview_draw (GimpPreview *preview); GtkWidget * gimp_preview_get_area (GimpPreview *preview);
void gimp_preview_draw_buffer (GimpPreview *preview,
const guchar *buffer, void gimp_preview_draw (GimpPreview *preview);
gint rowstride); void gimp_preview_draw_buffer (GimpPreview *preview,
const guchar *buffer,
void gimp_preview_invalidate (GimpPreview *preview); gint rowstride);
void gimp_preview_set_default_cursor (GimpPreview *preview, void gimp_preview_invalidate (GimpPreview *preview);
GdkCursor *cursor);
void gimp_preview_set_default_cursor (GimpPreview *preview,
GdkCursor *cursor);
G_END_DECLS G_END_DECLS
......
...@@ -209,6 +209,7 @@ EXPORTS ...@@ -209,6 +209,7 @@ EXPORTS
gimp_preview_area_set_offsets gimp_preview_area_set_offsets
gimp_preview_draw gimp_preview_draw
gimp_preview_draw_buffer gimp_preview_draw_buffer
gimp_preview_get_area
gimp_preview_get_position gimp_preview_get_position
gimp_preview_get_size gimp_preview_get_size
gimp_preview_get_type gimp_preview_get_type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment