Esempio n. 1
0
/* For Executor compatibility */
LONGINT GetScrapX(LONGINT type, char **h)
{
  int scraplen;

  get_scrap(type, &scraplen, h);
  return(scraplen);
}
Esempio n. 2
0
/* Put a character into a text buffer overwriting any text under the cursor */
QString wzGetSelection()
{
	QString retval = NULL;
	static char *scrap = NULL;

	if (get_scrap(&scrap))
	{
		retval = QString::fromUtf8(scrap);
		strlcpy(text, scrap, strlen(scrap));
	}
	return retval;
}
Esempio n. 3
0
void Input::pasteFromClipboard()
{
#ifndef WITHOUT_SCRAP
	static char *scrap = 0;
	int scraplen;

	get_scrap(T('T','E','X','T'), &scraplen, &scrap);
	for (int i = 0; i < scraplen; ++i) {
		for (IInputAdapterStore::const_iterator I = mAdapters.begin(); I != mAdapters.end();) {
			IInputAdapter* adapter = *I;
			++I;
			if (!(adapter)->injectChar(scrap[i]))
				break;
		}
	}
#endif // WITHOUT_SCRAP
}