Exemple #1
0
void CExtManager::zoomText(int nZoom)
{
#ifndef RHODES_QT_PLATFORM
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_ZOOMTEXT, (LPARAM)nZoom );
#endif
}
Exemple #2
0
static void __minimize_restoreApp(int nParam)
{
    ::ShowWindow(getMainWnd(), nParam );
    SetForegroundWindow(getMainWnd());
}
Exemple #3
0
void CExtManager::zoomPage(float fZoom)
{
#ifndef RHODES_QT_PLATFORM
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_ZOOMPAGE, (LPARAM)new CRhoFloatData(fZoom) );
#endif
}
Exemple #4
0
void CExtManager::zoomText(int nZoom)
{
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_ZOOMTEXT, (LPARAM)nZoom );
}
Exemple #5
0
void CExtManager::stopNavigate()
{
#ifndef RHODES_QT_PLATFORM
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_STOPNAVIGATE, (LPARAM)rho_webview_active_tab() );
#endif
}
// that function return native object used for display Web content :
// UIWebView* for iPhone
// jobject for Android - jobect is android.webkit.WebView class type
// HWND for Windows Mobile 
void* RhoNativeViewManager::getWebViewObject(int tab_index) {
	HWND main_wnd = getMainWnd();//getWebViewWnd();
    return main_wnd;
}
Exemple #7
0
void CExtManager::zoomPage(float fZoom)
{
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_ZOOMPAGE, (LPARAM)fZoom );
}
Exemple #8
0
void CExtManager::minimizeApp()
{
    ::ShowWindow(getMainWnd(), SW_MINIMIZE );
}
Exemple #9
0
void CExtManager::restoreApp()
{
    ::ShowWindow(getMainWnd(), SW_RESTORE );
}
Exemple #10
0
void CExtManager::executeJavascript(const wchar_t* szJSFunction)
{
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_EXECUTEJS, (LPARAM)_wcsdup(szJSFunction) );
}
Exemple #11
0
void CExtManager::stopNavigate()
{
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_STOPNAVIGATE, (LPARAM)rho_webview_active_tab() );
}
Exemple #12
0
void CExtManager::navigate(const wchar_t* szUrl)
{
    ::PostMessage( getMainWnd(), WM_COMMAND, IDM_NAVIGATE, (LPARAM)_wcsdup(szUrl) );
}
Exemple #13
0
WMBitmap::WMBitmap(IImage* img, bool useAlpha) {
	mReferenceCount = 1;

#if defined(_WIN32_WCE)
	ImageInfo imgInfo;
	img->GetImageInfo(&imgInfo);
	mWidth = imgInfo.Width;
	mHeight = imgInfo.Height;

	mAlphaBitmap = NULL;
	mBuf = NULL;

	HDC windowDC = ::GetDC(getMainWnd());
	BITMAP bmp;

	HDC mMemoryDC = CreateCompatibleDC(windowDC);

	mRowByteSize = mWidth*2;
	if (((mWidth*2) & 0x3) != 0) {
		mRowByteSize = ((mWidth*2) & (~0x3)) + 0x4;
	}

	char	buf[sizeof(BITMAPINFOHEADER) + 100];
	BITMAPINFO* bmi = (BITMAPINFO*)buf;

	bmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
	bmi->bmiHeader.biWidth = mWidth;
	bmi->bmiHeader.biHeight = mHeight;
	bmi->bmiHeader.biPlanes = 1;
	bmi->bmiHeader.biBitCount = 16;
	bmi->bmiHeader.biCompression = BI_BITFIELDS;
	bmi->bmiHeader.biSizeImage = mRowByteSize  * mHeight;
	bmi->bmiHeader.biXPelsPerMeter = 0;
	bmi->bmiHeader.biYPelsPerMeter = 0;
	bmi->bmiHeader.biClrUsed = 0;
	bmi->bmiHeader.biClrImportant = 0;

	*((DWORD*)&(bmi->bmiColors[0])) = 0x1F << 11;
	*((DWORD*)&(bmi->bmiColors[1])) = 0x3F << 5;
	*((DWORD*)&(bmi->bmiColors[2])) = 0x1F;

	mMemoryBitmap = CreateDIBSection(	mMemoryDC,
		bmi,
		DIB_RGB_COLORS,
		(void**)&mBuf,
		NULL,
		0);

	HGDIOBJ resObj = ::SelectObject(mMemoryDC, mMemoryBitmap);

	::GetObject( mMemoryBitmap, sizeof(BITMAP), &bmp );

	RECT r;
	r.left = 0;
	r.right = mWidth;
	r.top = 0;
	r.bottom = mHeight;

	if (useAlpha) {
		mAlphaBitmap = new WMAlphaBitmap(img);
	}
	else {
		img->Draw(mMemoryDC, &r, NULL);
	}

    ::SelectObject(mMemoryDC, resObj);
    DeleteDC(mMemoryDC);
#endif //#if defined(_WIN32_WCE)
}
void RhoNativeViewUtil::executeInUIThread_WM(RhoNativeViewRunnable* command) {
	HWND main_wnd = getMainWnd();
	::PostMessage(main_wnd, WM_EXECUTE_COMMAND, (WPARAM)command, 0);

}
Exemple #15
0
void take_picture(char* callback_url, rho_param * options_hash) {
	HWND main_wnd = getMainWnd();
	::PostMessage(main_wnd,WM_TAKEPICTURE,0,(LPARAM)strdup(callback_url));
}
Exemple #16
0
void CExtManager::resizeBrowserWindow(RECT rc)
{
    ::MoveWindow( getMainWnd(), rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, TRUE );
}
Exemple #17
0
void choose_picture(char* callback_url) {
//#if defined(_WIN32_WCE)
	HWND main_wnd = getMainWnd();
	::PostMessage(main_wnd,WM_SELECTPICTURE,0,(LPARAM)strdup(callback_url));
//#endif
}
Exemple #18
0
	virtual void run() {
		ourMapViewDlg.DoModal(getMainWnd());
	}