Giter VIP home page Giter VIP logo

kysela / libaroma-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlxprojects/libaroma

0.0 0.0 0.0 12.71 MB

an embedded ui toolkit

License: Apache License 2.0

C 78.90% Makefile 0.72% C++ 9.12% Shell 0.29% Batchfile 0.19% Squirrel 0.05% Perl 0.09% Python 0.98% Assembly 6.43% CMake 0.79% SAS 0.01% Pascal 0.41% Ada 0.48% C# 0.30% DIGITAL Command Language 0.15% HTML 0.16% Module Management System 0.01% M4 0.12% Roff 0.22% Hack 0.59%

libaroma-1's Introduction

libaroma

an embedded ui toolkit

Some info

Libaroma is a graphics library wrote by Ahmad Amarullah (amarullz@xda-developers) almost entirely in C.
It can be compiled for linux and some other OSes (like QNX, I didn't test that). Also has ARMv7/x86/MIPS optimizations, pretty useful.
It has a very nice optimization, it runs very well on low-end and old devices like mine, an 850MHz single-core phone.
This library has a lot of utilities, from drawing simple graphics (shapes, gradients, text and such) to an entire window managing system, and direct framebuffer drawing through canvases.

What changes I did?

I'm just trying to improve it, as the original one has some not-so-nice details (like the dialogs items being hardcoded in the library for the test program, instead of making those changeable by the user).
So, if you want to know every change I did, then just look at the commit history (I've tried to keep it clear and concise by doing changes, testing them and the adding each change in a individual commit with a descriptive title/message, howerver didn't do that every time). A summary of changes:

  • Dialog items now are dynamic (needs rework)
  • Window now has appbar_bg property (ideal for setting statusbar color, if window has appbar)
  • DRM support is here!
  • Enhanced and fixed some functions

How to compile (Windows)

NOTICE: It may be outdated, needs some care (I mostly build on Linux) There are a lot of scripts for building libaroma on tools/win32, but you first need a toolchain. I use gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_win32 from the launchpad's linaro archive (https://launchpad.net/linaro-toolchain-binaries/). After that, the correct way to compile everything is this:

  • go to tools/win32, edit envsetup.bat with the correct paths (you can just edit LIBAROMA_GCC and LIBAROMA_GPP variables), save and run it.
  • Open a new CMD window (needed to make the envsetup work), and go to the tools/win32/libs then run makelibs.bat
  • After that, go back (tools/win32) and run build_libaroma.bat
  • You should have libaroma compiled and ready to build a test app! To compile the test app, you can use either deploy_recovery.bat template (or deploy_android.bat if your phone is on Android). Those scripts will compile the app, push it and run it on your device! make sure to be rooted if you want to run it while on Android. Also, to close the app just press the power or home button.
    If you just want to build the app, run build_app.bat template; the resulting binary will be at bin folder (tools/win32/bin)
    To compile custom apps with the scripts, they should have a folder inside examples\ with the name you want (like examples/template) and inside that a file called main.c (the app source code, look at template for an, ehm, template) and a folder called zip (with the resources you want to embed in the app like fonts, images, etc). If you want to make a flashable zip, just create META-INF/com/google/android folders inside zip and put there the resulting binary (rename it as update-binary).

How to use the build/deploy scripts

As you noticed before, there are three main scripts for building apps, and they parameters are the following:

  • build_app.bat nameoftheapp [f] (where nameoftheapp equals to the folder name on examples/, f is optional and skips the "press any key to continue" after building)
  • deploy_android.bat nameoftheapp [r] (r is optional, it means don't build and just run into device)
  • deploy_recovery.bat nameoftheapp [r] (same as above, but for recovery mode)

Linux compiling?

Libaroma was prepared by Amarullz to be compiled on Windows, so linux build is under testing and may half-work (or won't work at all).
Anyway, scripts here are a bit different from Windows ones:

  • envsetup.sh still needs to be edited with correct toolchain paths
  • you still need to run tools/linux/libs/makelibs.sh in order to build dependencies
  • libaroma.sh builds main library
  • build.sh compiles libs, libaroma and the test app.
  • "build_app.sh appname" compiles the app called "appname" and puts the binary at tools/linux/bin/appname
  • "recovery.sh appname [r]" compiles the app and runs it on the recovery-mode connected device, if r is passed, it skips the compile process (just runs the app on the device).

So, the main workflow to build libaroma and the test app on Linux is as follows:

  • Edit tools/linux/envsetup.sh with correct toolchain paths
  • run either build.sh (to do everything automatically) or libs/makelibs.sh, libaroma.sh and then build_app.sh test
  • to run the app on recovery, just use recovery.sh test r (if you want to compile the app and debug, you can omit the "r" at the end).

In progress

This is a list of changes I'm wanting to implement (or just didn't prepare for upload)

  • New stausbar and example (needs to be done in a better way)
  • Slider control
  • Better transparency management (use alpha canvas in controls and such)
  • Expand config system (add default colorspace
  • Add the posibility to change colorspace if using fb/drm drivers

For more info, please visit github page (it's outdated and not-so-useful, though): http://amarullz.github.io/libaroma/

libaroma-1's People

Contributors

amarullz avatar kysela avatar m1cha avatar mlxprojects avatar

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.