cpp

Creating Javascript accessible object from C++ / CEF

Example with Chromium Embedded Framework (CEF) on how to create an object in C++ and make it accessible via Javascript. console.inof(api) Object {ready: true, version: "psql.0.0.1", info: Object, getVersion: function}console.inof(api) Object {ready: true, version: "psql.0.0.1", info: Object, getVersion: function} void ExtractEngineApp::OnContextCreated( CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame> frame, CefRefPtr<CefV8Context> context) {   auto info = CefV8Value::CreateObject(NULL, NULL); info->SetValue("major", …

Creating Javascript accessible object from C++ / CEF Read More »

Tokenizing/splitting string in c++

This method uses strtok to tokeninze our string given a specific delimeter, results of that are put into supplied vector. There are few other ways we can do this but this one is straight forward. #include <iostream> #include <string> #include <string.h>   #include <memory> #include <stdlib.h> #include <stdio.h> #include <list> #include <vector>   using namespace …

Tokenizing/splitting string in c++ Read More »

Compiling Webkit on Windows using Visual Studio 2012

Just some notes on compiling WebKit on windows with visual studio. Issues : C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\xrefwrap(431): error C2064: term does not evaluate to a function taking 1 arguments (..\..\win\WebCoreSupport\WebFrameLoaderClient.cpp) 25> C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\functional(239) : see reference to function template instantiation ‘_Ret std::_Callable_obj::_ApplyX(_V0_t &&)’ being compiled 25> with 25> [ …

Compiling Webkit on Windows using Visual Studio 2012 Read More »