• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ RHODESAPP函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中RHODESAPP函数的典型用法代码示例。如果您正苦于以下问题:C++ RHODESAPP函数的具体用法?C++ RHODESAPP怎么用?C++ RHODESAPP使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了RHODESAPP函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: rho_splash_screen_start

void rho_splash_screen_start()
{
    RHODESAPP().getSplashScreen().start();
}
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:4,代码来源:SplashScreenImpl.cpp


示例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, "");
}
开发者ID:kumarvegeta,项目名称:rhodes,代码行数:6,代码来源:rhodesapp.cpp


示例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();
}
开发者ID:hirotaka,项目名称:rhodes,代码行数:6,代码来源:rhodesapp.cpp


示例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;
}
开发者ID:Gaurav2728,项目名称:rhodes,代码行数:73,代码来源:RhoTime.cpp


示例5: RHODESAPP

void QtMainWindow::on_actionRotate180_triggered()
{
	RHODESAPP().callScreenRotationCallback(this->width(), this->height(), 180);
}
开发者ID:indoorsdog,项目名称:rhosetta,代码行数:4,代码来源:QtMainWindow.cpp


示例6: RHODESAPP

void CExtManager::executeRubyCallbackWithJsonBody( const char* szCallback, const char* szCallbackBody, const char* szCallbackData, bool bWaitForResponse)
{
    RHODESAPP().callCallbackWithJsonBody(szCallback, szCallbackBody, szCallbackData, bWaitForResponse );
}
开发者ID:polydectes,项目名称:rhodes,代码行数:4,代码来源:ExtManager.cpp


示例7: convertToStringW

StringW CExtManager::getCurrentUrl()
{
    return convertToStringW(RHODESAPP().getCurrentUrl(rho_webview_active_tab()));
}
开发者ID:polydectes,项目名称:rhodes,代码行数:4,代码来源:ExtManager.cpp


示例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);
}
开发者ID:javiermolina1234,项目名称:rhodes,代码行数:6,代码来源:rhodesapp.cpp


示例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
    }
}
开发者ID:wkhq84,项目名称:rhodes,代码行数:97,代码来源:HttpServer.cpp


示例10: RHODESAPP

CSimpleOnlyStaticModuleSingletonBase::CSimpleOnlyStaticModuleSingletonBase()
{
    RHODESAPP().getExtManager().registerExtension( "SimpleOnlyStaticModule", this );
}
开发者ID:bulatovalexey,项目名称:rhodes,代码行数:4,代码来源:SimpleOnlyStaticModuleBase.cpp


示例11: RHODESAPP

CCordovabarcodeSingletonBase::CCordovabarcodeSingletonBase()
{
    RHODESAPP().getExtManager().registerExtension( "Cordovabarcode", this );
}
开发者ID:darryncampbell,项目名称:appforum-rho-full,代码行数:4,代码来源:CordovabarcodeBase.cpp


示例12: rho_splash_screen_hide

void rho_splash_screen_hide()
{
    RHODESAPP().getSplashScreen().hide();
}
开发者ID:3runo5ouza,项目名称:rhodes,代码行数:4,代码来源:SplashScreenImpl.cpp


示例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);
}
开发者ID:croteb,项目名称:rhodes,代码行数:6,代码来源:rhodes.cpp


示例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;
}
开发者ID:ariejan,项目名称:rhodes,代码行数:95,代码来源:MapViewManager.cpp


示例15: RHODESAPP

IBrowserEngine* BrowserFactory::createWebkit(HWND hwndParent)
{
	RHODESAPP().getExtManager().getEngineEventMngr().setEngineType(rho::engineeventlistner::eWebkit);
	return rho_wmimpl_get_webkitBrowserEngine(hwndParent, rho_wmimpl_get_appinstance());
}
开发者ID:nhinze,项目名称:rhodes,代码行数:5,代码来源:BrowserFactory.cpp


示例16: rho_sys_get_property

VALUE rho_sys_get_property(char* szPropName) 
{
	if (!szPropName || !*szPropName) 
        return rho_ruby_get_NIL();
    
    VALUE res;
#ifdef RHODES_EMULATOR
    if (rho_simimpl_get_property(szPropName, &res))
        return res;
#endif

    if (rho_sysimpl_get_property(szPropName, &res))
        return res;

	if (strcasecmp("platform",szPropName) == 0) 
        return rho_ruby_create_string(rho_rhodesapp_getplatform());

	if (strcasecmp("has_network",szPropName) == 0) 
        return rho_sys_has_network();

	if (strcasecmp("locale",szPropName) == 0) 
        return rho_sys_get_locale();

	if (strcasecmp("screen_width",szPropName) == 0) 
        return rho_ruby_create_integer(rho_sys_get_screen_width());

	if (strcasecmp("screen_height",szPropName) == 0) 
        return rho_ruby_create_integer(rho_sys_get_screen_height());

	if (strcasecmp("real_screen_width",szPropName) == 0) 
        return rho_ruby_create_integer(rho_sys_get_screen_width());
    
	if (strcasecmp("real_screen_height",szPropName) == 0) 
        return rho_ruby_create_integer(rho_sys_get_screen_height());

	if (strcasecmp("device_id",szPropName) == 0) 
    {
        rho::String strDeviceID = "";
        if ( rho::sync::CClientRegister::getInstance() )
            strDeviceID = rho::sync::CClientRegister::getInstance()->getDevicePin();

        return rho_ruby_create_string(strDeviceID.c_str());
    }

    if (strcasecmp("phone_id", szPropName) == 0)
        return rho_ruby_create_string(""); 

	if (strcasecmp("full_browser",szPropName) == 0) 
        return rho_ruby_create_boolean(1);

	if (strcasecmp("rhodes_port",szPropName) == 0) 
        return rho_ruby_create_integer(atoi(RHODESAPP().getFreeListeningPort()));

	if (strcasecmp("free_server_port",szPropName) == 0) 
        return rho_ruby_create_integer(RHODESAPP().determineFreeListeningPort());

	if (strcasecmp("is_emulator",szPropName) == 0) 
        return rho_ruby_create_boolean(0);

	if (strcasecmp("has_touchscreen",szPropName) == 0)
        return rho_ruby_create_boolean(1);

	if (strcasecmp("has_sqlite",szPropName) == 0)
        return rho_ruby_create_boolean(1);
    
    if (strcasecmp("security_token_not_passed",szPropName) == 0) {
        int passed = 0;
        if ((RHODESAPP().isSecurityTokenNotPassed())) {
            passed = 1;
        }
        return rho_ruby_create_boolean(passed);
    }

	if (strcasecmp("is_motorola_device",szPropName) == 0)
#ifdef APP_BUILD_CAPABILITY_MOTOROLA
        return rho_ruby_create_boolean(1);
#else
        return rho_ruby_create_boolean(0);
#endif

	if (strcasecmp("has_cell_network",szPropName) == 0) 
        return rho_sys_has_network();

	if (strcasecmp("has_wifi_network",szPropName) == 0) 
        return rho_sys_has_network();

    RAWLOG_ERROR1("Unknown Rho::System property : %s", szPropName);

    return rho_ruby_get_NIL();
}
开发者ID:jandas,项目名称:rhodes,代码行数:90,代码来源:System.cpp


示例17: LOG

bool CKeyModule::ProcessKeyUp (WPARAM wparam, LPARAM lparam, INSTANCE_DATA *pdata)
{


    char key [8];
    bool handled, matched;

    // Assume key is not handled
    handled = FALSE;
    // Get key code from message
    int code = (int) wparam;


    if(code == VK_F11)
    {

        LOG(INFO) + "F11 Handled in Keyup";
        // Flag to show if we have found a match for the key
        matched = FALSE;

        // Convert to decimal text
        sprintf (key, "%d", code);

        // Check for specific key
        CKeyMapEntry *pentry = pdata->pKeyMap->Find (code);

        if (pentry)
        {
            if (pentry->nRemap)
            {
                // If it's remapped always mark it as handled and don't fire the event
                handled = TRUE;

                // Insert replacement key
                keybd_event (pentry->nRemap, 0, KEYEVENTF_SILENT, 0);
                keybd_event (pentry->nRemap, 0, KEYEVENTF_KEYUP | KEYEVENTF_SILENT, 0);
            }
            else
            {
                if (pentry->psNavigate.hasCallback())
                {
                    rho::Hashtable<rho::String, rho::String> keyData;
                    keyData.put("keyValue", key);
                    pentry->psNavigate.set(keyData);
                }
                handled = !pentry->bDispatch;
            }

            matched = TRUE;
        }

        // Check for all keys
        if (!matched)
        {
            if (pdata->psAllKeysNavigate.hasCallback())
            {
                rho::Hashtable<rho::String, rho::String> keyData;
                keyData.put("keyValue", key);
                pdata->psAllKeysNavigate.set(keyData);
                handled = !pdata->bAllKeysDispatch;
            }
        }

        // Check for home key
        if (!matched)
        {
            if (pdata->nHomeKey && pdata->nHomeKey == code)
            {
                // Call back to core to request home navigate
                LOG(INFO) + "Home Key has been pressed, navigating to application start page";
                RHODESAPP().navigateToUrl(RHODESAPP().getStartUrl());

                handled = TRUE;
                matched = TRUE;
            }
        }

        // Flag that subsequent WM_CHAR should be suppressed if we are handling the key
        pdata->bSuppressChar = handled;

        //return handled;

    }

    // Clear WM_CHAR suppression
    pdata->bSuppressChar = FALSE;

    return handled;
}
开发者ID:rhomobile,项目名称:rhodes,代码行数:89,代码来源:KeyModule.cpp


示例18: RHODESAPP

/*static*/ bool  _CRhoAppAdapter::callCallbackOnSyncUserChanged()
{
    return RHODESAPP().getApplicationEventReceiver()->onSyncUserChanged(); 
}
开发者ID:Gaurav2728,项目名称:rhodes,代码行数:4,代码来源:RhoAppAdapter.cpp



注:本文中的RHODESAPP函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ RID函数代码示例发布时间:2022-05-30
下一篇:
C++ RHASH_TBL函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap