static void ListNotify( EVENT ev, a_dialog *ui_dlg_info, gui_window *wnd ) { gui_event gui_ev; a_list *list; unsigned id; if( ui_dlg_info->curr != NULL ) { list = GUIGetList( ui_dlg_info->curr ); id = GUIGetControlId( wnd, ui_dlg_info->curr ); if( id != 0 ) { switch( ev ) { case EV_LIST_BOX_CHANGED : gui_ev = GUI_CONTROL_CLICKED; break; case EV_LIST_BOX_DCLICK : gui_ev = GUI_CONTROL_DCLICKED; break; case EV_LIST_BOX_CLOSED : gui_ev = GUI_CONTROL_CLICKED; break; default : return; } GUIEVENTWND( wnd, gui_ev, &id ); } } }
static bool GetList( gui_window *wnd, unsigned id, VFIELD **field, a_list **list ) { *field = GUIGetField( wnd, id ); if( *field == NULL ) { return( FALSE ); } *list = GUIGetList( *field ); if( *list == NULL ) { return( FALSE ); } return( TRUE ); }
static bool GetList( gui_window *wnd, gui_ctl_id id, VFIELD **field, a_list **list ) { *field = GUIGetField( wnd, id ); if( *field == NULL ) { return( false ); } *list = GUIGetList( *field ); if( *list == NULL ) { return( false ); } return( true ); }