Skip to content

How to define signals? #328

Description

@tokyob0t

So, im trying to make a custom GObject.Object with custom props/signals but idk how to

atm i know how to define custom props

local MyClass = GObject.Object:derive('MyClass')

MyClass._property.my_property =
    GObject.ParamSpecString('my_property', 'my_property', 'my_property', '', { 'READWRITE' })

MyClass._signal.my_signal = {} -- ????? idk what goes here

local obj = MyClass { my_property = 'Hello, World!' }
obj.my_property = 'New Value'

obj.on_my_signal = function() end -- do something

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions