Re: RFC: new API proposal for FcPattern iterator

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

 



Hi Akira,

My gut feeling is that that's a lot of API for usecases we don't fully have in
mind.  How about a much simpler API to return a FcStringSet from a pattern?

behdad

On 09/12/2012 09:33 PM, Akira TAGOH wrote:
> Hi,
> 
> I'm working on adding new API to iterate things in FcPattern now:
>   https://bugs.freedesktop.org/show_bug.cgi?id=43367
> 
> and proposing following APIs:
> int FcPatternObjectCount (const FcPattern *pat)
>   Returns the number of the object in FcPattern.
> 
> void FcPatternIterStart (const FcPattern *pat, FcPatternIter *iter)
>   Initialize the iterator with the first iterator in FcPattern.
> 
> FcBool FcPatternIterNext (const FcPattern *pat, FcPatternIter *iter)
>   Set the iterator to point to the next object in FcPattern.
> 
> FcBool FcPatternIterEqual (const FcPattern *p1, FcPatternIter *i1,
> const FcPattern *p2, FcPatternIter *i2)
>   Check if both iterators point to same object and contain same value.
> 
> FcBool FcPatternFindIter (const FcPattern *pat, FcPatternIter *iter,
> const char *object)
>   Set the iterator to point to the object in FcPattern if any and
> return FcTrue. return FcFalse otherwise.
> 
> FcBool FcPatternIterIsValid (const FcPattern *pat, FcPatternIter *iter)
>   Check if the iterator point to the valid entry in FcPattern. return
> FcFalse otherwise.
> 
> const char *FcPatternIterGetObject (const FcPattern *pat, FcPatternIter *iter)
>   Return the object name in FcPattern which the iterator point to.
> 
> int FcPatternIterValueCount (const FcPattern *pat, FcPatternIter *iter)
>   Return the number of the values in the object which the iterator point to.
> 
> void FcPatternIterGetValue (const FcPattern *pat, FcPatternIter *iter,
> int id, FcValue *v)
>   Return in FcValue nth value which the iterator point to.
> 
> Any comments and suggestions etc are welcome.
> 
> TIA,
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig


[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux