Eiji

Eiji

Hey, as you probably saw I have created this topic:

As I had wrote there I have made some research and did not found anything helpful. Therefore I was almost sure that there is no satisfying answer for it and posted such question to be sure. The problem is that linked question covers only few really basic things for specific use case of native desktop app.

I have just took a look at my browser (Vivaldi) settings window which is fully themed, have great i18n support and it’s just huge (16 categories). Writing it in scenic would take way too much time especially if we want to write proper dynamic search code and 1:1 theme support. Look that’s just settings window of first app which I had in mind.

Some time ago I was looking on scenic from documentation side and on source code examples. While code is awesome keeping in mind that everything is rendered using OpenGL it’s still not enough for comfortable developing lots of really simple apps.

I have few ideas for scenic-based libraries which would be extremely usable for typical native apps (something more than calculator). I wanted anyway to release such libraries as open source projects available on GitLab. Unfortunately I’m too bused now to fully focus on open source work without any founds and what I’m doing for community last time is mostly limited to only replying on some questions on this forum.

Here goes my idea: crowdfunding. At start I can give ~130 USD - maybe more if it would become more popular. I know that’s not a lot, but hope other people would also help. All collected money would go in one of 2 ways:

  1. All / most for me if there would be really big amount of money. In such case I would finish all current works and I will fully focus on open source work since I would not need to worry about anything other.

    In this scenario I would describe every idea in #your-libraries-projects:libraries category and I will notify about progress in specified period of time (let’s say 2-4 weeks). The only job offers which I expect are researching and writing NIFs.

  2. Most / all for Elixir job offers which would be available in one of those 2 forms:
    a) pay for research
    b) pay for 1.0.0 release

    In this scenario I would describe details about public API, requirements, (at least part of) dependencies etc. in #community:elixir-jobs.

Here is a sneak peek:

  1. Changes to scenic and its drivers like scenic_driver_glfw medium and high

  2. Advanced themes medium and high
    Well … Just take a look at KDE/Plasma and see how much we can improve.
    I expect 3 job offers here:

    • 1 research
    • 2 libraries (split like ecto + ecto_sql)
  3. Frame-less app medium
    Partially related to 1st point. Custom advanced titlebar.
    I expect 3 job offers here:

    • 1 research
    • 2 libraries (again split like ecto + ecto_sql)
  4. Advanced TabBar medium
    Customizable like old Firefox - definitely something more than component with few predefined buttons … :077:
    Single job offer.

  5. Advanced form and its components easy
    Something like advanced version of HTML forms, but without CSS3 mess) :smiley:
    Also single job offer.

  6. Advanced settings easy
    Categories, groups and layouts related …
    Again single job offer.

  7. OS integration high
    This would be split in the number of important OS features. For now I see 4 jobs offers:

    • MIME types and default applications
    • System notifications
    • TaskBar advanced support
    • Tray icon (simple and advanced version)
  8. Diagrams, Graphs and related medium
    Maybe few small jobs (like each diagram type) or maybe one bigger.

and even more …

I have in mind bigger projects like scenic-based version manager, ecto designer, M.U.G.E.N. - like advanced 2D fight game engine, card game engine, but those are less important. Of course ecto designer would be really powerful and important, but not for typical OS-like app.

It’s all I have right now. Of course I can share full details at any time, but not sure if it’s even worth to write it without know your opinions. What do you think about it? Would you like to see detailed project information? Which crowdfunding service is good in your opinion?

Showing Posts 1 to 10

stefanchrobot

stefanchrobot

If I understand correctly, you want to build desktop apps, right? That’s what I’m getting from showing a tray icon, etc.

If that’s the case, I think Scenic is not the right tool for that - I’d suggest going with platform specific components/widgets. I know that cross-platform UIs sound very nice, but in reality native widgets come on top when you really want platform-like feel (same story as on mobile). While wxErlang might be useful in some cases, you’ll hit a wall the second you’ll try to play a sound.

I’m working on an Elixir library for building component-based desktop apps, but that’s still in the making and not a priority till at least March.

Eiji

Eiji OP

exactly

Honestly OpenGL on which scenic (to be more precise scenic_driver_glfw) is based is enough. Look that awesome KDE/Plasma compositor is also written allows to use OpenGL engine in versions 2.0 and 3.1. The biggest problem is that I don’t have enough experience in OpenGL programming. :077:

Nope, I have a much different plan (more would be available in details).

Look every OS/distribution/desktop environment have its own theme files. There is only a matter of proper research, builds structs based on it and finally write a code that handles them.

While sounds are interesting for native apps I don’t see them around scenic topic. It’s mostly about drawing components with their themes properly.

I would suggest to hold on in case people would find my idea interesting. As you can see job offers have their own level, so I would have some work as well for newbie as well for more experienced developers which are familiar with NIFs. I have a plan to support all OS/distribution/desktop environment themes, so components could look like native. :077:

stefanchrobot

stefanchrobot

There’s a huge difference between looking native and actually being native. There was a great blog post that described a lot of features that you get for free just by using native components on Mac (sorry, I can’t seem to find it…). Same story applies to Windows. If you don’t go with native components, you end up with some users thinking “I should be able to select this text” or “I should be able to right-click here”. For most cases you probably don’t care, but you need to at least understand the limitations of going cross-platform vs native.

OvermindDL1

OvermindDL1

Ugh, the number of times at home I alt+click on a window splitter or something and can’t drag the window around drives my bonkers at times… >.>

/me points to Discord most recently…

Eiji

Eiji OP

Yeah, I’m definitely to cross-platform and look like native. The good point of that is that we can style app to look like on different OS/distribution/desktop environment - especially if we are talking about so poorly configurable Windows. I always want to see Oxygen themes used easily there. :077:

Exactly! Now think that any app can simulate any theme and window manager behaviour! Of course handling such cases is also expected in my plans. :smiley:

ConnorRigby

ConnorRigby

Nerves Core Team

Unfortunately creating a static binary from an Erlang project is pretty tough/not possible as far as i know. Even if you could do that, recreating the platform independent ui elements would be really tedious and not worth it in my opinion. I don’t think scenic or Elixir would be the right tool for this job

Eiji

Eiji OP

Maybe I’m wrong, but escript and distillery releases are already doing that. The only problem with distillery releases is that instead of your input arguments you have distillery arguments which are good at dev and nerves sides.

If I remember correctly nerves releases already does not requires installation of any Erlang and Elixir on target devices.

For sure, I don’t want to create few different GUI apps for just one API interface. It would be doable, but really limited. Instead of that I want to fetch as much information from system as possible and use them in OpenGL as same as scenic_driver_glfw does it already. The only difference here is that scenic have less components and it has it’s own predefined styles. I just want to add more components and better theme engine.

I saw some small games written in Elixir already. The only problem is that they were launched from iex session. It’s just a matter of making it work with escript or do it in similar way.

ConnorRigby

ConnorRigby

Nerves Core Team

I think escript can have issues in practice, but may be a solution.

In Nerves we still install Erlang. There are issues when cross compiling and bundling ERTS, which will become a problem if you want to distribute binaries for other platforms. So if you have say a CI/CD instance that builds binaries for distribution (most/all native applications do this), you wouldn’t be able do it all in one machine

OpenGL has no idea what a system is. OpenGL is a rendering engine. You may be confusing glfw. glfw has native support for Windows, macOS and many Unix-like systems using the X Window System, such as Linux and FreeBSD.

The only difference here is that scenic have less components and it has it’s own predefined styles. I just want to add more components and better theme engine.

This is a huge difference. Scenic is not using any native operating system features directly. it relies on glfw to do all the work behind the scenes. This means that there is no access to native operating system ui components. The only thing scenic_driver_glfw is concerned with is creating a “window” to draw pixels too. There isn’t any shapes, text, anything. The only thing glfw does is give you a raw surface to output pixels too. there would need to be some sort of abstraction to generic OS ui components. Every component would need to map to other components. Some components just don’t map over in different UI environments. Examples:

  • my window manager does not use a Cross in the corner to indicate closing a window
  • not all window managers put components in the same place, IE Ubuntu has the cross in the left corner of a window

Furthermore systems like X11 don’t even have the concept of many components in say the Windows UI. There’s no button for example.

Dynamically loading the same code, but displaying native components would be pretty much impossible. (okay not impossible, nothings impossible, but you get the point). This is why this doesn’t exist yet and anything wanting code uniformity is a framework that implements its own components. So Scenic, GTK, QT, .NET etc.

Eiji

Eiji OP

Yes, 100% correct - I know this.

Look that you can fetch information about current and available themes without OpenGL. Sometimes you would need to read standard Linux configuration files … some things you would need to fetch from dll files in Windows … sometimes … The idea is to write code which would parse such files (or use NIFs if it’s too much work) and save them into Elixir structs. Based on such data we can create GUI scenic-like API in order to draw same component types on dynamically fetched theme information. In short I would like to draw any OS/distribution/desktop environment components in OpenGL on all supported platforms i.e. XP - like button and MacOS-like progress bar in window with Oxygen theme even if just for fun. :slight_smile:

Again 100% correct - I just need access to some configuration files - not API for drawing OS components.

Which now is done by scenic. In same way scenic is drawing in OpenGL button I want to have “advanced” button i.e. just more them options.

I believe that most common components are themed pretty well. Of course there could be WinAPI component which is not available in GTK+ or Qt - in such cases I would simply return: {:error, :not_supported} and force developer to choose different theme or component or even draw it’s own component based on specified theme colors.

I’m curious if it’s possible to draw transparent window which could simulate different window manager behaviours.

It’s also saved in theme files. I don’t know exactly where, but I’m sure that’s possible to fetch such information.

I’m not talking about native X11, window managers etc. I’m talking about:

  1. Themes for window managers (for styling custom titlebar)
  2. Themes for GTK+, Qt, WinAPI (XP, Vista, 7, etc.)
  3. Icons for 2nd point themes

Again, it’s not a matter about using native components - it’s a matter to fetch information about them and draw them on our own in OpenGL.

Yup, it’s own components - just rules (colors and other styles) instead of predefined (dark vs light theme) would be fetched from existing themes.

ConnorRigby

ConnorRigby

Nerves Core Team

These “configuration files” you are looking for don’t exist like you think they do. OS specific UI data isn’t stored in a config file. Its baked into the OS, and requires integration via C/C++ bindings usually.

This is what Scenic calls primitives. More can be added relatively easily to the Scenic source, but not externally via another lib.

again possible does not mean reasonable. This is why projects like GTK, WX, QT etc exist. You get the same behaviour on every platform, but not using native components.

There is no such thing as “theme files” like you are describing. You must build an application that uses the native components as they were designed. IE red-cross-right-corner.png isn’t a thing that can just be looked up somewhere. You need to be in the framework it was designed in.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews