int32_t PListViewMoveItem(void *pobject, void *in, void *out, void *extraData) { if (!pobject || !in || !out) return B_ERROR; PView *parent = static_cast<PView*>(pobject); if (!parent) return B_BAD_TYPE; BListView *backend = (BListView*)parent->GetView(); PArgs *inArgs = static_cast<PArgs*>(in); PArgs *outArgs = static_cast<PArgs*>(out); int32 from; if (inArgs->FindInt32("from", &from) != B_OK) return B_ERROR; int32 to; if (inArgs->FindInt32("to", &to) != B_OK) return B_ERROR; if (backend->Window()) backend->Window()->Lock(); bool outValue1; outValue1 = backend->MoveItem(from, to); if (backend->Window()) backend->Window()->Unlock(); outArgs->MakeEmpty(); return B_OK; }