Re: Are Out-of-Tree Widgets Second-Class Citizens?



On 10/02/2009 12:27 PM, Paul Davis wrote:
> On Fri, Oct 2, 2009 at 1:53 PM, Brian J. Tarricone <bjt23 cornell edu> wrote:
>> On 10/02/2009 07:17 AM, Allin Cottrell wrote:
> 
>>> These two responses (Cody's and Brian's) don't jive. Any more
>>> clarification available? Thanks.
>>
>> Sure they do...  Cody said apps will have to use public APIs instead of
>> accessing struct members directly.  I just pointed out that some things
>> don't have accessor functions yet, which is a known issue, judging by
>> other replies in the thread.
> 
> I'm not buying it. One of responses indicated that "GTK" could use
> struct members directly. Clearly, its not intended for apps to do
> this. The grey zone are  "out-of-tree widgets" ... are these GTK or
> apps? they are surely neither, and the two descriptions conflict here.
> hopefully either there is NO direct struct access, even for in-tree
> widgets, or some mechanism for out-of-tree-widgets to break the seal,
> so to speak.

I think you missed what I (and others wrote).  Personally, I don't care
if gtk uses direct struct access or accessor functions or whatever
internally.  As long as there are *public* accessor functions for
anything that a widget subclass needs to access, it's fine.  If there
are cases where an in-tree gtk widget is accessing private struct
members directly, and it's something that an out-of-tree subclass might
need to use, it should be made public through some sort of accessor
function.  But these things need to be found on a case by case basis.
Morten's original email describes such a case that needs to be fixed.

This isn't some grand conspiracy to thwart making rich out-of-tree
widget subclasses.  This is a transition period, and there are bound to
be problems.  If people find that GSEAL has blocked access to things
they need to use, they should file a bug report, describe what they
need, and, if possible, provide a patch that adds the desired API.

	-brian

P.S. Of course, I don't speak for the gtk maintainers -- this is just my
understanding of what's expected from lurking here for some time.


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