Recent

Author Topic: Lazarus Webkit component set ALPHA !!!  (Read 23795 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: Lazarus Webkit component set ALPHA !!!
« Reply #15 on: April 04, 2013, 02:05:40 pm »
Quote from: humbertoteofilo
Hi Dibo
Webkit is a big software, there is a lot of ports with differents dependencies. There is Gtk2, Gtk3, QT, Mac COCOA(original target), google... There is no windows port over GDI/Directx, but some projects are promissing to provide windows webkit, like CEF.
http://code.google.com/p/chromiumembedded/

The windows  widgetset depends of development of those projects. I am watching...
Remember we need a mature C-language(procedural) port to create a Widgetset.

Lets wait
 8-)
Seems that windows binaries are available now. So there is webkit for GTK, for QT, now for Windows too. Will be nice to have one component for these platforms. Did you note that google leave webkit and is moving to own Blink port? Seems that Blink is smaller and lighter than webkit.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12524
  • FPC developer.
Re: Lazarus Webkit component set ALPHA !!!
« Reply #16 on: April 04, 2013, 09:02:37 pm »
Seems that windows binaries are available now. So there is webkit for GTK, for QT, now for Windows too. Will be nice to have one component for these platforms. Did you note that google leave webkit and is moving to own Blink port? Seems that Blink is smaller and lighter than webkit.

On Windows, the only sane solution is to instrument MSIE, which is defaulty installed. With the XP deprecation in about an year, the older variants (that cause so much pain) are mostly dead.

mohamedyousof

  • New Member
  • *
  • Posts: 14
Re: Lazarus Webkit component set ALPHA !!!
« Reply #17 on: December 20, 2013, 11:45:40 pm »
Hello, it is very nice component
can I ask you about the following:
1- how can I search the webpage for links
2- how can I click a link using code
2- how can I find forms on webpage such as username field or search field

what I need to know is how to deal with webpage components so i can click a link or fill fields and so on.

JD

  • Hero Member
  • *****
  • Posts: 1908
Re: Lazarus Webkit component set ALPHA !!!
« Reply #18 on: December 30, 2013, 12:33:22 am »
This looks very promising. Good job!!!
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

xinyiman

  • Hero Member
  • *****
  • Posts: 2259
    • Lazarus and Free Pascal italian community
Re: Lazarus Webkit component set ALPHA !!!
« Reply #19 on: July 01, 2014, 07:20:35 pm »
I tried the package and I must say that I have compiled examples without problems. I sailed quietly, then when I login to the site www.24options.com gave me the following error

By doing debugging goes wrong in the file gtk2widgetset.inc function AppProcessMessages and line

if not g_main_context_iteration (g_main_context_default, False) then

Code: [Select]
TGtk2WidgetSet.AppProcessMessages procedures;

   PendingGtkMessagesExists function: boolean;
   begin
     {$ IFDEF} USE_GTK_MAIN_OLD_ITERATION
     Result: = (gtk_events_pending <> 0) or LCLtoGtkMessagePending;
     {$ ELSE}
     Result: = g_main_context_pending (g_main_context_default) or
       LCLtoGtkMessagePending;
     {$ ENDIF}
   end;

var
   vlItem: TGtkMessageQueueItem;
   vlMsg: PMSG;
   i: Integer;
begin
   repeat
     / / Send messages to the cached LCL gtk
     / / DebugLn (['TGtk2WidgetSet.AppProcessMessages SendCachedLCLMessages']);
     SendCachedLCLMessages;

     / / Let gtk handle up to 100 messages and call our callbacks
     i: = 100;

     if not then FGtkTerminated
     begin
       {$ IFDEF} USE_GTK_MAIN_OLD_ITERATION
       while (gtk_events_pending <> 0) and (i> 0) do
       begin
         then if FGtkTerminated
           break;
         gtk_main_iteration_do (False);
         dec (i);
       end;
       {$ ELSE}
       while g_main_context_pending (g_main_context_default) and (i> 0) do
       begin
         then if FGtkTerminated
           break;
         if not g_main_context_iteration (g_main_context_default, False) then
           break;
         dec (i);
       end;
       {$ ENDIF}
     end;

     / / DebugLn (['TGtk2WidgetSet.AppProcessMessages SendCachedGtkMessages']);
     / / Send messages to the cached gtk lcl
     SendCachedGtkMessages;

     / / Then handle our own messages
     while not Application.Terminated do begin
       fMessageQueue.Lock;
       try
         / / Fetch first message
         vlItem: = fMessageQueue.FirstMessageItem;
         if vlItem = nil then break;

         / / Remove message from queue
         if vlItem.IsPaintMessage then begin
           / / DebugLn (['TGtk2WidgetSet.AppProcessMessages Paint:', DbgSName (GetLCLObject (Pointer (vlItem.Msg ^. Hwnd)))]);
           / / Paint messages are messages of the most expensive in the LCL,
           / / Therefore they are sent after all other
           if MovedPaintMessageCount <10 then begin
             inc (MovedPaintMessageCount);
             if fMessageQueue.HasNonPaintMessages then begin
               / / There are no paint messages -> move paint message to the end
               fMessageQueue.MoveToLast (FMessageQueue.First);
               continuous;
             end else begin
               / / There are only paint messages left in the queue
               / / -> Check other queues
               if PendingGtkMessagesExists then break;
             end;
           end else begin
             / / Handle this paint message now
             MovedPaintMessageCount: = 0;
           end;
         end;

         / / DebugLn (['SendMessage TGtk2WidgetSet.AppProcessMessages:', DbgSName (GetLCLObject (Pointer (vlItem.Msg ^. Hwnd)))]);
         vlMsg: = fMessageQueue.PopFirstMessage;
       finally
         fMessageQueue.UnLock;
       end;

       / / debugln (['TGtk2WidgetSet.AppProcessMessages', vlMsg ^. Message, '', LM_CHAR, '', dbgsname (GetLCLObject (Pointer (vlMsg ^. hwnd)))]);
       / / Send message
       if vlMsg <> nil then
       begin
         try
           with vlMsg ^ do SendMessage (hWnd, Message, wParam, LParam);
         finally
           Dispose (vlMsg);
         end;
       end;
     end;

     / / Proceed until all messages are handled
   until (not PendingGtkMessagesExists) or Application.Terminated;
end;


How can I fix?
« Last Edit: July 01, 2014, 08:02:38 pm by JuhaManninen »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018