Esempio n. 1
0
		void MethodHandler::BindWithRetval(Awesomium::JSObject &object, const Awesomium::WebString &name, JSDelegateWithRetval callback)
		{
			if (object.type() == Awesomium::kJSObjectType_Local)
			{
				return;
			}

			object.SetCustomMethod(name, true);

			object_method_key_t key(object.remote_id(), name);
			m_bound_methods_with_retval[key] = callback;
		}
Esempio n. 2
0
		void RootEngine::GUISystem::Dispatcher::BindWithRetVal( Awesomium::JSObject& p_object, const Awesomium::WebString& p_name, JSDelegate1WithRetval p_callback )
		{
			// We can't bind methods to local JSObjects
			if (p_object.type() == Awesomium::kJSObjectType_Local)
			{
				g_context.m_logger->LogText(LogTag::GUI, LogLevel::NON_FATAL_ERROR, "Cannot bind methods to local JSObjects");
				return;
			}

			p_object.SetCustomMethod(p_name, true);

			ObjectMethodKey key(p_object.remote_id(), p_name);
			m_boundMethodsWithRetVal[key] = p_callback;
		}