add_type_handler_full
Description:
This function connects into the type handling of the Client.
Every new menuitem that comes in immediately gets asked for its properties. When we get those properties we check the 'type' property and look
to see if it matches a handler that is known by the client. If so, the newfunc
function is executed on that
Menuitem. If not, then the DbusmenuClient:
DbusmenuClient:new-menuitem
signal is sent.
In the future the known types will be sent to the server so that it can make choices about the menu item types availble.
Parameters:
this |
Client where we're getting types coming in |
type |
A text string that will be matched with the 'type' property on incoming menu items |
newfunc |
The function that will be executed with those new items when they come in. |
destroy_func |
A function that is called when the type handler is removed (usually on client destruction) which will free the resources in |
user_data |
Data passed to |
Returns:
If registering the new type was successful. |