[Gtk2-perl-bugs] [Bug 591070] New: no support for GType/GParamGType

View: New views
3 Messages — Rating Filter:   Alert me  

[Gtk2-perl-bugs] [Bug 591070] New: no support for GType/GParamGType

by Bugzilla from bugzilla-daemon@bugzilla.gnome.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=591070

  gnome-perl | Glib | Ver: unspecified
           Summary: no support for GType/GParamGType
           Product: gnome-perl
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Glib
        AssignedTo: gtk2-perl-bugs@...
        ReportedBy: ebassi@...
         QAContact: gtk2-perl-bugs@...
     GNOME version: 2.27/2.28
   GNOME milestone: Unspecified


currently, Glib does not support values and GParamSpec dealing with GType, thus
it's impossible to deal with object properties storing a GType.

rationale: Clutter has a class which stores an interval between two values,
ClutterInterval; it would be probably more Perl-ish to override the bindings
completely and write intervals as arrayrefs, but one of the nice bits of the
class is that it allows subclasses to override the interval progress using
their own progress function, e.g.:

  interval('boolean') = [ false, true ]
  compute(interval, progress=0.0) = false
  compute(interval, progress=0.2) = false
  compute(interval, progress=0.4) = false
  compute(interval, progress=0.6) = true
  compute(interval, progress=0.8) = true
  compute(interval, progress=1.0) = true

  myinterval('boolean') = [ false, true ]
  myinterval.threshold = 0.7
  compute(myinterval, progress=0.0) = false
  compute(myinterval, progress=0.2) = false
  compute(myinterval, progress=0.4) = false
  compute(myinterval, progress=0.6) = false
  compute(myinterval, progress=0.8) = true
  compute(myinterval, progress=1.0) = true

the type of the value of the interval is stored as a :value-type property in
the C class, declared with g_param_spec_gtype(), since we allow interpolating
the progress even between boxed types (e.g. colors or geometries).

if I try to subclass ClutterInterval from Perl, and pass any value to the
:value-type property at construction time, Perl, Glib and GLib will get *very*
angry at me.


--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=591070.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gtk2-perl-bugs mailing list
Gtk2-perl-bugs@...
https://lists.sourceforge.net/lists/listinfo/gtk2-perl-bugs

[Gtk2-perl-bugs] [Bug 591070] no support for GType/GParamGType

by Bugzilla from bugzilla-daemon@bugzilla.gnome.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=591070

  gnome-perl | Glib | Ver: unspecified




------- Comment #1 from Emmanuele Bassi  2009-08-07 16:16 UTC -------
Created an attachment (id=140129)
 --> (http://bugzilla.gnome.org/attachment.cgi?id=140129&action=view)
Support GTypes in values and properties

Currently, Glib is missing support for declaring Object properties
storing GType (as package names), and for setting/getting those
properties.

The implementation of GParamSpecGType is pretty trivial, requiring
only the registration of the GParamSpec and some glue for constructor
and accessor to its only public member.

The implementation of GValue support for GType is slightly more
"interesting", since GType is *not* a fundamental type (like one
would expect) but a sub-type of G_TYPE_POINTER.

Fixes bug:


--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=591070.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gtk2-perl-bugs mailing list
Gtk2-perl-bugs@...
https://lists.sourceforge.net/lists/listinfo/gtk2-perl-bugs

[Gtk2-perl-bugs] [Bug 591070] no support for GType/GParamGType

by Bugzilla from bugzilla-daemon@bugzilla.gnome.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=591070

  gnome-perl | Glib | Ver: unspecified

Emmanuel Rodriguez changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |591166
              nThis|                            |




--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=591070.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gtk2-perl-bugs mailing list
Gtk2-perl-bugs@...
https://lists.sourceforge.net/lists/listinfo/gtk2-perl-bugs