ddrmax / cefcapi

An example on how to use C API in Chromium Embedded Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cefcapi - CEF C API

A simple example on how to use the C API in Chromium Embedded Framework. Example creates a window, embeds a browser and displays local html file. Shows how to implement dummy reference counting and CEF structures with callbacks to implement CEF handlers like cef_app_t and cef_client_t.

Examples available for both Linux and Windows.

Tested and works fine with CEF 3 branch 1750 revision 1629 (Chrome stable 33.0.1750.117).

There is Pull Request #3 that makes code work with a newer CEF branch 2454.

TODO: create python script that will generate callbacks for all handlers, and a corresponding initialize_struct_name() functions for each handler.

Getting started

  1. Copy binaries to the Release/ directory.
  2. Run the "make" command on Linux. On Windows use the build.bat script.

GCC compiler on Windows

It was required to modify cef_export.h to make it work with GCC compiler on Windows. The calling convention needs to be __stdcall:

#elif defined(COMPILER_GCC)

#define CEF_EXPORT __attribute__ ((visibility("default")))

#ifdef OS_WIN
#define CEF_CALLBACK __stdcall
#else
#define CEF_CALLBACK
#endif

About

An example on how to use C API in Chromium Embedded Framework

License:Other


Languages

Language:C 70.7%Language:C++ 28.5%Language:Objective-C 0.6%Language:HTML 0.1%Language:Batchfile 0.0%Language:Makefile 0.0%