Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

CEF4Delphi now supports Lazarus/FPC

Post Reply
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

Hi,

I just uploaded the new CEF4Delphi version with support for Lazarus / FPC.

I tested it using Lazarus 1.8.2 and FPC 3.0.4 in Windows. Don't try to compile it for other operating systems.

I added a new demo called SimpleLazarusBrowser and it works correctly in 32 bits but I still have to fix an initialization issue in 64 bits. :oops:

If you want to test it, open the cef4delphi_lazarus.lpk package, compile it and install it.

This is my first Lazarus component and any help from someone with more experience with Lazarus/FPC is more than welcome. :D
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

I just uploaded the fix for the 64 bit initialization issue.
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

I'll take a look at your SimpleOSRBrowser port as soon as I can.

Thanks!!!! :D
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

The last CEF4Delphi update includes the SimpleLazOSRBrowser demo thanks to LazFan! :D

I had to make some adaptations to the OnPaint event and it still has some issues with key presses beyond ascii char 127.
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

Thanks again LazFan!

I'll try your solution as soon as I can.
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

I added the TBufferPanel.OnUTF8KeyPress event and I also added you fix for this bug.

Thanks!!! :D
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: CEF4Delphi now supports Lazarus/FPC

Post by salvadordf »

Hi,

The SimpleServer demo only has the minimum code to make it work as an HTTP server.

You need to use the events and procedures related to websockets :
  • TCEFServerComponent.OnWebSocketRequest
  • TCEFServerComponent.OnWebSocketConnected
  • TCEFServerComponent.OnWebSocketMessage
  • TCEFServerComponent.SendWebSocketMessage
Read the official CEF3 code comments for more details :
https://github.com/chromiumembedded/cef ... ver_capi.h
Post Reply