Hello

Currently tizen platform doesn't seem to have any programming guide for external display.
So I want to raise issue about how tizen platform supports external display.

Below previous mails are what I and Carsten are thinking about external display. I hope to get more scenarios and opinion about external display from you guys.

Regards
Boram

On 10/06/2014 07:36 PM, Carsten Haitzler wrote:
i see you've basically taken e's model of the world here. :)

what i think here is that it's a "leaky abstraction". it has , imho, far too much detailed information in it.

in my opinion the application has to ask for high level stuff. or let's start with simple high-level and work down when/if needed.

my reasoning - so you plug in an external screen, you create a new window and mark it for "media display". what do we do whent he screne is unplugged? delete the window? move it back to the main screen? and message the app? we have to figure out lifecycle on connect and disconenct of vsarious monitors of various classes. what if external screen reconfigures to be lower res? what if it switches between fullscreen media mode and "desktop multi-window mode"... this requires a lot more than the below even in the most advanced modes.

so to keep simplicity down, we should have some high level usage models first.

1. i want to display this like a video on a tv. when the tv is no longer there please delete the window as it has no use otherwise.

this requires events to let you know a tv-style desktop/screen exists somewhere (has been created), or has been deleted. it requires querying if such a tv screen exists at all at any time. it requires you create a window and then attahc a property that says that that window is for tv purposes. the behaviro for this window would be defined to be:

1. it can be resized at any time (tv changes resolution).
2. it can be deleted any time (tv screen/desktop is disconnected by the user)
3. the window will FILL this screen at all times in fullscreen mode

the apple docs do bring up an intersting point i have forgotten about since my amiga days back in the 1980's - overscan. there should be some property that indicates if you handle overscan or not (and the screen/window will be adjusted accordingly).

note that upstream efl has stuff like requesting noblanking of a screen on a per elm window basis already (and handles it for x1 - nothing in wl land yet), so this is separate.

this case should handle the cases of playback of movies/tv etc., handle games on external screens etc.

2. i want to display this specifically as a mobile ui window OR specifically as a desktop ui window.

this would be used to indicate your app is really only destined for these 2 environments (exclusively). this means that if a mobile ui dekstop/screen vanishes and there is no other screen/desktop to migrate the window to, and it says "i am mobile ONLY" then the widnow is deleted. the same for desktop (but inverted). if you do not give this hint on a window, it should be assumed your window can display on either mobile or desktop ui's, and it will resized/scaled/adjusted to be on either screen as the user sees fit, as they attached/disconnect screens and request windows to move between them. your profile and scaling factors may change etc. etc. on the fly.

3. i PREFER mobile or PREFER desktop mode, but will migrate if i have to.

here an app - eg like an office app (ms office, libreoffice etc.) that would want to be on a desktop for productivity, but CAN switch to mobile mode if it has to. the idea here is that the moment a "desktop" screen/desktop is enabled/attached, the window migrates to this desktop/screen right away. when it is disconnected app migrates to the "closest thing you have" - might be mobile screen. there is also the other - where it wants mobiule mode, but will live with being in a window if it has to on a desktop display and no mobile display is there.

can we list more usage scenarios/models to cover. i really think we should do this FIRST.

On 10/06/2014 04:54 PM, Boram Park wrote:
Hello Carten

Currently I'm trying to find out how we.. tizen platform can support external display things easily for application developer.

I think strongly and technically tizen platform needs to offer this kind of guide to tizen application developers. So I and my team had discussion about this. And I want to share our proposal with you.

[proposal]
Elementary seems proper module to implement this functionality because it's most high level library to create GUI and app developers are more familiar with it than other modules. Of course, other GUI toolkit, such like GTK, doesn't have this kind of functionality. But I believe it must be very convenient and useful in not only mobile world but also desktop world for app developer. The concept of proposal is "A developer can connect elm_win to elm_desk. Then eom_win will be shown in elm_desk which is on external display." When e_desk is created and destroyed, elm_desk will be also added and removed. So it won't have any dependency with window system.

--- structure ------------------------------------------------------------------------------------------
typedef struct {
    int zone_id
    int x, y, w, h
    Eina_List *desks
} Elm_Zone

typedef struct {
    int desk_id
    Elm_Zone *zone
    char *profile  //mobile | desktop | tv | ...
    char *extinfo  //mirror | extended | ...
} Elm_Desk

--- connecting elm_win to elm_desk ----------------------------------------------------------
Elm_Zone *zone;
Elm_Desk *desk;
Eina_List *zones = elm_zone_get_info_get ()

EINA_LIST_FOREACH (zones, l, zone)
{
    EINA_LIST_FOREACH (zone->desktops, ll, desktop)
    {
if (!strcmp(desktop->profile, "mobile") && !strcmp(desktop->extinfo, "mirror"))
        {
            Evas_Object *win = elm_win_add()

            elm_win_desk_set (win, desk)
            ...
        }
    }
}

---- handling events ----------------------------------------------------------------------------- evas_object_smart_callback_add(win, "desk.added", _win_desk_added_cb, NULL) evas_object_smart_callback_add(win, "desk.removed", _win_desk_added_cb, NULL) evas_object_smart_callback_add(win, "desk.changed", _win_desk_added_cb, NULL)

static void
_win_desk_added_cb(void *data, Evas_Object *obj, void *event)
{
    Elm_Desktop_Event *ev = event;
    Elm_desk *desk = ev->desk;

if (!strcmp(desktop->profile, "mobile") && !strcmp(desktop->extinfo, "mirror"))
    {
        Evas_Object *win = elm_win_add()

        elm_win_desk_set (win, desk)
        ...
    }
}

Regards
Boram


--
The above message is intended solely for the named addressee and may
contain trade secret, industrial technology or privileged and
confidential information otherwise protected under applicable law
including the Unfair Competition Prevention and Trade Secret Protection
Act. Any unauthorized dissemination, distribution, copying or use of the
information contained in this communication is strictly prohibited. If
you have received this communication in error, please notify the sender
by email and delete this communication immediately.

--
Boram Park<[email protected]>

_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to