Re: [MSEide-MSEgui-talk] fpCEF3 port?

2017-03-02 Thread Martin Schreiber
On Thursday 02 March 2017 11:47:24 Krzysztof wrote:
> 2017-02-27 10:00 GMT+01:00 Martin Schreiber :
> > Why not? What does not work?
>
> Well, in LCL, "CreateBrowser" is called in virtual CreateWnd (this is where
> X / GDI handler is requested). With MSE Twidget I had to move
> "CreateBrowser" into construction because twidget.createwindow was never
> called. Result was that when create TChromium control, my whole application
> was cloned (even two buttons in task bar), but control by itself was not
> show. When changed to twindowwidget, createwindow is also not called. In
> which MSE method, X handler is received?

The winid will be created when the property clientwinid the first time will be 
read.
"
 tcustomwindowwidget = class(teventwidget)
[...]
   property clientwinid: winidty read getclientwinid;
[...]

function tcustomwindowwidget.getclientwinid: winidty;
begin
 checkclientwinid;
 result:= fclientwindow.id;
end;

procedure tcustomwindowwidget.checkclientwinid;
var
// options1: internalwindowoptionsty;
 rect1: rectty;
begin
 if fclientwindow.id = 0 then begin
  rect1:= innerwidgetrect;
  addpoint1(rect1.pos,rootpos);
  docreatewinid(window.winid,rect1,fclientwindow.id);
  if fclientwindow.id = 0 then begin
   createchildwindow;
  end;
  if fwindow <> nil then begin
   fwindow.registeronscroll({$ifdef FPC}@{$endif}windowscrolled);
  end;
  checkclientvisible;
 end;  
end;

function tcustomwindowwidget.createchildwindow: winidty;
var
 options1: internalwindowoptionsty;
 rect1: rectty;
begin
 rect1:= innerwidgetrect;
 addpoint1(rect1.pos,rootpos);
 fillchar(options1,sizeof(options1),0);
 options1.parent:= window.winid;
 guierror(gui_createwindow(rect1,options1,fclientwindow),self);
 result:= fclientwindow.id;
end;
"

Martin

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] fpCEF3 port?

2017-03-02 Thread Krzysztof
2017-02-27 10:00 GMT+01:00 Martin Schreiber :
>
>
> Why not? What does not work?


Well, in LCL, "CreateBrowser" is called in virtual CreateWnd (this is where
X / GDI handler is requested). With MSE Twidget I had to move
"CreateBrowser" into construction because twidget.createwindow was never
called. Result was that when create TChromium control, my whole application
was cloned (even two buttons in task bar), but control by itself was not
show. When changed to twindowwidget, createwindow is also not called. In
which MSE method, X handler is received? This is not something urgent, just
curiosity, I'm thinking about some hobby project. I'll back to this case
over the weekend
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk