screen_ref_window()

Create a reference to a window.

Synopsis:

#include <screen/screen.h>
 
int screen_ref_window(screen_window_t win)

Since:

BlackBerry 10.0.0

Arguments:

win

The handle of the window for which the reference is to be created.

Library:

libscreen (For the qcc command, use the -l screen option to link against this library)

Description:

Function Type: Immediate Execution

This function creates a reference to a window. This function can be used by window managers and group parents to prevent a window from disappearing, even when the process that originally created the window terminates abnormally. If this happens, ownership of the window is transferred to the window manager or group parent. The restrictions imposed on buffers still exist. The contents of the buffers can't be changed. The buffers cannot be destroyed until the window is unreferenced. When the original process owner is no longer a client of the windowing system, the window will be destroyed when screen_destroy_window() is called by the reference owner.

Returns:

0 if a reference to the specified window was created, or -1 if an error occurred (errno is set).

Last modified: 2014-11-17



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus