Ejemplo n.º 1
0
		ibool Netplay::OnDropFiles(Param& param)
		{
			DropFiles dropFiles( param );

			if (dropFiles.Inside( dialog.ListView( IDC_NETPLAY_GAMELIST ).GetWindow() ))
			{
				for (uint i=0, n=dropFiles.Size(); i < n; ++i)
					Add( dropFiles[i] );
			}

			return true;
		}
Ejemplo n.º 2
0
void CDropableMdiArea::dropEvent(QDropEvent *event)
{
	qDebug() << "dropEvent" << event->mimeData()->urls() ;
	QString file ;
	QList<QUrl> urls = event->mimeData()->urls() ;
	for ( int i = 0 ; i < urls.size() ; i ++ ) {
		file = urls.at(i).toLocalFile() ;
		break ;
	}

	emit dropFiles(file) ;
}
Ejemplo n.º 3
0
SWIGEXPORT jboolean JNICALL Java_org_scilab_modules_console_DropFilesJNI_dropFiles(JNIEnv *jenv, jclass jcls, jobjectArray jarg1) {
  jboolean jresult = 0 ;
  char **arg1 = (char **) 0 ;
  jint size1 ;
  BOOL result;
  
  (void)jenv;
  (void)jcls;
  {
    int i = 0;
    size1 = (*jenv)->GetArrayLength(jenv, jarg1);
    arg1 = (char **) MALLOC((size1+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size1; i++) {
      jstring j_string = (jstring)(*jenv)->GetObjectArrayElement(jenv, jarg1, i);
      const char * c_string = (*jenv)->GetStringUTFChars(jenv, j_string, 0);
      arg1[i] = MALLOC((strlen(c_string)+1)*sizeof(const char *));
      strcpy(arg1[i], c_string);
      (*jenv)->ReleaseStringUTFChars(jenv, j_string, c_string);
      (*jenv)->DeleteLocalRef(jenv, j_string);
    }
    arg1[i] = 0;
  }
  result = dropFiles(arg1);
  {
    if (result) jresult = JNI_TRUE   ;
    else  jresult = JNI_FALSE   ;
  }
  {
    int i;
    for (i=0; i<size1-1; i++) {
      FREE(arg1[i]);
      arg1[i] = NULL;
    }
    FREE(arg1);
    arg1 = NULL;
  }
  return jresult;
}