/[lcore]/trunk/lcoremessages.pas
ViewVC logotype

Diff of /trunk/lcoremessages.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 61 by plugwash, Thu Feb 4 22:47:07 2010 UTC revision 73 by plugwash, Fri Feb 12 00:51:00 2010 UTC
# Line 78  Line 78 
78    WM_USER = 1024;    WM_USER = 1024;
79    WM_TIMER = 275;    WM_TIMER = 275;
80    INFINITE = syncobjs.infinite;    INFINITE = syncobjs.infinite;
81    
82  function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;  function getwindowlongptr(ahwnd:hwnd;nindex:integer) : taddrint;
83  function setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint) : taddrint;  function setwindowlongptr(ahwnd:hwnd;nindex:integer;dwNewLong : taddrint) : taddrint;
84  function DefWindowProc(ahWnd:HWND; auMsg:Integer; awParam:WPARAM; alParam:LPARAM):Integer; stdcall;  function DefWindowProc(ahWnd:HWND; auMsg:Integer; awParam:WPARAM; alParam:LPARAM):Integer; stdcall;
# Line 103  Line 104 
104  {$i unixstuff.inc}  {$i unixstuff.inc}
105    
106  type  type
107      
108    tmessageintransit = class    tmessageintransit = class
109      msg : tmsg;      msg : tmsg;
110      next : tmessageintransit;      next : tmessageintransit;
# Line 114  Line 116 
116      waiting : boolean;      waiting : boolean;
117      lcorethread : boolean;      lcorethread : boolean;
118      nexttimer : ttimeval;      nexttimer : ttimeval;
119      threadid : integer;      threadid : tthreadid;
120    end;    end;
121    twindow=class    twindow=class
122      hwnd : hwnd;      hwnd : hwnd;
# Line 138  Line 140 
140    
141    
142  //findthreaddata should only be called while holding the structurelock  //findthreaddata should only be called while holding the structurelock
143  function findthreaddata(threadid : integer) : tthreaddata;  function findthreaddata(threadid : tthreadid) : tthreaddata;
144  begin  begin
145    result := tthreaddata(findtree(@threaddata,inttostr(threadid)));    result := tthreaddata(findtree(@threaddata,inttostr(taddrint(threadid))));
146    if result = nil then begin    if result = nil then begin
147      result := tthreaddata.create;      result := tthreaddata.create;
148      result.messageevent := teventobject.create(nil,false,false,inttostr(taddrint(result)));      result.messageevent := teventobject.create(nil,false,false,inttostr(taddrint(result)));
149      result.nexttimer := tv_invalidtimebig;      result.nexttimer := tv_invalidtimebig;
150      result.threadid := threadid;      result.threadid := threadid;
151      addtree(@threaddata,inttostr(threadid),result);      addtree(@threaddata,inttostr(taddrint(threadid)),result);
152    end;    end;
153  end;  end;
154    
# Line 160  Line 162 
162      //writeln('freeing thread data object');      //writeln('freeing thread data object');
163      athreaddata.free;      athreaddata.free;
164      //writeln('deleting thread data object from hashtable');      //writeln('deleting thread data object from hashtable');
165      deltree(@threaddata,inttostr(athreaddata.threadid));      deltree(@threaddata,inttostr(taddrint(athreaddata.threadid)));
166      //writeln('finished deleting thread data');      //writeln('finished deleting thread data');
167    end else begin    end else begin
168      //writeln('thread data is not unused');      //writeln('thread data is not unused');
# Line 292  Line 294 
294        //writeln('aboute to delete window from windows structure');        //writeln('aboute to delete window from windows structure');
295        deltree(@windows,inttostr(ahwnd));        deltree(@windows,inttostr(ahwnd));
296        //writeln('deleted window from windows structure');        //writeln('deleted window from windows structure');
297        windowthreaddata := tthreaddata(findtree(@threaddata,inttostr(window.threadid)));        windowthreaddata := tthreaddata(findtree(@threaddata,inttostr(taddrint(window.threadid))));
298    
299        if windowthreaddata <> nil then begin        if windowthreaddata <> nil then begin
300          //writeln('found thread data scanning for messages to clean up');          //writeln('found thread data scanning for messages to clean up');

Legend:
Removed from v.61  
changed lines
  Added in v.73

No admin address has been configured">No admin address has been configured
ViewVC Help
Powered by ViewVC 1.1.22