Torsten Schönfeld > Glib-1.222 > GParamSpec.xs

Download:
Glib-1.222.tar.gz

Annotate this POD

CPAN RT

New  2
Open  2
View Bugs
Report a bug
Source  

DESCRIPTION ^

Glib::ParamSpec encapsulates the metadata required to specify parameters. You will see these most often when creating new Glib::Object types; see Glib::Type->register and Glib::Object::Subclass.

Parameter specifications allow you to provide limits for validation as well as nicknames and blurbs to document the parameters. Blurbs show up in reference documentation such as this page or the gtk+ C API reference; i'm not really sure where the nicknames get used. The Perl bindings for the most part ignore the difference between dashes and underscores in the paramspec names, which typically find use as the actual keys for object parameters.

It's worth noting that Glib offers various sizes of integer and floating point values, while Perl really only deals with full integers and double precision floating point values. The size distinction is important for the underlying C libraries.

Dashes in the name are converted to underscores.

$value must be the right type for $paramspec (with usual stringizing, numizing, etc). value_validate checks the further restrictions such as minimum and maximum for a numeric type or allowed characters in a string. The "made valid" return is then for instance clamped to the min/max, or offending chars replaced by a substitutor.

DESCRIPTION ^

This page documents the extra accessors available for all of the integer type paramspecs: Char, Int, and Long. Perl really only supports full-size integers, so all of these methods return IVs; the distinction of integer size is important to the underlying C library and also determines the data value range.

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Char

  Glib::ParamSpec
  +----Glib::Param::Int

  Glib::ParamSpec
  +----Glib::Param::Long

DESCRIPTION ^

This page documents the extra accessors available for all of the unsigned integer type paramspecs: UChar, UInt, and ULong. Perl really only supports full-size integers, so all of these methods return UVs; the distinction of integer size is important to the underlying C library and also determines the data value range.

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::UChar

  Glib::ParamSpec
  +----Glib::Param::UInt

  Glib::ParamSpec
  +----Glib::Param::ULong

DESCRIPTION ^

This page documents the extra accessors available for the signed 64 bit integer type paramspecs. On 32 bit machines and even on some 64 bit machines, perl really only supports 32 bit integers, so all of these methods convert the values to and from Perl strings if necessary.

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Int64

DESCRIPTION ^

This page documents the extra accessors available for the unsigned 64 bit integer type paramspecs. On 32 bit machines and even on some 64 bit machines, perl really only supports 32 bit integers, so all of these methods convert the values to and from Perl strings if necessary.

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::UInt64

DESCRIPTION ^

This page documents the extra accessors available for both of the floating-point type paramspecs: Float and Double. Perl really only supports doubles, so all of these methods return NVs (that is, the C type "double"); the distinction of size is important to the underlying C library and also determines the data value range.

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Float

  Glib::ParamSpec
  +----Glib::Param::Double

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Boolean

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Enum

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Flags

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::String

HIERARCHY ^

  Glib::ParamSpec
  +----Glib::Param::Unichar