### 2.5.5 Options for Setting Client Data

The EZ widget data structure reserves two fields for applications to hook in client data. One is of type `void *` and the other is of type `int`. Also, there is a event handler list and three callback lists: a callback list, a destroy callback list and a motion callback list. EZwgl contains routines for registering them. However, under certation conditions, they may also be set by `EZ_ConfigureWidget`.

- EZ_CLIENT_PTR_DATA This options links a client data of type `void *` to a widget data structure.

- EZ_CLIENT_INT_DATA This options links a client data of type `int` to a widget data structure.

- EZ_CALLBACK If your widget has only one callback, you may find this option handy. It registers the callback for the widget. This option needs two values, a `EZ_CallBack` procedure and a `void *` client data to be passed to the callback. Note: this option removes all existing callbacks before registering the new one. If your widget has multiple callbacks, you'll have to use `EZ_AddWidgetCallBack`.

- EZ_DESTROY_CALLBACK This option registers the one destroy callback for the widget. It removes all destroy callbacks before registering the new one. If your widget has multiple destroy callbacks, use `EZ_AddWidgetCallBack` instead. This option needs two values, a procedure of type `EZ_CallBack` and a client data of type `void *`.

- EZ_MOTION_CALLBACK This option registers a motion callback for the widget. Motion callbacks are available only for FreeLabel, ListTree, ListBox and FancyListBox widgets. This option removes all existing motion callbacks before registering the new one. If your widget has multiple motion callbacks, use `EZ_AddWidgetCallBack` instead. This option needs two values, a procedure of type `EZ_CallBack` and a client data of type `void *`.

- EZ_EVENT_HANDLER This option registers the event handler for the widget. It takes two values, an `EZ_EventHandler` and a `void *` client data. As for callbacks, this option removes all the currently registered event handlers before registering the new one. Therefore, you must use `EZ_AddEventHandler` to register your event handlers if your widget has multiple event handlers.

HTML Documentation Maintainance:`Arturo Espinosa <arturo@nuclecu.unam.mx>`