Skip to content

Instantly share code, notes, and snippets.

@joseph-montanez
Created November 23, 2011 17:01
Show Gist options
  • Save joseph-montanez/1389218 to your computer and use it in GitHub Desktop.
Save joseph-montanez/1389218 to your computer and use it in GitHub Desktop.
program console;
{$mode objfpc}{$H+}
uses
sysutils, pango, Glib2, Gdk2, Gtk2;
procedure Shabb_Print (Line : String);
begin
G_Print (Pgchar (line + ''#13#10));
end;
function Test_Callback (data : gpointer) : gboolean; cdecl;
begin
Shabb_Print ('Ticks');
Test_Callback := True;
end;
var
Loop : gPointer;
begin
Loop := g_main_loop_new (Null, False);
g_timeout_add (1000, @test_callback, Nil);
g_timeout_add (2000, @test_callback, Nil);
g_main_loop_run (Loop);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment