[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ggi-develop
Subject:    Re: [ggi-develop] ggiWidgetGetUid
From:       Peter Rosin <peda () lysator ! liu ! se>
Date:       2010-05-11 19:17:25
Message-ID: 4BE9AD45.7010408 () lysator ! liu ! se
[Download RAW message or body]

Den 2010-05-11 20:38 skrev Andreas Beck:
> Hi Peter,
>
>> Should ggiWidgetGetUid be made static, kept extern and have a declaration
>> added in some header or perhaps even be exported from the widget lib?
>
> Hmm - I actually envisioned it to be kept static. The idea of the wuid
> field is to have a very simple unique identifier that can be used to
> find a widget within a widget tree later on, even if it got rearranged
> dynamically, e.g. when introducing drag&drop docking behaviours where
> you can e.g. rearrange the columns of a table or similar.
>
> Of course this could as well be done using the pointer to the widget,
> but especially in a dynamic scenario I somewhat dislike keeping
> pointers to things that might have gotten deallocated elsewhere.
>
>
> Even when you create external widgets you would probably still use
> ggiWidgetAllocate to allocate the widget and fill out the initial values,
> so I don't think exporting ggiWidgetGetUid would be helpful externally.
>
> But if you have other ideas, please share them, maybe I overlooked
> something.

Hi ANdy,

No, I don't see any point in exposing it. I don't have any custom widgets
in my apps, so I won't be needing it until at least the point where I'm
writing my own widgets. But the widget I'm going to start writing - if
I ever do start writing widgets - is a property page type widget I think,
and that belongs in the widget lib anyway...

So, I'm adding static to that function so that the lib builds with
-Werror-implicit-function-declaration.

Cheers,
Peter

-- 
They are in the crowd with the answer before the question.
 > Why do you dislike Jeopardy?

------------------------------------------------------------------------------

_______________________________________________
ggi-develop mailing list
ggi-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ggi-develop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic