try_set_workspace_layout


Description:

public int try_set_workspace_layout (int current_token, int rows, int columns)

Tries to modify the layout of Workspace on this.

To do this, tries to acquire ownership of the layout. If the current process is the owner of the layout, current_token is used to determine if the caller is the owner (there might be more than one part of the same process trying to set the layout). Since no more than one application should set this property of this at a time, setting the layout is not guaranteed to work.

If rows is 0, the actual number of rows will be determined based on columns and the number of Workspace. If columns is 0, the actual number of columns will be determined based on rows and the number of Workspace. rows and columns must not be 0 at the same time.

You have to release the ownership of the layout with release_workspace_layout when you do not need it anymore.

Parameters:

this

a Screen.

current_token

a token. Use 0 if you do not called try_set_workspace_layout before, or if you did not keep the old token.

rows

the number of rows to use for the Workspace layout.

columns

the number of columns to use for the Workspace layout.

Returns:

a token to use for future calls to try_set_workspace_layout and to release_workspace_layout, or 0 if the layout could not be set.




2022 vala-language.org