# ybrowser
Yingshaoxo browser.

## How to make a desktop envirnoment for linux
First, we don't need those application in our platform to do anything but give us images when they think the user interface should get updated.

Then, what we need to do is send the keyboard, mouse, touchscreen, resolution to that application that is currently running at the front-end.

For each time, there would only have one single app is running at the front-end, I mean they can't send you image/graphic data at the background.

And for the desktop or launcher we have, there would always have 3 buttons at the bottom: recent_apps, home, back.

And what we will do as a desktop envirnoment is to send the mixed graphic data directly to the FTF SPI LCD Screen.

In this case, we don't need any modern desktop envirnoment that is normally greater than 1GB, but a simple python script that is smaller than 500KB.

### Protocol
#### For launcher
```
/add_or_update_app

request:
{
    "app_name": "",
    "app_icon_url": "",
    "app_url": ""
}
```

#### For each app
```
/get_graphic_image

request:
{
}

response:
{
    "has_image": true/false,
    "image": <base64_string>
}



/send_control_info

request:
{
    "keyboard": ascii_for_keyboard,
    "mouse": ...,
    "touch_screen": ...,,
    "resolution": 1080x1920,
}
```

### More Info
I'm not making a desktop launcher, it is mobile only. And all design is resposive since I'll send resolution info to apps in realtime. (By the way, if user want to open two window in desktop, they could just do it, what is the difficulty? Render two window, one is left, another is right, they are all images.)

The multiple_window is not a problem, for those applications, they will always running in the backgroud, if user want to switch back to an app, they just have to use bottom 'recent app' to get recent app list, then click it to do a quick switch.
