Renamed arguments to width_in_pixels, height_in_pixels, x_in_pixels,

1999-12-13  Federico Mena Quintero  <federico@redhat.com>

	* gdk-pixbuf/gnome-canvas-pixbuf.c
	(gnome_canvas_pixbuf_class_init): Renamed arguments to
	width_in_pixels, height_in_pixels, x_in_pixels, y_in_pixels, for
	consistency with the new canvas.
	(PixbufPrivate): Do the same renaming in the structure fields, for
	consistency.

	* doc/tmpl/gnome-canvas-pixbuf.sgml: Updated for new argument names.
This commit is contained in:
Federico Mena Quintero 1999-12-08 21:17:52 +00:00 committed by Arturo Espinosa
parent e7b2454ce3
commit a70843bab2
2 changed files with 89 additions and 33 deletions

View File

@ -24,12 +24,15 @@ struct GdkPixbufModule {
gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func, ModuleUpdatedNotifyFunc update_func, gpointer user_data); gpointer (* begin_load) (ModulePreparedNotifyFunc prepare_func, ModuleUpdatedNotifyFunc update_func, gpointer user_data);
void (* stop_load) (gpointer context); void (* stop_load) (gpointer context);
gboolean (* load_increment)(gpointer context, const gchar *buf, guint size); gboolean (* load_increment)(gpointer context, const gchar *buf, guint size);
/* Animation loading */
GdkPixbufAnimation *(* load_animation) (FILE *f);
}; };
</STRUCT> </STRUCT>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_module</NAME> <NAME>gdk_pixbuf_get_module</NAME>
<RETURNS>GdkPixbufModule *</RETURNS> <RETURNS>GdkPixbufModule *</RETURNS>
gchar *buffer, gint size gchar *buffer,gint size
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_load_module</NAME> <NAME>gdk_pixbuf_load_module</NAME>
@ -85,7 +88,7 @@ void
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_loader_write</NAME> <NAME>gdk_pixbuf_loader_write</NAME>
<RETURNS>gboolean </RETURNS> <RETURNS>gboolean </RETURNS>
GdkPixbufLoader *loader, const gchar *buf, size_t count GdkPixbufLoader *loader,const gchar *buf,size_t count
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_loader_get_pixbuf</NAME> <NAME>gdk_pixbuf_loader_get_pixbuf</NAME>
@ -93,6 +96,11 @@ GdkPixbufLoader *loader, const gchar *buf, size_t count
GdkPixbufLoader *loader GdkPixbufLoader *loader
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_loader_get_animation</NAME>
<RETURNS>GdkPixbufAnimation *</RETURNS>
GdkPixbufLoader *loader
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_loader_close</NAME> <NAME>gdk_pixbuf_loader_close</NAME>
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GdkPixbufLoader *loader GdkPixbufLoader *loader
@ -101,8 +109,24 @@ GdkPixbufLoader *loader
<NAME>GdkPixbuf</NAME> <NAME>GdkPixbuf</NAME>
</STRUCT> </STRUCT>
<STRUCT> <STRUCT>
<NAME>GdkPixbufFrame</NAME>
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
</STRUCT>
<ENUM>
<NAME>GdkPixbufFrameAction</NAME>
typedef enum
{
GDK_PIXBUF_FRAME_RETAIN,
GDK_PIXBUF_FRAME_DISPOSE,
GDK_PIXBUF_FRAME_REVERT
} GdkPixbufFrameAction;
</ENUM>
<STRUCT>
<NAME>GdkPixbuf</NAME> <NAME>GdkPixbuf</NAME>
struct GdkPixbuf { struct GdkPixbuf
{
/* Reference count */ /* Reference count */
int ref_count; int ref_count;
@ -110,6 +134,26 @@ struct GdkPixbuf {
ArtPixBuf *art_pixbuf; ArtPixBuf *art_pixbuf;
}; };
</STRUCT> </STRUCT>
<STRUCT>
<NAME>GdkPixbufFrame</NAME>
struct GdkPixbufFrame
{
GdkPixbuf *pixbuf;
gushort x_offset;
gushort y_offset;
guint delaytime;
GdkPixbufFrameAction action;
};
</STRUCT>
<STRUCT>
<NAME>GdkPixbufAnimation</NAME>
struct GdkPixbufAnimation
{
int n_frames;
GList *frames;
};
</STRUCT>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_get_format</NAME> <NAME>gdk_pixbuf_get_format</NAME>
<RETURNS>ArtPixFormat </RETURNS> <RETURNS>ArtPixFormat </RETURNS>
@ -178,7 +222,7 @@ const char *filename
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new_from_data</NAME> <NAME>gdk_pixbuf_new_from_data</NAME>
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
guchar *data, ArtPixFormat format, gboolean has_alpha,int width, int height, int rowstride,ArtDestroyNotify dfunc, gpointer dfunc_data guchar *data,ArtPixFormat format,gboolean has_alpha,int width, int height,int rowstride,ArtDestroyNotify dfunc,gpointer dfunc_data
</FUNCTION> </FUNCTION>
<FUNCTION> <FUNCTION>
<NAME>gdk_pixbuf_new_from_xpm_data</NAME> <NAME>gdk_pixbuf_new_from_xpm_data</NAME>
@ -217,6 +261,16 @@ GdkPixbuf *pixbuf, GdkDrawable *drawable,int src_x, int src_y,int dest_x, int de
<RETURNS>GdkPixbuf *</RETURNS> <RETURNS>GdkPixbuf *</RETURNS>
GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height GdkPixbuf *dest,GdkDrawable *src, GdkColormap *cmap,int src_x, int src_y,int dest_x, int dest_y,int width, int height
</FUNCTION> </FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_new_from_file</NAME>
<RETURNS>GdkPixbufAnimation *</RETURNS>
const char *filename
</FUNCTION>
<FUNCTION>
<NAME>gdk_pixbuf_animation_destroy</NAME>
<RETURNS>void </RETURNS>
GdkPixbufAnimation *animation,gboolean free_frames
</FUNCTION>
<MACRO> <MACRO>
<NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME> <NAME>GNOME_TYPE_CANVAS_PIXBUF</NAME>
#define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ()) #define GNOME_TYPE_CANVAS_PIXBUF (gnome_canvas_pixbuf_get_type ())

View File

@ -87,11 +87,13 @@ Canvas item to display #GdkPixbuf images.
Normally, the pixbuf item's translation and scaling arguments Normally, the pixbuf item's translation and scaling arguments
are interpreted in units, so they will be modified by the item's are interpreted in units, so they will be modified by the item's
affine transformation. The <link affine transformation. The <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link>, linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>,
<link <link
linkend="GnomeCanvasPixbuf--height-pixels">height_pixels</link>, linkend="GnomeCanvasPixbuf--height-in-pixels">height_in_pixels</link>,
<link linkend="GnomeCanvasPixbuf--x-pixels">x_pixels</link>, and <link
<link linkend="GnomeCanvasPixbuf--y-pixels">y_pixels</link> linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>, and
<link
linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
object arguments can be used to modify this behavior. If one of object arguments can be used to modify this behavior. If one of
these arguments is %TRUE, then the corresponding scaling or these arguments is %TRUE, then the corresponding scaling or
translation value will not be affected lengthwise by the pixbuf translation value will not be affected lengthwise by the pixbuf
@ -102,11 +104,11 @@ Canvas item to display #GdkPixbuf images.
For example, consider a pixbuf item whose size is (300, 200). For example, consider a pixbuf item whose size is (300, 200).
If the item is modified with a scaling transformation of (0.5, If the item is modified with a scaling transformation of (0.5,
2.0) but the <link 2.0) but the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link> is linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
set to %TRUE, then the item will appear to be (300, 400) pixels is set to %TRUE, then the item will appear to be (300, 400)
in size. This means that in this case the item's affine pixels in size. This means that in this case the item's affine
transformation only applies to the height value, while the transformation only applies to the height value, while the width
width value is kept in absolute pixels. value is kept in absolute pixels.
</para> </para>
<para> <para>
@ -122,11 +124,11 @@ Canvas item to display #GdkPixbuf images.
</para> </para>
</footnote>. If the item is then modified by the same scaling </footnote>. If the item is then modified by the same scaling
transformation of (0.5, 2.0) but the <link transformation of (0.5, 2.0) but the <link
linkend="GnomeCanvasPixbuf--y-pixels">y_pixels</link> argument linkend="GnomeCanvasPixbuf--y-in-pixels">y_in_pixels</link>
is set to %TRUE, then the image's upper-left corner will appear argument is set to %TRUE, then the image's upper-left corner
to be at position (15, 40). In this case, the affine will appear to be at position (15, 40). In this case, the
transformation is applied only to the x offset, while the y affine transformation is applied only to the x offset, while the
offset is kept in absolute pixels. y offset is kept in absolute pixels.
</para> </para>
<para> <para>
@ -215,12 +217,12 @@ Canvas item to display #GdkPixbuf images.
will only be used if the <link will only be used if the <link
linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument linkend="GnomeCanvasPixbuf--width-set">width_set</link> argument
is %TRUE. If the <link is %TRUE. If the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link> linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
argument is %FALSE, the width will be taken to be in canvas units, argument is %FALSE, the width will be taken to be in canvas units,
and thus will be scaled along with the canvas item's affine and thus will be scaled along with the canvas item's affine
transformation. If width_pixels is %TRUE, the width will be taken transformation. If width_in_pixels is %TRUE, the width will be
to be in pixels, and will visually remain a constant size even if taken to be in pixels, and will visually remain a constant size
the item's affine transformation changes. even if the item's affine transformation changes.
</para> </para>
<!-- ##### ARG GnomeCanvasPixbuf:width_set ##### --> <!-- ##### ARG GnomeCanvasPixbuf:width_set ##### -->
@ -232,7 +234,7 @@ Canvas item to display #GdkPixbuf images.
used instead. This argument is %FALSE by default. used instead. This argument is %FALSE by default.
</para> </para>
<!-- ##### ARG GnomeCanvasPixbuf:width_pixels ##### --> <!-- ##### ARG GnomeCanvasPixbuf:width_in_pixels ##### -->
<para> <para>
If this argument is %TRUE, then the width of the pixbuf will be If this argument is %TRUE, then the width of the pixbuf will be
considered to be in pixels, that is, it will not be visually considered to be in pixels, that is, it will not be visually
@ -261,10 +263,10 @@ Canvas item to display #GdkPixbuf images.
The default is %FALSE. The default is %FALSE.
</para> </para>
<!-- ##### ARG GnomeCanvasPixbuf:height_pixels ##### --> <!-- ##### ARG GnomeCanvasPixbuf:height_in_pixels ##### -->
<para> <para>
Works in the same way as the <link Works in the same way as the <link
linkend="GnomeCanvasPixbuf--width-pixels">width_pixels</link> linkend="GnomeCanvasPixbuf--width-in-pixels">width_in_pixels</link>
argument. The default is %FALSE. argument. The default is %FALSE.
</para> </para>
@ -285,7 +287,7 @@ Canvas item to display #GdkPixbuf images.
coordinates. coordinates.
</para> </para>
<!-- ##### ARG GnomeCanvasPixbuf:x_pixels ##### --> <!-- ##### ARG GnomeCanvasPixbuf:x_in_pixels ##### -->
<para> <para>
If this argument is %TRUE, the pixbuf's translation with respect If this argument is %TRUE, the pixbuf's translation with respect
to its logical origin in item-relative coordinates will be in to its logical origin in item-relative coordinates will be in
@ -312,11 +314,11 @@ Canvas item to display #GdkPixbuf images.
default is %FALSE. default is %FALSE.
</para> </para>
<!-- ##### ARG GnomeCanvasPixbuf:y_pixels ##### --> <!-- ##### ARG GnomeCanvasPixbuf:y_in_pixels ##### -->
<para> <para>
Works in the same way as the <link Works in the same way as the <link
linkend="GnomeCanvasPixbuf--x-pixels">x_pixels</link> argument. linkend="GnomeCanvasPixbuf--x-in-pixels">x_in_pixels</link>
The default is %FALSE. argument. The default is %FALSE.
</para> </para>
<!-- <!--