1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, AdaCore                     -- 
  5. --                                                                          -- 
  6. -- This library is free software;  you can redistribute it and/or modify it -- 
  7. -- under terms of the  GNU General Public License  as published by the Free -- 
  8. -- Software  Foundation;  either version 3,  or (at your  option) any later -- 
  9. -- version. This library is distributed in the hope that it will be useful, -- 
  10. -- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- -- 
  11. -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            -- 
  12. --                                                                          -- 
  13. -- As a special exception under Section 7 of GPL version 3, you are granted -- 
  14. -- additional permissions described in the GCC Runtime Library Exception,   -- 
  15. -- version 3.1, as published by the Free Software Foundation.               -- 
  16. --                                                                          -- 
  17. -- You should have received a copy of the GNU General Public License and    -- 
  18. -- a copy of the GCC Runtime Library Exception along with this program;     -- 
  19. -- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    -- 
  20. -- <http://www.gnu.org/licenses/>.                                          -- 
  21. --                                                                          -- 
  22. ------------------------------------------------------------------------------ 
  23.  
  24. --  <description> 
  25. --  A Gdk.Frame_Timings.Gdk_Frame_Timings object holds timing information for 
  26. --  a single frame of the application's displays. To retrieve 
  27. --  Gdk.Frame_Timings.Gdk_Frame_Timings objects, use 
  28. --  Gdk.Frame_Clock.Get_Timings or Gdk.Frame_Clock.Get_Current_Timings. The 
  29. --  information in Gdk.Frame_Timings.Gdk_Frame_Timings is useful for precise 
  30. --  synchronization of video with the event or audio streams, and for measuring 
  31. --  quality metrics for the application's display, such as latency and jitter. 
  32. -- 
  33. --  </description> 
  34. pragma Ada_2005; 
  35.  
  36. pragma Warnings (Off, "*is already use-visible*"); 
  37. with Glib; use Glib; 
  38.  
  39. package Gdk.Frame_Timings is 
  40.  
  41.    type Gdk_Frame_Timings is new Glib.C_Boxed with null record; 
  42.    Null_Gdk_Frame_Timings : constant Gdk_Frame_Timings; 
  43.  
  44.    function From_Object (Object : System.Address) return Gdk_Frame_Timings; 
  45.    function From_Object_Free (B : access Gdk_Frame_Timings'Class) return Gdk_Frame_Timings; 
  46.    pragma Inline (From_Object_Free, From_Object); 
  47.  
  48.    ------------------ 
  49.    -- Constructors -- 
  50.    ------------------ 
  51.  
  52.    function Get_Type return Glib.GType; 
  53.    pragma Import (C, Get_Type, "gdk_frame_timings_get_type"); 
  54.  
  55.    ------------- 
  56.    -- Methods -- 
  57.    ------------- 
  58.  
  59.    function Get_Complete (Self : Gdk_Frame_Timings) return Boolean; 
  60.    --  The timing information in a Gdk.Frame_Timings.Gdk_Frame_Timings is 
  61.    --  filled in incrementally as the frame as drawn and passed off to the 
  62.    --  window system for processing and display to the user. The accessor 
  63.    --  functions for Gdk.Frame_Timings.Gdk_Frame_Timings can return 0 to 
  64.    --  indicate an unavailable value for two reasons: either because the 
  65.    --  information is not yet available, or because it isn't available at all. 
  66.    --  Once gdk_frame_timings_complete returns True for a frame, you can be 
  67.    --  certain that no further values will become available and be stored in 
  68.    --  the Gdk.Frame_Timings.Gdk_Frame_Timings. 
  69.    --  Since: gtk+ 3.8 
  70.  
  71.    function Get_Frame_Counter (Self : Gdk_Frame_Timings) return Gint64; 
  72.    --  Gets the frame counter value of the Gdk.Frame_Clock.Gdk_Frame_Clock 
  73.    --  when this this frame was drawn. 
  74.    --  Since: gtk+ 3.8 
  75.  
  76.    function Get_Frame_Time (Self : Gdk_Frame_Timings) return Gint64; 
  77.    --  Returns the frame time for the frame. This is the time value that is 
  78.    --  typically used to time animations for the frame. See 
  79.    --  Gdk.Frame_Clock.Get_Frame_Time. 
  80.  
  81.    function Get_Predicted_Presentation_Time 
  82.       (Self : Gdk_Frame_Timings) return Gint64; 
  83.    --  Gets the predicted time at which this frame will be displayed. Although 
  84.    --  no predicted time may be available, if one is available, it will be 
  85.    --  available while the frame is being generated, in contrast to 
  86.    --  Gdk.Frame_Timings.Get_Presentation_Time, which is only available after 
  87.    --  the frame has been presented. In general, if you are simply animating, 
  88.    --  you should use Gdk.Frame_Clock.Get_Frame_Time rather than this function, 
  89.    --  but this function is useful for applications that want exact control 
  90.    --  over latency. For example, a movie player may want this information for 
  91.    --  Audio/Video synchronization. 
  92.    --  Since: gtk+ 3.8 
  93.  
  94.    function Get_Presentation_Time (Self : Gdk_Frame_Timings) return Gint64; 
  95.    --  Reurns the presentation time. This is the time at which the frame 
  96.    --  became visible to the user. 
  97.    --  Since: gtk+ 3.8 
  98.  
  99.    function Get_Refresh_Interval (Self : Gdk_Frame_Timings) return Gint64; 
  100.    --  Gets the natural interval between presentation times for the display 
  101.    --  that this frame was displayed on. Frame presentation usually happens 
  102.    --  during the "vertical blanking interval". 
  103.    --  Since: gtk+ 3.8 
  104.  
  105.    function Ref (Self : Gdk_Frame_Timings) return Gdk_Frame_Timings; 
  106.    --  Increases the reference count of Timings. 
  107.    --  Since: gtk+ 3.8 
  108.  
  109.    procedure Unref (Self : Gdk_Frame_Timings); 
  110.    --  Decreases the reference count of Timings. If Timings is no longer 
  111.    --  referenced, it will be freed. 
  112.    --  Since: gtk+ 3.8 
  113.  
  114. private 
  115.  
  116.    Null_Gdk_Frame_Timings : constant Gdk_Frame_Timings := (Glib.C_Boxed with null record); 
  117.  
  118. end Gdk.Frame_Timings;