本文整理汇总了C++中RHODESAPP函数的典型用法代码示例。如果您正苦于以下问题:C++ RHODESAPP函数的具体用法?C++ RHODESAPP怎么用?C++ RHODESAPP使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RHODESAPP函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rho_splash_screen_start
void rho_splash_screen_start()
{
RHODESAPP().getSplashScreen().start();
}
示例2: RHODESAPP
RHO_GLOBAL void JNICALL Java_com_rhomobile_rhodes_RhodesService_doRequestAsync
(JNIEnv *env, jclass, jstring strUrl)
{
std::string url = rho_cast<std::string>(env, strUrl);
RHODESAPP().runCallbackInThread(url, "");
}
示例3: RHODESAPP
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhodesAppOptions_getBlobPath
(JNIEnv *env, jclass)
{
const char *s = RHODESAPP().getBlobsDirPath().c_str();
return rho_cast<jhstring>(env, s).release();
}
示例4: RAWTRACE
boolean CRhoTimer::checkTimers()
{
RAWTRACE("CRhoTimer::checkTimers");
synchronized(m_mxAccess);
boolean bRet = false;
CTimeInterval curTime = CTimeInterval::getCurrentTime();
for( int i = (int)m_arItems.size()-1; i >= 0; i--)
{
CTimerItem oItem = m_arItems.elementAt(i);
if(oItem.m_overflow==false)
{
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
{
RAWTRACE("CRhoTimer::checkTimers: firing timer");
m_arItems.removeElementAt(i);
if ( RHODESAPP().callTimerCallback(oItem.m_strCallback, oItem.m_strCallbackData) )
bRet = true;
}
}
else
{
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
{
if((curTime.toULong()-oItem.m_oFireTime.toULong())<=oItem.m_nInterval)
{
RAWTRACE("CRhoTimer::checkTimers: firing timer");
m_arItems.removeElementAt(i);
if ( RHODESAPP().callTimerCallback(oItem.m_strCallback, oItem.m_strCallbackData) )
bRet = true;
}
}
}
}
for( int i = (int)m_arNativeItems.size()-1; i >= 0; i--)
{
CNativeTimerItem oItem = m_arNativeItems.elementAt(i);
if(oItem.m_overflow==false)
{
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
{
RAWTRACE("CRhoTimer::checkTimers: firing native timer");
m_arNativeItems.removeElementAt(i);
if ( oItem.m_pCallback->onTimer() )
bRet = true;
}
}
else
{
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
{
if((curTime.toULong()-oItem.m_oFireTime.toULong())<=oItem.m_nInterval)
{
RAWTRACE("CRhoTimer::checkTimers: firing native timer");
m_arNativeItems.removeElementAt(i);
if ( oItem.m_pCallback->onTimer() )
bRet = true;
}
}
}
}
return bRet;
}
示例5: RHODESAPP
void QtMainWindow::on_actionRotate180_triggered()
{
RHODESAPP().callScreenRotationCallback(this->width(), this->height(), 180);
}
示例6: RHODESAPP
void CExtManager::executeRubyCallbackWithJsonBody( const char* szCallback, const char* szCallbackBody, const char* szCallbackData, bool bWaitForResponse)
{
RHODESAPP().callCallbackWithJsonBody(szCallback, szCallbackBody, szCallbackData, bWaitForResponse );
}
示例7: convertToStringW
StringW CExtManager::getCurrentUrl()
{
return convertToStringW(RHODESAPP().getCurrentUrl(rho_webview_active_tab()));
}
示例8: Java_com_rhomobile_rhodes_RhodesService_currentLocation
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhodesService_currentLocation(JNIEnv * env, jclass, jint jTab)
{
std::string strLocation = RHODESAPP().getCurrentUrl(static_cast<int>(jTab));
RAWTRACE2("Controller currentLocation (tab: %d): %s", static_cast<int>(jTab), strLocation.c_str());
return rho_cast<jstring>(env, strLocation);
}
示例9: LOG
bool CHttpServer::run()
{
LOG(INFO) + "Start HTTP server";
if (!init())
return false;
m_active = true;
RHODESAPP().notifyLocalServerStarted();
for(;;)
{
RAWTRACE("Waiting for connections...");
#ifndef RHO_NO_RUBY_API
if (rho_ruby_is_started())
rho_ruby_start_threadidle();
#endif
fd_set readfds;
FD_ZERO(&readfds);
FD_SET(m_listener, &readfds);
timeval tv = {0,0};
unsigned long nTimeout = RHODESAPP().getTimer().getNextTimeout();
tv.tv_sec = nTimeout/1000;
tv.tv_usec = (nTimeout - tv.tv_sec*1000)*1000;
int ret = select(m_listener+1, &readfds, NULL, NULL, (tv.tv_sec == 0 && tv.tv_usec == 0 ? 0 : &tv) );
#ifndef RHO_NO_RUBY_API
if (rho_ruby_is_started())
rho_ruby_stop_threadidle();
#endif
bool bProcessed = false;
if (ret > 0)
{
if (FD_ISSET(m_listener, &readfds))
{
//RAWTRACE("Before accept...");
SOCKET conn = accept(m_listener, NULL, NULL);
//RAWTRACE("After accept...");
if (!m_active) {
RAWTRACE("Stop HTTP server");
return true;
}
if (conn == INVALID_SOCKET) {
#if !defined(WINDOWS_PLATFORM)
if (RHO_NET_ERROR_CODE == EINTR)
continue;
#endif
RAWLOG_ERROR1("Can not accept connection: %d", RHO_NET_ERROR_CODE);
return false;
}
RAWTRACE("Connection accepted, process it...");
VALUE val;
#ifndef RHO_NO_RUBY_API
if (rho_ruby_is_started())
{
if ( !RHOCONF().getBool("enable_gc_while_request") )
val = rho_ruby_disable_gc();
}
#endif
m_sock = conn;
bProcessed = process(m_sock);
#ifndef RHO_NO_RUBY_API
if (rho_ruby_is_started())
{
if ( !RHOCONF().getBool("enable_gc_while_request") )
rho_ruby_enable_gc(val);
}
#endif
RAWTRACE("Close connected socket");
closesocket(m_sock);
m_sock = INVALID_SOCKET;
}
}
else if ( ret == 0 ) //timeout
{
bProcessed = RHODESAPP().getTimer().checkTimers();
}
else
{
RAWLOG_ERROR1("select error: %d", ret);
return false;
}
#ifndef RHO_NO_RUBY_API
if (rho_ruby_is_started())
{
if ( bProcessed )
{
LOG(INFO) + "GC Start.";
rb_gc();
LOG(INFO) + "GC End.";
}
}
#endif
}
}
示例10: RHODESAPP
CSimpleOnlyStaticModuleSingletonBase::CSimpleOnlyStaticModuleSingletonBase()
{
RHODESAPP().getExtManager().registerExtension( "SimpleOnlyStaticModule", this );
}
示例11: RHODESAPP
CCordovabarcodeSingletonBase::CCordovabarcodeSingletonBase()
{
RHODESAPP().getExtManager().registerExtension( "Cordovabarcode", this );
}
示例12: rho_splash_screen_hide
void rho_splash_screen_hide()
{
RHODESAPP().getSplashScreen().hide();
}
示例13: RHODESAPP
RHO_GLOBAL jstring JNICALL Java_com_rhomobile_rhodes_RhodesService_getBlobPath
(JNIEnv *env, jclass)
{
const char *s = RHODESAPP().getBlobsDirPath().c_str();
return rho_cast<jstring>(env, s);
}
示例14: SetWindowText
LRESULT CRhoMapViewDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
SetWindowText(_T("MapView"));
#if defined(_WIN32_WCE)
#if !defined (OS_PLATFORM_MOTCE)
SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
RHO_ASSERT(SHInitDialog(&shidi));
SHMENUBARINFO mbi = { sizeof(mbi), 0 };
mbi.hwndParent = m_hWnd;
mbi.nToolBarId = IDR_GETURL_MENUBAR;//IDR_MAPVIEW;
mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
SHCreateMenuBar(&mbi);
#else
m_hWndCommandBar = CommandBar_Create(_AtlBaseModule.GetResourceInstance(), m_hWnd, 1);
CommandBar_AddAdornments(m_hWndCommandBar, 0, 0 );
CommandBar_Show(m_hWndCommandBar, TRUE);
#endif //OS_WINCE
//::SetWindowLong(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd,
// GWL_EXSTYLE,
// ::GetWindowLong(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd, GWL_EXSTYLE) | WS_EX_TRANSPARENT);
RECT r;
::GetClientRect(m_hWnd, &r);
RHO_MAP_TRACE2("execute rho_map_create( w = %d, h = %d )", r.right - r.left, r.bottom - r.top);
ourMapView = rho_map_create(mParams, &ourDrawingDevice, r.right - r.left, r.bottom - r.top);
rho_param_free(mParams);
mParams = NULL;
if (ourMapView != NULL) {
int minz = ourMapView->minZoom();
int maxz = ourMapView->maxZoom();
RHO_MAP_TRACE2("request Zoom limits: minZoom = %d, maxZoom = %d", minz, maxz);
::SendMessage(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd, TBM_SETRANGEMIN, FALSE, minz);
::SendMessage(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd, TBM_SETRANGEMAX, FALSE, maxz);
int dwPos = ourMapView->zoom();
dwPos = ourMapView->maxZoom() - (dwPos - ourMapView->minZoom());
::SendMessage(GetDlgItem(IDC_SLIDER_ZOOM).m_hWnd, TBM_SETPOS, TRUE, dwPos);
String strImagePath = "lib/res/blue_pushpin.png";
String fullImagePath = CFilePath::join( RHODESAPP().getRhoRuntimePath(), strImagePath);
IDrawingImage* pinImg = ourDrawingDevice.createImage(fullImagePath, true);
PIN_INFO pin_info = {0};
pin_info.x_offset = -10;
pin_info.y_offset = -35;
pin_info.click_rect_x = -10;
pin_info.click_rect_y = -35;
pin_info.click_rect_width = 72;
pin_info.click_rect_height = 72;
ourMapView->setPinImage(pinImg, pin_info);
strImagePath = "lib/res/callout.png";
fullImagePath = CFilePath::join( RHODESAPP().getRhoRuntimePath(), strImagePath);
IDrawingImage* pinCalloutImg = ourDrawingDevice.createImage(fullImagePath, true);
PIN_INFO pin_callout_info = {0};
pin_callout_info.x_offset = 5;
pin_callout_info.y_offset = 0;
pin_callout_info.click_rect_width = 179;
pin_callout_info.click_rect_height = 64;
ourMapView->setPinCalloutImage(pinCalloutImg, pin_callout_info);
strImagePath = "lib/res/callout_link.png";
fullImagePath = CFilePath::join( RHODESAPP().getRhoRuntimePath(), strImagePath);
IDrawingImage* pinCalloutLinkImg = ourDrawingDevice.createImage(fullImagePath, true);
ourMapView->setPinCalloutLinkImage(pinCalloutLinkImg, pin_callout_info);
strImagePath = "lib/res/esri.png";
fullImagePath = CFilePath::join( RHODESAPP().getRhoRuntimePath(), strImagePath);
IDrawingImage* esriLogoImg = ourDrawingDevice.createImage(fullImagePath, true);
ourMapView->setESRILogoImage(esriLogoImg);
}
#else
//CreateButtons();
//GotoDlgCtrl(m_btnOk);
#endif
requestRedraw();
return FALSE;
}
示例15: RHODESAPP
IBrowserEngine* BrowserFactory::createWebkit(HWND hwndParent)
{
RHODESAPP().getExtManager().getEngineEventMngr().setEngineType(rho::engineeventlistner::eWebkit);
return rho_wmimpl_get_webkitBrowserEngine(hwndParent, rho_wmimpl_get_appinstance());
}