Skip to content

Instantly share code, notes, and snippets.

@ik5
Created August 31, 2012 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ik5/3549922 to your computer and use it in GitHub Desktop.
Save ik5/3549922 to your computer and use it in GitHub Desktop.
gir2pascal result
type
PGtkButton = ^TGtkButton;
TGtkButton = object(TGtkBin)
priv3: PGtkButtonPrivate;
function new: PGtkButton; cdecl; inline; static;
function get_label: Pgchar; cdecl; inline;
procedure set_label(label_: Pgchar); cdecl; inline;
property label_: Pgchar read get_label write set_label;
end;
function gtk_button_new: PGtkButton; cdecl; external;
function gtk_button_get_label(AButton: PGtkButton): Pgchar; cdecl; external;
procedure gtk_button_set_label(AButton: PGtkButton; label_: Pgchar); cdecl; external;
implementation
function TGtkButton.new: PGtkButton; cdecl;
begin
Result := Gtk3.gtk_button_new();
end;
function TGtkButton.get_label: Pgchar; cdecl;
begin
Result := Gtk3.gtk_button_get_label(@self);
end;
procedure TGtkButton.set_label(label_: Pgchar); cdecl;
begin
Gtk3.gtk_button_set_label(@self, label_);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment