root / Client / UGUIPlatformUtils.pas @ 0:95bd93c28625
History | View | Annotate | Download (1.3 kB)
| 1 | (*
|
|---|---|
| 2 | * CDDL HEADER START |
| 3 | * |
| 4 | * The contents of this file are subject to the terms of the |
| 5 | * Common Development and Distribution License, Version 1.0 only |
| 6 | * (the "License"). You may not use this file except in compliance |
| 7 | * with the License. |
| 8 | * |
| 9 | * You can obtain a copy of the license at |
| 10 | * http://www.opensource.org/licenses/cddl1.php. |
| 11 | * See the License for the specific language governing permissions |
| 12 | * and limitations under the License. |
| 13 | * |
| 14 | * When distributing Covered Code, include this CDDL HEADER in each |
| 15 | * file and include the License file at |
| 16 | * http://www.opensource.org/licenses/cddl1.php. If applicable, |
| 17 | * add the following below this CDDL HEADER, with the fields enclosed |
| 18 | * by brackets "[]" replaced with your own identifying * information: |
| 19 | * Portions Copyright [yyyy] [name of copyright owner] |
| 20 | * |
| 21 | * CDDL HEADER END |
| 22 | * |
| 23 | * |
| 24 | * Portions Copyright 2007 Andreas Schneider |
| 25 | *) |
| 26 | unit UGUIPlatformUtils;
|
| 27 | |
| 28 | {$mode objfpc}{$H+} |
| 29 | |
| 30 | interface
|
| 31 | |
| 32 | uses
|
| 33 | Classes, SysUtils |
| 34 | {$IFDEF LCLWin32}, windows{$ENDIF} |
| 35 | {$IFDEF LCLGtk}, gtk{$ENDIF}; |
| 36 | |
| 37 | procedure SetWindowParent(AHandle, AParent: THANDLE);
|
| 38 | |
| 39 | implementation
|
| 40 | |
| 41 | procedure SetWindowParent(AHandle, AParent: THANDLE);
|
| 42 | begin
|
| 43 | {$IFDEF LCLWin32}
|
| 44 | SetWindowLong(AHandle, GWL_HWNDPARENT, AParent); |
| 45 | {$ENDIF}
|
| 46 | {$IFDEF LCLGtk}
|
| 47 | gtk_window_set_transient_for(PGtkWindow(AHandle), PGtkWindow(AParent)); |
| 48 | {$ENDIF}
|
| 49 | end;
|
| 50 | |
| 51 | end.
|
| 52 |