unit uHotKey;

interface

uses
{$IFDEF VCL}
  ComCtrls,
{$ELSE}
  QComCtrls,
{$ENDIF}
  ExtCtrls,
  Rubies;

var
  cHotKey: Tvalue;

function ap_cHotKey: Tvalue;
function ap_iHotKey(real: THotKey; owner: Tvalue): Tvalue;
procedure Init_HotKey;

implementation

uses
  SysUtils, Classes,
  uDefUtils, uIntern, uHandle, uAlloc, uProp, uPhi,
  uSizeConstraints,
  uConv,
  uIndexer,
  Graphics,
  uPersistent, uComponent, uControl;

function ap_cHotKey: Tvalue;
begin
  result := cHotKey;
end;

procedure HotKey_setup(obj: Tvalue; real: THotKey);
begin
//    AssignPropMethod(real, [Handle]);
end;

function HotKey_event_handle(This, name: Tvalue): Tvalue; cdecl;
begin
  EventHandle(This, name, [Handle]);
  result := Qnil;
end;

function HotKey_alloc(This: Tvalue; real: THotKey): Tvalue;
begin
  result := ChildAlloc(This, real);
  HotKey_setup(result, real);
end;

function ap_iHotKey(real: THotKey; owner: Tvalue): Tvalue;
begin
  result := HotKey_alloc(cHotKey, real);
  ap_owner(result, owner);
end;

function ap_iHotKey_v(var AControl; owner: Tvalue): Tvalue;
begin
  result := ap_iHotKey(THotKey(AControl), owner);
end;

function HotKey_allocate(This: Tvalue): Tvalue; cdecl;
var
  real: THotKey;
begin
  real := THotKey.Create(nil);
  result := CompoAlloc(This, real);
  HotKey_setup(result, real);
end;

(**** str_my_class made by ap_src_maker ****)
(**** made by ap_src_maker ****)

procedure Init_HotKey;
begin
  cHotKey := OutputPersistentClass(mPhi, THotKey, cWinControl, ap_iHotKey_v);
  rb_define_method(cHotKey, 'event_handle', @HotKey_event_handle, 1);
  rb_define_alloc_func(cHotKey, @HotKey_allocate);

(**** str_init made by ap_src_maker ****)
(**** made by ap_src_maker ****)


end;

end.
