Coder Social home page Coder Social logo

ultralight-ux / appcore Goto Github PK

View Code? Open in Web Editor NEW
77.0 7.0 24.0 2.29 MB

Cross-platform app runtime module for Ultralight

Home Page: https://ultralig.ht

License: GNU Lesser General Public License v2.1

CMake 1.18% C++ 9.47% Batchfile 0.07% C 84.79% HLSL 0.45% Metal 0.43% HTML 0.02% Objective-C 2.41% Objective-C++ 1.01% Shell 0.01% Less 0.15%

appcore's Issues

FileSystemWin does not implement all FileSystem methods

There is a huge list of boilerplate to fill. Do I really need to implement file deletion and getting free volume space if I only want to display a page? Why is even OpenTemporaryFile separate from OpenFile? Do I need to write my own String16Vector implementation?

MIME type of .js file on Windows is text/plain (sometimes?)

[GetFileMimeType] Bin/launcher-ui/js/app.js = text/plain
[GetFileMimeType] Bin/launcher-ui/css/main.css = text/css
[Ultralight] [Console]: [JS] [Error] TypeError: 'text/plain' is not a valid JavaScript MIME type. (@1:11)

I see the default platform filesystem implementation on Windows uses registry to check for MIME type. However...
image

Turns out on some systems it's actually set to text/plain for .js files in the registry! I'd propose adding some hardcoded mapping for the most common web extensions, especially that WebCore will refuse to load a .js file with wrong MIME type, apparently, unlike Firefox and Chromium. I guess either that or make a patch to ignore wrong MIME type for JS files?

Wrong description of Ref<App> Create()

Ref Create() comments say that one should "set your Config before creating App".

/// Config before creating App. (@see Platform::set_config)

However, as AppWin::AppWin() constructor overrides with Platform::instance().set_config, it has no effect.

Platform::instance().set_config(config);

For example, if I load https://google.co.kr like below,

auto& platform = ultralight::Platform::instance();

Config config;
config.font_family_standard = "Malgun Gothic";
config.font_family_fixed = "Malgun Gothic";
config.font_family_serif = "Malgun Gothic";
config.font_family_sans_serif = "Malgun Gothic";
config.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";

platform.set_config(config);

app_ = App::Create();

The result is like this:
image

The CORRECT way to setup config is,

app_ = App::Create();

auto& platform = ultralight::Platform::instance();

Config config;
config.font_family_standard = "Malgun Gothic";
config.font_family_fixed = "Malgun Gothic";
config.font_family_serif = "Malgun Gothic";
config.font_family_sans_serif = "Malgun Gothic";
config.user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36";

platform.set_config(config);

app_->renderer() = Renderer::Create(); //this overides default config with 'my' config

which leads to Chrome-like correctly rendered scene.
image

How I can set window Icon

Hi,
I have the taskbar icon with a .rc file. No problem for this.
But, How I can use my .rc Icon ID for the Window? I don't find any way to access HWND (for Windows).

Thanks!

[Feature Request] Create Ultralight renderer on existing window

In order to create a VST plugin, the host creates a window and passes the reference to the plugin to render on. I'd like to be able to use Ultralight for this, but it does not seem that it's possible to pass a previously created window like this.

Could this either a) be documented or b) be implemented?

Thanks much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.