lgi-devs / lgi-devs/lgi

How to define signals?

Open
#328 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
491
Forks
81
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points. Clarify whether the goal is documentation or support for defining custom GObject signals, then locate the existing property-definition and signal-binding entry points; done should include a documented, verifiable way to define and connect a custom signal.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.