Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solving #741- Add possibility to use GVariant in signal handler #743

Merged
merged 3 commits into from
Mar 5, 2021

Conversation

hfmrow
Copy link
Contributor

@hfmrow hfmrow commented Feb 25, 2021

In response to #741 [WIP]

Register GValue marshalers for:

  • GSimpleAction

  • GAction

  • GPropertyAction

  • Add marshaller for GVariant (WIP)

Add:

  • g_action_print_detailed_name()
  • g_variant_parse()

In response to gotk3#741 [WIP]

Register GValue marshalers for:
GSimpleAction,
GAction,
GPropertyAction

Add marshaller for GVariant (WIP)

Add:
g_action_print_detailed_name()
g_variant_parse()
@hfmrow
Copy link
Contributor Author

hfmrow commented Feb 25, 2021

Now i'm facing to another issue: panic: reflect.Value.Convert: value of type unsafe.Pointer cannot be converted to type string
I'm working on ...

Any help is welcome

Add GVariant to 'goMarshal'
This is a simple implementation and will need to be populated with all types supported by GVariant  (with time)
@hfmrow hfmrow changed the title (partially) Solving #741 [WIP] Solving #741 Feb 25, 2021
@hfmrow
Copy link
Contributor Author

hfmrow commented Feb 25, 2021

Ok, it's done (i hope).

g_variant_new_double()
g_variant_get_double()
And usage in goMarshal
@hfmrow hfmrow changed the title Solving #741 Solving #741- Add possibility to use GVariant in signal handler Feb 25, 2021
@andre-hub andre-hub merged commit 90e9d95 into gotk3:master Mar 5, 2021
@andre-hub andre-hub added this to the V0.6.0 milestone Mar 5, 2021
@@ -256,6 +256,33 @@ func goMarshal(closure *C.GClosure, retValue *C.GValue,
} else {
val = innerVal
}

case *Variant:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I this a valid Go syntax? because under go 1.16 it produces this error:

# github.com/gotk3/gotk3/glib
../../go/pkg/mod/github.com/gotk3/gotk3@v0.5.3-0.20210305115817-fdbeed35eb7d/glib/glib.go:236:3: expected '}', found 'case'
../../go/pkg/mod/github.com/gotk3/gotk3@v0.5.3-0.20210305115817-fdbeed35eb7d/glib/glib.go:269:2: expected declaration, found rv

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is indeed not valid syntax. I think I'll make a PR to fix this.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like something went wrong while merge conflicts were being solved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created #750.

@hfmrow hfmrow deleted the Solving-#741 branch June 25, 2021 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants