diff options
Diffstat (limited to 'libgtk_kylix')
| -rw-r--r-- | libgtk_kylix/GTKForms.pas | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libgtk_kylix/GTKForms.pas b/libgtk_kylix/GTKForms.pas index 167db27..0f85652 100644 --- a/libgtk_kylix/GTKForms.pas +++ b/libgtk_kylix/GTKForms.pas @@ -1,6 +1,6 @@ (* GTK-Kylix Library: GTKForms - Basic windows (TGTKForm, TGTKDialog), TGTKApplication, TGDKScreen - Version 0.6.26 (last updated 2007-08-19) + Version 0.6.27 (last updated 2008-10-11) Copyright (C) 2007 Tomas Bzatek <tbzatek@users.sourceforge.net> This library is free software; you can redistribute it and/or @@ -31,6 +31,8 @@ uses gtk2, gdk2, glib2, Classes, SysUtils, GTKControls, GTKConsts; type // Some basic types PCharArray = array[0..0] of PChar; + __pthread_t = {$ifdef cpu64}QWord{$else}DWord{$endif}; + TCustomGTKForm = class; (****************************************** TGDKSCREEN **************************************************************************) @@ -178,6 +180,7 @@ type // Some basic types FOnException: TExceptionEvent; FMainForm: TCustomGTKForm; FMainFormSet, FGTK205Up, FGTK220Up, FGTK240Up, FGTK260Up, FGTK280Up: Boolean; + FThreadID: __pthread_t; procedure Quit; protected procedure CreateHandle; @@ -206,6 +209,7 @@ type // Some basic types property GTKVersion_2_4_0_Up: boolean read FGTK240Up; property GTKVersion_2_6_0_Up: boolean read FGTK260Up; property GTKVersion_2_8_0_Up: boolean read FGTK280Up; + property ThreadID: __pthread_t read FThreadID; end; @@ -525,6 +529,7 @@ begin Classes.ApplicationShowException := ShowException; CreateHandle; HookSynchronizeWakeup; + FThreadID := 0; end; procedure my_g_thread_init(vtable:Pointer);cdecl;external 'libgthread-2.0.so' name 'g_thread_init'; @@ -678,12 +683,14 @@ begin end; procedure _exit(status: longint); cdecl; external 'libc.so.6' name '_exit'; +function __pthread_self: __pthread_t; cdecl; external 'libpthread.so.0' name 'pthread_self'; procedure TGTKApplication.Run; begin repeat try // gdk_threads_enter; + FThreadID := __pthread_self; gtk_main; // gdk_threads_leave; except |
