Skip to content

How to return function result as linked arguments? #534

@d47081

Description

@d47081

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?

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