Code Monkey home page Code Monkey logo

Comments (2)

GeopJr avatar GeopJr commented on June 9, 2024 1

You mean: Support signal return values?

Yes!

I never used (or remember to had used) signals with return values

FWIW, there's quite a few in GTK, here's some: Gtk::ComboBox::PopdownSignal, Gdk::Surface::EventSignal, Gtk::SpinButton::InputSignal

from gi-crystal.

hugopl avatar hugopl commented on June 9, 2024

You mean: Support signal return values?

Meanwhile it doesn't support, but yes, it's possible to have this.

First step is to let the signal macro register a signal with a return value, so we can inform to GObject the right GType used for the return type at:

https://github.com/hugopl/gi-crystal/blob/main/src/bindings/g_object/object.cr#L596

Then we also need to register a GObject::SignalAcumulator callback.

I never used (or remember to had used) signals with return values, so I would need to do some experiments in libtest to first see it working in C, to later change the macro to let it work in Crystal.

from gi-crystal.

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.