Re: Widget descriptors as unions

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

 



On 08/29/2015 10:53 AM, LRN wrote:
> On 29.08.2015 11:46, Florian Pelz wrote:
>> On 08/29/2015 10:39 AM, Jean-Marie Delapierre wrote:
>>> I have explained (I hope in a clear way, but I begin to doubt about it)
>>> that the unions I suggest only own pointers, not child objects as you
>>> say in your answer.
>>
>> I think it is clear, but you still need to declare one such union for
>> each class.
> 
> Union-pointers sound like a neat trick.
> 
> Can't you generate headers with these union-pointer declarations
> automatically, using gobject introspection?
> 

I don't like requiring an additional tool for building. It also makes
the inner workings less transparent than using only the C high-level
assembler with macros. I don't think you can do the declaration
conveniently without additional tools, i.e. just a C preprocessor and
compiler.

> I'm also not sure what are the ABI implications. Are unions compile-time
> only? I guess you'd only change a pointer-union if the class hierarchy of
> its corresponding widget class changes, which sounds like a good excuse to
> recompile anyway...
> 

ABI-wise, unions don't make a difference. But: If you use a library that
uses a class that inherits from a GTK class and the GTK class starts
implementing a new interface, you'd need to recompile the library's
header files.

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux