{"action":"created","issue":{"url":"https://api.github.com/repos/AdaCore/gtkada/issues/3","labels_url":"https://api.github.com/repos/AdaCore/gtkada/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/AdaCore/gtkada/issues/3/comments","events_url":"https://api.github.com/repos/AdaCore/gtkada/issues/3/events","html_url":"https://github.com/AdaCore/gtkada/issues/3","id":123965742,"number":3,"title":"Using Cairo with GTK","user":{"login":"dead-crow","id":16351303,"avatar_url":"https://avatars.githubusercontent.com/u/16351303?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-crow","html_url":"https://github.com/dead-crow","followers_url":"https://api.github.com/users/dead-crow/followers","following_url":"https://api.github.com/users/dead-crow/following{/other_user}","gists_url":"https://api.github.com/users/dead-crow/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-crow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-crow/subscriptions","organizations_url":"https://api.github.com/users/dead-crow/orgs","repos_url":"https://api.github.com/users/dead-crow/repos","events_url":"https://api.github.com/users/dead-crow/events{/privacy}","received_events_url":"https://api.github.com/users/dead-crow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-27T07:14:38Z","updated_at":"2016-01-13T11:03:34Z","closed_at":null,"body":"Hi ,\r\n\r\nI'm trying to code geometric forms with cairo and display with a gtk_window .\r\n\r\nI created the window and a gtk_drawing_area in it .\r\n\r\nMaybe , now the \"draw\" signal is needed ?\r\n\r\nIf yes , i have no idea of how to use it .\r\nI read carefully descriptions in packages , but it doesn't help me .\r\n\r\n```ada\r\nWITH Gtk.Main ;          USE Gtk.Main ;\r\nWITH Gtk.Window ;        USE Gtk.Window ;\r\nWITH Gtk.Enums ;         USE Gtk.Enums ;\r\nWITH Gtk.Button ;        USE Gtk.Button ;\r\nWITH Gtk.Alignment ;     USE Gtk.Alignment ;\r\nWITH Gtk.Box ;           USE Gtk.Box ;\r\nWITH Gtk.Gentry;         USE Gtk.Gentry;\r\nWITH Gtk.Widget ;        USE Gtk.Widget ; \r\nwith Gtk.Handlers;\r\n\r\nwith Gtk.Drawing_Area; \tuse Gtk.Drawing_Area;\r\n\r\n\r\nPROCEDURE dessine_avec_cairo IS\r\n\r\n-----------------------\r\n   -- VARIABLES --    | \r\n----------------------------------------------------------\r\n   win : Gtk_window ;\r\n\r\n   Btn1, Btn2 ,Btn3  : Gtk_Button ;\r\n\r\n   alignG, alignM ,alignD  : Gtk_Alignment ;\r\n   \r\n   Boite  : Gtk_VBox ;\r\n   \r\n   Boutons :  Gtk_HBox ;\r\n    \r\n   saisie : Gtk_Entry ;\r\n   \r\n   zone_dessin : Gtk_Drawing_Area ;\r\n     \r\n----------------------------------------------------------\r\n--Instanciation package(s) for connexion\r\n----------------------------------------------------------\r\n\r\n   PACKAGE P_Callback IS NEW Gtk.Handlers.Callback(Gtk_Widget_Record);\r\n    \r\n   USE P_Callback ; \r\n\r\n----------------------------------------------------------\r\n--  Handlers (or callbacks)   |\r\n----------------------------------------------------------\r\n   \r\n   procedure Stop_Program(Emetteur : access Gtk_Widget_Record'class)\r\n   is\r\n   \r\n      PRAGMA Unreferenced (Emetteur);\r\n      \r\n   begin\r\n   \r\n      Main_Quit;\r\n\r\n   end Stop_Program ;\r\n   \r\n-------------------------------------------------\r\nBEGIN\r\n\r\n   Init ; \r\n   \r\n----------------\r\n   -- NEW --   |\r\n-------------------------------------------------\r\n\r\n   Gtk_New(zone_dessin);\r\n   \r\n   Gtk_New(win);   \r\n   \r\n   Gtk_New(saisie);\r\n\t\t\t\t\t   \r\n   Gtk_New(Btn1, \"Bouton 1\") ; \r\n   Gtk_New(Btn2, \"Bouton 2\") ; \r\n   Gtk_New(Btn3, \"Bouton 3\") ; \r\n   \r\n   Gtk_New(alignG,0.0,1.0,1.0,1.0);\r\n   Gtk_New(alignM,0.5,1.0,1.0,1.0);\r\n   Gtk_New(alignD,1.0,1.0,1.0,1.0);\r\n   \r\n  Gtk_New_VBox\r\n  (Boite, homogeneous => false, Spacing => 0) ;\r\n  \r\n  Gtk_New_HBox\r\n  (Boutons, homogeneous => false, Spacing => 0) ;\r\n\r\n---------------------------------\r\n--  Add                    |\r\n---------------------------------\r\n\r\n   alignG.add(Btn1) ;\r\n   alignM.add(Btn2) ;\r\n   alignD.add(Btn3) ;\r\n   \r\n   win.Add(Boite);\r\n\r\n------------------------------------------\r\n--  Connect                |\r\n------------------------------------------\r\n\r\nConnect(Widget => win ,\r\n          Name => \"destroy\" ,\r\n            Cb => Stop_Program'access);  \r\n    \r\n\r\n------------------------------------------\r\n--  Design Window          |\r\n------------------------------------------\r\n\r\n    Size\r\n      (Drawing_Area => zone_dessin ,\r\n       Width => 100 ,\r\n       Height => 100);\r\n\r\n    Pack_Start\r\n      (In_Box => Boite ,\r\n       Child  => zone_dessin ,\r\n       Expand => true ,\r\n       Fill => true );\r\n\r\n   Pack_Start\r\n      (In_Box => Boite ,\r\n       Child  => saisie ,\r\n       Expand => false );\r\n   \r\n   Pack_Start\r\n      (In_Box => Boite , \r\n       Child => Boutons ,\r\n       Expand => true ,\r\n       Fill => true );\r\n     \r\n     \r\n   Pack_Start\r\n      (In_Box => Boutons , \r\n       Child => alignG ,\r\n       Expand => true ,\r\n       Fill => true );\r\n\r\n   Pack_Start\r\n      (In_Box => Boutons , \r\n       Child => alignM ,\r\n       Expand => true ,\r\n       Fill => true );\r\n    \r\n   Pack_Start\r\n      (In_Box => Boutons , \r\n       Child => alignD ,\r\n       Expand => true ,\r\n       Fill => true );\r\n   \r\n \r\n \r\n   win.Set_Default_Size(500,500) ;   \r\n   \r\n   win.set_position(Win_Pos_Mouse) ; \r\n   \r\n   win.set_opacity(0.7) ;\r\n   \r\n   win.Show_all ; \r\n   Main ; \r\n\r\nEND dessine_avec_cairo ;\r\n```"},"comment":{"url":"https://api.github.com/repos/AdaCore/gtkada/issues/comments/171255066","html_url":"https://github.com/AdaCore/gtkada/issues/3#issuecomment-171255066","issue_url":"https://api.github.com/repos/AdaCore/gtkada/issues/3","id":171255066,"user":{"login":"dead-crow","id":16351303,"avatar_url":"https://avatars.githubusercontent.com/u/16351303?v=3","gravatar_id":"","url":"https://api.github.com/users/dead-crow","html_url":"https://github.com/dead-crow","followers_url":"https://api.github.com/users/dead-crow/followers","following_url":"https://api.github.com/users/dead-crow/following{/other_user}","gists_url":"https://api.github.com/users/dead-crow/gists{/gist_id}","starred_url":"https://api.github.com/users/dead-crow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dead-crow/subscriptions","organizations_url":"https://api.github.com/users/dead-crow/orgs","repos_url":"https://api.github.com/users/dead-crow/repos","events_url":"https://api.github.com/users/dead-crow/events{/privacy}","received_events_url":"https://api.github.com/users/dead-crow/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T11:03:34Z","updated_at":"2016-01-13T11:03:34Z","body":"Thanks for your answer setton .\r\n\r\nI already created a topic on a GTK forum .\r\nBut because it's specific to this ADA binding , i got no answer .\r\nPlus , i think that there is minimum one person here who can help me about it  ."}}