Giter Club home page Giter Club logo

Comments (6)

EPashkin avatar EPashkin commented on July 20, 2024

IMHO is good idea to provide set of standard actions,
but at minimum "app.quit" is shorter that Kinds::App(Kind::Quit),

from gio.

GuillaumeGomez avatar GuillaumeGomez commented on July 20, 2024

It is, but less safe.

from gio.

sdroege avatar sdroege commented on July 20, 2024

In the bindings I would only provide string constants for those well-known action names. In applications you could build an enum out of them that can implement from/to string but the problem with having this in the bindings would be that it's not nicely extensible by the application-specific actions.

from gio.

EPashkin avatar EPashkin commented on July 20, 2024

@sdroege There no problem with extensibility as action function still accept normal strings,
Ex. users can add enum for theirs operation and implement AsRef<str> for it.

from gio.

sdroege avatar sdroege commented on July 20, 2024

I've implemented something like this in sdroege/rustfest-rome18-gtk-gst-workshop@a4a6cfd

I don't think there's anything reasonable we can do here inside the bindings. The actions are completely app specific

from gio.

sdroege avatar sdroege commented on July 20, 2024

Closing then

from gio.

Related Issues (20)

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.