Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not install CEF4Delphi on Lazarus Linux QT #440

Open
khongten001 opened this issue Oct 6, 2022 · 2 comments
Open

Could not install CEF4Delphi on Lazarus Linux QT #440

khongten001 opened this issue Oct 6, 2022 · 2 comments

Comments

@khongten001
Copy link

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!

@salvadordf
Copy link
Owner

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.

@khongten001
Copy link
Author

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants