Created
November 23, 2011 17:01
-
-
Save joseph-montanez/1389218 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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