Comments (10)
I hadn't seen that API before. That is awesome. (note that GApplication is a Gtk+ 2 API also!)
GApplication
tells you exactly what you need to call to emulate g_application_run
(it consists of calling g_application_register()
then g_application_activate()
or g_application_open()
, then exit if g_application_is_remote()
otherwise run the mainloop. (although it's unclear how you would trigger the command-line signal).
(Alternatively, now that JuliaLang/julia#5687 is merged, we could flip the ownership of the mainloop so that Gtk is the primary and Julia is triggered from a timer.)
from gtk.jl.
Ah yes I see. I had only read the information text to GtkApplication and thought that gtk-init is called in the constructor. I also had not seen that all this depends on libgio.
So it seems that we want to wrap these application parts of GIO and then add GtkApplication window on top of that.
I am not so sure about whether we should flip the ownership of the mainloop. The other way around seems to be more natural for Gtk bindings. But if I get it right we would loose the possibility to construct Gtk widgets on the REPL, right? Or, more concretely, we could only construct them but the callbacks would not be invoked until gtk-init is called, which would block.
from gtk.jl.
That's the fun part about flipping it correctly -- it would be completely transparent to the user.
from gtk.jl.
I love how stuff gets tackled on a "deep" level in this community, and how it opens up new possibilities.
from gtk.jl.
It's definitely helpful to both maintain a package and be deeply into the core of julia.
from gtk.jl.
Try that with Matlab π.
from gtk.jl.
@tknopp feel free to submit a pull request for this. I've now switched the mainloop ownership on master (aside from being mildly sketchy that we do a stack replacement while inside a Gtk callback). But now you can do whatever you want with the main loop!
from gtk.jl.
@vtjnash I am not entirely sure if I find much time for Gtk.jl development in the near future so I won't commit myself to this.
My main motivation here was to get a global main menu on OSX when I was developing Julietta. I have not yet ported Julietta to the new Gtk.jl API. In general I think it is a quite nice testbed for Gtk.jl.
from gtk.jl.
No pressure. Just thought I would point out how the situation has changed recently, making this much easier to play around with
from gtk.jl.
Yes, thanks for the hint. I am really looking forward playing around with this when I find time.
from gtk.jl.
Related Issues (20)
- Julia Crash on GTK combo HOT 2
- Connecting event to calendar HOT 4
- CssProviderLeaf performance HOT 2
- Where is gdk library HOT 1
- Julia aborts from a Scale on mac HOT 8
- When CSS on screen has effect?
- In Ubuntu open_dialog() does not close after completing its action
- Crash on load with version 1.2.3 or 1.3.0 on Windows HOT 3
- Error in running finalizer
- issues with headless machine precompile HOT 1
- ComboBoxText no longer working under Julia 1.8.5 HOT 3
- Segfault with showall on trivial glade file on M1 Mac
- Is there a Julia binding to the GtkLayout container?
- circular dependency with libtiff_jll 4.5 HOT 1
- Apple silicon M2 Gtkscale error
- GtkSpinButton MethodError
- race conditions in finalizers HOT 1
- sigatomic_end called in non-sigatomic region HOT 1
- Gtk not working on MacOS Sonoma 14.4 or 14.4.1 HOT 1
- Canβt get to Glade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtk.jl.