added Linux arm64 SDK
This commit is contained in:
@@ -1 +0,0 @@
|
||||
add_app(Sample2 main.cpp)
|
||||
@@ -1,271 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
* {
|
||||
-webkit-user-select: none;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
max-height: 510px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: linear-gradient(135deg, #4e95ff, #6032e4, #c478ff);
|
||||
width: 900px;
|
||||
height: 600px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
h2, h3 {
|
||||
margin: 0;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
width: 90%;
|
||||
max-width: 850px;
|
||||
height: 510px;
|
||||
gap: 20px;
|
||||
margin-top: 80px;
|
||||
}
|
||||
|
||||
#leftPane {
|
||||
color: white;
|
||||
padding: 40px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#leftPane h2 {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 8px;
|
||||
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
#leftPane p {
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
font-size: 1.2rem;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#leftPane .date {
|
||||
margin-top: auto;
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
align-self: flex-start;
|
||||
padding: 8px 16px;
|
||||
border-radius: 12px;
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
|
||||
#rightPane {
|
||||
border-radius: 24px;
|
||||
background-color: white;
|
||||
flex: 1.2;
|
||||
color: #4361ee;
|
||||
box-shadow: 0 16px 40px -6px rgba(31, 40, 101, 0.25);
|
||||
padding: 35px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#rightPane h3 {
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#rightPane > p {
|
||||
color: #9095a7;
|
||||
font-size: 0.95rem;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.task-group {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.task-group h5 {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
color: #9095a7;
|
||||
font-size: 0.75rem;
|
||||
border-bottom: 1px solid #eceef0;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 5px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
#rightPane ul {
|
||||
padding-left: 0;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
#rightPane li {
|
||||
list-style-type: none;
|
||||
padding: 3px 14px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 6px;
|
||||
color: #4a4d61;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#rightPane li:hover {
|
||||
background-color: #f5f7ff;
|
||||
color: #4361ee;
|
||||
}
|
||||
|
||||
#rightPane li:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
margin-right: 12px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 50%;
|
||||
border: 1.5px solid #dbe2e7;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
|
||||
#rightPane li.checked {
|
||||
color: #9095a7;
|
||||
/*text-decoration: line-through;*/
|
||||
}
|
||||
|
||||
#rightPane li.checked:before {
|
||||
background-color: #4361ee;
|
||||
border-color: #4361ee;
|
||||
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 14 10' fill='none'><path d='M1 5L5 9L13 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.progress {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
right: 35px;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.progress svg {
|
||||
position: absolute;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.progress-bg {
|
||||
fill: none;
|
||||
stroke: #eceef0;
|
||||
stroke-width: 12;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
fill: none;
|
||||
stroke: #4361ee;
|
||||
stroke-width: 12;
|
||||
stroke-dasharray: 251.2;
|
||||
stroke-dashoffset: 50.24;
|
||||
transition: stroke-dashoffset 0.3s ease;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
position: relative;
|
||||
font-size: 0.6rem;
|
||||
font-weight: 600;
|
||||
color: #4361ee;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
var listItems = document.getElementsByTagName('li');
|
||||
for(var i = 0; i < listItems.length; i++) {
|
||||
listItems[i].onclick = function() {
|
||||
this.classList.toggle('checked');
|
||||
updateProgress();
|
||||
}
|
||||
}
|
||||
|
||||
// Initialize progress
|
||||
updateProgress();
|
||||
|
||||
function updateProgress() {
|
||||
var total = document.getElementsByTagName('li').length;
|
||||
var completed = document.getElementsByClassName('checked').length;
|
||||
var percentage = Math.round((completed / total) * 100);
|
||||
|
||||
// Update the progress circle using stroke-dashoffset
|
||||
var circle = document.querySelector('.progress-bar');
|
||||
var radius = circle.getAttribute('r');
|
||||
var circumference = 2 * Math.PI * radius;
|
||||
var offset = circumference - (percentage / 100) * circumference;
|
||||
circle.style.strokeDasharray = `${circumference}`;
|
||||
circle.style.strokeDashoffset = offset;
|
||||
|
||||
// Update text
|
||||
document.querySelector('.progress-text').textContent = `${percentage}%`;
|
||||
}
|
||||
|
||||
// Display current date
|
||||
var now = new Date();
|
||||
var options = { weekday: 'long', month: 'long', day: 'numeric' };
|
||||
document.getElementById('current-date').textContent = now.toLocaleDateString('en-US', options);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div id="leftPane">
|
||||
<h2>Good morning.</h2>
|
||||
<p>A brief look at the day ahead</p>
|
||||
<div class="date" id="current-date">Wednesday, April 9</div>
|
||||
</div>
|
||||
<div id="rightPane">
|
||||
<h3>Upcoming Tasks</h3>
|
||||
<p>Click a task to mark it as completed.</p>
|
||||
<div class="progress">
|
||||
<svg viewBox="0 0 100 100">
|
||||
<circle class="progress-bg" cx="50" cy="50" r="40"></circle>
|
||||
<circle class="progress-bar" cx="50" cy="50" r="40"></circle>
|
||||
</svg>
|
||||
<span class="progress-text">80%</span>
|
||||
</div>
|
||||
|
||||
<div class="task-group">
|
||||
<h5>Today</h5>
|
||||
<ul>
|
||||
<li class="checked">Create layout for initial mockup</li>
|
||||
<li class="checked">Select icons for mobile interface</li>
|
||||
<li class="checked">Discussions regarding new color scheme</li>
|
||||
<li class="checked">Call with architecture clients</li>
|
||||
<li>Create quote for the Marvel redesign</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="task-group">
|
||||
<h5>Tomorrow</h5>
|
||||
<ul>
|
||||
<li>Plan itinerary for conference</li>
|
||||
<li>Discuss haptic interface optimizations</li>
|
||||
<li>Performance improvement analysis</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,119 +0,0 @@
|
||||
#include <AppCore/App.h>
|
||||
#include <AppCore/Window.h>
|
||||
#include <AppCore/Overlay.h>
|
||||
|
||||
using namespace ultralight;
|
||||
|
||||
///
|
||||
/// Welcome to Sample 2!
|
||||
///
|
||||
/// In this sample we'll introduce the AppCore API and use it to build a simple application that
|
||||
/// creates a window and displays a local HTML file.
|
||||
///
|
||||
/// __What is AppCore?__
|
||||
///
|
||||
/// AppCore is an optional, high-performance, cross-platform application framework built on top of
|
||||
/// the Ultralight renderer.
|
||||
///
|
||||
/// It can be used to create standalone, GPU-accelerated HTML applications that paint directly to
|
||||
/// the native window's backbuffer using the best technology available on each platform (D3D,
|
||||
/// Metal, OpenGL, etc.).
|
||||
///
|
||||
/// We will create the simplest possible AppCore application in this sample.
|
||||
///
|
||||
|
||||
class MyApp : public WindowListener,
|
||||
public ViewListener {
|
||||
RefPtr<App> app_;
|
||||
RefPtr<Window> window_;
|
||||
RefPtr<Overlay> overlay_;
|
||||
public:
|
||||
MyApp() {
|
||||
///
|
||||
/// Create our main App instance.
|
||||
///
|
||||
/// The App class is responsible for the lifetime of the application and is required to create
|
||||
/// any windows.
|
||||
///
|
||||
app_ = App::Create();
|
||||
|
||||
///
|
||||
/// Create our Window.
|
||||
///
|
||||
/// This command creates a native platform window and shows it immediately.
|
||||
///
|
||||
/// The window's size (900 by 600) is in virtual device coordinates, the actual size in pixels
|
||||
/// is automatically determined by the monitor's DPI.
|
||||
///
|
||||
window_ = Window::Create(app_->main_monitor(), 900, 600, false, kWindowFlags_Titled);
|
||||
|
||||
///
|
||||
/// Set the title of our window.
|
||||
///
|
||||
window_->SetTitle("Ultralight Sample 2 - Basic App");
|
||||
|
||||
///
|
||||
/// Create a web-content overlay that spans the entire window.
|
||||
///
|
||||
/// You can create multiple overlays per window, each overlay has its own View which can be
|
||||
/// used to load and display web-content.
|
||||
///
|
||||
/// AppCore automatically manages focus, keyboard/mouse input, and GPU painting for each active
|
||||
/// overlay. Destroying the overlay will remove it from the window.
|
||||
///
|
||||
overlay_ = Overlay::Create(window_, window_->width(), window_->height(), 0, 0);
|
||||
|
||||
///
|
||||
/// Load a local HTML file into our overlay's View
|
||||
///
|
||||
overlay_->view()->LoadURL("file:///page.html");
|
||||
|
||||
///
|
||||
/// Register our MyApp instance as a WindowListener so we can handle the Window's OnClose event
|
||||
/// below.
|
||||
///
|
||||
window_->set_listener(this);
|
||||
|
||||
///
|
||||
/// Register our MyApp instance as a ViewListener so we can handle the View's OnChangeCursor
|
||||
/// event below.
|
||||
///
|
||||
overlay_->view()->set_view_listener(this);
|
||||
}
|
||||
|
||||
virtual ~MyApp() {}
|
||||
|
||||
///
|
||||
/// Inherited from WindowListener, called when the Window is closed.
|
||||
///
|
||||
/// We exit the application when the window is closed.
|
||||
///
|
||||
virtual void OnClose(ultralight::Window* window) override {
|
||||
app_->Quit();
|
||||
}
|
||||
|
||||
///
|
||||
/// Inherited from WindowListener, called when the Window is resized.
|
||||
///
|
||||
/// (Not used in this sample)
|
||||
///
|
||||
virtual void OnResize(ultralight::Window* window, uint32_t width, uint32_t height) override {}
|
||||
|
||||
///
|
||||
/// Inherited from ViewListener, called when the Cursor changes.
|
||||
///
|
||||
virtual void OnChangeCursor(ultralight::View* caller, ultralight::Cursor cursor) override {
|
||||
window_->SetCursor(cursor);
|
||||
}
|
||||
|
||||
void Run() {
|
||||
app_->Run();
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
MyApp app;
|
||||
app.Run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user