GithubHelp home page GithubHelp logo

Comments (7)

gkoz avatar gkoz commented on July 25, 2024

It looks like we'll be taking random types of widgets a lot. It might be worth pondering whether static or dynamic dispatch is preferable here.

from gtk.

gkoz avatar gkoz commented on July 25, 2024

The position arguments seem to call for a type that would let us specify either a specific number, or 'end'. Option could work for that but would be less explicit. Do any other parts of gtk use the same convention?

from gtk.

StephanvanSchaik avatar StephanvanSchaik commented on July 25, 2024

At the moment, I would propose the following patch to fix the issue with the widget types (I'll send a pull request later).

Well, there are similar cases of insert functions, such as this one.

from gtk.

gkoz avatar gkoz commented on July 25, 2024

The input position parameters will need a separate PR then to decide on the type to use.
I'll make a PR to add a conversion for Option<u32> so we can at least give the output values the time_t treatment.
You can avoid a little bit of gtk:: repetitiveness by importing the WidgetTrait.

from gtk.

gkoz avatar gkoz commented on July 25, 2024

gtk-rs/glib#5 should help reduce boilerplate in cases where negative values represents failure.

from gtk.

GuillaumeGomez avatar GuillaumeGomez commented on July 25, 2024

With the PR merged, I guess this issue can be closed ?

from gtk.

StephanvanSchaik avatar StephanvanSchaik commented on July 25, 2024

Yes, this issue has been resolved :).

from gtk.

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.