Gtk2
view release on metacpan or search on metacpan
xs/GdkPixbuf.xs view on Meta::CPAN
=cut
=for enum GdkColorspace
=cut
## void gdk_pixbuf_render_threshold_alpha (GdkPixbuf * pixbuf, GdkBitmap * bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold);
void
gdk_pixbuf_render_threshold_alpha (pixbuf, bitmap, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold)
GdkPixbuf * pixbuf
GdkBitmap * bitmap
int src_x
int src_y
int dest_x
int dest_y
int width
int height
int alpha_threshold
## void gdk_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, GdkDrawable *drawable, GdkGC *gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkRgbDither dither, int x_dither, int y_dither)
void
gdk_pixbuf_render_to_drawable (pixbuf, drawable, gc, src_x, src_y, dest_x, dest_y, width, height, dither, x_dither, y_dither)
GdkPixbuf *pixbuf
GdkDrawable *drawable
GdkGC *gc
int src_x
int src_y
int dest_x
int dest_y
int width
int height
GdkRgbDither dither
int x_dither
int y_dither
## void gdk_pixbuf_render_to_drawable_alpha (GdkPixbuf *pixbuf, GdkDrawable *drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, GdkPixbufAlphaMode alpha_mode, int alpha_threshold, GdkRgbDither dither, int x_dither, int y_...
void
gdk_pixbuf_render_to_drawable_alpha (pixbuf, drawable, src_x, src_y, dest_x, dest_y, width, height, alpha_mode, alpha_threshold, dither, x_dither, y_dither)
GdkPixbuf *pixbuf
GdkDrawable *drawable
int src_x
int src_y
int dest_x
int dest_y
int width
int height
GdkPixbufAlphaMode alpha_mode
int alpha_threshold
GdkRgbDither dither
int x_dither
int y_dither
=for apidoc
=for signature pixmap = $pixbuf->render_pixmap_and_mask_for_colormap ($colormap, $alpha_threshold)
=for signature (pixmap, mask) = $pixbuf->render_pixmap_and_mask_for_colormap ($colormap, $alpha_threshold)
=cut
void
gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, colormap, alpha_threshold)
GdkPixbuf *pixbuf
GdkColormap *colormap
int alpha_threshold
PPCODE:
{
GdkPixmap *pm;
GdkBitmap *bm;
gdk_pixbuf_render_pixmap_and_mask_for_colormap (pixbuf, colormap, &pm, GIMME_V == G_ARRAY ? &bm : 0, alpha_threshold);
XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pm)));
if (GIMME_V == G_ARRAY)
XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (bm)));
}
=for apidoc
=for signature pixmap = $pixbuf->render_pixmap_and_mask ($alpha_threshold)
=for signature (pixmap, mask) = $pixbuf->render_pixmap_and_mask ($alpha_threshold)
=cut
void
gdk_pixbuf_render_pixmap_and_mask (pixbuf, alpha_threshold)
GdkPixbuf *pixbuf
int alpha_threshold
PPCODE:
{
GdkPixmap *pm;
GdkBitmap *bm;
gdk_pixbuf_render_pixmap_and_mask (pixbuf, &pm, GIMME_V == G_ARRAY ? &bm : 0, alpha_threshold);
XPUSHs (sv_2mortal (newSVGdkPixmap_noinc (pm)));
if (GIMME_V == G_ARRAY)
XPUSHs (sv_2mortal (newSVGdkBitmap_noinc (bm)));
}
=for apidoc get_from_image
=for signature pixbuf = Gtk2::Gdk::Pixbuf->get_from_image ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height)
=for signature pixbuf = $pixbuf->get_from_image ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height)
=for arg src (GdkImage)
Fetch pixels from a Gtk2::Gdk::Image as a Gtk2::Gdk::Pixbuf.
Returns a new Gtk2::Gdk::Pixbuf if you use the class form, or I<$pixbuf> if
you call it on an existing pixbuf.
=cut
=for apidoc
=for signature pixbuf = Gtk2::Gdk::Pixbuf->get_from_drawable ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height)
=for signature pixbuf = $pixbuf->get_from_drawable ($src, $cmap, $src_x, $src_y, $dest_x, $dest_y, $width, $height)
=for arg src (GdkDrawable)
Fetch pixels from a Gtk2::Gdk::Drawable as a Gtk2::Gdk::Pixbuf.
Returns a new Gtk2::Gdk::Pixbuf if you use the class form, or I<$pixbuf> if
you call it on an existing pixbuf.
=cut
## GdkPixbuf *gdk_pixbuf_get_from_drawable (GdkPixbuf *dest, GdkDrawable *src, GdkColormap *cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
SV *
gdk_pixbuf_get_from_drawable (dest_or_class, src, cmap, src_x, src_y, dest_x, dest_y, width, height)
SV * dest_or_class
SV * src
GdkColormap_ornull *cmap
int src_x
int src_y
int dest_x
int dest_y
int width
int height
ALIAS:
get_from_image = 1
PREINIT:
GdkPixbuf * pixbuf, * dest;
CODE:
dest = (gperl_sv_is_defined (dest_or_class) && SvROK (dest_or_class))
? SvGdkPixbuf (dest_or_class)
: NULL;
if (ix == 1)
pixbuf = gdk_pixbuf_get_from_image (dest,
SvGdkImage (src),
cmap, src_x, src_y,
dest_x, dest_y,
width, height);
else
pixbuf = gdk_pixbuf_get_from_drawable (dest,
SvGdkDrawable (src),
cmap, src_x, src_y,
dest_x, dest_y,
width, height);
if (!pixbuf)
xs/GdkPixbuf.xs view on Meta::CPAN
OUTPUT:
RETVAL
MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::PixbufAnimationIter PREFIX = gdk_pixbuf_animation_iter_
BOOT:
gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_PIXBUF_ANIMATION_ITER, TRUE);
int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter)
GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter)
gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter)
### gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter, const GTimeVal *current_time)
gboolean
gdk_pixbuf_animation_iter_advance (iter, current_time_seconds=0, current_time_microseconds=0)
GdkPixbufAnimationIter *iter
guint current_time_seconds
guint current_time_microseconds
CODE:
if (current_time_microseconds) {
GTimeVal current_time;
current_time.tv_sec = current_time_seconds;
current_time.tv_usec = current_time_microseconds;
RETVAL = gdk_pixbuf_animation_iter_advance (iter,
¤t_time);
} else
RETVAL = gdk_pixbuf_animation_iter_advance (iter, NULL);
OUTPUT:
RETVAL
MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::Pixbuf PREFIX = gdk_pixbuf_
#if GTK_CHECK_VERSION(2,2,0)
## GdkPixbufFormat is an information structure, so we'll just hashify it so you
## can use Data::Dumper on it.
# returned strings should be freed
### gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format)
### gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format)
### gchar ** gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format)
### gchar ** gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format)
### gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format)
### gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format)
### gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format)
### gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format)
### GSList *gdk_pixbuf_get_formats (void)
## list should be freed, but not formats
=for apidoc
Returns a list of hashes with information about the formats supported by
Gtk2::Gdk::Pixbuf.
=cut
void
gdk_pixbuf_get_formats (class=NULL)
PREINIT:
GSList * formats, * i;
PPCODE:
formats = gdk_pixbuf_get_formats ();
for (i = formats ; i != NULL ; i = i->next) {
XPUSHs (sv_2mortal (newSVGdkPixbufFormat (i->data)));
}
g_slist_free (formats);
PERL_UNUSED_VAR (ax);
#endif /* >= 2.2.0 */
#if GTK_CHECK_VERSION(2,4,0)
### GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename, gint *width, gint *height)
=for apidoc
=for signature (format, width, height) = $pixbuf->get_file_info ($filename)
Parses enough of I<$filename> to determine and return the format and size.
If the format is unknown or the file can't be opened, returns an empty list.
=cut
void gdk_pixbuf_get_file_info (class, filename)
GPerlFilename filename
PREINIT:
GdkPixbufFormat *format;
gint width = -1;
gint height = -1;
PPCODE:
format = gdk_pixbuf_get_file_info (filename, &width, &height);
if (format) {
EXTEND (sp, 3);
PUSHs (sv_2mortal (newSVGdkPixbufFormat (format)));
PUSHs (sv_2mortal (newSViv (width)));
PUSHs (sv_2mortal (newSViv (height)));
}
#endif
MODULE = Gtk2::Gdk::Pixbuf PACKAGE = Gtk2::Gdk::PixbufFormat PREFIX = gdk_pixbuf_format_
=for position DESCRIPTION
=head1 DESCRIPTION
A C<Gtk2::Gdk::PixbufFormat> has the following format information fields,
eg. C<< $format->{'name'} >>,
name string
description string
mime_types arrayref of strings
extensions arrayref of strings, eg. ['jpg','jpeg']
is_writable 0 or 1
is_scalable 0 or 1 # in Gtk 2.6 up
is_disabled 0 or 1 # in Gtk 2.6 up
license string # in Gtk 2.6 up
=cut
#if GTK_CHECK_VERSION(2, 2, 0)
void
DESTROY (sv)
SV *sv
CODE:
_gperl_remove_mg (SvRV (sv));
#endif /* 2.2.0 */
#if GTK_CHECK_VERSION(2, 6, 0)
=for apidoc
Note that any change caused by this method will not immediately affect
I<$format-E<gt>{is_disabled}>. You need to refetch the format in order to see
the new value.
=cut
void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format, gboolean disabled);
#endif /* 2.6.0 */
( run in 0.825 second using v1.01-cache-2.11-cpan-5511b514fd6 )