CEF4Delphi icon indicating copy to clipboard operation
CEF4Delphi copied to clipboard

Could not install CEF4Delphi on Lazarus Linux QT

Open khongten001 opened this issue 2 years ago • 2 comments

Hi @salvadordf

Thank you for developing this awesome components!

I'm facing an error when installing CEF4Delphi on Lazarus Linux QT widget. The error in uCEFLinuxFunctions.pas because QT does not use GDK units! Could you please take a look?

unit uCEFLinuxFunctions;

{$IFDEF FPC}
  {$MODE OBJFPC}{$H+}
{$ENDIF}

{$I cef.inc}

{$IFNDEF TARGET_64BITS}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}

interface

uses
  {$IFDEF LINUX}
    {$IFDEF FPC}
      ctypes, keysym, xf86keysym, x, xlib,


      //// NO IFDEF FOR LCLQT5!!!!!


      {$IFDEF LCLGTK2}gtk2, glib2, gdk2, gtk2proc, gtk2int, Gtk2Def, gdk2x, Gtk2Extra,{$ENDIF}         
      {$IFDEF LCLGTK3}LazGdk3, LazGtk3, LazGObject2, LazGLib2, gtk3objects, gtk3procs,{$ENDIF}
    {$ENDIF}
  {$ENDIF}
  uCEFLinuxTypes, uCEFTypes;

{$IFDEF LINUX}
// Error here because PGdkEventKey is not defined
procedure GdkEventKeyToCEFKeyEvent(GdkEvent: PGdkEventKey; var aCEFKeyEvent : TCEFKeyEvent);


function  KeyboardCodeFromXKeysym(keysym : uint32) : integer;
function  GetCefStateModifiers(state : uint32) : integer;


// Error here because PGdkEventKey is not defined
function  GdkEventToWindowsKeyCode(Event: PGdkEventKey) : integer;
function  GetWindowsKeyCodeWithoutLocation(key_code : integer) : integer;
function  GetControlCharacter(windows_key_code : integer; shift : boolean) : integer;   

Thank you very much!

khongten001 avatar Oct 06 '22 07:10 khongten001

At this moment, CEF4Delphi only supports GTK.

I would have to learn about QT5 development and then see how it's implemented in the official CEF sample application in order to add QT5 support to CEF4Delphi.

salvadordf avatar Oct 06 '22 08:10 salvadordf

The QT back-end for Chromium was merged at https://bugs.chromium.org/p/chromium/issues/detail?id=1317782

Hope CEF will support QT soon :)

khongten001 avatar Oct 09 '23 01:10 khongten001