Cefcapi
An example on how to use C API in Chromium Embedded Framework (CEF)
Install / Use
/learn @cztomczak/CefcapiREADME
CEF C API (cefcapi)
A simple example on how to use the C API in Chromium Embedded
Framework created by
Czarek Tomczak.
Example creates a window, embeds a browser inside that window
and loads Google website. Shows how to implement dummy reference
counting and CEF structures with callbacks to implement CEF handlers
like cef_app_t, cef_client_t and cef_life_span_handler_t.
To understand and implement real reference counting see the
UsingTheCAPI
wiki page in upstream CEF project.
Table of contents:
Examples
- Windows: see main_win.c
- Linux: see main_linux.c
- Mac: not available yet (Issue #15)
Compatibility
Tested configurations:
- Windows:
- Binary:
cef_binary_3.3202.1692.g18a939d_windows32.tar.bz2 - Compilers: mingw-gcc 5.3.0 and TDM-gcc 5.1.0 on Windows 7 64-bit
- Binary:
- Linux:
- Binary:
cef_binary_3.3202.1692.g18a939d_linux64.tar.bz2 - Compiler: Linux: gcc 4.8.2 on Ubuntu 14.04 64-bit
- Compiler: gcc 6.3.0 on Debian 9.2 (stretch) 64-bit
- Binary:
Getting started
- Download "Standard Distribution" binaries from Spotify Automated Builds for the supported CEF version mentioned in the Compatibility section above: http://opensource.spotify.com/cefbuilds/index.html
- Create cefcapi/Release/ directory
- Copy cef_binary*/Release/* to cefcapi/Release/
- Copy cef_binary*/Resources/* to cefcapi/Release/
- On Linux run "make gtk2" (GTK+ 2 example) or "make gtk3" (GTK+ 3 example) in the root directory. Note that you may need to build CEF with "use_gtk3=true" to link it with GTK+ 3.
- On Windows run the "build.bat" script in the root directory
Support development
If you would like to support general CEF C API development efforts by making a donation please click the Paypal Donate button:
<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHSHWR5JM4FN4'> <img src='https://raw.githubusercontent.com/wiki/cztomczak/cefpython/images/donate.gif' /> </a><br><br>Updating CEF version
If you download a CEF version newer than 3.3202.1692 then
apart from copying binaries to cefcapi/Release/ directory
you will also have to update the include/ directory with CEF
header files.
In the include/ directory you can find two files: "cef_version_win.h" and "cef_version_linux.h" - these header files were copied from CEF binary distributions for appropriate platforms and their original file names were "cef_version.h".
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
