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 GtkPrintSettings object represents the settings of a print dialog in a 
  26. --  system-independent way. The main use for this object is that once you've 
  27. --  printed you can get a settings object that represents the settings the user 
  28. --  chose, and the next time you print you can pass that object in so that the 
  29. --  user doesn't have to re-set all his settings. 
  30. -- 
  31. --  Its also possible to enumerate the settings so that you can easily save 
  32. --  the settings for the next time your app runs, or even store them in a 
  33. --  document. The predefined keys try to use shared values as much as possible 
  34. --  so that moving such a document between systems still works. 
  35. -- 
  36. --  <!-- TODO example of getting, storing and setting settings --> 
  37. --  Printing support was added in GTK+ 2.10. 
  38. -- 
  39. --  </description> 
  40. pragma Ada_2005; 
  41.  
  42. pragma Warnings (Off, "*is already use-visible*"); 
  43. with Glib;           use Glib; 
  44. with Glib.Key_File;  use Glib.Key_File; 
  45. with Glib.Object;    use Glib.Object; 
  46. with Gtk.Enums;      use Gtk.Enums; 
  47. with Gtk.Paper_Size; use Gtk.Paper_Size; 
  48.  
  49. package Gtk.Print_Settings is 
  50.  
  51.    type Gtk_Print_Settings_Record is new GObject_Record with null record; 
  52.    type Gtk_Print_Settings is access all Gtk_Print_Settings_Record'Class; 
  53.  
  54.    type Gtk_Page_Range_Record is record 
  55.       Range_Start : Gint; 
  56.       Range_End   : Gint; 
  57.    end record; 
  58.    pragma Convention (C, Gtk_Page_Range_Record); 
  59.    type Gtk_Page_Range_Array is array (Integer range <>) of Gtk_Page_Range_Record; 
  60.    pragma Convention (C, Gtk_Page_Range_Array); 
  61.    --  Page range specification(s). 
  62.  
  63.    --------------- 
  64.    -- Callbacks -- 
  65.    --------------- 
  66.  
  67.    type Gtk_Print_Settings_Func is access procedure (Key : UTF8_String; Value : UTF8_String); 
  68.  
  69.    ------------------ 
  70.    -- Constructors -- 
  71.    ------------------ 
  72.  
  73.    procedure Gtk_New (Self : out Gtk_Print_Settings); 
  74.    procedure Initialize 
  75.       (Self : not null access Gtk_Print_Settings_Record'Class); 
  76.    --  Creates a new Gtk.Print_Settings.Gtk_Print_Settings object. 
  77.    --  Since: gtk+ 2.10 
  78.  
  79.    function Gtk_Print_Settings_New return Gtk_Print_Settings; 
  80.    --  Creates a new Gtk.Print_Settings.Gtk_Print_Settings object. 
  81.    --  Since: gtk+ 2.10 
  82.  
  83.    procedure Gtk_New_From_File 
  84.       (Self      : out Gtk_Print_Settings; 
  85.        File_Name : UTF8_String); 
  86.    procedure Initialize_From_File 
  87.       (Self      : not null access Gtk_Print_Settings_Record'Class; 
  88.        File_Name : UTF8_String); 
  89.    --  Reads the print settings from File_Name. Returns a new 
  90.    --  Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, 
  91.    --  or null if an error occurred. If the file could not be loaded then error 
  92.    --  is set to either a GFile_Error or GKey_File_Error. See 
  93.    --  Gtk.Print_Settings.To_File. 
  94.    --  Since: gtk+ 2.12 
  95.    --  "file_name": the filename to read the settings from 
  96.  
  97.    function Gtk_Print_Settings_New_From_File 
  98.       (File_Name : UTF8_String) return Gtk_Print_Settings; 
  99.    --  Reads the print settings from File_Name. Returns a new 
  100.    --  Gtk.Print_Settings.Gtk_Print_Settings object with the restored settings, 
  101.    --  or null if an error occurred. If the file could not be loaded then error 
  102.    --  is set to either a GFile_Error or GKey_File_Error. See 
  103.    --  Gtk.Print_Settings.To_File. 
  104.    --  Since: gtk+ 2.12 
  105.    --  "file_name": the filename to read the settings from 
  106.  
  107.    procedure Gtk_New_From_Key_File 
  108.       (Self       : out Gtk_Print_Settings; 
  109.        Key_File   : Glib.Key_File.G_Key_File; 
  110.        Group_Name : UTF8_String := ""); 
  111.    procedure Initialize_From_Key_File 
  112.       (Self       : not null access Gtk_Print_Settings_Record'Class; 
  113.        Key_File   : Glib.Key_File.G_Key_File; 
  114.        Group_Name : UTF8_String := ""); 
  115.    --  Reads the print settings from the group Group_Name in Key_File. Returns 
  116.    --  a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored 
  117.    --  settings, or null if an error occurred. If the file could not be loaded 
  118.    --  then error is set to either a GFile_Error or GKey_File_Error. 
  119.    --  Since: gtk+ 2.12 
  120.    --  "key_file": the Gkey.File.Gkey_File to retrieve the settings from 
  121.    --  "group_name": the name of the group to use, or null to use the default 
  122.    --  "Print Settings" 
  123.  
  124.    function Gtk_Print_Settings_New_From_Key_File 
  125.       (Key_File   : Glib.Key_File.G_Key_File; 
  126.        Group_Name : UTF8_String := "") return Gtk_Print_Settings; 
  127.    --  Reads the print settings from the group Group_Name in Key_File. Returns 
  128.    --  a new Gtk.Print_Settings.Gtk_Print_Settings object with the restored 
  129.    --  settings, or null if an error occurred. If the file could not be loaded 
  130.    --  then error is set to either a GFile_Error or GKey_File_Error. 
  131.    --  Since: gtk+ 2.12 
  132.    --  "key_file": the Gkey.File.Gkey_File to retrieve the settings from 
  133.    --  "group_name": the name of the group to use, or null to use the default 
  134.    --  "Print Settings" 
  135.  
  136.    function Get_Type return Glib.GType; 
  137.    pragma Import (C, Get_Type, "gtk_print_settings_get_type"); 
  138.  
  139.    ------------- 
  140.    -- Methods -- 
  141.    ------------- 
  142.  
  143.    function Copy 
  144.       (Self : not null access Gtk_Print_Settings_Record) 
  145.        return Gtk_Print_Settings; 
  146.    --  Copies a Gtk.Print_Settings.Gtk_Print_Settings object. 
  147.    --  Since: gtk+ 2.10 
  148.  
  149.    procedure Foreach 
  150.       (Self : not null access Gtk_Print_Settings_Record; 
  151.        Func : Gtk_Print_Settings_Func); 
  152.    --  Calls Func for each key-value pair of Settings. 
  153.    --  Since: gtk+ 2.10 
  154.    --  "func": the function to call 
  155.  
  156.    generic 
  157.       type User_Data_Type (<>) is private; 
  158.       with procedure Destroy (Data : in out User_Data_Type) is null; 
  159.    package Foreach_User_Data is 
  160.  
  161.       type Gtk_Print_Settings_Func is access procedure 
  162.         (Key       : UTF8_String; 
  163.          Value     : UTF8_String; 
  164.          User_Data : User_Data_Type); 
  165.  
  166.       procedure Foreach 
  167.          (Self      : not null access Gtk.Print_Settings.Gtk_Print_Settings_Record'Class; 
  168.           Func      : Gtk_Print_Settings_Func; 
  169.           User_Data : User_Data_Type); 
  170.       --  Calls Func for each key-value pair of Settings. 
  171.       --  Since: gtk+ 2.10 
  172.       --  "func": the function to call 
  173.       --  "user_data": user data for Func 
  174.  
  175.    end Foreach_User_Data; 
  176.  
  177.    function Get 
  178.       (Self : not null access Gtk_Print_Settings_Record; 
  179.        Key  : UTF8_String) return UTF8_String; 
  180.    --  Looks up the string value associated with Key. 
  181.    --  Since: gtk+ 2.10 
  182.    --  "key": a key 
  183.  
  184.    function Get_Bool 
  185.       (Self : not null access Gtk_Print_Settings_Record; 
  186.        Key  : UTF8_String) return Boolean; 
  187.    --  Returns the boolean represented by the value that is associated with 
  188.    --  Key. 
  189.    --  The string "true" represents True, any other string False. 
  190.    --  Since: gtk+ 2.10 
  191.    --  "key": a key 
  192.  
  193.    procedure Set_Bool 
  194.       (Self  : not null access Gtk_Print_Settings_Record; 
  195.        Key   : UTF8_String; 
  196.        Value : Boolean); 
  197.    --  Sets Key to a boolean value. 
  198.    --  Since: gtk+ 2.10 
  199.    --  "key": a key 
  200.    --  "value": a boolean 
  201.  
  202.    function Get_Collate 
  203.       (Self : not null access Gtk_Print_Settings_Record) return Boolean; 
  204.    --  Gets the value of GTK_PRINT_SETTINGS_COLLATE. 
  205.    --  Since: gtk+ 2.10 
  206.  
  207.    procedure Set_Collate 
  208.       (Self    : not null access Gtk_Print_Settings_Record; 
  209.        Collate : Boolean); 
  210.    --  Sets the value of GTK_PRINT_SETTINGS_COLLATE. 
  211.    --  Since: gtk+ 2.10 
  212.    --  "collate": whether to collate the output 
  213.  
  214.    function Get_Default_Source 
  215.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  216.    --  Gets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE. 
  217.    --  Since: gtk+ 2.10 
  218.  
  219.    procedure Set_Default_Source 
  220.       (Self           : not null access Gtk_Print_Settings_Record; 
  221.        Default_Source : UTF8_String); 
  222.    --  Sets the value of GTK_PRINT_SETTINGS_DEFAULT_SOURCE. 
  223.    --  Since: gtk+ 2.10 
  224.    --  "default_source": the default source 
  225.  
  226.    function Get_Dither 
  227.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  228.    --  Gets the value of GTK_PRINT_SETTINGS_DITHER. 
  229.    --  Since: gtk+ 2.10 
  230.  
  231.    procedure Set_Dither 
  232.       (Self   : not null access Gtk_Print_Settings_Record; 
  233.        Dither : UTF8_String); 
  234.    --  Sets the value of GTK_PRINT_SETTINGS_DITHER. 
  235.    --  Since: gtk+ 2.10 
  236.    --  "dither": the dithering that is used 
  237.  
  238.    function Get_Double 
  239.       (Self : not null access Gtk_Print_Settings_Record; 
  240.        Key  : UTF8_String) return Gdouble; 
  241.    --  Returns the double value associated with Key, or 0. 
  242.    --  Since: gtk+ 2.10 
  243.    --  "key": a key 
  244.  
  245.    procedure Set_Double 
  246.       (Self  : not null access Gtk_Print_Settings_Record; 
  247.        Key   : UTF8_String; 
  248.        Value : Gdouble); 
  249.    --  Sets Key to a double value. 
  250.    --  Since: gtk+ 2.10 
  251.    --  "key": a key 
  252.    --  "value": a double value 
  253.  
  254.    function Get_Double_With_Default 
  255.       (Self : not null access Gtk_Print_Settings_Record; 
  256.        Key  : UTF8_String; 
  257.        Def  : Gdouble) return Gdouble; 
  258.    --  Returns the floating point number represented by the value that is 
  259.    --  associated with Key, or Default_Val if the value does not represent a 
  260.    --  floating point number. 
  261.    --  Floating point numbers are parsed with g_ascii_strtod. 
  262.    --  Since: gtk+ 2.10 
  263.    --  "key": a key 
  264.    --  "def": the default value 
  265.  
  266.    function Get_Duplex 
  267.       (Self : not null access Gtk_Print_Settings_Record) 
  268.        return Gtk.Enums.Gtk_Print_Duplex; 
  269.    --  Gets the value of GTK_PRINT_SETTINGS_DUPLEX. 
  270.    --  Since: gtk+ 2.10 
  271.  
  272.    procedure Set_Duplex 
  273.       (Self   : not null access Gtk_Print_Settings_Record; 
  274.        Duplex : Gtk.Enums.Gtk_Print_Duplex); 
  275.    --  Sets the value of GTK_PRINT_SETTINGS_DUPLEX. 
  276.    --  Since: gtk+ 2.10 
  277.    --  "duplex": a Gtk.Enums.Gtk_Print_Duplex value 
  278.  
  279.    function Get_Finishings 
  280.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  281.    --  Gets the value of GTK_PRINT_SETTINGS_FINISHINGS. 
  282.    --  Since: gtk+ 2.10 
  283.  
  284.    procedure Set_Finishings 
  285.       (Self       : not null access Gtk_Print_Settings_Record; 
  286.        Finishings : UTF8_String); 
  287.    --  Sets the value of GTK_PRINT_SETTINGS_FINISHINGS. 
  288.    --  Since: gtk+ 2.10 
  289.    --  "finishings": the finishings 
  290.  
  291.    function Get_Int 
  292.       (Self : not null access Gtk_Print_Settings_Record; 
  293.        Key  : UTF8_String) return Gint; 
  294.    --  Returns the integer value of Key, or 0. 
  295.    --  Since: gtk+ 2.10 
  296.    --  "key": a key 
  297.  
  298.    procedure Set_Int 
  299.       (Self  : not null access Gtk_Print_Settings_Record; 
  300.        Key   : UTF8_String; 
  301.        Value : Gint); 
  302.    --  Sets Key to an integer value. 
  303.    --  Since: gtk+ 2.10 
  304.    --  "key": a key 
  305.    --  "value": an integer 
  306.  
  307.    function Get_Int_With_Default 
  308.       (Self : not null access Gtk_Print_Settings_Record; 
  309.        Key  : UTF8_String; 
  310.        Def  : Gint) return Gint; 
  311.    --  Returns the value of Key, interpreted as an integer, or the default 
  312.    --  value. 
  313.    --  Since: gtk+ 2.10 
  314.    --  "key": a key 
  315.    --  "def": the default value 
  316.  
  317.    function Get_Length 
  318.       (Self : not null access Gtk_Print_Settings_Record; 
  319.        Key  : UTF8_String; 
  320.        Unit : Gtk.Enums.Gtk_Unit) return Gdouble; 
  321.    --  Returns the value associated with Key, interpreted as a length. The 
  322.    --  returned value is converted to Units. 
  323.    --  Since: gtk+ 2.10 
  324.    --  "key": a key 
  325.    --  "unit": the unit of the return value 
  326.  
  327.    procedure Set_Length 
  328.       (Self  : not null access Gtk_Print_Settings_Record; 
  329.        Key   : UTF8_String; 
  330.        Value : Gdouble; 
  331.        Unit  : Gtk.Enums.Gtk_Unit); 
  332.    --  Associates a length in units of Unit with Key. 
  333.    --  Since: gtk+ 2.10 
  334.    --  "key": a key 
  335.    --  "value": a length 
  336.    --  "unit": the unit of Length 
  337.  
  338.    function Get_Media_Type 
  339.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  340.    --  Gets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE. 
  341.    --  The set of media types is defined in PWG 5101.1-2002 PWG. <!-- FIXME 
  342.    --  link here --> 
  343.    --  Since: gtk+ 2.10 
  344.  
  345.    procedure Set_Media_Type 
  346.       (Self       : not null access Gtk_Print_Settings_Record; 
  347.        Media_Type : UTF8_String); 
  348.    --  Sets the value of GTK_PRINT_SETTINGS_MEDIA_TYPE. 
  349.    --  The set of media types is defined in PWG 5101.1-2002 PWG. <!-- FIXME 
  350.    --  link here --> 
  351.    --  Since: gtk+ 2.10 
  352.    --  "media_type": the media type 
  353.  
  354.    function Get_N_Copies 
  355.       (Self : not null access Gtk_Print_Settings_Record) return Gint; 
  356.    --  Gets the value of GTK_PRINT_SETTINGS_N_COPIES. 
  357.    --  Since: gtk+ 2.10 
  358.  
  359.    procedure Set_N_Copies 
  360.       (Self       : not null access Gtk_Print_Settings_Record; 
  361.        Num_Copies : Gint); 
  362.    --  Sets the value of GTK_PRINT_SETTINGS_N_COPIES. 
  363.    --  Since: gtk+ 2.10 
  364.    --  "num_copies": the number of copies 
  365.  
  366.    function Get_Number_Up 
  367.       (Self : not null access Gtk_Print_Settings_Record) return Gint; 
  368.    --  Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP. 
  369.    --  Since: gtk+ 2.10 
  370.  
  371.    procedure Set_Number_Up 
  372.       (Self      : not null access Gtk_Print_Settings_Record; 
  373.        Number_Up : Gint); 
  374.    --  Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP. 
  375.    --  Since: gtk+ 2.10 
  376.    --  "number_up": the number of pages per sheet 
  377.  
  378.    function Get_Number_Up_Layout 
  379.       (Self : not null access Gtk_Print_Settings_Record) 
  380.        return Gtk.Enums.Gtk_Number_Up_Layout; 
  381.    --  Gets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. 
  382.    --  Since: gtk+ 2.14 
  383.  
  384.    procedure Set_Number_Up_Layout 
  385.       (Self             : not null access Gtk_Print_Settings_Record; 
  386.        Number_Up_Layout : Gtk.Enums.Gtk_Number_Up_Layout); 
  387.    --  Sets the value of GTK_PRINT_SETTINGS_NUMBER_UP_LAYOUT. 
  388.    --  Since: gtk+ 2.14 
  389.    --  "number_up_layout": a Gtk.Enums.Gtk_Number_Up_Layout value 
  390.  
  391.    function Get_Orientation 
  392.       (Self : not null access Gtk_Print_Settings_Record) 
  393.        return Gtk.Enums.Gtk_Page_Orientation; 
  394.    --  Get the value of GTK_PRINT_SETTINGS_ORIENTATION, converted to a 
  395.    --  Gtk.Enums.Gtk_Page_Orientation. 
  396.    --  Since: gtk+ 2.10 
  397.  
  398.    procedure Set_Orientation 
  399.       (Self        : not null access Gtk_Print_Settings_Record; 
  400.        Orientation : Gtk.Enums.Gtk_Page_Orientation); 
  401.    --  Sets the value of GTK_PRINT_SETTINGS_ORIENTATION. 
  402.    --  Since: gtk+ 2.10 
  403.    --  "orientation": a page orientation 
  404.  
  405.    function Get_Output_Bin 
  406.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  407.    --  Gets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN. 
  408.    --  Since: gtk+ 2.10 
  409.  
  410.    procedure Set_Output_Bin 
  411.       (Self       : not null access Gtk_Print_Settings_Record; 
  412.        Output_Bin : UTF8_String); 
  413.    --  Sets the value of GTK_PRINT_SETTINGS_OUTPUT_BIN. 
  414.    --  Since: gtk+ 2.10 
  415.    --  "output_bin": the output bin 
  416.  
  417.    function Get_Page_Ranges 
  418.       (Self : not null access Gtk_Print_Settings_Record) 
  419.        return Gtk_Page_Range_Array; 
  420.    --  Gets the value of GTK_PRINT_SETTINGS_PAGE_RANGES. 
  421.    --  Since: gtk+ 2.10 
  422.  
  423.    procedure Set_Page_Ranges 
  424.       (Self        : not null access Gtk_Print_Settings_Record; 
  425.        Page_Ranges : Gtk_Page_Range_Array); 
  426.    --  Sets the value of GTK_PRINT_SETTINGS_PAGE_RANGES. 
  427.    --  Since: gtk+ 2.10 
  428.    --  "page_ranges": an array of Gtk_Page_Range_Record<!-- -->s 
  429.  
  430.    function Get_Page_Set 
  431.       (Self : not null access Gtk_Print_Settings_Record) 
  432.        return Gtk.Enums.Gtk_Page_Set; 
  433.    --  Gets the value of GTK_PRINT_SETTINGS_PAGE_SET. 
  434.    --  Since: gtk+ 2.10 
  435.  
  436.    procedure Set_Page_Set 
  437.       (Self     : not null access Gtk_Print_Settings_Record; 
  438.        Page_Set : Gtk.Enums.Gtk_Page_Set); 
  439.    --  Sets the value of GTK_PRINT_SETTINGS_PAGE_SET. 
  440.    --  Since: gtk+ 2.10 
  441.    --  "page_set": a Gtk.Enums.Gtk_Page_Set value 
  442.  
  443.    function Get_Paper_Height 
  444.       (Self : not null access Gtk_Print_Settings_Record; 
  445.        Unit : Gtk.Enums.Gtk_Unit) return Gdouble; 
  446.    --  Gets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT, converted to Unit. 
  447.    --  Since: gtk+ 2.10 
  448.    --  "unit": the unit for the return value 
  449.  
  450.    procedure Set_Paper_Height 
  451.       (Self   : not null access Gtk_Print_Settings_Record; 
  452.        Height : Gdouble; 
  453.        Unit   : Gtk.Enums.Gtk_Unit); 
  454.    --  Sets the value of GTK_PRINT_SETTINGS_PAPER_HEIGHT. 
  455.    --  Since: gtk+ 2.10 
  456.    --  "height": the paper height 
  457.    --  "unit": the units of Height 
  458.  
  459.    function Get_Paper_Size 
  460.       (Self : not null access Gtk_Print_Settings_Record) 
  461.        return Gtk.Paper_Size.Gtk_Paper_Size; 
  462.    --  Gets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, converted to a 
  463.    --  Gtk.Paper_Size.Gtk_Paper_Size. 
  464.    --  Since: gtk+ 2.10 
  465.  
  466.    procedure Set_Paper_Size 
  467.       (Self       : not null access Gtk_Print_Settings_Record; 
  468.        Paper_Size : Gtk.Paper_Size.Gtk_Paper_Size); 
  469.    --  Sets the value of GTK_PRINT_SETTINGS_PAPER_FORMAT, 
  470.    --  GTK_PRINT_SETTINGS_PAPER_WIDTH and GTK_PRINT_SETTINGS_PAPER_HEIGHT. 
  471.    --  Since: gtk+ 2.10 
  472.    --  "paper_size": a paper size 
  473.  
  474.    function Get_Paper_Width 
  475.       (Self : not null access Gtk_Print_Settings_Record; 
  476.        Unit : Gtk.Enums.Gtk_Unit) return Gdouble; 
  477.    --  Gets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH, converted to Unit. 
  478.    --  Since: gtk+ 2.10 
  479.    --  "unit": the unit for the return value 
  480.  
  481.    procedure Set_Paper_Width 
  482.       (Self  : not null access Gtk_Print_Settings_Record; 
  483.        Width : Gdouble; 
  484.        Unit  : Gtk.Enums.Gtk_Unit); 
  485.    --  Sets the value of GTK_PRINT_SETTINGS_PAPER_WIDTH. 
  486.    --  Since: gtk+ 2.10 
  487.    --  "width": the paper width 
  488.    --  "unit": the units of Width 
  489.  
  490.    function Get_Print_Pages 
  491.       (Self : not null access Gtk_Print_Settings_Record) 
  492.        return Gtk.Enums.Gtk_Print_Pages; 
  493.    --  Gets the value of GTK_PRINT_SETTINGS_PRINT_PAGES. 
  494.    --  Since: gtk+ 2.10 
  495.  
  496.    procedure Set_Print_Pages 
  497.       (Self  : not null access Gtk_Print_Settings_Record; 
  498.        Pages : Gtk.Enums.Gtk_Print_Pages); 
  499.    --  Sets the value of GTK_PRINT_SETTINGS_PRINT_PAGES. 
  500.    --  Since: gtk+ 2.10 
  501.    --  "pages": a Gtk.Enums.Gtk_Print_Pages value 
  502.  
  503.    function Get_Printer 
  504.       (Self : not null access Gtk_Print_Settings_Record) return UTF8_String; 
  505.    --  Convenience function to obtain the value of GTK_PRINT_SETTINGS_PRINTER. 
  506.    --  Since: gtk+ 2.10 
  507.  
  508.    procedure Set_Printer 
  509.       (Self    : not null access Gtk_Print_Settings_Record; 
  510.        Printer : UTF8_String); 
  511.    --  Convenience function to set GTK_PRINT_SETTINGS_PRINTER to Printer. 
  512.    --  Since: gtk+ 2.10 
  513.    --  "printer": the printer name 
  514.  
  515.    function Get_Printer_Lpi 
  516.       (Self : not null access Gtk_Print_Settings_Record) return Gdouble; 
  517.    --  Gets the value of GTK_PRINT_SETTINGS_PRINTER_LPI. 
  518.    --  Since: gtk+ 2.16 
  519.  
  520.    procedure Set_Printer_Lpi 
  521.       (Self : not null access Gtk_Print_Settings_Record; 
  522.        Lpi  : Gdouble); 
  523.    --  Sets the value of GTK_PRINT_SETTINGS_PRINTER_LPI. 
  524.    --  Since: gtk+ 2.16 
  525.    --  "lpi": the resolution in lpi (lines per inch) 
  526.  
  527.    function Get_Quality 
  528.       (Self : not null access Gtk_Print_Settings_Record) 
  529.        return Gtk.Enums.Gtk_Print_Quality; 
  530.    --  Gets the value of GTK_PRINT_SETTINGS_QUALITY. 
  531.    --  Since: gtk+ 2.10 
  532.  
  533.    procedure Set_Quality 
  534.       (Self    : not null access Gtk_Print_Settings_Record; 
  535.        Quality : Gtk.Enums.Gtk_Print_Quality); 
  536.    --  Sets the value of GTK_PRINT_SETTINGS_QUALITY. 
  537.    --  Since: gtk+ 2.10 
  538.    --  "quality": a Gtk.Enums.Gtk_Print_Quality value 
  539.  
  540.    function Get_Resolution 
  541.       (Self : not null access Gtk_Print_Settings_Record) return Gint; 
  542.    --  Gets the value of GTK_PRINT_SETTINGS_RESOLUTION. 
  543.    --  Since: gtk+ 2.10 
  544.  
  545.    procedure Set_Resolution 
  546.       (Self       : not null access Gtk_Print_Settings_Record; 
  547.        Resolution : Gint); 
  548.    --  Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, 
  549.    --  GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y. 
  550.    --  Since: gtk+ 2.10 
  551.    --  "resolution": the resolution in dpi 
  552.  
  553.    function Get_Resolution_X 
  554.       (Self : not null access Gtk_Print_Settings_Record) return Gint; 
  555.    --  Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_X. 
  556.    --  Since: gtk+ 2.16 
  557.  
  558.    function Get_Resolution_Y 
  559.       (Self : not null access Gtk_Print_Settings_Record) return Gint; 
  560.    --  Gets the value of GTK_PRINT_SETTINGS_RESOLUTION_Y. 
  561.    --  Since: gtk+ 2.16 
  562.  
  563.    function Get_Reverse 
  564.       (Self : not null access Gtk_Print_Settings_Record) return Boolean; 
  565.    --  Gets the value of GTK_PRINT_SETTINGS_REVERSE. 
  566.    --  Since: gtk+ 2.10 
  567.  
  568.    procedure Set_Reverse 
  569.       (Self        : not null access Gtk_Print_Settings_Record; 
  570.        Gtk_Reverse : Boolean); 
  571.    --  Sets the value of GTK_PRINT_SETTINGS_REVERSE. 
  572.    --  Since: gtk+ 2.10 
  573.    --  "reverse": whether to reverse the output 
  574.  
  575.    function Get_Scale 
  576.       (Self : not null access Gtk_Print_Settings_Record) return Gdouble; 
  577.    --  Gets the value of GTK_PRINT_SETTINGS_SCALE. 
  578.    --  Since: gtk+ 2.10 
  579.  
  580.    procedure Set_Scale 
  581.       (Self  : not null access Gtk_Print_Settings_Record; 
  582.        Scale : Gdouble); 
  583.    --  Sets the value of GTK_PRINT_SETTINGS_SCALE. 
  584.    --  Since: gtk+ 2.10 
  585.    --  "scale": the scale in percent 
  586.  
  587.    function Get_Use_Color 
  588.       (Self : not null access Gtk_Print_Settings_Record) return Boolean; 
  589.    --  Gets the value of GTK_PRINT_SETTINGS_USE_COLOR. 
  590.    --  Since: gtk+ 2.10 
  591.  
  592.    procedure Set_Use_Color 
  593.       (Self      : not null access Gtk_Print_Settings_Record; 
  594.        Use_Color : Boolean); 
  595.    --  Sets the value of GTK_PRINT_SETTINGS_USE_COLOR. 
  596.    --  Since: gtk+ 2.10 
  597.    --  "use_color": whether to use color 
  598.  
  599.    function Has_Key 
  600.       (Self : not null access Gtk_Print_Settings_Record; 
  601.        Key  : UTF8_String) return Boolean; 
  602.    --  Returns True, if a value is associated with Key. 
  603.    --  Since: gtk+ 2.10 
  604.    --  "key": a key 
  605.  
  606.    function Load_File 
  607.       (Self      : not null access Gtk_Print_Settings_Record; 
  608.        File_Name : UTF8_String) return Boolean; 
  609.    --  Reads the print settings from File_Name. If the file could not be 
  610.    --  loaded then error is set to either a GFile_Error or GKey_File_Error. See 
  611.    --  Gtk.Print_Settings.To_File. 
  612.    --  Since: gtk+ 2.14 
  613.    --  "file_name": the filename to read the settings from 
  614.  
  615.    function Load_Key_File 
  616.       (Self       : not null access Gtk_Print_Settings_Record; 
  617.        Key_File   : Glib.Key_File.G_Key_File; 
  618.        Group_Name : UTF8_String := "") return Boolean; 
  619.    --  Reads the print settings from the group Group_Name in Key_File. If the 
  620.    --  file could not be loaded then error is set to either a GFile_Error or 
  621.    --  GKey_File_Error. 
  622.    --  Since: gtk+ 2.14 
  623.    --  "key_file": the Gkey.File.Gkey_File to retrieve the settings from 
  624.    --  "group_name": the name of the group to use, or null to use the default 
  625.    --  "Print Settings" 
  626.  
  627.    procedure Set 
  628.       (Self  : not null access Gtk_Print_Settings_Record; 
  629.        Key   : UTF8_String; 
  630.        Value : UTF8_String := ""); 
  631.    --  Associates Value with Key. 
  632.    --  Since: gtk+ 2.10 
  633.    --  "key": a key 
  634.    --  "value": a string value, or null 
  635.  
  636.    procedure Set_Resolution_Xy 
  637.       (Self         : not null access Gtk_Print_Settings_Record; 
  638.        Resolution_X : Gint; 
  639.        Resolution_Y : Gint); 
  640.    --  Sets the values of GTK_PRINT_SETTINGS_RESOLUTION, 
  641.    --  GTK_PRINT_SETTINGS_RESOLUTION_X and GTK_PRINT_SETTINGS_RESOLUTION_Y. 
  642.    --  Since: gtk+ 2.16 
  643.    --  "resolution_x": the horizontal resolution in dpi 
  644.    --  "resolution_y": the vertical resolution in dpi 
  645.  
  646.    function To_File 
  647.       (Self      : not null access Gtk_Print_Settings_Record; 
  648.        File_Name : UTF8_String) return Boolean; 
  649.    --  This function saves the print settings from Settings to File_Name. If 
  650.    --  the file could not be loaded then error is set to either a GFile_Error 
  651.    --  or GKey_File_Error. 
  652.    --  Since: gtk+ 2.12 
  653.    --  "file_name": the file to save to 
  654.  
  655.    procedure To_Key_File 
  656.       (Self       : not null access Gtk_Print_Settings_Record; 
  657.        Key_File   : Glib.Key_File.G_Key_File; 
  658.        Group_Name : UTF8_String); 
  659.    --  This function adds the print settings from Settings to Key_File. 
  660.    --  Since: gtk+ 2.12 
  661.    --  "key_file": the Gkey.File.Gkey_File to save the print settings to 
  662.    --  "group_name": the group to add the settings to in Key_File, or null to 
  663.    --  use the default "Print Settings" 
  664.  
  665.    procedure Unset 
  666.       (Self : not null access Gtk_Print_Settings_Record; 
  667.        Key  : UTF8_String); 
  668.    --  Removes any value associated with Key. This has the same effect as 
  669.    --  setting the value to null. 
  670.    --  Since: gtk+ 2.10 
  671.    --  "key": a key 
  672.  
  673. end Gtk.Print_Settings;