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

How to return function result as linked arguments? #534

Open
d47081 opened this issue Jul 27, 2024 · 0 comments
Open

How to return function result as linked arguments? #534

d47081 opened this issue Jul 27, 2024 · 0 comments

Comments

@d47081
Copy link

d47081 commented Jul 27, 2024

Trying to reproduce this method:
https://docs.gtk.org/Pango/method.Layout.xy_to_index.html

1 and 2 arguments are working, but
I have following construction where index_ and trailing must be returned as 3 and 4 arguments:

Php::Value PangoLayout_::xy_to_index(Php::Parameters &parameters)
{
	gint x = (gint) parameters[0];
	gint y = (gint) parameters[1];

	gint* index_;
	gint* trailing;

	return pango_layout_xy_to_index(PANGO_LAYOUT(instance), x, y, index_, trailing);
}

In other words, method must have following implementation in php

PangoLayout::xy_to_index($x, $y, &$index_, &$trailing): bool

Also my function return integer 0|1 not boolean type as documented. Is any way to change?

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

No branches or pull requests

1 participant