Re: #koi #split-screen-feauture #swap-screen #agl-compositor

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

 



On Mon, Apr 19, 2021 at 02:35:53AM -0700, Francesco ARGENTIERI (KINETON) wrote:
> Hi everyone,
Hi Francesco,
> I'm working on both customized homescreen and launcher applications,  which inherith from the original application.
> So I want achive the result shown in figure attached below, as described in [agl-compositor](https://docs.automotivelinux.org/en/master/#5_Component_Documentation/1_agl-compositor/). 
> I have adjusted the method tapshortcut from launcher in this way:
> 
> ```cpp
> void HomescreenHandler::tapShortcut(const QString &application_id, const QString &output_name) 
>   struct json_object *j_json = json_object_new_object();
>   struct json_object *value{nullptr};
>   json_object_object_add(j_json, "area", value);
>   value = json_object_new_string("normal.full");
>   if (output_name.isEmpty()) {
>     last_app = application_id;
>     mp_hs_->showWindow(application_id.toStdString().c_str(), j_json);
>     aglShell_->activate_app(nullptr, application_id, nullptr);
>     hmi_->setSplitScreenButtonStatus(true);
>   } else {
>     if (hmi_->getSplitScreenButtonStatus()) {
>       value = json_object_new_string("split.sub");
>       aglShell_->set_window_props(nullptr, application_id, AGL_SHELL_DESKTOP_APP_ROLE_SPLIT_VERTICAL, 0, 100, 960, 0, 1920, 880);
>       mp_hs_->showWindow(application_id.toStdString().c_str(), j_json);
>     }
>     aglShell_->activate_app_by_screen(output_name, application_id, nullptr);
>   }
> }
> ```
Well, in hindsight, we should probably clear up some of the older bits,
still remaining, that clearly can confuse people. Passing
`j_json` to libhomescreen has no implication whatsoever on how
to position or start the split-surface kind of surface. So any of "areas",
"split.sub" or "normal.full" are not used.

- showWindow() verb calls into libhomescreen which would attempt to
start the application if it is not already started. If already started, it
doesn't do anything.
- activate_app() calls into private extension and informs the compositor
to display/show the app_id identified by application_id.
- set_window_props() calls into private extension and informs the
compositor that the application_id would have a distinct role. Some
roles like split here, would ignore any additional parameters you might be
giving it. There's only AGL_SHELL_DESKTOP_APP_ROLE_SPLIT_VERTICAL or
AGL_SHELL_DESKTOP_APP_ROLE_SPLIT_HORIZONTAL, which, depending on the
output size would effectively be half of output. The client itself, is
responsible for resizing to those values (after the compositor has
informed it). Those additional parameters only makes sense for
dialg/pop-up to specify an initial positioning or to create some kind of
a bounding box to clip the surface to.

I've posted an example w/ Qt that does the split at [1]. What I
haven't tested lately, is the activation of the split surface roles, and
at the moment I assume it only happens for the that particular surface.
Probably a feature here would be to take focus input into account or
to have some kind of a gesture that tells the compositor which
surface to change between the two. Note that this example is a bit
different from what you're trying to achieve, the application itself
would be started as split one.

> Now, it is not clearly explaned how to be done to control each  areas' applications.</p>
> My question are:</p>
>  1. the paramenter **output_name** affects where I actually  draw my applications areas? </p>
Anywhere you see output, you would need an output. The toolkit usually
exposes that, and I've used QScreen with Qt to retrieve the underlying
wayland object. If there isn't one, it would default to the first one
added to the list by the underlying toolkit (and basically how the
compositor advertises to the toolkit the outputs).
>  2. Is it required specify the two application areas? (x, y, width, height) </p>
Those values are not used for split surfaces where you only have only
two options: vertical or horizontal.

>  3. *"normal.full"* plays a relevant role, so i should use *"split.main"* and *"split.sub"* such us keywords values?</p>
No, no role whatsoever.

> 
> ---
> 
> I would like receive information about the process to subscribe/register the company which i work as  AGL memeber.
Here Walt Miner (CC'ed) would be the person to reach.

[1] https://gitlab.collabora.com/mvlad/split-agl

> 
> 
> 
> 
> 
> 
> 




-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#9137): https://lists.automotivelinux.org/g/agl-dev-community/message/9137
Mute This Topic: https://lists.automotivelinux.org/mt/82204671/2167316
Mute #koi:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/koi
Mute #split-screen-feauture:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/split-screen-feauture
Mute #swap-screen:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/swap-screen
Mute #agl-compositor:https://lists.automotivelinux.org/g/agl-dev-community/mutehashtag/agl-compositor
Group Owner: agl-dev-community+owner@xxxxxxxxxxxxxxxxxxxxxxxxx
Unsubscribe: https://lists.automotivelinux.org/g/agl-dev-community/leave/4543822/2167316/883735764/xyzzy [list-automotive-discussions82@xxxxxxxxxxx]
-=-=-=-=-=-=-=-=-=-=-=-


Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux