non inplace components (was: DDJ article) (long !!)



Miguel de Icaza <miguel@gnu.org> writes:

> Hello Mathieu,
> 
>    I am sorry for taking so long to apply your patches, but I was in
>    the middle of a reorganization in Bonobo.

npb

> 
>    Could you explain me what your patches do one by one and submit a
patch we're discussing here can be found at
http://www.stud.enst.fr/~lacage/stuff/bonobo-patch.tar.gz
>    ChangeLog entry?

ok.
here is the picture:

There are 2 patches in the file you have:
1) gnome-client-site.c.patch
This patch changes what i think is a wrong behaviour:
originally, size_allocate signals sent to the wrapper were sent to 
the embeddable component through the CORBA interfaces.
I added handling of the size_request signal and made sure that the 
signals sent to the component were REALLY aimed to the component's
widget by cnnectiong the handlers to the wrapper->bin.child widget
instead of wrapper.
The original behaviour was wrong because the wrapper hasn't
necessarily the same size as the component's widget. Such a pb is
shown when you apply my other patches. (see below)
The patch does not change in any way the external behaviour of the
current bonobo.
Here is the Changelog entry for this:
-------------------
gnome-client-site.c
in gnome_client_site_new_view
Added handling of the request_resize signal through the CORBA interfaces.
Changed the signals sent through the CORBA interfaces from the wrapper 
widget to the wrapper's child widget.
-------------------

2) others file patches.
I think these should NOT be applied now. We should first agree on an API
to handle NON_IN_PLACE components.

Here is my proposal:
The patches only implement partially this proposal and should not 
be considered as applyable: this is test stuff i used to play with
the folowing ideas.
----------------proposal-------------------------
in GnomeWrapper:
change gnome_wrapper_set_covered and gnome_wrapper_is_covered to
gnome_wrapper_set_state and gnome_wrapper_get_state

Why ? Because the wrapper must have at least 3 states to know how to 
paint the window of the embeddable
GNOME_WRAPPER_COVERED -> non activated component
GNOME_WRAPER_COVERED_PAINT -> non inplace activated component
GNMOE_WRAPPER_UNCOVERED_PAINT -> inplace activated component
Basically, when the component is inplace and activated, we uncover the 
cover to let events pass through and we paint the border.
When the component is not inplace and activated, we do not uncover the
cover and we paint on the whole cover.

in GnomeViewFrame:
gnome_view_frame_set_covered should be replaced by 
gnome_view_frame_activate and gnome_view_frame_deactivate

Why ? because the set_covered semantics are no longer valid when you take
into account noninplace components (see discussion of the proposed API for
the wrapper). It is however possible to keep the current API for this and 
do nasty things inside the bonobo code to make it work but... well... 
not really nice.

in GnomeEmbeddable
gnome_embeddable_new should be added one more parameter which is used to
say whether we are creating a noninplace component or not
----------------proposal-------------------------

If ppl agree to do this, i can write a nice clean patch to implement it.

> 
> Miguel.

Mathieu

-- 
Mathieu Lacage 
Snailmail: ch 224, 212 Rue de Tolbiac 75013 Paris
email: lacage@email.enst.fr
url: http://www.stud.enst.fr/~lacage



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