Re: Gtk2::Ex::MarkupTextBuffer




On Feb 6, 2005, at 9:49 PM, Kevin C. Krinke wrote:

Interesting point brought up in IRC earlier:

<irc channel="irc.gnome.org#gtk-perl">

        <muppet> kck: it looks like pango_parse_markup isn't too hard to
        bind, and PangoAttributes hold the info you need to turn markup
        into tags...  but the attributes are not bound and are not fun
        to bind.
        <kck> It's all good. I've just learned how to use XML::Parser
        and XML::LibXML.
        <kck> meaning bind it or not I gained something from the
        experience
        <muppet> cool

</irc>

Question stands then; do I submit the module to CPAN/gtk2-perl-ex.sf.net
or just use it locally until the bindings are done? (Maybe make a note
in the POD that it'll be deprecated at some point and that it's only a
"for now" module?)

To clarify... each PangoAttribute holds the start-index and end-index of the region to which the attribute applies, and has different information according to the type. PangoAttrList is a collection of PangoAttributes. You can use the PangoAttrList in perl now, but you can't do anything with the Attributes because those aren't bound. I have a prototype for them, but it's not ready for anybody to use and there's no chance of it being in 1.08x.

pango_parse_markup() would remove the need for Gtk2::Ex::MarkupTextBuffer to parse the pango markup itself, but you'd still have to do the grunt work to turn the AttrList into appropriate TextTags in the TextBuffer. So, the bindings wouldn't *replace* your module, they'd just make it more efficient.

I don't see anything wrong with you releasing a version now that uses some XML parser, and then later upgrading it to remove that dependency.

--
The door is locked. I tried to open it, but the lock is harder to pick than a broken nose.
  -- Sensei, on 'I, Ninja'




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]