1. Compilation Units

    1. Cairo
    2. Cairo.Font_Face
    3. Cairo.Font_Options
    4. Cairo.Image_Surface
    5. Cairo.PDF
    6. Cairo.Matrix
    7. Cairo.Pattern
    8. Cairo.Png
    9. Cairo.SVG
    10. Cairo.Region
    11. Cairo.Scaled_Font
    12. Cairo.Surface
    13. Fontconfig
    14. Gdk
    15. Gdk.Cairo
    16. Gdk.Color
    17. Gdk.Cursor
    18. Gdk.Device
    19. Gdk.Device_Manager
    20. Gdk.Device_Tool
    21. Gdk.Display
    22. Gdk.Display_Manager
    23. Gdk.Dnd
    24. Gdk.Drag_Contexts
    25. Gdk.Drawing_Context
    26. Gdk.Event
      1. Gdk.Event.Handler_Set_User_Data
    27. Gdk.Frame_Clock
    28. Gdk.Frame_Timings
    29. Gdk.GLContext
    30. Gdk.Input
      1. Gdk.Input.Input_Add
    31. Gdk.Keyval
    32. Gdk.Main
    33. Gdk.Monitor
    34. Gdk.Pixbuf
    35. Gdk.RGBA
    36. Gdk.Property
    37. Gdk.Rectangle
    38. Gdk.Screen
    39. Gdk.Seat
    40. Gdk.Threads
    41. Gdk.Types
    42. Gdk.Types.Keysyms
    43. Gdk.Visual
    44. Gdk.Window
      1. Gdk.Window.Invalidate_Maybe_Recurse_User_Data
    45. Gdk.Window_Attr
    46. Glib
    47. Glib.Action
    48. Glib.Action_Group
    49. Glib.Action_Map
    50. Glib.Application
    51. Glib.Cancellable
      1. Glib.Cancellable.Connect_User_Data
    52. Glib.Convert
    53. Glib.Enums
    54. Glib.GSlist
      1. Glib.GSlist.Generic_SList
    55. Glib.Error
    56. Glib.G_Icon
    57. Glib.Generic_Properties
      1. Glib.Generic_Properties.Generic_Enumeration_Property
      2. Glib.Generic_Properties.Generic_Internal_Boxed_Property
      3. Glib.Generic_Properties.Generic_Internal_Discrete_Property
    58. Glib.Glist
      1. Glib.Glist.Generic_List
    59. Glib.Gnodes
      1. Glib.Gnodes.Gnode_Data
    60. Glib.Graphs
    61. Glib.Graphs.Layouts
      1. Glib.Graphs.Layouts.Layered_Layouts
    62. Glib.IOChannel
    63. Glib.Key_File
    64. Glib.List_Model
    65. Glib.Main
      1. Glib.Main.Generic_Sources
    66. Glib.Menu
    67. Glib.Menu_Model
    68. Glib.Messages
    69. Glib.Module
    70. Glib.Notification
    71. Glib.Object
      1. Glib.Object.User_Data
      2. Glib.Object.User_Data_Closure
    72. Glib.Option
      1. Glib.Option.Set_Translate_Func_User_Data
    73. Glib.Poll
    74. Glib.Properties
    75. Glib.Properties.Creation
    76. Glib.Simple_Action
    77. Glib.Simple_Action_Group
    78. Glib.Spawn
    79. Glib.String
    80. Glib.Type_Conversion_Hooks
      1. Glib.Type_Conversion_Hooks.Hook_Registrator
    81. Glib.Types
      1. Glib.Types.Implements
    82. Glib.Unicode
    83. Glib.Utils
    84. Glib.Values
    85. Glib.Variant
    86. Glib.XML
    87. Gtk
    88. Gtk.About_Dialog
    89. Gtk.Accel_Group
    90. Gtk.Accel_Label
    91. Gtk.Accel_Map
      1. Gtk.Accel_Map.Foreach_Unfiltered_User_Data
      2. Gtk.Accel_Map.Foreach_User_Data
    92. Gtk.Action
    93. Gtk.Action_Bar
    94. Gtk.Action_Group
      1. Gtk.Action_Group.Set_Translate_Func_User_Data
    95. Gtk.Actionable
    96. Gtk.Activatable
    97. Gtk.Adjustment
    98. Gtk.Alignment
    99. Gtk.Application
    100. Gtk.Application_Window
    101. Gtk.Arguments
    102. Gtk.Arrow
    103. Gtk.Aspect_Frame
    104. Gtk.Assistant
      1. Gtk.Assistant.Set_Forward_Page_Func_User_Data
    105. Gtk.Bin
    106. Gtk.Binding_Set
    107. Gtk.Bindings
    108. Gtk.Box
    109. Gtk.Buildable
    110. Gtk.Builder
    111. Gtk.Button
    112. Gtk.Button_Box
    113. Gtk.Calendar
      1. Gtk.Calendar.Set_Detail_Func_User_Data
    114. Gtk.Cell_Area
      1. Gtk.Cell_Area.Foreach_Alloc_User_Data
      2. Gtk.Cell_Area.Foreach_User_Data
      3. Gtk.Cell_Area.Set_Cell_Data_Func_User_Data
    115. Gtk.Cell_Area_Box
      1. Gtk.Cell_Area_Box.Set_Cell_Data_Func_User_Data
    116. Gtk.Cell_Area_Context
    117. Gtk.Cell_Editable
    118. Gtk.Cell_Layout
      1. Gtk.Cell_Layout.Set_Cell_Data_Func_User_Data
    119. Gtk.Cell_Renderer
    120. Gtk.Cell_Renderer_Accel
    121. Gtk.Cell_Renderer_Combo
    122. Gtk.Cell_Renderer_Pixbuf
    123. Gtk.Cell_Renderer_Progress
    124. Gtk.Cell_Renderer_Spin
    125. Gtk.Cell_Renderer_Spinner
    126. Gtk.Cell_Renderer_Text
    127. Gtk.Cell_Renderer_Toggle
    128. Gtk.Cell_View
      1. Gtk.Cell_View.Set_Cell_Data_Func_User_Data
    129. Gtk.Check_Button
    130. Gtk.Check_Menu_Item
    131. Gtk.Clipboard
    132. Gtk.Color_Button
    133. Gtk.Color_Chooser
    134. Gtk.Color_Chooser_Dialog
    135. Gtk.Color_Chooser_Widget
    136. Gtk.Color_Selection
    137. Gtk.Color_Selection_Dialog
    138. Gtk.Combo_Box
      1. Gtk.Combo_Box.Set_Cell_Data_Func_User_Data
      2. Gtk.Combo_Box.Set_Row_Separator_Func_User_Data
    139. Gtk.Combo_Box_Text
      1. Gtk.Combo_Box_Text.Set_Cell_Data_Func_User_Data
    140. Gtk.Container
      1. Gtk.Container.Forall_User_Data
      2. Gtk.Container.Foreach_User_Data
    141. Gtk.Css_Provider
    142. Gtk.Css_Section
    143. Gtk.Dialog
    144. Gtk.Dnd
    145. Gtk.Drawing_Area
    146. Gtk.Editable
    147. Gtk.Entry_Buffer
    148. Gtk.Entry_Completion
      1. Gtk.Entry_Completion.Set_Cell_Data_Func_User_Data
      2. Gtk.Entry_Completion.Set_Match_Func_User_Data
    149. Gtk.Enums
    150. Gtk.Event_Box
    151. Gtk.Event_Controller
    152. Gtk.Expander
    153. Gtk.File_Chooser
    154. Gtk.File_Chooser_Button
    155. Gtk.File_Chooser_Dialog
    156. Gtk.File_Chooser_Widget
    157. Gtk.File_Filter
      1. Gtk.File_Filter.Add_Custom_User_Data
    158. Gtk.Fixed
    159. Gtk.Flow_Box
      1. Gtk.Flow_Box.Bind_Model_User_Data
      2. Gtk.Flow_Box.Selected_Foreach_User_Data
      3. Gtk.Flow_Box.Set_Filter_Func_User_Data
      4. Gtk.Flow_Box.Set_Sort_Func_User_Data
    160. Gtk.Flow_Box_Child
    161. Gtk.Font_Button
      1. Gtk.Font_Button.Set_Filter_Func_User_Data
    162. Gtk.Font_Chooser
      1. Gtk.Font_Chooser.Set_Filter_Func_User_Data
    163. Gtk.Font_Chooser_Dialog
      1. Gtk.Font_Chooser_Dialog.Set_Filter_Func_User_Data
    164. Gtk.Font_Chooser_Widget
      1. Gtk.Font_Chooser_Widget.Set_Filter_Func_User_Data
    165. Gtk.Font_Selection
    166. Gtk.Font_Selection_Dialog
    167. Gtk.Frame
    168. Gtk.GLArea
    169. Gtk.GRange
    170. Gtk.GEntry
    171. Gtk.Gesture
    172. Gtk.Gesture_Drag
    173. Gtk.Gesture_Long_Press
    174. Gtk.Gesture_Multi_Press
    175. Gtk.Gesture_Pan
    176. Gtk.Gesture_Rotate
    177. Gtk.Gesture_Single
    178. Gtk.Gesture_Swipe
    179. Gtk.Gesture_Zoom
    180. Gtk.Gradient
    181. Gtk.Grid
    182. Gtk.Handle_Box
    183. Gtk.Hbutton_Box
    184. Gtk.Header_Bar
    185. Gtk.IM_Context
    186. Gtk.IM_Context_Simple
    187. Gtk.IM_Multi_Context
    188. Gtk.Hsv
    189. Gtk.Icon_Factory
    190. Gtk.Icon_Set
    191. Gtk.Icon_Source
    192. Gtk.Icon_Theme
    193. Gtk.Icon_View
      1. Gtk.Icon_View.Selected_Foreach_User_Data
      2. Gtk.Icon_View.Set_Cell_Data_Func_User_Data
    194. Gtk.Image
    195. Gtk.Image_Menu_Item
    196. Gtk.Info_Bar
    197. Gtk.Invisible
    198. Gtk.Label
    199. Gtk.Layout
    200. Gtk.Level_Bar
    201. Gtk.Link_Button
    202. Gtk.List_Box
      1. Gtk.List_Box.Bind_Model_User_Data
      2. Gtk.List_Box.Selected_Foreach_User_Data
      3. Gtk.List_Box.Set_Filter_Func_User_Data
      4. Gtk.List_Box.Set_Header_Func_User_Data
      5. Gtk.List_Box.Set_Sort_Func_User_Data
    203. Gtk.List_Box_Row
    204. Gtk.List_Store
      1. Gtk.List_Store.Foreach_User_Data
      2. Gtk.List_Store.Set_Default_Sort_Func_User_Data
      3. Gtk.List_Store.Set_Sort_Func_User_Data
    205. Gtk.Main
    206. Gtk.Menu
      1. Gtk.Menu.Popup_For_Device_User_Data
      2. Gtk.Menu.Popup_User_Data
    207. Gtk.Menu_Bar
    208. Gtk.Menu_Button
    209. Gtk.Menu_Item
    210. Gtk.Menu_Shell
    211. Gtk.Menu_Tool_Button
    212. Gtk.Message_Dialog
    213. Gtk.Misc
    214. Gtk.Notebook
    215. Gtk.Offscreen_Window
    216. Gtk.Orientable
    217. Gtk.Overlay
    218. Gtk.Page_Setup
    219. Gtk.Paned
    220. Gtk.Paper_Size
    221. Gtk.Popover
    222. Gtk.Print_Context
    223. Gtk.Print_Operation
    224. Gtk.Print_Operation_Preview
    225. Gtk.Print_Settings
      1. Gtk.Print_Settings.Foreach_User_Data
    226. Gtk.Progress_Bar
    227. Gtk.Radio_Action
    228. Gtk.Radio_Button
    229. Gtk.Radio_Menu_Item
    230. Gtk.Radio_Tool_Button
    231. Gtk.Rc
    232. Gtk.Recent_Action
      1. Gtk.Recent_Action.Set_Sort_Func_User_Data
    233. Gtk.Recent_Chooser
      1. Gtk.Recent_Chooser.Set_Sort_Func_User_Data
    234. Gtk.Recent_Chooser_Dialog
      1. Gtk.Recent_Chooser_Dialog.Set_Sort_Func_User_Data
    235. Gtk.Recent_Chooser_Menu
      1. Gtk.Recent_Chooser_Menu.Set_Sort_Func_User_Data
    236. Gtk.Recent_Chooser_Widget
      1. Gtk.Recent_Chooser_Widget.Set_Sort_Func_User_Data
    237. Gtk.Recent_Filter
      1. Gtk.Recent_Filter.Add_Custom_User_Data
    238. Gtk.Recent_Info
    239. Gtk.Recent_Manager
    240. Gtk.Revealer
    241. Gtk.Scale
    242. Gtk.Scale_Button
    243. Gtk.Scrollable
    244. Gtk.Scrollbar
    245. Gtk.Scrolled_Window
    246. Gtk.Search_Bar
    247. Gtk.Search_Entry
    248. Gtk.Selection_Data
    249. Gtk.Separator
    250. Gtk.Separator_Menu_Item
    251. Gtk.Separator_Tool_Item
    252. Gtk.Settings
    253. Gtk.Shortcuts_Window
    254. Gtk.Size_Group
    255. Gtk.Spin_Button
    256. Gtk.Spinner
    257. Gtk.Stack
    258. Gtk.Stack_Switcher
    259. Gtk.Status_Bar
    260. Gtk.Status_Icon
    261. Gtk.Stock
    262. Gtk.Style
    263. Gtk.Style_Context
    264. Gtk.Style_Properties
    265. Gtk.Style_Provider
    266. Gtk.Switch
    267. Gtk.Symbolic_Color
    268. Gtk.Table
    269. Gtk.Target_Entry
    270. Gtk.Target_List
    271. Gtk.Tearoff_Menu_Item
    272. Gtk.Text_Attributes
    273. Gtk.Text_Buffer
    274. Gtk.Text_Child
    275. Gtk.Text_Child_Anchor
    276. Gtk.Text_Iter
    277. Gtk.Text_Mark
    278. Gtk.Text_Tag
    279. Gtk.Text_Tag_Table
      1. Gtk.Text_Tag_Table.Foreach_User_Data
    280. Gtk.Text_View
    281. Gtk.Theming_Engine
    282. Gtk.Toggle_Action
    283. Gtk.Toggle_Button
    284. Gtk.Toggle_Tool_Button
    285. Gtk.Tool_Button
    286. Gtk.Tool_Item
    287. Gtk.Tool_Item_Group
    288. Gtk.Tool_Palette
    289. Gtk.Tool_Shell
    290. Gtk.Toolbar
    291. Gtk.Tooltip
    292. Gtk.Tree_Drag_Dest
    293. Gtk.Tree_Drag_Source
    294. Gtk.Tree_Model
      1. Gtk.Tree_Model.Foreach_User_Data
    295. Gtk.Tree_Model.Utils
    296. Gtk.Tree_Model_Filter
      1. Gtk.Tree_Model_Filter.Foreach_User_Data
      2. Gtk.Tree_Model_Filter.Set_Modify_Func_User_Data
      3. Gtk.Tree_Model_Filter.Set_Visible_Func_User_Data
    297. Gtk.Tree_Model_Sort
      1. Gtk.Tree_Model_Sort.Foreach_User_Data
      2. Gtk.Tree_Model_Sort.Set_Default_Sort_Func_User_Data
      3. Gtk.Tree_Model_Sort.Set_Sort_Func_User_Data
    298. Gtk.Tree_Row_Reference
    299. Gtk.Tree_Selection
      1. Gtk.Tree_Selection.Selected_Foreach_User_Data
      2. Gtk.Tree_Selection.Set_Select_Function_User_Data
    300. Gtk.Tree_Sortable
      1. Gtk.Tree_Sortable.Set_Default_Sort_Func_User_Data
      2. Gtk.Tree_Sortable.Set_Sort_Func_User_Data
    301. Gtk.Tree_Store
      1. Gtk.Tree_Store.Foreach_User_Data
      2. Gtk.Tree_Store.Generic_Set
      3. Gtk.Tree_Store.Set_Default_Sort_Func_User_Data
      4. Gtk.Tree_Store.Set_Sort_Func_User_Data
    302. Gtk.Tree_View
      1. Gtk.Tree_View.Insert_Column_With_Data_Func_User_Data
      2. Gtk.Tree_View.Map_Expanded_Rows_User_Data
      3. Gtk.Tree_View.Set_Column_Drag_Function_User_Data
      4. Gtk.Tree_View.Set_Destroy_Count_Func_User_Data
      5. Gtk.Tree_View.Set_Row_Separator_Func_User_Data
      6. Gtk.Tree_View.Set_Search_Equal_Func_User_Data
      7. Gtk.Tree_View.Set_Search_Position_Func_User_Data
    303. Gtk.Tree_View_Column
      1. Gtk.Tree_View_Column.Set_Cell_Data_Func_User_Data
    304. Gtk.Type_Conversion
    305. Gtk.UI_Manager
    306. Gtk.Vbutton_Box
    307. Gtk.Viewport
    308. Gtk.Volume_Button
    309. Gtk.Widget
      1. Gtk.Widget.Add_Tick_Callback_User_Data
      2. Gtk.Widget.Set_Connect_Func_User_Data
    310. Gtk.Window
    311. Gtkada
    312. Gtkada.Abstract_List_Model
    313. Gtkada.Abstract_Tree_Model
    314. Gtkada.Application
    315. Gtkada.Bindings
    316. Gtkada.Builder
    317. Gtkada.C
      1. Gtkada.C.Unbounded_Arrays
    318. Gtkada.Canvas
    319. Gtkada.Canvas_View
    320. Gtkada.Canvas_View.Astar
    321. Gtkada.Canvas_View.Links
    322. Gtkada.Canvas_View.Models
      1. Gtkada.Canvas_View.Models.Rtree_Models
    323. Gtkada.Canvas_View.Models.Layers
    324. Gtkada.Canvas_View.Objects
    325. Gtkada.Canvas_View.Rtrees
    326. Gtkada.Canvas_View.Views
    327. Gtkada.Dialogs
    328. Gtkada.File_Selection
    329. Gtkada.Handlers
    330. Gtkada.Intl
    331. Gtkada.MDI
      1. Gtkada.MDI.Desktop
    332. Gtkada.Multi_Paned
    333. Gtkada.Multiline_Entry
    334. Gtkada.Pixmaps
    335. Gtkada.Printing
    336. Gtkada.Stock_Icons
    337. Gtkada.Stock_Labels
    338. Gtkada.Style
    339. Gtkada.Types
    340. Pango
    341. Pango.Attributes
    342. Pango.Cairo
    343. Pango.Context
    344. Pango.Coverage
    345. Pango.Enums
    346. Pango.Font
    347. Pango.Font_Face
    348. Pango.Font_Family
    349. Pango.Font_Map
    350. Pango.Font_Metrics
    351. Pango.Fontset
      1. Pango.Fontset.Foreach_User_Data
    352. Pango.Language
    353. Pango.Layout
    354. Pango.Matrix
    355. Pango.Tabs
  2. Tagged Types

    1. Gdk.Device.Gdk_Device_Record
    2. Gdk.Device_Manager.Gdk_Device_Manager_Record
    3. Gdk.Device_Tool.Gdk_Device_Tool_Record
    4. Gdk.Display.Gdk_Display_Record
    5. Gdk.Drag_Contexts.Drag_Context_Record
    6. Gdk.Drawing_Context.Gdk_Drawing_Context_Record
    7. Gdk.Frame_Clock.Gdk_Frame_Clock_Record
    8. Gdk.Frame_Timings.Gdk_Frame_Timings
    9. Gdk.GLContext.Gdk_GLContext_Record
    10. Gdk.Monitor.Gdk_Monitor_Record
    11. Gdk.Pixbuf.Gdk_Pixbuf_Record
    12. Gdk.Screen.Gdk_Screen_Record
    13. Glib.Application.Gapplication_Command_Line_Record
    14. Glib.Application.Gapplication_Record
    15. Gdk.Seat.Gdk_Seat_Record
    16. Glib.C_Boxed
    17. Glib.Cancellable.Gcancellable_Record
    18. Glib.Graphs.Layouts.Base_Dummy_Vertex
    19. Glib.Graphs.Edge
    20. Glib.Graphs.Vertex
    21. Glib.Menu.Gmenu_Item_Record
    22. Glib.Menu.Gmenu_Record
    23. Glib.Menu_Model.Gmenu_Attribute_Iter_Record
    24. Glib.Menu_Model.Gmenu_Link_Iter_Record
    25. Glib.Menu_Model.Gmenu_Model_Record
    26. Glib.Object.GObject_Record
    27. Glib.Notification.Gnotification_Record
    28. Glib.Object.G_Binding_Record
    29. Glib.Option.Goption_Context
    30. Glib.Simple_Action.Gsimple_Action_Record
    31. Glib.Simple_Action_Group.Gsimple_Action_Group_Record
    32. Glib.Variant.Gvariant
    33. Gtk.About_Dialog.Gtk_About_Dialog_Record
    34. Gtk.Accel_Group.Gtk_Accel_Group_Record
    35. Gtk.Accel_Label.Gtk_Accel_Label_Record
    36. Gtk.Accel_Map.Gtk_Accel_Map_Record
    37. Gtk.Action.Gtk_Action_Record
    38. Gtk.Action_Bar.Gtk_Action_Bar_Record
    39. Gtk.Action_Group.Gtk_Action_Group_Record
    40. Gtk.Adjustment.Gtk_Adjustment_Record
    41. Gtk.Alignment.Gtk_Alignment_Record
    42. Gtk.Application.Gtk_Application_Record
    43. Gtk.Application_Window.Gtk_Application_Window_Record
    44. Gtk.Arrow.Gtk_Arrow_Record
    45. Gtk.Aspect_Frame.Gtk_Aspect_Frame_Record
    46. Gtk.Assistant.Gtk_Assistant_Record
    47. Gtk.Bin.Gtk_Bin_Record
    48. Gtk.Box.Gtk_Box_Record
    49. Gtk.Builder.Gtk_Builder_Record
    50. Gtk.Button.Gtk_Button_Record
    51. Gtk.Button_Box.Gtk_Button_Box_Record
    52. Gtk.Calendar.Gtk_Calendar_Record
    53. Gtk.Cell_Area.Gtk_Cell_Area_Record
    54. Gtk.Cell_Area_Box.Gtk_Cell_Area_Box_Record
    55. Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record
    56. Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record
    57. Gtk.Cell_Renderer_Accel.Gtk_Cell_Renderer_Accel_Record
    58. Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo_Record
    59. Gtk.Cell_Renderer_Pixbuf.Gtk_Cell_Renderer_Pixbuf_Record
    60. Gtk.Cell_Renderer_Progress.Gtk_Cell_Renderer_Progress_Record
    61. Gtk.Cell_Renderer_Spin.Gtk_Cell_Renderer_Spin_Record
    62. Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner_Record
    63. Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record
    64. Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle_Record
    65. Gtk.Cell_View.Gtk_Cell_View_Record
    66. Gtk.Check_Button.Gtk_Check_Button_Record
    67. Gtk.Check_Menu_Item.Gtk_Check_Menu_Item_Record
    68. Gtk.Clipboard.Gtk_Clipboard_Record
    69. Gtk.Color_Button.Gtk_Color_Button_Record
    70. Gtk.Color_Chooser_Dialog.Gtk_Color_Chooser_Dialog_Record
    71. Gtk.Color_Chooser_Widget.Gtk_Color_Chooser_Widget_Record
    72. Gtk.Color_Selection.Gtk_Color_Selection_Record
    73. Gtk.Color_Selection_Dialog.Gtk_Color_Selection_Dialog_Record
    74. Gtk.Combo_Box.Gtk_Combo_Box_Record
    75. Gtk.Combo_Box_Text.Gtk_Combo_Box_Text_Record
    76. Gtk.Container.Gtk_Container_Record
    77. Gtk.Css_Provider.Gtk_Css_Provider_Record
    78. Gtk.Css_Section.Gtk_Css_Section
    79. Gtk.Dialog.Gtk_Dialog_Record
    80. Gtk.Drawing_Area.Gtk_Drawing_Area_Record
    81. Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record
    82. Gtk.Entry_Completion.Gtk_Entry_Completion_Record
    83. Gtk.Event_Box.Gtk_Event_Box_Record
    84. Gtk.Event_Controller.Gtk_Event_Controller_Record
    85. Gtk.Expander.Gtk_Expander_Record
    86. Gtk.File_Chooser_Button.Gtk_File_Chooser_Button_Record
    87. Gtk.File_Chooser_Dialog.Gtk_File_Chooser_Dialog_Record
    88. Gtk.File_Chooser_Widget.Gtk_File_Chooser_Widget_Record
    89. Gtk.File_Filter.Gtk_File_Filter_Record
    90. Gtk.Fixed.Gtk_Fixed_Record
    91. Gtk.Flow_Box.Gtk_Flow_Box_Record
    92. Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record
    93. Gtk.Font_Button.Gtk_Font_Button_Record
    94. Gtk.Font_Chooser_Dialog.Gtk_Font_Chooser_Dialog_Record
    95. Gtk.Font_Chooser_Widget.Gtk_Font_Chooser_Widget_Record
    96. Gtk.Font_Selection.Gtk_Font_Selection_Record
    97. Gtk.Font_Selection_Dialog.Gtk_Font_Selection_Dialog_Record
    98. Gtk.Frame.Gtk_Frame_Record
    99. Gtk.GLArea.Gtk_GLArea_Record
    100. Gtk.GRange.Gtk_Range_Record
    101. Gtk.GEntry.Gtk_Entry_Record
    102. Gtk.Gesture.Gtk_Gesture_Record
    103. Gtk.Gesture_Drag.Gtk_Gesture_Drag_Record
    104. Gtk.Gesture_Long_Press.Gtk_Gesture_Long_Press_Record
    105. Gtk.Gesture_Multi_Press.Gtk_Gesture_Multi_Press_Record
    106. Gtk.Gesture_Pan.Gtk_Gesture_Pan_Record
    107. Gtk.Gesture_Rotate.Gtk_Gesture_Rotate_Record
    108. Gtk.Gesture_Single.Gtk_Gesture_Single_Record
    109. Gtk.Gesture_Swipe.Gtk_Gesture_Swipe_Record
    110. Gtk.Gesture_Zoom.Gtk_Gesture_Zoom_Record
    111. Gtk.Gradient.Gtk_Gradient
    112. Gtk.Grid.Gtk_Grid_Record
    113. Gtk.Handle_Box.Gtk_Handle_Box_Record
    114. Gtk.Hbutton_Box.Gtk_Hbutton_Box_Record
    115. Gtk.Header_Bar.Gtk_Header_Bar_Record
    116. Gtk.IM_Context.Gtk_IM_Context_Record
    117. Gtk.IM_Context_Simple.Gtk_IM_Context_Simple_Record
    118. Gtk.IM_Multi_Context.Gtk_IM_Multi_Context_Record
    119. Gtk.Hsv.Gtk_Hsv_Record
    120. Gtk.Icon_Factory.Gtk_Icon_Factory_Record
    121. Gtk.Icon_Set.Gtk_Icon_Set
    122. Gtk.Icon_Source.Gtk_Icon_Source
    123. Gtk.Icon_Theme.Gtk_Icon_Info_Record
    124. Gtk.Icon_Theme.Gtk_Icon_Theme_Record
    125. Gtk.Icon_View.Gtk_Icon_View_Record
    126. Gtk.Image.Gtk_Image_Record
    127. Gtk.Image_Menu_Item.Gtk_Image_Menu_Item_Record
    128. Gtk.Info_Bar.Gtk_Info_Bar_Record
    129. Gtk.Invisible.Gtk_Invisible_Record
    130. Gtk.Label.Gtk_Label_Record
    131. Gtk.Layout.Gtk_Layout_Record
    132. Gtk.Level_Bar.Gtk_Level_Bar_Record
    133. Gtk.Link_Button.Gtk_Link_Button_Record
    134. Gtk.List_Box.Gtk_List_Box_Record
    135. Gtk.List_Box_Row.Gtk_List_Box_Row_Record
    136. Gtk.List_Store.Gtk_List_Store_Record
    137. Gtk.Menu.Gtk_Menu_Record
    138. Gtk.Menu_Bar.Gtk_Menu_Bar_Record
    139. Gtk.Menu_Button.Gtk_Menu_Button_Record
    140. Gtk.Menu_Item.Gtk_Menu_Item_Record
    141. Gtk.Menu_Shell.Gtk_Menu_Shell_Record
    142. Gtk.Menu_Tool_Button.Gtk_Menu_Tool_Button_Record
    143. Gtk.Message_Dialog.Gtk_Message_Dialog_Record
    144. Gtk.Misc.Gtk_Misc_Record
    145. Gtk.Notebook.Gtk_Notebook_Record
    146. Gtk.Offscreen_Window.Gtk_Offscreen_Window_Record
    147. Gtk.Overlay.Gtk_Overlay_Record
    148. Gtk.Page_Setup.Gtk_Page_Setup_Record
    149. Gtk.Paned.Gtk_Paned_Record
    150. Gtk.Paper_Size.Gtk_Paper_Size
    151. Gtk.Popover.Gtk_Popover_Record
    152. Gtk.Print_Context.Gtk_Print_Context_Record
    153. Gtk.Print_Operation.Gtk_Print_Operation_Record
    154. Gtk.Print_Settings.Gtk_Print_Settings_Record
    155. Gtk.Progress_Bar.Gtk_Progress_Bar_Record
    156. Gtk.Radio_Action.Gtk_Radio_Action_Record
    157. Gtk.Radio_Button.Gtk_Radio_Button_Record
    158. Gtk.Radio_Menu_Item.Gtk_Radio_Menu_Item_Record
    159. Gtk.Radio_Tool_Button.Gtk_Radio_Tool_Button_Record
    160. Gtk.Recent_Action.Gtk_Recent_Action_Record
    161. Gtk.Recent_Chooser_Dialog.Gtk_Recent_Chooser_Dialog_Record
    162. Gtk.Recent_Chooser_Menu.Gtk_Recent_Chooser_Menu_Record
    163. Gtk.Recent_Chooser_Widget.Gtk_Recent_Chooser_Widget_Record
    164. Gtk.Recent_Filter.Gtk_Recent_Filter_Record
    165. Gtk.Recent_Info.Gtk_Recent_Info
    166. Gtk.Recent_Manager.Gtk_Recent_Manager_Record
    167. Gtk.Revealer.Gtk_Revealer_Record
    168. Gtk.Scale.Gtk_Scale_Record
    169. Gtk.Scale_Button.Gtk_Scale_Button_Record
    170. Gtk.Scrollbar.Gtk_Scrollbar_Record
    171. Gtk.Scrolled_Window.Gtk_Scrolled_Window_Record
    172. Gtk.Search_Bar.Gtk_Search_Bar_Record
    173. Gtk.Search_Entry.Gtk_Search_Entry_Record
    174. Gtk.Selection_Data.Gtk_Selection_Data
    175. Gtk.Separator.Gtk_Separator_Record
    176. Gtk.Separator_Menu_Item.Gtk_Separator_Menu_Item_Record
    177. Gtk.Separator_Tool_Item.Gtk_Separator_Tool_Item_Record
    178. Gtk.Settings.Gtk_Settings_Record
    179. Gtk.Shortcuts_Window.Gtk_Shortcuts_Window_Record
    180. Gtk.Size_Group.Gtk_Size_Group_Record
    181. Gtk.Spin_Button.Gtk_Spin_Button_Record
    182. Gtk.Spinner.Gtk_Spinner_Record
    183. Gtk.Stack.Gtk_Stack_Record
    184. Gtk.Stack_Switcher.Gtk_Stack_Switcher_Record
    185. Gtk.Status_Bar.Gtk_Status_Bar_Record
    186. Gtk.Status_Icon.Gtk_Status_Icon_Record
    187. Gtk.Style.Gtk_Style_Record
    188. Gtk.Style_Context.Gtk_Style_Context_Record
    189. Gtk.Style_Properties.Gtk_Style_Properties_Record
    190. Gtk.Switch.Gtk_Switch_Record
    191. Gtk.Symbolic_Color.Gtk_Symbolic_Color
    192. Gtk.Table.Gtk_Table_Record
    193. Gtk.Target_List.Gtk_Target_List
    194. Gtk.Tearoff_Menu_Item.Gtk_Tearoff_Menu_Item_Record
    195. Gtk.Text_Buffer.Gtk_Text_Buffer_Record
    196. Gtk.Text_Child.Gtk_Text_Child_Anchor_Record
    197. Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record
    198. Gtk.Text_Mark.Gtk_Text_Mark_Record
    199. Gtk.Text_Tag.Gtk_Text_Tag_Record
    200. Gtk.Text_Tag_Table.Gtk_Text_Tag_Table_Record
    201. Gtk.Text_View.Gtk_Text_View_Record
    202. Gtk.Theming_Engine.Gtk_Theming_Engine_Record
    203. Gtk.Toggle_Action.Gtk_Toggle_Action_Record
    204. Gtk.Toggle_Button.Gtk_Toggle_Button_Record
    205. Gtk.Toggle_Tool_Button.Gtk_Toggle_Tool_Button_Record
    206. Gtk.Tool_Button.Gtk_Tool_Button_Record
    207. Gtk.Tool_Item.Gtk_Tool_Item_Record
    208. Gtk.Tool_Item_Group.Gtk_Tool_Item_Group_Record
    209. Gtk.Tool_Palette.Gtk_Tool_Palette_Record
    210. Gtk.Toolbar.Gtk_Toolbar_Record
    211. Gtk.Tooltip.Gtk_Tooltip_Record
    212. Gtk.Tree_Model.Gtk_Root_Tree_Model_Record
    213. Gtk.Tree_Model.Gtk_Tree_Path
    214. Gtk.Tree_Model_Filter.Gtk_Tree_Model_Filter_Record
    215. Gtk.Tree_Model_Sort.Gtk_Tree_Model_Sort_Record
    216. Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference
    217. Gtk.Tree_Selection.Gtk_Tree_Selection_Record
    218. Gtk.Tree_Store.Gtk_Tree_Store_Record
    219. Gtk.Tree_View.Gtk_Tree_View_Record
    220. Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record
    221. Gtk.UI_Manager.Gtk_UI_Manager_Record
    222. Gtk.Vbutton_Box.Gtk_Vbutton_Box_Record
    223. Gtk.Viewport.Gtk_Viewport_Record
    224. Gtk.Volume_Button.Gtk_Volume_Button_Record
    225. Gtk.Widget.Gtk_Widget_Record
    226. Gtk.Window.Gtk_Window_Group_Record
    227. Gtk.Window.Gtk_Window_Record
    228. Gtkada.Abstract_List_Model.Gtk_Abstract_List_Model_Record
    229. Gtkada.Abstract_Tree_Model.Gtk_Abstract_Tree_Model_Record
    230. Gtkada.Application.Gtkada_Application_Record
    231. Gtkada.Builder.Gtkada_Builder_Record
    232. Gtkada.Canvas.Buffered_Item_Record
    233. Gtkada.Canvas.Canvas_Item_Record
    234. Gtkada.Canvas.Canvas_Link_Record
    235. Gtkada.Canvas_View.Abstract_Item_Record
    236. Gtkada.Canvas.Interactive_Canvas_Record
    237. Gtkada.Canvas_View.Canvas_Item_Record
    238. Gtkada.Canvas_View.Canvas_Link_Record
    239. Gtkada.Canvas_View.Canvas_Model_Record
    240. Gtkada.Canvas_View.Canvas_View_Record
    241. Gtkada.Canvas_View.Container_Item_Record
    242. Gtkada.Canvas_View.Editable_Text_Item_Record
    243. Gtkada.Canvas_View.Ellipse_Item_Record
    244. Gtkada.Canvas_View.Hr_Item_Record
    245. Gtkada.Canvas_View.Image_Item_Record
    246. Gtkada.Canvas_View.Models.Rtree_Models.Rtree_Model_Record
    247. Gtkada.Canvas_View.List_Canvas_Model_Record
    248. Gtkada.Canvas_View.Polyline_Item_Record
    249. Gtkada.Canvas_View.Rtrees.Rtree
    250. Gtkada.Canvas_View.Rect_Item_Record
    251. Gtkada.Canvas_View.Text_Item_Record
    252. Gtkada.Canvas_View.Views.Animator
    253. Gtkada.Canvas_View.Views.Minimap_View_Record
    254. Gtkada.MDI.MDI_Child_Record
    255. Gtkada.MDI.MDI_Window_Record
    256. Gtkada.Multi_Paned.Gtkada_Multi_Paned_Record
    257. Gtkada.Multiline_Entry.Gtkada_Multiline_Entry_Record
    258. Gtkada.Printing.Gtkada_Print_Operation_Record
    259. Gtkada.Style.Drawing_Style
    260. Pango.Attributes.Pango_Attr_List
    261. Pango.Context.Pango_Context_Record
    262. Pango.Coverage.Pango_Coverage_Record
    263. Pango.Font.Pango_Font_Record
    264. Pango.Font_Face.Pango_Font_Face_Record
    265. Pango.Font_Family.Pango_Font_Family_Record
    266. Pango.Font_Map.Pango_Font_Map_Record
    267. Pango.Font_Metrics.Pango_Font_Metrics
    268. Pango.Fontset.Pango_Fontset_Record
    269. Pango.Language.Pango_Language
    270. Pango.Layout.Pango_Layout_Iter
    271. Pango.Layout.Pango_Layout_Record
    272. Pango.Tabs.Pango_Tab_Array

Glib.Variant

Description

Glib.Variant.Gvariant is a variant datatype; it stores a value along with information about the type of that value. The range of possible values is determined by the type. The type system used by Glib.Variant.Gvariant is Glib.Variant.Gvariant_Type.

Glib.Variant.Gvariant instances always have a type and a value (which are given at construction time). The type and value of a Glib.Variant.Gvariant instance can never change other than by the Glib.Variant.Gvariant itself being destroyed. A Glib.Variant.Gvariant cannot contain a pointer.

Glib.Variant.Gvariant is reference counted using Glib.Variant.Ref and Glib.Variant.Unref. Glib.Variant.Gvariant also has floating reference counts -- see Glib.Variant.Ref_Sink.

Glib.Variant.Gvariant is completely threadsafe. A Glib.Variant.Gvariant instance can be concurrently accessed in any way from any number of threads without problems.

Glib.Variant.Gvariant is heavily optimised for dealing with data in serialised form. It works particularly well with data located in memory-mapped files. It can perform nearly all deserialisation operations in a small constant time, usually touching only a single memory page. Serialised Glib.Variant.Gvariant data can also be sent over the network.

Glib.Variant.Gvariant is largely compatible with D-Bus. Almost all types of Glib.Variant.Gvariant instances can be sent over D-Bus. See Glib.Variant.Gvariant_Type for exceptions. (However, Glib.Variant.Gvariant's serialisation format is not the same as the serialisation format of a D-Bus message body: use Gdbus.Message.Gdbus_Message, in the gio library, for those.)

For space-efficiency, the Glib.Variant.Gvariant serialisation format does not automatically include the variant's length, type or endianness, which must either be implied from context (such as knowledge that a particular file format always contains a little-endian G_VARIANT_TYPE_VARIANT which occupies the whole length of the file) or supplied out-of-band (for instance, a length, type and/or endianness indicator could be placed at the beginning of a file, network message or network stream).

A Glib.Variant.Gvariant's size is limited mainly by any lower level operating system constraints, such as the number of bits in Gsize. For example, it is reasonable to have a 2GB file mapped into memory with Gmapped.File.Gmapped_File, and call g_variant_new_from_data on it.

For convenience to C programmers, Glib.Variant.Gvariant features powerful varargs-based value construction and destruction. This feature is designed to be embedded in other libraries.

There is a Python-inspired text language for describing Glib.Variant.Gvariant values. Glib.Variant.Gvariant includes a printer for this language and a parser with type inferencing.

## Memory Use

Glib.Variant.Gvariant tries to be quite efficient with respect to memory use. This section gives a rough idea of how much memory is used by the current implementation. The information here is subject to change in the future.

The memory allocated by Glib.Variant.Gvariant can be grouped into 4 broad purposes: memory for serialised data, memory for the type information cache, buffer management memory and memory for the Glib.Variant.Gvariant structure itself.

## Serialised Data Memory

This is the memory that is used for storing GVariant data in serialised form. This is what would be sent over the network or what would end up on disk, not counting any indicator of the endianness, or of the length or type of the top-level variant.

The amount of memory required to store a boolean is 1 byte. 16, 32 and 64 bit integers and double precision floating point numbers use their "natural" size. Strings (including object path and signature strings) are stored with a nul terminator, and as such use the length of the string plus 1 byte.

Maybe types use no space at all to represent the null value and use the same amount of space (sometimes plus one byte) as the equivalent non-maybe-typed value to represent the non-null case.

Arrays use the amount of space required to store each of their members, concatenated. Additionally, if the items stored in an array are not of a fixed-size (ie: strings, other arrays, etc) then an additional framing offset is stored for each item. The size of this offset is either 1, 2 or 4 bytes depending on the overall size of the container. Additionally, extra padding bytes are added as required for alignment of child values.

Tuples (including dictionary entries) use the amount of space required to store each of their members, concatenated, plus one framing offset (as per arrays) for each non-fixed-sized item in the tuple, except for the last one. Additionally, extra padding bytes are added as required for alignment of child values.

Variants use the same amount of space as the item inside of the variant, plus 1 byte, plus the length of the type string for the item inside the variant.

As an example, consider a dictionary mapping strings to variants. In the case that the dictionary is empty, 0 bytes are required for the serialisation.

If we add an item "width" that maps to the int32 value of 500 then we will use 4 byte to store the int32 (so 6 for the variant containing it) and 6 bytes for the string. The variant must be aligned to 8 after the 6 bytes of the string, so that's 2 extra bytes. 6 (string) + 2 (padding) + 6 (variant) is 14 bytes used for the dictionary entry. An additional 1 byte is added to the array as a framing offset making a total of 15 bytes.

If we add another entry, "title" that maps to a nullable string that happens to have a value of null, then we use 0 bytes for the null value (and 3 bytes for the variant to contain it along with its type string) plus 6 bytes for the string. Again, we need 2 padding bytes. That makes a total of 6 + 2 + 3 = 11 bytes.

We now require extra padding between the two items in the array. After the 14 bytes of the first item, that's 2 bytes required. We now require 2 framing offsets for an extra two bytes. 14 + 2 + 11 + 2 = 29 bytes to encode the entire two-item dictionary.

## Type Information Cache

For each GVariant type that currently exists in the program a type information structure is kept in the type information cache. The type information structure is required for rapid deserialisation.

Continuing with the above example, if a Glib.Variant.Gvariant exists with the type "a{sv}" then a type information struct will exist for "a{sv}", "{sv}", "s", and "v". Multiple uses of the same type will share the same type information. Additionally, all single-digit types are stored in read-only static memory and do not contribute to the writable memory footprint of a program using Glib.Variant.Gvariant.

Aside from the type information structures stored in read-only memory, there are two forms of type information. One is used for container types where there is a single element type: arrays and maybe types. The other is used for container types where there are multiple element types: tuples and dictionary entries.

Array type info structures are 6 * sizeof (void *), plus the memory required to store the type string itself. This means that on 32-bit systems, the cache entry for "a{sv}" would require 30 bytes of memory (plus malloc overhead).

Tuple type info structures are 6 * sizeof (void *), plus 4 * sizeof (void *) for each item in the tuple, plus the memory required to store the type string itself. A 2-item tuple, for example, would have a type information structure that consumed writable memory in the size of 14 * sizeof (void *) (plus type string) This means that on 32-bit systems, the cache entry for "{sv}" would require 61 bytes of memory (plus malloc overhead).

This means that in total, for our "a{sv}" example, 91 bytes of type information would be allocated.

The type information cache, additionally, uses a GHash_Table to store and lookup the cached items and stores a pointer to this hash table in static storage. The hash table is freed when there are zero items in the type cache.

Although these sizes may seem large it is important to remember that a program will probably only have a very small number of different types of values in it and that only one type information structure is required for many different values of the same type.

## Buffer Management Memory

Glib.Variant.Gvariant uses an internal buffer management structure to deal with the various different possible sources of serialised data that it uses. The buffer is responsible for ensuring that the correct call is made when the data is no longer in use by Glib.Variant.Gvariant. This may involve a g_free or a g_slice_free or even g_mapped_file_unref.

One buffer management structure is used for each chunk of serialised data. The size of the buffer management structure is 4 * (void *). On 32-bit systems, that's 16 bytes.

## GVariant structure

The size of a Glib.Variant.Gvariant structure is 6 * (void *). On 32-bit systems, that's 24 bytes.

Glib.Variant.Gvariant structures only exist if they are explicitly created with API calls. For example, if a Glib.Variant.Gvariant is constructed out of serialised data for the example given above (with the dictionary) then although there are 9 individual values that comprise the entire dictionary (two keys, two values, two variants containing the values, two dictionary entries, plus the dictionary itself), only 1 Glib.Variant.Gvariant instance exists -- the one referring to the dictionary.

If calls are made to start accessing the other values then Glib.Variant.Gvariant instances will exist for those values only for as long as they are in use (ie: until you call Glib.Variant.Unref). The type information is shared. The serialised data and the buffer management structure for that serialised data is shared by the child.

## Summary

To put the entire example together, for our dictionary mapping strings to variants (with two entries, as given above), we are using 91 bytes of memory for type information, 29 byes of memory for the serialised data, 16 bytes for buffer management and 24 bytes for the Glib.Variant.Gvariant instance, or a total of 160 bytes, plus malloc overhead. If we were to use Glib.Variant.Get_Child_Value to access the two dictionary entries, we would use an additional 48 bytes. If we were to have other dictionaries of the same type, we would use more memory for the serialised data and buffer management for those dictionaries, but the type information would be shared.

Byteswap

function Byteswap (Self : Gvariant) return Gvariant

Performs a byteswapping operation on the contents of Value. The result is that all multi-byte numeric data contained in Value is byteswapped. That includes 16, 32, and 64bit signed and unsigned integers as well as file handles and double precision floating point values. This function is an identity mapping on any value that does not contain multi-byte numeric data. That include strings, booleans, bytes and containers containing only these things (recursively). The returned value is always in normal form and is marked as trusted. Since: gtk+ 2.24

Parameters
Self
Return Value

the byteswapped form of Value

Check_Format_String

function Check_Format_String
   (Self          : Gvariant;
    Format_String : UTF8_String;
    Copy_Only     : Boolean) return Boolean

Checks if calling g_variant_get with Format_String on Value would be valid from a type-compatibility standpoint. Format_String is assumed to be a valid format string (from a syntactic standpoint). If Copy_Only is True then this function additionally checks that it would be safe to call Glib.Variant.Unref on Value immediately after the call to g_variant_get without invalidating the result. This is only possible if deep copies are made (ie: there are no pointers to the data inside of the soon-to-be-freed Glib.Variant.Gvariant instance). If this check fails then a g_critical is printed and False is returned. This function is meant to be used by functions that wish to provide varargs accessors to Glib.Variant.Gvariant values of uncertain values (eg: g_variant_lookup or g_menu_model_get_item_attribute). Since: gtk+ 2.34

Parameters
Self
Format_String

a valid Glib.Variant.Gvariant format string

Copy_Only

True to ensure the format string makes deep copies

Return Value

True if Format_String is safe to use

Classify

function Classify (Self : Gvariant) return GVariant_Class

Classifies Value according to its top-level type. Since: gtk+ 2.24

Parameters
Self
Return Value

the Glib.Variant.GVariant_Class of Value

Copy

function Copy (Self : Gvariant_Type) return Gvariant_Type

Makes a copy of a Glib.Variant.Gvariant_Type. It is appropriate to call Glib.Variant.Free on the return value. Type may not be null.

Parameters
Self
Return Value

a new Glib.Variant.Gvariant_Type Since 2.24

Dup_Bytestring_Array

function Dup_Bytestring_Array
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of array of bytes Glib.Variant.Gvariant. This call makes a deep copy; the return result should be released with g_strfreev. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.26

Parameters
Self
Length

the length of the result, or null

Return Value

an array of strings

Dup_Objv

function Dup_Objv
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of object paths Glib.Variant.Gvariant. This call makes a deep copy; the return result should be released with g_strfreev. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.30

Parameters
Self
Length

the length of the result, or null

Return Value

an array of strings

Dup_String

function Dup_String
   (Self   : Gvariant;
    Length : access Gsize) return UTF8_String

Similar to Glib.Variant.Get_String except that instead of returning a constant string, the string is duplicated. The string will always be utf8 encoded. The return value must be freed using g_free. Since: gtk+ 2.24

Parameters
Self
Length

a pointer to a Gsize, to store the length

Return Value

a newly allocated string, utf8 encoded

Dup_String

function Dup_String (Self : Gvariant_Type) return UTF8_String

Returns a newly-allocated copy of the type string corresponding to Type. The returned string is nul-terminated. It is appropriate to call g_free on the return value.

Parameters
Self
Return Value

the corresponding type string Since 2.24

Dup_Strv

function Dup_Strv
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of strings Glib.Variant.Gvariant. This call makes a deep copy; the return result should be released with g_strfreev. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.24

Parameters
Self
Length

the length of the result, or null

Return Value

an array of strings

Element

function Element (Self : Gvariant_Type) return Gvariant_Type

Determines the element type of an array or maybe type. This function may only be used with array or maybe types.

Parameters
Self
Return Value

the element type of Type Since 2.24

First

function First (Self : Gvariant_Type) return Gvariant_Type

Determines the first item type of a tuple or dictionary entry type. This function may only be used with tuple or dictionary entry types, but must not be used with the generic tuple type G_VARIANT_TYPE_TUPLE. In the case of a dictionary entry type, this returns the type of the key. null is returned in case of Type being G_VARIANT_TYPE_UNIT. This call, together with Glib.Variant.Next provides an iterator interface over tuple and dictionary entry types.

Parameters
Self
Return Value

the first item type of Type, or null Since 2.24

Free

procedure Free (Self : Gvariant_Type)

Frees a Glib.Variant.Gvariant_Type that was allocated with Glib.Variant.Copy, g_variant_type_new or one of the container type constructor functions. In the case that Type is null, this function does nothing. Since 2.24

Parameters
Self

From_Object

function From_Object (Object : System.Address) return Gvariant
Parameters
Object
Return Value

From_Object_Free

function From_Object_Free (B : access Gvariant'Class) return Gvariant
Parameters
B
Return Value

G_New

procedure G_New (Self : out Gvariant_Type; Type_String : UTF8_String)

Creates a new Glib.Variant.Gvariant_Type corresponding to the type string given by Type_String. It is appropriate to call Glib.Variant.Free on the return value. It is a programmer error to call this function with an invalid type string. Use Glib.Variant.String_Is_Valid if you are unsure. Since: gtk+ 2.24

Parameters
Self
Type_String

a valid GVariant type string

G_New_Boolean

procedure G_New_Boolean (Self : out Gvariant; Value : Boolean)

Creates a new boolean Glib.Variant.Gvariant instance -- either True or False. Since: gtk+ 2.24

Parameters
Self
Value

a Boolean value

G_New_Byte

procedure G_New_Byte (Self : out Gvariant; Value : Guchar)

Creates a new byte Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Guint8 value

G_New_Bytestring

procedure G_New_Bytestring (Self : out Gvariant; String : Gint_Array)

Creates an array-of-bytes Glib.Variant.Gvariant with the contents of String. This function is just like g_variant_new_string except that the string need not be valid utf8. The nul terminator character at the end of the string is stored in the array. Since: gtk+ 2.26

Parameters
Self
String

a normal nul-terminated string in no particular encoding

G_New_Bytestring_Array

procedure G_New_Bytestring_Array
   (Self   : out Gvariant;
    Strv   : GNAT.Strings.String_List;
    Length : Gssize)

Constructs an array of bytestring Glib.Variant.Gvariant from the given array of strings. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.26

Parameters
Self
Strv

an array of strings

Length

the length of Strv, or -1

G_New_Dict_Entry

procedure G_New_Dict_Entry
   (Self  : out Gvariant;
    Key   : Gvariant;
    Value : Gvariant)

Creates a new dictionary entry Glib.Variant.Gvariant. Key and Value must be non-null. Key must be a value of a basic type (ie: not a container). If the Key or Value are floating references (see Glib.Variant.Ref_Sink), the new instance takes ownership of them as if via Glib.Variant.Ref_Sink. Since: gtk+ 2.24

Parameters
Self
Key

a basic Glib.Variant.Gvariant, the key

Value

a Glib.Variant.Gvariant, the value

G_New_Dict_Entry

procedure G_New_Dict_Entry
   (Self  : out Gvariant_Type;
    Key   : Gvariant_Type;
    Value : Gvariant_Type)

Constructs the type corresponding to a dictionary entry with a key of type Key and a value of type Value. It is appropriate to call Glib.Variant.Free on the return value.

Parameters
Self
Key

a basic Glib.Variant.Gvariant_Type

Value

a Glib.Variant.Gvariant_Type

G_New_Double

procedure G_New_Double (Self : out Gvariant; Value : Gdouble)

Creates a new double Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Gdouble floating point value

G_New_Handle

procedure G_New_Handle (Self : out Gvariant; Value : Gint32)

Creates a new handle Glib.Variant.Gvariant instance. By convention, handles are indexes into an array of file descriptors that are sent alongside a D-Bus message. If you're not interacting with D-Bus, you probably don't need them. Since: gtk+ 2.24

Parameters
Self
Value

a Gint32 value

G_New_Int16

procedure G_New_Int16 (Self : out Gvariant; Value : Gint16)

Creates a new int16 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Gint16 value

G_New_Int32

procedure G_New_Int32 (Self : out Gvariant; Value : Gint32)

Creates a new int32 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Gint32 value

G_New_Int64

procedure G_New_Int64 (Self : out Gvariant; Value : Gint64)

Creates a new int64 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Gint64 value

G_New_Object_Path

procedure G_New_Object_Path
   (Self        : out Gvariant;
    Object_Path : UTF8_String)

Creates a D-Bus object path Glib.Variant.Gvariant with the contents of String. String must be a valid D-Bus object path. Use Glib.Variant.Is_Object_Path if you're not sure. Since: gtk+ 2.24

Parameters
Self
Object_Path

a normal C nul-terminated string

G_New_Objv

procedure G_New_Objv
   (Self   : out Gvariant;
    Strv   : GNAT.Strings.String_List;
    Length : Gssize)

Constructs an array of object paths Glib.Variant.Gvariant from the given array of strings. Each string must be a valid Glib.Variant.Gvariant object path; see Glib.Variant.Is_Object_Path. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.30

Parameters
Self
Strv

an array of strings

Length

the length of Strv, or -1

G_New_Signature

procedure G_New_Signature (Self : out Gvariant; Signature : UTF8_String)

Creates a D-Bus type signature Glib.Variant.Gvariant with the contents of String. String must be a valid D-Bus type signature. Use Glib.Variant.Is_Signature if you're not sure. Since: gtk+ 2.24

Parameters
Self
Signature

a normal C nul-terminated string

G_New_String

procedure G_New_String (Self : out Gvariant; String : UTF8_String)

Creates a string Glib.Variant.Gvariant with the contents of String. String must be valid utf8. Since: gtk+ 2.24

Parameters
Self
String

a normal utf8 nul-terminated string

G_New_Strv

procedure G_New_Strv
   (Self   : out Gvariant;
    Strv   : GNAT.Strings.String_List;
    Length : Gssize)

Constructs an array of strings Glib.Variant.Gvariant from the given array of strings. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.24

Parameters
Self
Strv

an array of strings

Length

the length of Strv, or -1

G_New_Take_String

procedure G_New_Take_String (Self : out Gvariant; String : UTF8_String)

Creates a string Glib.Variant.Gvariant with the contents of String. String must be valid utf8. This function consumes String. g_free will be called on String when it is no longer required. You must not modify or access String in any other way after passing it to this function. It is even possible that String is immediately freed. Since: gtk+ 2.38

Parameters
Self
String

a normal utf8 nul-terminated string

G_New_Uint16

procedure G_New_Uint16 (Self : out Gvariant; Value : Guint16)

Creates a new uint16 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Guint16 value

G_New_Uint32

procedure G_New_Uint32 (Self : out Gvariant; Value : Guint32)

Creates a new uint32 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Guint32 value

G_New_Uint64

procedure G_New_Uint64 (Self : out Gvariant; Value : Guint64)

Creates a new uint64 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Self
Value

a Guint64 value

G_New_Variant

procedure G_New_Variant (Self : out Gvariant; Value : Gvariant)

Boxes Value. The result is a Glib.Variant.Gvariant instance representing a variant containing the original value. If Child is a floating reference (see Glib.Variant.Ref_Sink), the new instance takes ownership of Child. Since: gtk+ 2.24

Parameters
Self
Value

a Glib.Variant.Gvariant instance

Get_Boolean

function Get_Boolean (Self : Gvariant) return Boolean

Returns the boolean value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_BOOLEAN. Since: gtk+ 2.24

Parameters
Self
Return Value

True or False

Get_Byte

function Get_Byte (Self : Gvariant) return Guchar

Returns the byte value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_BYTE. Since: gtk+ 2.24

Parameters
Self
Return Value

a Guchar

Get_Bytestring_Array

function Get_Bytestring_Array
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of array of bytes Glib.Variant.Gvariant. This call makes a shallow copy; the return result should be released with g_free, but the individual strings must not be modified. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.26

Parameters
Self
Length

the length of the result, or null

Return Value

an array of constant strings

Get_Child_Value

function Get_Child_Value (Self : Gvariant; Index : Gsize) return Gvariant

Reads a child item out of a container Glib.Variant.Gvariant instance. This includes variants, maybes, arrays, tuples and dictionary entries. It is an error to call this function on any other type of Glib.Variant.Gvariant. It is an error if Index_ is greater than the number of child items in the container. See Glib.Variant.N_Children. The returned value is never floating. You should free it with Glib.Variant.Unref when you're done with it. This function is O(1). Since: gtk+ 2.24

Parameters
Self
Index

the index of the child to fetch

Return Value

the child at the specified index

Get_Double

function Get_Double (Self : Gvariant) return Gdouble

Returns the double precision floating point value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_DOUBLE. Since: gtk+ 2.24

Parameters
Self
Return Value

a Gdouble

Get_Handle

function Get_Handle (Self : Gvariant) return Gint32

Returns the 32-bit signed integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_HANDLE. By convention, handles are indexes into an array of file descriptors that are sent alongside a D-Bus message. If you're not interacting with D-Bus, you probably don't need them. Since: gtk+ 2.24

Parameters
Self
Return Value

a Gint32

Get_Int16

function Get_Int16 (Self : Gvariant) return Gint16

Returns the 16-bit signed integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_INT16. Since: gtk+ 2.24

Parameters
Self
Return Value

a Gint16

Get_Int32

function Get_Int32 (Self : Gvariant) return Gint32

Returns the 32-bit signed integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_INT32. Since: gtk+ 2.24

Parameters
Self
Return Value

a Gint32

Get_Int64

function Get_Int64 (Self : Gvariant) return Gint64

Returns the 64-bit signed integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_INT64. Since: gtk+ 2.24

Parameters
Self
Return Value

a Gint64

Get_Maybe

function Get_Maybe (Self : Gvariant) return Gvariant

Given a maybe-typed Glib.Variant.Gvariant instance, extract its value. If the value is Nothing, then this function returns null. Since: gtk+ 2.24

Parameters
Self
Return Value

the contents of Value, or null

Get_Normal_Form

function Get_Normal_Form (Self : Gvariant) return Gvariant

Gets a Glib.Variant.Gvariant instance that has the same value as Value and is trusted to be in normal form. If Value is already trusted to be in normal form then a new reference to Value is returned. If Value is not already trusted, then it is scanned to check if it is in normal form. If it is found to be in normal form then it is marked as trusted and a new reference to it is returned. If Value is found not to be in normal form then a new trusted Glib.Variant.Gvariant is created with the same value as Value. It makes sense to call this function if you've received Glib.Variant.Gvariant data from untrusted sources and you want to ensure your serialised output is definitely in normal form. Since: gtk+ 2.24

Parameters
Self
Return Value

a trusted Glib.Variant.Gvariant

Get_Objv

function Get_Objv
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of object paths Glib.Variant.Gvariant. This call makes a shallow copy; the return result should be released with g_free, but the individual strings must not be modified. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.30

Parameters
Self
Length

the length of the result, or null

Return Value

an array of constant strings

Get_Size

function Get_Size (Self : Gvariant) return Gsize

Determines the number of bytes that would be required to store Value with Glib.Variant.Store. If Value has a fixed-sized type then this function always returned that fixed size. In the case that Value is already in serialised form or the size has already been calculated (ie: this function has been called before) then this function is O(1). Otherwise, the size is calculated, an operation which is approximately O(n) in the number of values involved. Since: gtk+ 2.24

Parameters
Self
Return Value

the serialised size of Value

Get_String

function Get_String
   (Self   : Gvariant;
    Length : access Gsize) return UTF8_String

Returns the string value of a Glib.Variant.Gvariant instance with a string type. This includes the types G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_OBJECT_PATH and G_VARIANT_TYPE_SIGNATURE. The string will always be utf8 encoded. If Length is non-null then the length of the string (in bytes) is returned there. For trusted values, this information is already known. For untrusted values, a strlen will be performed. It is an error to call this function with a Value of any type other than those three. The return value remains valid as long as Value exists. Since: gtk+ 2.24

Parameters
Self
Length

a pointer to a Gsize, to store the length

Return Value

the constant string, utf8 encoded

Get_String_Length

function Get_String_Length (Self : Gvariant_Type) return Gsize

Returns the length of the type string corresponding to the given Type. This function must be used to determine the valid extent of the memory region returned by Glib.Variant.Peek_String.

Parameters
Self
Return Value

the length of the corresponding type string Since 2.24

Get_Strv

function Get_Strv
   (Self   : Gvariant;
    Length : access Gsize) return GNAT.Strings.String_List

Gets the contents of an array of strings Glib.Variant.Gvariant. This call makes a shallow copy; the return result should be released with g_free, but the individual strings must not be modified. If Length is non-null then the number of elements in the result is stored there. In any case, the resulting array will be null-terminated. For an empty array, Length will be set to 0 and a pointer to a null pointer will be returned. Since: gtk+ 2.24

Parameters
Self
Length

the length of the result, or null

Return Value

an array of constant strings

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Type

function Get_Type (Self : Gvariant) return Gvariant_Type

Determines the type of Value. The return value is valid for the lifetime of Value and must not be freed. Since: gtk+ 2.24

Parameters
Self
Return Value

a Glib.Variant.Gvariant_Type

Get_Type_String

function Get_Type_String (Self : Gvariant) return UTF8_String

Returns the type string of Value. Unlike the result of calling Glib.Variant.Peek_String, this string is nul-terminated. This string belongs to Glib.Variant.Gvariant and must not be freed. Since: gtk+ 2.24

Parameters
Self
Return Value

the type string for the type of Value

Get_Uint16

function Get_Uint16 (Self : Gvariant) return Guint16

Returns the 16-bit unsigned integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_UINT16. Since: gtk+ 2.24

Parameters
Self
Return Value

a Guint16

Get_Uint32

function Get_Uint32 (Self : Gvariant) return Guint32

Returns the 32-bit unsigned integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_UINT32. Since: gtk+ 2.24

Parameters
Self
Return Value

a Guint32

Get_Uint64

function Get_Uint64 (Self : Gvariant) return Guint64

Returns the 64-bit unsigned integer value of Value. It is an error to call this function with a Value of any type other than G_VARIANT_TYPE_UINT64. Since: gtk+ 2.24

Parameters
Self
Return Value

a Guint64

Get_Variant

function Get_Variant (Self : Gvariant) return Gvariant

Unboxes Value. The result is the Glib.Variant.Gvariant instance that was contained in Value. Since: gtk+ 2.24

Parameters
Self
Return Value

the item contained in the variant

Gvariant

type Gvariant is new Glib.C_Boxed with null record;

GVariant_Class

type GVariant_Class is (
   Class_Tuple,
   Class_Array,
   Class_Boolean,
   Class_Double,
   Class_Signature,
   Class_Handle,
   Class_Int32,
   Class_Maybe,
   …,
   Class_Dict_Entry);

The range of possible top-level types of Glib.Variant.Gvariant instances.

Enumeration Literal
Class_Tuple
Class_Array
Class_Boolean
Class_Double
Class_Signature
Class_Handle
Class_Int32
Class_Maybe
Class_Int16
Class_Object_Path
Class_Uint16
Class_String
Class_Uint64
Class_Uint32
Class_Variant
Class_Int64
Class_Byte
Class_Dict_Entry

GVariant_Class_Properties

package GVariant_Class_Properties is
   new Generic_Internal_Discrete_Property (GVariant_Class);

Gvariant_Iter

type Gvariant_Iter is new Glib.C_Proxy;

Gvariant_New_Boolean

function Gvariant_New_Boolean (Value : Boolean) return Gvariant

Creates a new boolean Glib.Variant.Gvariant instance -- either True or False. Since: gtk+ 2.24

Parameters
Value

a Boolean value

Return Value

Gvariant_New_Byte

function Gvariant_New_Byte (Value : Guchar) return Gvariant

Creates a new byte Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Guint8 value

Return Value

Gvariant_New_Bytestring

function Gvariant_New_Bytestring (String : Gint_Array) return Gvariant

Creates an array-of-bytes Glib.Variant.Gvariant with the contents of String. This function is just like g_variant_new_string except that the string need not be valid utf8. The nul terminator character at the end of the string is stored in the array. Since: gtk+ 2.26

Parameters
String

a normal nul-terminated string in no particular encoding

Return Value

Gvariant_New_Bytestring_Array

function Gvariant_New_Bytestring_Array
   (Strv   : GNAT.Strings.String_List;
    Length : Gssize) return Gvariant

Constructs an array of bytestring Glib.Variant.Gvariant from the given array of strings. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.26

Parameters
Strv

an array of strings

Length

the length of Strv, or -1

Return Value

Gvariant_New_Dict_Entry

function Gvariant_New_Dict_Entry
   (Key   : Gvariant;
    Value : Gvariant) return Gvariant

Creates a new dictionary entry Glib.Variant.Gvariant. Key and Value must be non-null. Key must be a value of a basic type (ie: not a container). If the Key or Value are floating references (see Glib.Variant.Ref_Sink), the new instance takes ownership of them as if via Glib.Variant.Ref_Sink. Since: gtk+ 2.24

Parameters
Key

a basic Glib.Variant.Gvariant, the key

Value

a Glib.Variant.Gvariant, the value

Return Value

Gvariant_New_Double

function Gvariant_New_Double (Value : Gdouble) return Gvariant

Creates a new double Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Gdouble floating point value

Return Value

Gvariant_New_Handle

function Gvariant_New_Handle (Value : Gint32) return Gvariant

Creates a new handle Glib.Variant.Gvariant instance. By convention, handles are indexes into an array of file descriptors that are sent alongside a D-Bus message. If you're not interacting with D-Bus, you probably don't need them. Since: gtk+ 2.24

Parameters
Value

a Gint32 value

Return Value

Gvariant_New_Int16

function Gvariant_New_Int16 (Value : Gint16) return Gvariant

Creates a new int16 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Gint16 value

Return Value

Gvariant_New_Int32

function Gvariant_New_Int32 (Value : Gint32) return Gvariant

Creates a new int32 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Gint32 value

Return Value

Gvariant_New_Int64

function Gvariant_New_Int64 (Value : Gint64) return Gvariant

Creates a new int64 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Gint64 value

Return Value

Gvariant_New_Object_Path

function Gvariant_New_Object_Path
   (Object_Path : UTF8_String) return Gvariant

Creates a D-Bus object path Glib.Variant.Gvariant with the contents of String. String must be a valid D-Bus object path. Use Glib.Variant.Is_Object_Path if you're not sure. Since: gtk+ 2.24

Parameters
Object_Path

a normal C nul-terminated string

Return Value

Gvariant_New_Objv

function Gvariant_New_Objv
   (Strv   : GNAT.Strings.String_List;
    Length : Gssize) return Gvariant

Constructs an array of object paths Glib.Variant.Gvariant from the given array of strings. Each string must be a valid Glib.Variant.Gvariant object path; see Glib.Variant.Is_Object_Path. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.30

Parameters
Strv

an array of strings

Length

the length of Strv, or -1

Return Value

Gvariant_New_Signature

function Gvariant_New_Signature (Signature : UTF8_String) return Gvariant

Creates a D-Bus type signature Glib.Variant.Gvariant with the contents of String. String must be a valid D-Bus type signature. Use Glib.Variant.Is_Signature if you're not sure. Since: gtk+ 2.24

Parameters
Signature

a normal C nul-terminated string

Return Value

Gvariant_New_String

function Gvariant_New_String (String : UTF8_String) return Gvariant

Creates a string Glib.Variant.Gvariant with the contents of String. String must be valid utf8. Since: gtk+ 2.24

Parameters
String

a normal utf8 nul-terminated string

Return Value

Gvariant_New_Strv

function Gvariant_New_Strv
   (Strv   : GNAT.Strings.String_List;
    Length : Gssize) return Gvariant

Constructs an array of strings Glib.Variant.Gvariant from the given array of strings. If Length is -1 then Strv is null-terminated. Since: gtk+ 2.24

Parameters
Strv

an array of strings

Length

the length of Strv, or -1

Return Value

Gvariant_New_Take_String

function Gvariant_New_Take_String (String : UTF8_String) return Gvariant

Creates a string Glib.Variant.Gvariant with the contents of String. String must be valid utf8. This function consumes String. g_free will be called on String when it is no longer required. You must not modify or access String in any other way after passing it to this function. It is even possible that String is immediately freed. Since: gtk+ 2.38

Parameters
String

a normal utf8 nul-terminated string

Return Value

Gvariant_New_Uint16

function Gvariant_New_Uint16 (Value : Guint16) return Gvariant

Creates a new uint16 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Guint16 value

Return Value

Gvariant_New_Uint32

function Gvariant_New_Uint32 (Value : Guint32) return Gvariant

Creates a new uint32 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Guint32 value

Return Value

Gvariant_New_Uint64

function Gvariant_New_Uint64 (Value : Guint64) return Gvariant

Creates a new uint64 Glib.Variant.Gvariant instance. Since: gtk+ 2.24

Parameters
Value

a Guint64 value

Return Value

Gvariant_New_Variant

function Gvariant_New_Variant (Value : Gvariant) return Gvariant

Boxes Value. The result is a Glib.Variant.Gvariant instance representing a variant containing the original value. If Child is a floating reference (see Glib.Variant.Ref_Sink), the new instance takes ownership of Child. Since: gtk+ 2.24

Parameters
Value

a Glib.Variant.Gvariant instance

Return Value

Gvariant_Type

type Gvariant_Type is new Glib.C_Proxy;

Gvariant_Type_Boolean

Gvariant_Type_Boolean : constant Gvariant_Type;

Gvariant_Type_Byte

Gvariant_Type_Byte    : constant Gvariant_Type;

Gvariant_Type_Double

Gvariant_Type_Double  : constant Gvariant_Type;

Gvariant_Type_Int16

Gvariant_Type_Int16   : constant Gvariant_Type;

Gvariant_Type_Int32

Gvariant_Type_Int32   : constant Gvariant_Type;

Gvariant_Type_Int64

Gvariant_Type_Int64   : constant Gvariant_Type;

Gvariant_Type_New

function Gvariant_Type_New
   (Type_String : UTF8_String) return Gvariant_Type

Creates a new Glib.Variant.Gvariant_Type corresponding to the type string given by Type_String. It is appropriate to call Glib.Variant.Free on the return value. It is a programmer error to call this function with an invalid type string. Use Glib.Variant.String_Is_Valid if you are unsure. Since: gtk+ 2.24

Parameters
Type_String

a valid GVariant type string

Return Value

Gvariant_Type_New_Dict_Entry

function Gvariant_Type_New_Dict_Entry
   (Key   : Gvariant_Type;
    Value : Gvariant_Type) return Gvariant_Type

Constructs the type corresponding to a dictionary entry with a key of type Key and a value of type Value. It is appropriate to call Glib.Variant.Free on the return value.

Parameters
Key

a basic Glib.Variant.Gvariant_Type

Value

a Glib.Variant.Gvariant_Type

Return Value

Gvariant_Type_String

Gvariant_Type_String  : constant Gvariant_Type;

Gvariant_Type_Uint16

Gvariant_Type_Uint16  : constant Gvariant_Type;

Gvariant_Type_Uint32

Gvariant_Type_Uint32  : constant Gvariant_Type;

Gvariant_Type_Uint64

Gvariant_Type_Uint64  : constant Gvariant_Type;

Hash

function Hash (Self : Gvariant) return Guint

Generates a hash value for a Glib.Variant.Gvariant instance. The output of this function is guaranteed to be the same for a given value only per-process. It may change between different processor architectures or even different versions of GLib. Do not use this function as a basis for building protocols or file formats. The type of Value is gconstpointer only to allow use of this function with GHash_Table. Value must be a Glib.Variant.Gvariant. Since: gtk+ 2.24

Parameters
Self
Return Value

a hash value corresponding to Value

Init

function Init (Self : Gvariant_Iter; Value : Gvariant) return Gsize

Initialises (without allocating) a Glib.Variant.Gvariant_Iter. Iter may be completely uninitialised prior to this call; its old value is ignored. The iterator remains valid for as long as Value exists, and need not be freed in any way. Since: gtk+ 2.24

Parameters
Self
Value

a container Glib.Variant.Gvariant

Return Value

the number of items in Value

Is_Array

function Is_Array (Self : Gvariant_Type) return Boolean

Determines if the given Type is an array type. This is true if the type string for Type starts with an 'a'. This function returns True for any indefinite type for which every definite subtype is an array type -- G_VARIANT_TYPE_ARRAY, for example.

Parameters
Self
Return Value

True if Type is an array type Since 2.24

Is_Basic

function Is_Basic (Self : Gvariant_Type) return Boolean

Determines if the given Type is a basic type. Basic types are booleans, bytes, integers, doubles, strings, object paths and signatures. Only a basic type may be used as the key of a dictionary entry. This function returns False for all indefinite types except G_VARIANT_TYPE_BASIC.

Parameters
Self
Return Value

True if Type is a basic type Since 2.24

Is_Container

function Is_Container (Self : Gvariant) return Boolean

Checks if Value is a container. Since: gtk+ 2.24

Parameters
Self
Return Value

True if Value is a container

Is_Container

function Is_Container (Self : Gvariant_Type) return Boolean

Determines if the given Type is a container type. Container types are any array, maybe, tuple, or dictionary entry types plus the variant type. This function returns True for any indefinite type for which every definite subtype is a container -- G_VARIANT_TYPE_ARRAY, for example.

Parameters
Self
Return Value

True if Type is a container type Since 2.24

Is_Definite

function Is_Definite (Self : Gvariant_Type) return Boolean

Determines if the given Type is definite (ie: not indefinite). A type is definite if its type string does not contain any indefinite type characters ('*', '?', or 'r'). A Glib.Variant.Gvariant instance may not have an indefinite type, so calling this function on the result of Glib.Variant.Get_Type will always result in True being returned. Calling this function on an indefinite type like G_VARIANT_TYPE_ARRAY, however, will result in False being returned.

Parameters
Self
Return Value

True if Type is definite Since 2.24

Is_Dict_Entry

function Is_Dict_Entry (Self : Gvariant_Type) return Boolean

Determines if the given Type is a dictionary entry type. This is true if the type string for Type starts with a '{'. This function returns True for any indefinite type for which every definite subtype is a dictionary entry type -- G_VARIANT_TYPE_DICT_ENTRY, for example.

Parameters
Self
Return Value

True if Type is a dictionary entry type Since 2.24

Is_Floating

function Is_Floating (Self : Gvariant) return Boolean

Checks whether Value has a floating reference count. This function should only ever be used to assert that a given variant is or is not floating, or for debug purposes. To acquire a reference to a variant that might be floating, always use Glib.Variant.Ref_Sink or Glib.Variant.Take_Ref. See Glib.Variant.Ref_Sink for more information about floating reference counts. Since: gtk+ 2.26

Parameters
Self
Return Value

whether Value is floating

Is_Maybe

function Is_Maybe (Self : Gvariant_Type) return Boolean

Determines if the given Type is a maybe type. This is true if the type string for Type starts with an 'm'. This function returns True for any indefinite type for which every definite subtype is a maybe type -- G_VARIANT_TYPE_MAYBE, for example.

Parameters
Self
Return Value

True if Type is a maybe type Since 2.24

Is_Normal_Form

function Is_Normal_Form (Self : Gvariant) return Boolean

Checks if Value is in normal form. The main reason to do this is to detect if a given chunk of serialised data is in normal form: load the data into a Glib.Variant.Gvariant using g_variant_new_from_data and then use this function to check. If Value is found to be in normal form then it will be marked as being trusted. If the value was already marked as being trusted then this function will immediately return True. Since: gtk+ 2.24

Parameters
Self
Return Value

True if Value is in normal form

Is_Object_Path

function Is_Object_Path (String : UTF8_String) return Boolean

Determines if a given string is a valid D-Bus object path. You should ensure that a string is a valid D-Bus object path before passing it to g_variant_new_object_path. A valid object path starts with '/' followed by zero or more sequences of characters separated by '/' characters. Each sequence must contain only the characters "[A-Z][a-z][0-9]_". No sequence (including the one following the final '/' character) may be empty. Since: gtk+ 2.24

Parameters
String

a normal C nul-terminated string

Return Value

True if String is a D-Bus object path

Is_Of_Type

function Is_Of_Type
   (Self     : Gvariant;
    The_Type : Gvariant_Type) return Boolean

Checks if a value has a type matching the provided type. Since: gtk+ 2.24

Parameters
Self
The_Type

a Glib.Variant.Gvariant_Type

Return Value

True if the type of Value matches Type

Is_Signature

function Is_Signature (String : UTF8_String) return Boolean

Determines if a given string is a valid D-Bus type signature. You should ensure that a string is a valid D-Bus type signature before passing it to g_variant_new_signature. D-Bus type signatures consist of zero or more definite Glib.Variant.Gvariant_Type strings in sequence. Since: gtk+ 2.24

Parameters
String

a normal C nul-terminated string

Return Value

True if String is a D-Bus type signature

Is_Subtype_Of

function Is_Subtype_Of
   (Self      : Gvariant_Type;
    Supertype : Gvariant_Type) return Boolean

Checks if Type is a subtype of Supertype. This function returns True if Type is a subtype of Supertype. All types are considered to be subtypes of themselves. Aside from that, only indefinite types can have subtypes.

Parameters
Self
Supertype

a Glib.Variant.Gvariant_Type

Return Value

True if Type is a subtype of Supertype Since 2.24

Is_Tuple

function Is_Tuple (Self : Gvariant_Type) return Boolean

Determines if the given Type is a tuple type. This is true if the type string for Type starts with a '(' or if Type is G_VARIANT_TYPE_TUPLE. This function returns True for any indefinite type for which every definite subtype is a tuple type -- G_VARIANT_TYPE_TUPLE, for example.

Parameters
Self
Return Value

True if Type is a tuple type Since 2.24

Is_Variant

function Is_Variant (Self : Gvariant_Type) return Boolean

Determines if the given Type is the variant type.

Parameters
Self
Return Value

True if Type is the variant type Since 2.24

Iter_New

function Iter_New (Self : Gvariant) return Gvariant_Iter

Creates a heap-allocated Glib.Variant.Gvariant_Iter for iterating over the items in Value. Use g_variant_iter_free to free the return value when you no longer need it. A reference is taken to Value and will be released only when g_variant_iter_free is called. Since: gtk+ 2.24

Parameters
Self
Return Value

a new heap-allocated Glib.Variant.Gvariant_Iter

Key

function Key (Self : Gvariant_Type) return Gvariant_Type

Determines the key type of a dictionary entry type. This function may only be used with a dictionary entry type. Other than the additional restriction, this call is equivalent to Glib.Variant.First.

Parameters
Self
Return Value

the key type of the dictionary entry Since 2.24

Lookup_Value

function Lookup_Value
   (Self          : Gvariant;
    Key           : UTF8_String;
    Expected_Type : Gvariant_Type) return Gvariant

Looks up a value in a dictionary Glib.Variant.Gvariant. This function works with dictionaries of the type a{s*} (and equally well with type a{o*}, but we only further discuss the string case for sake of clarity). In the event that Dictionary has the type a{sv}, the Expected_Type string specifies what type of value is expected to be inside of the variant. If the value inside the variant has a different type then null is returned. In the event that Dictionary has a value type other than v then Expected_Type must directly match the key type and it is used to unpack the value directly or an error occurs. In either case, if Key is not found in Dictionary, null is returned. If the key is found and the value has the correct type, it is returned. If Expected_Type was specified then any non-null return value will have this type. This function is currently implemented with a linear scan. If you plan to do many lookups then Gvariant.Dict.Gvariant_Dict may be more efficient. Since: gtk+ 2.28

Parameters
Self
Key

the key to lookup in the dictionary

Expected_Type

a Glib.Variant.Gvariant_Type, or null

Return Value

the value of the dictionary key, or null

N_Children

function N_Children (Self : Gvariant) return Gsize

Determines the number of children in a container Glib.Variant.Gvariant instance. This includes variants, maybes, arrays, tuples and dictionary entries. It is an error to call this function on any other type of Glib.Variant.Gvariant. For variants, the return value is always 1. For values with maybe types, it is always zero or one. For arrays, it is the length of the array. For tuples it is the number of tuple items (which depends only on the type). For dictionary entries, it is always 2 This function is O(1). Since: gtk+ 2.24

Parameters
Self
Return Value

the number of children in the container

N_Items

function N_Items (Self : Gvariant_Type) return Gsize

Determines the number of items contained in a tuple or dictionary entry type. This function may only be used with tuple or dictionary entry types, but must not be used with the generic tuple type G_VARIANT_TYPE_TUPLE. In the case of a dictionary entry type, this function will always return 2.

Parameters
Self
Return Value

the number of items in Type Since 2.24

Next

function Next (Self : Gvariant_Type) return Gvariant_Type

Determines the next item type of a tuple or dictionary entry type. Type must be the result of a previous call to Glib.Variant.First or Glib.Variant.Next. If called on the key type of a dictionary entry then this call returns the value type. If called on the value type of a dictionary entry then this call returns null. For tuples, null is returned when Type is the last item in a tuple.

Parameters
Self
Return Value

the next Glib.Variant.Gvariant_Type after Type, or null Since 2.24

Next_Value

function Next_Value (Self : Gvariant_Iter) return Gvariant

Gets the next item in the container. If no more items remain then null is returned. Use Glib.Variant.Unref to drop your reference on the return value when you no longer need it. Here is an example for iterating with Glib.Variant.Next_Value:

// recursively iterate a container
void
iterate_container_recursive (GVariant *container)
{
  GVariantIter iter;
  GVariant *child;

  g_variant_iter_init (&iter, container);
  while ((child = g_variant_iter_next_value (&iter)))
    {
      g_print ("type '%s'\n", g_variant_get_type_string (child));

      if (g_variant_is_container (child))
        iterate_container_recursive (child);

      g_variant_unref (child);
    }
}

Since: gtk+ 2.24

Parameters
Self
Return Value

a Glib.Variant.Gvariant, or null

Null_Gvariant

Null_Gvariant : constant Gvariant;

Parse

function Parse
   (The_Type : Gvariant_Type;
    Text     : UTF8_String;
    Limit    : UTF8_String := "";
    Endptr   : GNAT.Strings.String_List) return Gvariant

Parses a Glib.Variant.Gvariant from a text representation. A single Glib.Variant.Gvariant is parsed from the content of Text. The format is described [here][gvariant-text]. The memory at Limit will never be accessed and the parser behaves as if the character at Limit is the nul terminator. This has the effect of bounding Text. If Endptr is non-null then Text is permitted to contain data following the value that this function parses and Endptr will be updated to point to the first character past the end of the text parsed by this function. If Endptr is null and there is extra data then an error is returned. If Type is non-null then the value will be parsed to have that type. This may result in additional parse errors (in the case that the parsed value doesn't fit the type) but may also result in fewer errors (in the case that the type would have been ambiguous, such as with empty arrays). In the event that the parsing is successful, the resulting Glib.Variant.Gvariant is returned. In case of any error, null will be returned. If Error is non-null then it will be set to reflect the error that occurred. Officially, the language understood by the parser is "any string produced by Glib.Variant.Print".

Parameters
The_Type

a Glib.Variant.Gvariant_Type, or null

Text

a string containing a GVariant in text form

Limit

a pointer to the end of Text, or null

Endptr

a location to store the end pointer, or null

Return Value

a reference to a Glib.Variant.Gvariant, or null

Parse_Error_Print_Context

function Parse_Error_Print_Context
   (Error      : Glib.Error.GError;
    Source_Str : UTF8_String) return UTF8_String

Pretty-prints a message showing the context of a Glib.Variant.Gvariant parse error within the string for which parsing was attempted. The resulting string is suitable for output to the console or other monospace media where newlines are treated in the usual way. The message will typically look something like one of the following:

unterminated string constant:
  (1, 2, 3, 'abc
            ^^^^

or

unable to find a common type:
  [1, 2, 3, 'str']
   ^        ^^^^^

The format of the message may change in a future version. Error must have come from a failed attempt to Glib.Variant.Parse and Source_Str must be exactly the same string that caused the error. If Source_Str was not nul-terminated when you passed it to Glib.Variant.Parse then you must add nul termination before using this function. Since: gtk+ 2.40

Parameters
Error

a Gerror.Gerror from the GVariant_Parse_Error domain

Source_Str

the string that was given to the parser

Return Value

the printed message

Parse_Error_Quark

function Parse_Error_Quark return Glib.GQuark
Return Value

Parser_Get_Error_Quark

function Parser_Get_Error_Quark return Glib.GQuark

Same as g_variant_error_quark. Deprecated since None, 1

Return Value

Peek_String

function Peek_String (Self : Gvariant_Type) return UTF8_String

Returns the type string corresponding to the given Type. The result is not nul-terminated; in order to determine its length you must call Glib.Variant.Get_String_Length. To get a nul-terminated string, see Glib.Variant.Dup_String.

Parameters
Self
Return Value

the corresponding type string (not nul-terminated) Since 2.24

Print

function Print
   (Self          : Gvariant;
    Type_Annotate : Boolean) return UTF8_String

Pretty-prints Value in the format understood by Glib.Variant.Parse. The format is described [here][gvariant-text]. If Type_Annotate is True, then type information is included in the output. Since: gtk+ 2.24

Parameters
Self
Type_Annotate

True if type information should be included in the output

Return Value

a newly-allocated string holding the result.

Print_String

function Print_String
   (Self          : Gvariant;
    String        : Glib.String.Gstring;
    Type_Annotate : Boolean) return Glib.String.Gstring

Behaves as Glib.Variant.Print, but operates on a Glib.String.Gstring. If String is non-null then it is appended to and returned. Else, a new empty Glib.String.Gstring is allocated and it is returned. Since: gtk+ 2.24

Parameters
Self
String

a Glib.String.Gstring, or null

Type_Annotate

True if type information should be included in the output

Return Value

a Glib.String.Gstring containing the string

Property_GVariant_Class

type Property_GVariant_Class is new GVariant_Class_Properties.Property;

Ref

function Ref (Self : Gvariant) return Gvariant

Increases the reference count of Value. Since: gtk+ 2.24

Parameters
Self
Return Value

the same Value

Ref_Sink

function Ref_Sink (Self : Gvariant) return Gvariant

Glib.Variant.Gvariant uses a floating reference count system. All functions with names starting with g_variant_new_ return floating references. Calling Glib.Variant.Ref_Sink on a Glib.Variant.Gvariant with a floating reference will convert the floating reference into a full reference. Calling Glib.Variant.Ref_Sink on a non-floating Glib.Variant.Gvariant results in an additional normal reference being added. In other words, if the Value is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference. If the Value is not floating, then this call adds a new normal reference increasing the reference count by one. All calls that result in a Glib.Variant.Gvariant instance being inserted into a container will call Glib.Variant.Ref_Sink on the instance. This means that if the value was just created (and has only its floating reference) then the container will assume sole ownership of the value at that point and the caller will not need to unreference it. This makes certain common styles of programming much easier while still maintaining normal refcounting semantics in situations where values are not floating. Since: gtk+ 2.24

Parameters
Self
Return Value

the same Value

Store

procedure Store (Self : Gvariant; Data : System.Address)

Stores the serialised form of Value at Data. Data should be large enough. See Glib.Variant.Get_Size. The stored data is in machine native byte order but may not be in fully-normalised form if read from an untrusted source. See Glib.Variant.Get_Normal_Form for a solution. As with g_variant_get_data, to be able to deserialise the serialised variant successfully, its type and (if the destination machine might be different) its endianness must also be available. This function is approximately O(n) in the size of Data. Since: gtk+ 2.24

Parameters
Self
Data

the location to store the serialised data at

String_Is_Valid

function String_Is_Valid (Type_String : UTF8_String) return Boolean

Checks if Type_String is a valid GVariant type string. This call is equivalent to calling g_variant_type_string_scan and confirming that the following character is a nul terminator.

Parameters
Type_String

a pointer to any string

Return Value

True if Type_String is exactly one valid type string Since 2.24

Take_Ref

function Take_Ref (Self : Gvariant) return Gvariant

If Value is floating, sink it. Otherwise, do nothing. Typically you want to use Glib.Variant.Ref_Sink in order to automatically do the correct thing with respect to floating or non-floating references, but there is one specific scenario where this function is helpful. The situation where this function is helpful is when creating an API that allows the user to provide a callback function that returns a Glib.Variant.Gvariant. We certainly want to allow the user the flexibility to return a non-floating reference from this callback (for the case where the value that is being returned already exists). At the same time, the style of the Glib.Variant.Gvariant API makes it likely that for newly-created Glib.Variant.Gvariant instances, the user can be saved some typing if they are allowed to return a Glib.Variant.Gvariant with a floating reference. Using this function on the return value of the user's callback allows the user to do whichever is more convenient for them. The caller will alway receives exactly one full reference to the value: either the one that was returned in the first place, or a floating reference that has been converted to a full reference. This function has an odd interaction when combined with Glib.Variant.Ref_Sink running at the same time in another thread on the same Glib.Variant.Gvariant instance. If Glib.Variant.Ref_Sink runs first then the result will be that the floating reference is converted to a hard reference. If Glib.Variant.Take_Ref runs first then the result will be that the floating reference is converted to a hard reference and an additional reference on top of that one is added. It is best to avoid this situation.

Parameters
Self
Return Value

the same Value

Unref

procedure Unref (Self : Gvariant)

Decreases the reference count of Value. When its reference count drops to 0, the memory used by the variant is freed. Since: gtk+ 2.24

Parameters
Self

Value

function Value (Self : Gvariant_Type) return Gvariant_Type

Determines the value type of a dictionary entry type. This function may only be used with a dictionary entry type.

Parameters
Self
Return Value

the value type of the dictionary entry Since 2.24

Simple Types

Tagged Types

Constants

Subprograms

Generic Instantiations