unit uIdComponent;

interface

uses Classes, Rubies;

var
  cIdComponent: Tvalue;

function ap_cIdComponent: Tvalue;
procedure Init_IdComponent;

implementation

uses
  SysUtils, uDefUtils, Pythia, IdComponent, IdHandle, uIndy;

function ap_cIdComponent: Tvalue;
begin
  result := cIdComponent;
end;

procedure IdComponent_setup(obj: Tvalue; real: TIdComponent);
begin
end;

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

procedure Init_IdComponent;
begin
  cIdComponent := rb_define_class_under(mIndy, 'IdComponent', ap_cComponent);
  DefineProp(cIdComponent, TIdComponent);
  rb_define_method(cIdComponent, 'event_handle', @IdComponent_event_handle, 1);
end;

end.
