summaryrefslogtreecommitdiff
path: root/libgtk_kylix/GTKUtils.pas
diff options
context:
space:
mode:
Diffstat (limited to 'libgtk_kylix/GTKUtils.pas')
-rw-r--r--libgtk_kylix/GTKUtils.pas24
1 files changed, 5 insertions, 19 deletions
diff --git a/libgtk_kylix/GTKUtils.pas b/libgtk_kylix/GTKUtils.pas
index acc30ca..f893858 100644
--- a/libgtk_kylix/GTKUtils.pas
+++ b/libgtk_kylix/GTKUtils.pas
@@ -24,11 +24,9 @@ unit GTKUtils;
interface
-uses gtk2, gdk2, glib2, SysUtils, GTKControls, GTKClasses;
+uses gtk2, gdk2, lazglib2, SysUtils, GTKControls, GTKClasses;
(********************************************************************************************************************************)
-function PgcharToString(const S: Pgchar): string;
-function StringToPgchar(const S: string): Pgchar;
function AllocateColor(Widget: PGtkWidget; R, G, B: Word): PGdkColor; overload;
function AllocateColor(R, G, B: Word): TGDKColor; overload;
function KeyValToUnicode(const Key: word): guint32;
@@ -50,18 +48,6 @@ function StringToGDKColor(Str: string; var Color: TGDKColor): boolean;
implementation
(********************************************************************************************************************************)
-function PgcharToString(const S: Pgchar): string;
-begin
- Result := string(S);
-end;
-
-(********************************************************************************************************************************)
-function StringToPgchar(const S: string): Pgchar;
-begin
- Result := PChar(S);
-end;
-
-(********************************************************************************************************************************)
function AllocateColor(Widget: PGtkWidget; R, G, B: Word): PGdkColor;
begin
New(Result);
@@ -178,10 +164,10 @@ end;
(********************************************************************************************************************************)
function PGdkColorToGDKColor(Color: PGdkColor): TGDKColor;
begin
- Result.pixel := Color.pixel;
- Result.red := Color.red;
- Result.green := Color.green;
- Result.blue := Color.blue;
+ Result.pixel := Color^.pixel;
+ Result.red := Color^.red;
+ Result.green := Color^.green;
+ Result.blue := Color^.blue;
end;
(********************************************************************************************************************************)