The plug widget shows an Evas_Object created by an other process. It can be used anywhere the same way as any other elementary widget.
This is how to create a plug.
Evas_Object *plug; plug = elm_plug_add(parent);
The socket image provides the service where we can connect the plug object
with the elm_plug_connect()
function. In this process we use the service
name and number set by the socket we want to connect to.
As an example, we connect to a service named âplug_testâ on the number 0.
elm_plug_connect(plug, "plug_test", 0, EINA_FALSE);
The Evas_Object corresponding to the distant image is retrieved with the elm_plug_image_object_get()
function.
Evas_Object *plug_img = elm_plug_image_object_get(plug);
elm_win_socket_listen()
function in the other process on the remote window
object (it is called remote_win here).
// Create a remote window in the other process Elm_Win *remote_win = elm_win_add(NULL, "Window Socket", ELM_WIN_SOCKET_IMAGE); // Create a socket named "plug_test" and listen to it elm_win_socket_listen(remote_win, "plug_test", 0, EINA_FALSE);
This widget emits the following signals:
âclickedâ
: the user clicked the image (press/release). The event parameter of the callback will be NULL.âimage,deletedâ
: the server side was deleted. The event parameter of the callback will be NULL.âimage,resizedâ
: the server side was resized. The event parameter of the callback will be Evas_Coord_Size (two integers).