.\"Copyright 2010 (c) EPFL .TH XDF_GET_EVENT 3 2010 "EPFL" "xdffileio library manual" .SH NAME xdf_get_event - Get details of an event of a data file .SH SYNOPSIS .LP .B #include .sp .BI "int xdf_get_event(struct xdf* " xdf ", unsigned int " index "," .br .BI " int* " evttype ", double* " onset ", double* " dur ");" .br .SH DESCRIPTION .LP \fBxdf_get_event\fP() returns the information of the \fIindex\fP-th event of the file referenced by the handle \fIxdf\fP. The event type, start (in seconds) and duration (in seconds) of the event are returned respectively to the pointers \fIevttype\fP, \fIonset\fP and \fIdur\fP. .SH "RETURN VALUE" .LP \fBxdf_get_event\fP() returns 0 in case of success. Otherwise \-1 is returned and \fIerrno\fP is set appropriately. .SH ERRORS .TP .B EINVAL \fIxdf\fP, \fIevttype\fP, \fIonset\fP or \fIdur\fP is NULL. .TP .B ERANGE \fIindex\fP is bigger than the number event in the file. .TP .SH "SEE ALSO" .BR xdf_add_evttype (3)