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.App_Launch_Context
    16. Gdk.Cicp_Params
    17. Gdk.Clipboard
    18. Gdk.Color_State
    19. Gdk.Content_Formats
    20. Gdk.Content_Provider
    21. Gdk.Cursor
    22. Gdk.Device
    23. Gdk.Device_Tool
    24. Gdk.Display
    25. Gdk.Display_Manager
    26. Gdk.Dmabuf_Formats
    27. Gdk.Dmabuf_Texture
    28. Gdk.Dmabuf_Texture_Builder
    29. Gdk.Drag
    30. Gdk.Draw_Context
    31. Gdk.Drop
    32. Gdk.Enums
    33. Gdk.Event
    34. Gdk.Event.Button_Event
    35. Gdk.Event.DND_Event
    36. Gdk.Event.Crossing_Event
    37. Gdk.Event.Delete_Event
    38. Gdk.Event.Focus_Event
    39. Gdk.Event.Grab_Broken_Event
    40. Gdk.Event.Key_Event
    41. Gdk.Event.Motion_Event
    42. Gdk.Event.Pad_Event
    43. Gdk.Event.Proximity_Event
    44. Gdk.Event.Scroll_Event
    45. Gdk.Event.Touch_Event
    46. Gdk.Event.Touchpad_Event
    47. Gdk.Frame_Clock
    48. Gdk.Frame_Timings
    49. Gdk.GLContext
    50. Gdk.GLTexture
    51. Gdk.GLTexture_Builder
    52. Gdk.Key_Match
    53. Gdk.Memory_Texture
    54. Gdk.Memory_Texture_Builder
    55. Gdk.Monitor
    56. Gdk.Paintable
    57. Gdk.Pixbuf
    58. Gdk.Pixbuf_Format
    59. Gdk.RGBA
    60. Gdk.Popup_Layout
    61. Gdk.Rectangle
    62. Gdk.Seat
    63. Gdk.Snapshot
    64. Gdk.Surface
    65. Gdk.Texture
    66. Gdk.Toplevel_Layout
    67. Glib
    68. Glib.Action
    69. Glib.Action_Group
    70. Glib.Action_Map
    71. Glib.App_Info
      1. Glib.App_Info.Get_Default_For_Type_Async_User_Data
      2. Glib.App_Info.Get_Default_For_Uri_Scheme_Async_User_Data
      3. Glib.App_Info.Launch_Default_For_Uri_Async_User_Data
    72. Glib.App_Launch_Context
    73. Glib.Application
    74. Glib.Bytes
    75. Glib.Cancellable
      1. Glib.Cancellable.Connect_User_Data
    76. Glib.Convert
    77. Glib.Date_Time
    78. Glib.Enums
    79. Glib.Error
    80. Glib.File_IO_Stream
    81. Glib.Error_Enums
    82. Glib.File_Info
    83. Glib.File_Input_Stream
    84. Glib.GFile
    85. Glib.GSlist
      1. Glib.GSlist.Generic_SList
    86. Glib.File_Output_Stream
    87. Glib.G_Icon
    88. 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
      4. Glib.Generic_Properties.Generic_Internal_Flags_Property
    89. Glib.Glist
      1. Glib.Glist.Generic_List
    90. Glib.Gnodes
      1. Glib.Gnodes.Gnode_Data
    91. Glib.IOChannel
    92. Glib.Graphs
    93. Glib.IO_Stream
    94. Glib.Graphs.Layouts
      1. Glib.Graphs.Layouts.Layered_Layouts
    95. Glib.Input_Stream
    96. Glib.Key_File
    97. Glib.List_Model
    98. Glib.List_Store
    99. Glib.Loadable_Icon
    100. Glib.Main
      1. Glib.Main.Generic_Sources
    101. Glib.Menu
    102. Glib.Menu_Model
    103. Glib.Messages
    104. Glib.Module
    105. Glib.Notification
    106. Glib.Object
      1. Glib.Object.User_Data
      2. Glib.Object.User_Data_Closure
    107. Glib.Option
      1. Glib.Option.Set_Translate_Func_User_Data
    108. Glib.Output_Stream
    109. Glib.Poll
    110. Glib.Properties
    111. Glib.Properties.Creation
    112. Glib.Resource
    113. Glib.Settings
    114. Glib.Settings_Backend
    115. Glib.Settings_Schema
    116. Glib.Settings_Schema_Key
    117. Glib.Settings_Schema_Source
    118. Glib.Simple_Action
    119. Glib.Simple_Action_Group
    120. Glib.Spawn
    121. Glib.String
    122. Glib.Test
    123. Glib.Time_Zone
    124. Glib.Type_Conversion_Hooks
      1. Glib.Type_Conversion_Hooks.Hook_Registrator
    125. Glib.Types
      1. Glib.Types.Implements
    126. Glib.Unicode
    127. Glib.Utils
    128. Glib.Values
    129. Glib.Variant
    130. Glib.XML
    131. Graphene
    132. Graphene.Box
    133. Graphene.Config
    134. Graphene.Euler
    135. Graphene.Frustum
    136. Graphene.Matrix
    137. Graphene.Plane
    138. Graphene.Point
    139. Graphene.Point3d
    140. Graphene.Quad
    141. Graphene.Quaternion
    142. Graphene.Ray
    143. Graphene.Rect
    144. Graphene.Size
    145. Graphene.Sphere
    146. Graphene.Triangle
    147. Graphene.Vec2
    148. Graphene.Vec3
    149. Graphene.Vec4
    150. Gsk
    151. Gsk.Enums
    152. Gsk.Path
    153. Gsk.Path_Builder
    154. Gsk.Path_Measure
    155. Gsk.Path_Point
    156. Gsk.Stroke
    157. Gsk.Transform
    158. Gtk
    159. Gtk.About_Dialog
    160. Gtk.Accessible
    161. Gtk.Accessible_Hyperlink
    162. Gtk.Accessible_Hypertext
    163. Gtk.Accessible_Range
    164. Gtk.Accessible_Text
    165. Gtk.Action_Bar
    166. Gtk.Actionable
    167. Gtk.Activate_Action
    168. Gtk.Adjustment
    169. Gtk.Alert_Dialog
    170. Gtk.Alternative_Trigger
    171. Gtk.Any_Filter
    172. Gtk.Application
    173. Gtk.Application_Window
    174. Gtk.Arguments
    175. Gtk.Aspect_Frame
    176. Gtk.Assistant
      1. Gtk.Assistant.Set_Forward_Page_Func_User_Data
    177. Gtk.Assistant_Page
    178. Gtk.Atcontext
    179. Gtk.Bin_Layout
    180. Gtk.Bitset
    181. Gtk.Bitset_Iter
    182. Gtk.Bookmark_List
    183. Gtk.Bool_Filter
    184. Gtk.Box
    185. Gtk.Box_Layout
    186. Gtk.Buildable
    187. Gtk.Builder
    188. Gtk.Builder_CScope
    189. Gtk.Builder_List_Item_Factory
    190. Gtk.Builder_Scope
    191. Gtk.Button
    192. Gtk.Callback_Action
      1. Gtk.Callback_Action.Callback_Action_With_Data
    193. Gtk.Cclosure_Expression
    194. 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
    195. Gtk.Cell_Area_Box
      1. Gtk.Cell_Area_Box.Set_Cell_Data_Func_User_Data
    196. Gtk.Cell_Area_Context
    197. Gtk.Cell_Editable
    198. Gtk.Cell_Layout
      1. Gtk.Cell_Layout.Set_Cell_Data_Func_User_Data
    199. Gtk.Cell_Renderer
    200. Gtk.Cell_Renderer_Accel
    201. Gtk.Cell_Renderer_Combo
    202. Gtk.Cell_Renderer_Progress
    203. Gtk.Cell_Renderer_Spin
    204. Gtk.Cell_Renderer_Spinner
    205. Gtk.Cell_Renderer_Text
    206. Gtk.Cell_Renderer_Toggle
    207. Gtk.Cell_View
      1. Gtk.Cell_View.Set_Cell_Data_Func_User_Data
    208. Gtk.Center_Box
    209. Gtk.Center_Layout
    210. Gtk.Check_Button
    211. Gtk.Closure_Expression
    212. Gtk.Color_Dialog
    213. Gtk.Color_Dialog_Button
    214. Gtk.Column_View
    215. Gtk.Column_View_Cell
    216. Gtk.Column_View_Column
    217. Gtk.Column_View_Row
    218. Gtk.Column_View_Sorter
    219. Gtk.Constant_Expression
    220. Gtk.Constraint
    221. Gtk.Constraint_Guide
    222. Gtk.Constraint_Layout
    223. Gtk.Constraint_Target
    224. Gtk.Css_Provider
    225. Gtk.Css_Section
    226. Gtk.Custom_Filter
      1. Gtk.Custom_Filter.Custom_Filter_User_Data
    227. Gtk.Custom_Sorter
      1. Gtk.Custom_Sorter.Custom_Sorter_User_Data
    228. Gtk.Dialog
    229. Gtk.Directory_List
    230. Gtk.Drag_Source
    231. Gtk.Drawing_Area
      1. Gtk.Drawing_Area.Set_Draw_Func_User_Data
    232. Gtk.Drop_Down
    233. Gtk.Drop_Target
    234. Gtk.Editable
    235. Gtk.Editable_Label
    236. Gtk.Emoji_Chooser
    237. Gtk.Entry_Buffer
    238. Gtk.Entry_Completion
      1. Gtk.Entry_Completion.Set_Cell_Data_Func_User_Data
      2. Gtk.Entry_Completion.Set_Match_Func_User_Data
    239. Gtk.Enums
    240. Gtk.Event_Controller
    241. Gtk.Event_Controller_Focus
    242. Gtk.Event_Controller_Key
    243. Gtk.Event_Controller_Legacy
    244. Gtk.Event_Controller_Motion
    245. Gtk.Event_Controller_Scroll
    246. Gtk.Every_Filter
    247. Gtk.Expander
    248. Gtk.Expression
      1. Gtk.Expression.Watch_User_Data
    249. Gtk.Expression_Watch
    250. Gtk.File_Dialog
    251. Gtk.File_Filter
    252. Gtk.File_Launcher
    253. Gtk.Filter
    254. Gtk.Filter_List_Model
    255. Gtk.Fixed
    256. Gtk.Fixed_Layout
    257. Gtk.Flatten_List_Model
    258. 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
    259. Gtk.Flow_Box_Child
    260. Gtk.Font_Dialog
    261. Gtk.Font_Dialog_Button
    262. Gtk.Frame
    263. Gtk.GLArea
    264. Gtk.GRange
    265. Gtk.GEntry
    266. Gtk.Gesture
    267. Gtk.Gesture_Click
    268. Gtk.Gesture_Drag
    269. Gtk.Gesture_Long_Press
    270. Gtk.Gesture_Pan
    271. Gtk.Gesture_Rotate
    272. Gtk.Gesture_Single
    273. Gtk.Gesture_Stylus
    274. Gtk.Gesture_Swipe
    275. Gtk.Gesture_Zoom
    276. Gtk.Graphics_Offload
    277. Gtk.Grid
    278. Gtk.Grid_Layout
    279. Gtk.Grid_View
    280. Gtk.IM_Context
    281. Gtk.IM_Context_Simple
    282. Gtk.IM_Multi_Context
    283. Gtk.Header_Bar
    284. Gtk.Icon_Paintable
    285. Gtk.Icon_Theme
    286. Gtk.Image
    287. Gtk.Info_Bar
    288. Gtk.Inscription
    289. Gtk.Keyval_Trigger
    290. Gtk.Label
    291. Gtk.Layout_Manager
    292. Gtk.Level_Bar
    293. Gtk.Link_Button
    294. Gtk.List_Base
    295. 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
    296. Gtk.List_Box_Row
    297. Gtk.List_Item
    298. Gtk.List_Item_Factory
    299. 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
    300. Gtk.List_View
    301. Gtk.Main
    302. Gtk.Map_List_Model
      1. Gtk.Map_List_Model.Map_List_Model_User_Data
    303. Gtk.Menu_Button
      1. Gtk.Menu_Button.Set_Create_Popup_Func_User_Data
    304. Gtk.Message_Dialog
    305. Gtk.Mnemonic_Action
    306. Gtk.Mnemonic_Trigger
    307. Gtk.Multi_Filter
    308. Gtk.Multi_Selection
    309. Gtk.Multi_Sorter
    310. Gtk.Named_Action
    311. Gtk.Native
    312. Gtk.Native_Dialog
    313. Gtk.Never_Trigger
    314. Gtk.No_Selection
    315. Gtk.Notebook
    316. Gtk.Notebook_Page
    317. Gtk.Nothing_Action
    318. Gtk.Numeric_Sorter
    319. Gtk.Object_Expression
    320. Gtk.Orientable
    321. Gtk.Overlay
    322. Gtk.Overlay_Layout
    323. Gtk.Page_Setup
    324. Gtk.Page_Setup_Unix_Dialog
    325. Gtk.Paned
    326. Gtk.Paper_Size
    327. Gtk.Password_Entry
    328. Gtk.Password_Entry_Buffer
    329. Gtk.Picture
    330. Gtk.Popover
    331. Gtk.Popover_Menu
    332. Gtk.Popover_Menu_Bar
    333. Gtk.Print_Context
    334. Gtk.Print_Dialog
    335. Gtk.Print_Operation
    336. Gtk.Print_Operation_Preview
    337. Gtk.Print_Settings
      1. Gtk.Print_Settings.Foreach_User_Data
    338. Gtk.Print_Setup
    339. Gtk.Progress_Bar
    340. Gtk.Property_Expression
    341. Gtk.Recent_Info
    342. Gtk.Recent_Manager
    343. Gtk.Revealer
    344. Gtk.Root
    345. Gtk.Scale
      1. Gtk.Scale.Set_Format_Value_Func_User_Data
    346. Gtk.Scale_Button
    347. Gtk.Scroll_Info
    348. Gtk.Scrollable
    349. Gtk.Scrollbar
    350. Gtk.Scrolled_Window
    351. Gtk.Search_Bar
    352. Gtk.Search_Entry
    353. Gtk.Section_Model
    354. Gtk.Selection_Filter_Model
    355. Gtk.Selection_Model
    356. Gtk.Separator
    357. Gtk.Settings
    358. Gtk.Shortcut
    359. Gtk.Shortcut_Action
    360. Gtk.Shortcut_Controller
    361. Gtk.Shortcut_Manager
    362. Gtk.Shortcut_Trigger
    363. Gtk.Signal_Action
    364. Gtk.Signal_List_Item_Factory
    365. Gtk.Single_Selection
    366. Gtk.Size_Group
    367. Gtk.Slice_List_Model
    368. Gtk.Snapshot
    369. Gtk.Sort_List_Model
    370. Gtk.Sorter
    371. Gtk.Spin_Button
    372. Gtk.Spinner
    373. Gtk.Stack
    374. Gtk.Stack_Page
    375. Gtk.Stack_Sidebar
    376. Gtk.Stack_Switcher
    377. Gtk.String_Filter
    378. Gtk.String_List
    379. Gtk.String_Object
    380. Gtk.String_Sorter
    381. Gtk.Style_Context
    382. Gtk.Style_Provider
    383. Gtk.Switch
    384. Gtk.Symbolic_Paintable
    385. Gtk.Text_Buffer
    386. Gtk.Text_Child_Anchor
    387. Gtk.Text_Iter
      1. Gtk.Text_Iter.Forward_Find_Char_User_Data
    388. Gtk.Text_Mark
    389. Gtk.Text_Tag
    390. Gtk.Text_Tag_Table
      1. Gtk.Text_Tag_Table.Foreach_User_Data
    391. Gtk.Text_View
    392. Gtk.Toggle_Button
    393. Gtk.Tooltip
    394. Gtk.Tree_Drag_Dest
    395. Gtk.Tree_Drag_Source
    396. Gtk.Tree_Expander
    397. Gtk.Tree_List_Model
      1. Gtk.Tree_List_Model.Gtk_Tree_List_Model_User_Data
    398. Gtk.Tree_List_Row
    399. Gtk.Tree_List_Row_Sorter
    400. Gtk.Tree_Model
      1. Gtk.Tree_Model.Foreach_User_Data
    401. 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
    402. 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
    403. Gtk.Tree_Row_Reference
    404. Gtk.Tree_Selection
      1. Gtk.Tree_Selection.Selected_Foreach_User_Data
      2. Gtk.Tree_Selection.Set_Select_Function_User_Data
    405. Gtk.Tree_Sortable
      1. Gtk.Tree_Sortable.Set_Default_Sort_Func_User_Data
      2. Gtk.Tree_Sortable.Set_Sort_Func_User_Data
    406. 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
    407. 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_Row_Separator_Func_User_Data
      5. Gtk.Tree_View.Set_Search_Equal_Func_User_Data
    408. Gtk.Tree_View_Column
      1. Gtk.Tree_View_Column.Set_Cell_Data_Func_User_Data
    409. Gtk.Try_Expression
    410. Gtk.Uri_Launcher
    411. Gtk.Viewport
    412. Gtk.Volume_Button
    413. Gtk.Widget
      1. Gtk.Widget.Add_Tick_Callback_User_Data
    414. Gtk.Window
    415. Gtkada
    416. Gtkada.Bindings
    417. Gtkada.C
      1. Gtkada.C.Unbounded_Arrays
    418. Gtkada.Intl
    419. Gtkada.Types
    420. Pango
    421. Pango.Attributes
    422. Pango.Cairo
    423. Pango.Color
    424. Pango.Context
    425. Pango.Coverage
    426. Pango.Enums
    427. Pango.Font
    428. Pango.Font_Face
    429. Pango.Font_Family
    430. Pango.Font_Map
    431. Pango.Font_Metrics
    432. Pango.Fontset
      1. Pango.Fontset.Foreach_User_Data
    433. Pango.Language
    434. Pango.Layout
    435. Pango.Matrix
    436. Pango.Tabs
  2. Tagged Types

    1. Gdk.App_Launch_Context.Gdk_App_Launch_Context_Record
    2. Gdk.Cicp_Params.Gdk_Cicp_Params_Record
    3. Gdk.Clipboard.Gdk_Clipboard_Record
    4. Gdk.Color_State.Gdk_Color_State
    5. Gdk.Content_Formats.Gdk_Content_Formats
    6. Gdk.Content_Provider.Gdk_Content_Provider_Record
    7. Gdk.Cursor.Gdk_Cursor_Record
    8. Gdk.Device.Gdk_Device_Record
    9. Gdk.Device_Tool.Gdk_Device_Tool_Record
    10. Gdk.Display.Gdk_Display_Record
    11. Gdk.Display_Manager.Gdk_Display_Manager_Record
    12. Gdk.Dmabuf_Formats.Gdk_Dmabuf_Formats
    13. Gdk.Dmabuf_Texture.Gdk_Dmabuf_Texture_Record
    14. Gdk.Dmabuf_Texture_Builder.Gdk_Dmabuf_Texture_Builder_Record
    15. Gdk.Drag.Gdk_Drag_Record
    16. Gdk.Draw_Context.Gdk_Draw_Context_Record
    17. Gdk.Event.Button_Event.Gdk_Button_Event
    18. Gdk.Event.DND_Event.Gdk_DND_Event
    19. Gdk.Event.Crossing_Event.Gdk_Crossing_Event
    20. Gdk.Event.Delete_Event.Gdk_Delete_Event
    21. Gdk.Event.Focus_Event.Gdk_Focus_Event
    22. Gdk.Drop.Gdk_Drop_Record
    23. Gdk.Event.Gdk_Event
    24. Gdk.Event.Grab_Broken_Event.Gdk_Grab_Broken_Event
    25. Gdk.Event.Key_Event.Gdk_Key_Event
    26. Gdk.Event.Motion_Event.Gdk_Motion_Event
    27. Gdk.Event.Pad_Event.Gdk_Pad_Event
    28. Gdk.Event.Proximity_Event.Gdk_Proximity_Event
    29. Gdk.Event.Scroll_Event.Gdk_Scroll_Event
    30. Gdk.Event.Touch_Event.Gdk_Touch_Event
    31. Gdk.Event.Touchpad_Event.Gdk_Touchpad_Event
    32. Gdk.Frame_Clock.Gdk_Frame_Clock_Record
    33. Gdk.Frame_Timings.Gdk_Frame_Timings
    34. Gdk.GLContext.Gdk_GLContext_Record
    35. Gdk.GLTexture.Gdk_Gltexture_Record
    36. Gdk.GLTexture_Builder.Gdk_Gltexture_Builder_Record
    37. Gdk.Memory_Texture.Gdk_Memory_Texture_Record
    38. Gdk.Memory_Texture_Builder.Gdk_Memory_Texture_Builder_Record
    39. Gdk.Monitor.Gdk_Monitor_Record
    40. Gdk.Pixbuf.Gdk_Pixbuf_Record
    41. Gdk.Popup_Layout.Gdk_Popup_Layout
    42. Gdk.Seat.Gdk_Seat_Record
    43. Gdk.Snapshot.Gdk_Snapshot_Record
    44. Gdk.Surface.Gdk_Surface_Record
    45. Gdk.Texture.Gdk_Texture_Record
    46. Glib.App_Launch_Context.Gapp_Launch_Context_Record
    47. Glib.Application.Gapplication_Command_Line_Record
    48. Glib.Application.Gapplication_Record
    49. Glib.Bytes.Gbytes
    50. Gdk.Toplevel_Layout.Gdk_Toplevel_Layout
    51. Glib.C_Boxed
    52. Glib.Cancellable.Gcancellable_Record
    53. Glib.File_IO_Stream.Gfile_Iostream_Record
    54. Glib.Date_Time.Gdate_Time
    55. Glib.File_Info.Gfile_Info_Record
    56. Glib.File_Input_Stream.Gfile_Input_Stream_Record
    57. Glib.File_Output_Stream.Gfile_Output_Stream_Record
    58. Glib.Graphs.Layouts.Base_Dummy_Vertex
    59. Glib.Graphs.Edge
    60. Glib.IO_Stream.Giostream_Record
    61. Glib.Graphs.Vertex
    62. Glib.Input_Stream.Ginput_Stream_Record
    63. Glib.List_Store.Glist_Store_Record
    64. Glib.Menu.Gmenu_Item_Record
    65. Glib.Menu.Gmenu_Record
    66. Glib.Menu_Model.Gmenu_Attribute_Iter_Record
    67. Glib.Menu_Model.Gmenu_Link_Iter_Record
    68. Glib.Menu_Model.Gmenu_Model_Record
    69. Glib.Object.GObject_Record
    70. Glib.Notification.Gnotification_Record
    71. Glib.Object.G_Binding_Record
    72. Glib.Option.Goption_Context
    73. Glib.Output_Stream.Goutput_Stream_Record
    74. Glib.Resource.Gresource
    75. Glib.Settings.Gsettings_Record
    76. Glib.Settings_Backend.Gsettings_Backend_Record
    77. Glib.Settings_Schema.Gsettings_Schema
    78. Glib.Settings_Schema_Key.Gsettings_Schema_Key
    79. Glib.Settings_Schema_Source.Gsettings_Schema_Source
    80. Glib.Simple_Action.Gsimple_Action_Record
    81. Glib.Simple_Action_Group.Gsimple_Action_Group_Record
    82. Glib.Time_Zone.Gtime_Zone
    83. Glib.Variant.Gvariant
    84. Gsk.Path.Gsk_Path
    85. Gsk.Path_Builder.Gsk_Path_Builder
    86. Gsk.Path_Measure.Gsk_Path_Measure
    87. Gsk.Stroke.Gsk_Stroke
    88. Gsk.Transform.Gsk_Transform
    89. Gtk.About_Dialog.Gtk_About_Dialog_Record
    90. Gtk.Accessible_Hyperlink.Gtk_Accessible_Hyperlink_Record
    91. Gtk.Action_Bar.Gtk_Action_Bar_Record
    92. Gtk.Activate_Action.Gtk_Activate_Action_Record
    93. Gtk.Adjustment.Gtk_Adjustment_Record
    94. Gtk.Alert_Dialog.Gtk_Alert_Dialog_Record
    95. Gtk.Alternative_Trigger.Gtk_Alternative_Trigger_Record
    96. Gtk.Any_Filter.Gtk_Any_Filter_Record
    97. Gtk.Application.Gtk_Application_Record
    98. Gtk.Application_Window.Gtk_Application_Window_Record
    99. Gtk.Aspect_Frame.Gtk_Aspect_Frame_Record
    100. Gtk.Assistant.Gtk_Assistant_Record
    101. Gtk.Assistant_Page.Gtk_Assistant_Page_Record
    102. Gtk.Atcontext.Gtk_Atcontext_Record
    103. Gtk.Bin_Layout.Gtk_Bin_Layout_Record
    104. Gtk.Bitset.Gtk_Bitset
    105. Gtk.Bookmark_List.Gtk_Bookmark_List_Record
    106. Gtk.Bool_Filter.Gtk_Bool_Filter_Record
    107. Gtk.Box.Gtk_Box_Record
    108. Gtk.Box_Layout.Gtk_Box_Layout_Record
    109. Gtk.Builder.Gtk_Builder_Record
    110. Gtk.Builder_CScope.Gtk_Builder_C_Scope_Record
    111. Gtk.Builder_List_Item_Factory.Gtk_Builder_List_Item_Factory_Record
    112. Gtk.Button.Gtk_Button_Record
    113. Gtk.Callback_Action.Gtk_Callback_Action_Record
    114. Gtk.Cclosure_Expression.Gtk_Cclosure_Expression_Record
    115. Gtk.Cell_Area.Gtk_Cell_Area_Record
    116. Gtk.Cell_Area_Box.Gtk_Cell_Area_Box_Record
    117. Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record
    118. Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record
    119. Gtk.Cell_Renderer_Accel.Gtk_Cell_Renderer_Accel_Record
    120. Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo_Record
    121. Gtk.Cell_Renderer_Progress.Gtk_Cell_Renderer_Progress_Record
    122. Gtk.Cell_Renderer_Spin.Gtk_Cell_Renderer_Spin_Record
    123. Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner_Record
    124. Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record
    125. Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle_Record
    126. Gtk.Cell_View.Gtk_Cell_View_Record
    127. Gtk.Center_Box.Gtk_Center_Box_Record
    128. Gtk.Center_Layout.Gtk_Center_Layout_Record
    129. Gtk.Check_Button.Gtk_Check_Button_Record
    130. Gtk.Closure_Expression.Gtk_Closure_Expression_Record
    131. Gtk.Color_Dialog.Gtk_Color_Dialog_Record
    132. Gtk.Color_Dialog_Button.Gtk_Color_Dialog_Button_Record
    133. Gtk.Column_View.Gtk_Column_View_Record
    134. Gtk.Column_View_Cell.Gtk_Column_View_Cell_Record
    135. Gtk.Column_View_Column.Gtk_Column_View_Column_Record
    136. Gtk.Column_View_Row.Gtk_Column_View_Row_Record
    137. Gtk.Column_View_Sorter.Gtk_Column_View_Sorter_Record
    138. Gtk.Constant_Expression.Gtk_Constant_Expression_Record
    139. Gtk.Constraint.Gtk_Constraint_Record
    140. Gtk.Constraint_Guide.Gtk_Constraint_Guide_Record
    141. Gtk.Constraint_Layout.Gtk_Constraint_Layout_Child_Record
    142. Gtk.Constraint_Layout.Gtk_Constraint_Layout_Record
    143. Gtk.Css_Provider.Gtk_Css_Provider_Record
    144. Gtk.Css_Section.Gtk_Css_Section
    145. Gtk.Custom_Filter.Gtk_Custom_Filter_Record
    146. Gtk.Custom_Sorter.Gtk_Custom_Sorter_Record
    147. Gtk.Dialog.Gtk_Dialog_Record
    148. Gtk.Directory_List.Gtk_Directory_List_Record
    149. Gtk.Drag_Source.Gtk_Drag_Source_Record
    150. Gtk.Drawing_Area.Gtk_Drawing_Area_Record
    151. Gtk.Drop_Down.Gtk_Drop_Down_Record
    152. Gtk.Drop_Target.Gtk_Drop_Target_Record
    153. Gtk.Editable_Label.Gtk_Editable_Label_Record
    154. Gtk.Emoji_Chooser.Gtk_Emoji_Chooser_Record
    155. Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record
    156. Gtk.Entry_Completion.Gtk_Entry_Completion_Record
    157. Gtk.Event_Controller.Gtk_Event_Controller_Record
    158. Gtk.Event_Controller_Focus.Gtk_Event_Controller_Focus_Record
    159. Gtk.Event_Controller_Key.Gtk_Event_Controller_Key_Record
    160. Gtk.Event_Controller_Legacy.Gtk_Event_Controller_Legacy_Record
    161. Gtk.Event_Controller_Motion.Gtk_Event_Controller_Motion_Record
    162. Gtk.Event_Controller_Scroll.Gtk_Event_Controller_Scroll_Record
    163. Gtk.Every_Filter.Gtk_Every_Filter_Record
    164. Gtk.Expander.Gtk_Expander_Record
    165. Gtk.Expression.Dummy_Gtk_Expression_Record
    166. Gtk.Expression.Gtk_Expression_Record
    167. Gtk.Expression_Watch.Gtk_Expression_Watch
    168. Gtk.File_Dialog.Gtk_File_Dialog_Record
    169. Gtk.File_Filter.Gtk_File_Filter_Record
    170. Gtk.File_Launcher.Gtk_File_Launcher_Record
    171. Gtk.Filter.Gtk_Filter_Record
    172. Gtk.Filter_List_Model.Gtk_Filter_List_Model_Record
    173. Gtk.Fixed.Gtk_Fixed_Record
    174. Gtk.Fixed_Layout.Gtk_Fixed_Layout_Child_Record
    175. Gtk.Fixed_Layout.Gtk_Fixed_Layout_Record
    176. Gtk.Flatten_List_Model.Gtk_Flatten_List_Model_Record
    177. Gtk.Flow_Box.Gtk_Flow_Box_Record
    178. Gtk.Flow_Box_Child.Gtk_Flow_Box_Child_Record
    179. Gtk.Font_Dialog.Gtk_Font_Dialog_Record
    180. Gtk.Font_Dialog_Button.Gtk_Font_Dialog_Button_Record
    181. Gtk.Frame.Gtk_Frame_Record
    182. Gtk.GLArea.Gtk_GLArea_Record
    183. Gtk.GRange.Gtk_Range_Record
    184. Gtk.GEntry.Gtk_Entry_Record
    185. Gtk.Gesture.Gtk_Gesture_Record
    186. Gtk.Gesture_Click.Gtk_Gesture_Click_Record
    187. Gtk.Gesture_Drag.Gtk_Gesture_Drag_Record
    188. Gtk.Gesture_Long_Press.Gtk_Gesture_Long_Press_Record
    189. Gtk.Gesture_Pan.Gtk_Gesture_Pan_Record
    190. Gtk.Gesture_Rotate.Gtk_Gesture_Rotate_Record
    191. Gtk.Gesture_Single.Gtk_Gesture_Single_Record
    192. Gtk.Gesture_Stylus.Gtk_Gesture_Stylus_Record
    193. Gtk.Gesture_Swipe.Gtk_Gesture_Swipe_Record
    194. Gtk.Gesture_Zoom.Gtk_Gesture_Zoom_Record
    195. Gtk.Graphics_Offload.Gtk_Graphics_Offload_Record
    196. Gtk.Grid.Gtk_Grid_Record
    197. Gtk.Grid_Layout.Gtk_Grid_Layout_Child_Record
    198. Gtk.Grid_Layout.Gtk_Grid_Layout_Record
    199. Gtk.Grid_View.Gtk_Grid_View_Record
    200. Gtk.IM_Context.Gtk_IM_Context_Record
    201. Gtk.IM_Context_Simple.Gtk_IM_Context_Simple_Record
    202. Gtk.IM_Multi_Context.Gtk_IM_Multi_Context_Record
    203. Gtk.Header_Bar.Gtk_Header_Bar_Record
    204. Gtk.Icon_Paintable.Gtk_Icon_Paintable_Record
    205. Gtk.Icon_Theme.Gtk_Icon_Theme_Record
    206. Gtk.Image.Gtk_Image_Record
    207. Gtk.Info_Bar.Gtk_Info_Bar_Record
    208. Gtk.Inscription.Gtk_Inscription_Record
    209. Gtk.Keyval_Trigger.Gtk_Keyval_Trigger_Record
    210. Gtk.Label.Gtk_Label_Record
    211. Gtk.Layout_Manager.Gtk_Layout_Child_Record
    212. Gtk.Layout_Manager.Gtk_Layout_Manager_Record
    213. Gtk.Level_Bar.Gtk_Level_Bar_Record
    214. Gtk.Link_Button.Gtk_Link_Button_Record
    215. Gtk.List_Base.Gtk_List_Base_Record
    216. Gtk.List_Box.Gtk_List_Box_Record
    217. Gtk.List_Box_Row.Gtk_List_Box_Row_Record
    218. Gtk.List_Item.Gtk_List_Item_Record
    219. Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record
    220. Gtk.List_Store.Gtk_List_Store_Record
    221. Gtk.List_View.Gtk_List_View_Record
    222. Gtk.Map_List_Model.Gtk_Map_List_Model_Record
    223. Gtk.Menu_Button.Gtk_Menu_Button_Record
    224. Gtk.Message_Dialog.Gtk_Message_Dialog_Record
    225. Gtk.Mnemonic_Action.Gtk_Mnemonic_Action_Record
    226. Gtk.Mnemonic_Trigger.Gtk_Mnemonic_Trigger_Record
    227. Gtk.Multi_Filter.Gtk_Multi_Filter_Record
    228. Gtk.Multi_Selection.Gtk_Multi_Selection_Record
    229. Gtk.Multi_Sorter.Gtk_Multi_Sorter_Record
    230. Gtk.Named_Action.Gtk_Named_Action_Record
    231. Gtk.Native_Dialog.Gtk_Native_Dialog_Record
    232. Gtk.Never_Trigger.Gtk_Never_Trigger_Record
    233. Gtk.No_Selection.Gtk_No_Selection_Record
    234. Gtk.Notebook.Gtk_Notebook_Record
    235. Gtk.Notebook_Page.Gtk_Notebook_Page_Record
    236. Gtk.Nothing_Action.Gtk_Nothing_Action_Record
    237. Gtk.Numeric_Sorter.Gtk_Numeric_Sorter_Record
    238. Gtk.Object_Expression.Gtk_Object_Expression_Record
    239. Gtk.Overlay.Gtk_Overlay_Record
    240. Gtk.Overlay_Layout.Gtk_Overlay_Layout_Child_Record
    241. Gtk.Overlay_Layout.Gtk_Overlay_Layout_Record
    242. Gtk.Page_Setup.Gtk_Page_Setup_Record
    243. Gtk.Page_Setup_Unix_Dialog.Gtk_Page_Setup_Unix_Dialog_Record
    244. Gtk.Paned.Gtk_Paned_Record
    245. Gtk.Paper_Size.Gtk_Paper_Size
    246. Gtk.Password_Entry.Gtk_Password_Entry_Record
    247. Gtk.Password_Entry_Buffer.Gtk_Password_Entry_Buffer_Record
    248. Gtk.Picture.Gtk_Picture_Record
    249. Gtk.Popover.Gtk_Popover_Record
    250. Gtk.Popover_Menu.Gtk_Popover_Menu_Record
    251. Gtk.Popover_Menu_Bar.Gtk_Popover_Menu_Bar_Record
    252. Gtk.Print_Context.Gtk_Print_Context_Record
    253. Gtk.Print_Dialog.Gtk_Print_Dialog_Record
    254. Gtk.Print_Operation.Gtk_Print_Operation_Record
    255. Gtk.Print_Settings.Gtk_Print_Settings_Record
    256. Gtk.Print_Setup.Gtk_Print_Setup
    257. Gtk.Progress_Bar.Gtk_Progress_Bar_Record
    258. Gtk.Property_Expression.Gtk_Property_Expression_Record
    259. Gtk.Recent_Info.Gtk_Recent_Info
    260. Gtk.Recent_Manager.Gtk_Recent_Manager_Record
    261. Gtk.Revealer.Gtk_Revealer_Record
    262. Gtk.Scale.Gtk_Scale_Record
    263. Gtk.Scale_Button.Gtk_Scale_Button_Record
    264. Gtk.Scroll_Info.Gtk_Scroll_Info
    265. Gtk.Scrollbar.Gtk_Scrollbar_Record
    266. Gtk.Scrolled_Window.Gtk_Scrolled_Window_Record
    267. Gtk.Search_Bar.Gtk_Search_Bar_Record
    268. Gtk.Search_Entry.Gtk_Search_Entry_Record
    269. Gtk.Selection_Filter_Model.Gtk_Selection_Filter_Model_Record
    270. Gtk.Separator.Gtk_Separator_Record
    271. Gtk.Settings.Gtk_Settings_Record
    272. Gtk.Shortcut.Gtk_Shortcut_Record
    273. Gtk.Shortcut_Action.Gtk_Shortcut_Action_Record
    274. Gtk.Shortcut_Controller.Gtk_Shortcut_Controller_Record
    275. Gtk.Shortcut_Trigger.Gtk_Shortcut_Trigger_Record
    276. Gtk.Signal_Action.Gtk_Signal_Action_Record
    277. Gtk.Signal_List_Item_Factory.Gtk_Signal_List_Item_Factory_Record
    278. Gtk.Single_Selection.Gtk_Single_Selection_Record
    279. Gtk.Size_Group.Gtk_Size_Group_Record
    280. Gtk.Slice_List_Model.Gtk_Slice_List_Model_Record
    281. Gtk.Snapshot.Gtk_Snapshot_Record
    282. Gtk.Sort_List_Model.Gtk_Sort_List_Model_Record
    283. Gtk.Sorter.Gtk_Sorter_Record
    284. Gtk.Spin_Button.Gtk_Spin_Button_Record
    285. Gtk.Spinner.Gtk_Spinner_Record
    286. Gtk.Stack.Gtk_Stack_Record
    287. Gtk.Stack_Page.Gtk_Stack_Page_Record
    288. Gtk.Stack_Sidebar.Gtk_Stack_Sidebar_Record
    289. Gtk.Stack_Switcher.Gtk_Stack_Switcher_Record
    290. Gtk.String_Filter.Gtk_String_Filter_Record
    291. Gtk.String_List.Gtk_String_List_Record
    292. Gtk.String_Object.Gtk_String_Object_Record
    293. Gtk.String_Sorter.Gtk_String_Sorter_Record
    294. Gtk.Style_Context.Gtk_Style_Context_Record
    295. Gtk.Switch.Gtk_Switch_Record
    296. Gtk.Text_Buffer.Gtk_Text_Buffer_Record
    297. Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record
    298. Gtk.Text_Mark.Gtk_Text_Mark_Record
    299. Gtk.Text_Tag.Gtk_Text_Tag_Record
    300. Gtk.Text_Tag_Table.Gtk_Text_Tag_Table_Record
    301. Gtk.Text_View.Gtk_Text_View_Record
    302. Gtk.Toggle_Button.Gtk_Toggle_Button_Record
    303. Gtk.Tooltip.Gtk_Tooltip_Record
    304. Gtk.Tree_Expander.Gtk_Tree_Expander_Record
    305. Gtk.Tree_List_Model.Gtk_Tree_List_Model_Record
    306. Gtk.Tree_List_Row.Gtk_Tree_List_Row_Record
    307. Gtk.Tree_List_Row_Sorter.Gtk_Tree_List_Row_Sorter_Record
    308. Gtk.Tree_Model.Gtk_Root_Tree_Model_Record
    309. Gtk.Tree_Model.Gtk_Tree_Path
    310. Gtk.Tree_Model_Filter.Gtk_Tree_Model_Filter_Record
    311. Gtk.Tree_Model_Sort.Gtk_Tree_Model_Sort_Record
    312. Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference
    313. Gtk.Tree_Selection.Gtk_Tree_Selection_Record
    314. Gtk.Tree_Store.Gtk_Tree_Store_Record
    315. Gtk.Tree_View.Gtk_Tree_View_Record
    316. Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record
    317. Gtk.Try_Expression.Gtk_Try_Expression_Record
    318. Gtk.Uri_Launcher.Gtk_Uri_Launcher_Record
    319. Gtk.Viewport.Gtk_Viewport_Record
    320. Gtk.Volume_Button.Gtk_Volume_Button_Record
    321. Gtk.Widget.Gtk_Widget_Record
    322. Gtk.Window.Gtk_Window_Group_Record
    323. Gtk.Window.Gtk_Window_Record
    324. Pango.Attributes.Pango_Attr_List
    325. Pango.Context.Pango_Context_Record
    326. Pango.Coverage.Pango_Coverage_Record
    327. Pango.Font.Pango_Font_Record
    328. Pango.Font_Face.Pango_Font_Face_Record
    329. Pango.Font_Family.Pango_Font_Family_Record
    330. Pango.Font_Map.Pango_Font_Map_Record
    331. Pango.Font_Metrics.Pango_Font_Metrics
    332. Pango.Fontset.Pango_Fontset_Record
    333. Pango.Language.Pango_Language
    334. Pango.Layout.Pango_Layout_Iter
    335. Pango.Layout.Pango_Layout_Record
    336. Pango.Tabs.Pango_Tab_Array

Gtk.Widget

Description

The base class for all widgets.

It manages the widget lifecycle, layout, states and style.

### Height-for-width Geometry Management

GTK uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height). The most common example is a label that reflows to fill up the available width, wraps to fewer lines, and therefore needs less height.

Height-for-width geometry management is implemented in GTK by way of two virtual methods:

There are some important things to keep in mind when implementing height-for-width and when using it in widget implementations.

If you implement a direct GtkWidget subclass that supports height-for-width or width-for-height geometry management for itself or its child widgets, the [vfuncGtk.Widget.get_request_mode] virtual function must be implemented as well and return the widget's preferred request mode. The default implementation of this virtual function returns Gtk.Enums.Constant_Size, which means that the widget will only ever get -1 passed as the for_size value to its [vfuncGtk.Widget.measure] implementation.

The geometry management system will query a widget hierarchy in only one orientation at a time. When widgets are initially queried for their minimum sizes it is generally done in two initial passes in the [enumGtk.SizeRequestMode] chosen by the toplevel.

For example, when queried in the normal Gtk.Enums.Height_For_Width mode:

First, the default minimum and natural width for each widget in the interface will be computed using [methodGtk.Widget.measure] with an orientation of Gtk.Enums.Orientation_Horizontal and a for_size of -1. Because the preferred widths for each widget depend on the preferred widths of their children, this information propagates up the hierarchy, and finally a minimum and natural width is determined for the entire toplevel. Next, the toplevel will use the minimum width to query for the minimum height contextual to that width using [methodGtk.Widget.measure] with an orientation of Gtk.Enums.Orientation_Vertical and a for_size of the just computed width. This will also be a highly recursive operation. The minimum height for the minimum width is normally used to set the minimum size constraint on the toplevel.

After the toplevel window has initially requested its size in both dimensions it can go on to allocate itself a reasonable size (or a size previously specified with [methodGtk.Window.set_default_size]). During the recursive allocation process it's important to note that request cycles will be recursively executed while widgets allocate their children. Each widget, once allocated a size, will go on to first share the space in one orientation among its children and then request each child's height for its target allocated width or its width for allocated height, depending. In this way a widget will typically be requested its size a number of times before actually being allocated a size. The size a widget is finally allocated can of course differ from the size it has requested. For this reason, GtkWidget caches a small number of results to avoid re-querying for the same sizes in one allocation cycle.

If a widget does move content around to intelligently use up the allocated size then it must support the request in both GtkSizeRequestModes even if the widget in question only trades sizes in a single orientation.

For instance, a [classGtk.Label] that does height-for-width word wrapping will not expect to have [vfuncGtk.Widget.measure] with an orientation of Gtk.Enums.Orientation_Vertical called because that call is specific to a width-for-height request. In this case the label must return the height required for its own minimum possible width. By following this rule any widget that handles height-for-width or width-for-height requests will always be allocated at least enough space to fit its own content.

Here are some examples of how a Gtk.Enums.Height_For_Width widget generally deals with width-for-height requests:

orientation, int for_size, int *minimum_size, int *natural_size, int
*minimum_baseline, int *natural_baseline) { if (orientation ==
GTK_ORIENTATION_HORIZONTAL) { // Calculate minimum and natural width } else
// VERTICAL { if (i_am_in_height_for_width_mode) { int min_width, dummy;

// First, get the minimum width of our widget GTK_WIDGET_GET_CLASS
(widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, &min_width,
&dummy, &dummy, &dummy);

// Now use the minimum width to retrieve the minimum and natural height to
display // that width. GTK_WIDGET_GET_CLASS (widget)->measure (widget,
GTK_ORIENTATION_VERTICAL, min_width, minimum_size, natural_size, &dummy,
&dummy); } else { // ... some widgets do both. } } } ```

Often a widget needs to get its own request during size request or
allocation. For example, when computing height it may need to also compute
width. Or when deciding how to use an allocation, the widget may need to
know its natural size. In these cases, the widget should be careful to call
its virtual methods directly, like in the code example above.

It will not work to use the wrapper function [methodGtk.Widget.measure]
inside your own [vfuncGtk.Widget.size_allocate] implementation. These
return a request adjusted by [classGtk.SizeGroup], the widget's align and
expand flags, as well as its CSS style.

If a widget used the wrappers inside its virtual method implementations,
then the adjustments (such as widget margins) would be applied twice. GTK
therefore does not allow this and will warn if you try to do it.

Of course if you are getting the size request for another widget, such as
a child widget, you must use [methodGtk.Widget.measure]; otherwise, you
would not properly consider widget margins, [classGtk.SizeGroup], and so
forth.

GTK also supports baseline vertical alignment of widgets. This means that
widgets are positioned such that the typographical baseline of widgets in
the same row are aligned. This happens if a widget supports baselines, has
a vertical alignment using baselines, and is inside a widget that supports
baselines and has a natural "row" that it aligns to the baseline, or a
baseline assigned to it by the grandparent.

Baseline alignment support for a widget is also done by the
[vfuncGtk.Widget.measure] virtual function. It allows you to report both a
minimum and natural size.

If a widget ends up baseline aligned it will be allocated all the space in
the parent as if it was Gtk.Widget.Align_Fill, but the selected baseline
can be found via [methodGtk.Widget.get_baseline]. If the baseline has a
value other than -1 you need to align the widget such that the baseline
appears at the position.

### GtkWidget as GtkBuildable

The `GtkWidget` implementation of the `GtkBuildable` interface supports
various custom elements to specify additional aspects of widgets that are
not directly expressed as properties.

If the widget uses a [classGtk.LayoutManager], `GtkWidget` supports a
custom `<layout>` element, used to define layout properties:

```xml <object class="GtkGrid" id="my_grid"> <child> <object
class="GtkLabel" id="label1"> <property name="label">Description</property>
<layout> <property name="column">0</property> <property
name="row">0</property> <property name="row-span">1</property> <property
name="column-span">1</property> </layout> </object> </child> <child>
<object class="GtkEntry" id="description_entry"> <layout> <property
name="column">1</property> <property name="row">0</property> <property
name="row-span">1</property> <property name="column-span">1</property>
</layout> </object> </child> </object> ```

`GtkWidget` allows style information such as style classes to be
associated with widgets, using the custom `<style>` element:

```xml <object class="GtkButton" id="button1"> <style> <class
name="my-special-button-class"/> <class name="dark-button"/> </style>
</object> ```

`GtkWidget` allows defining accessibility information, such as properties,
relations, and states, using the custom `<accessibility>` element:

```xml <object class="GtkButton" id="button1"> <accessibility> <property
name="label">Download</property> <relation
name="labelled-by">label1</relation> </accessibility> </object> ```

### Building composite widgets from template XML

`GtkWidget `exposes some facilities to automate the procedure of creating
composite widgets using "templates".

To create composite widgets with `GtkBuilder` XML, one must associate the
interface description with the widget class at class initialization time
using [methodGtk.WidgetClass.set_template].

The interface description semantics expected in composite template
descriptions is slightly different from regular [classGtk.Builder] XML.

Unlike regular interface descriptions,
[methodGtk.WidgetClass.set_template] will expect a `<template>` tag as a
direct child of the toplevel `<interface>` tag. The `<template>` tag must
specify the "class" attribute which must be the type name of the widget.
Optionally, the "parent" attribute may be specified to specify the direct
parent type of the widget type; this is ignored by `GtkBuilder` but can be
used by UI design tools to introspect what kind of properties and internal
children exist for a given type when the actual type does not exist.

The XML which is contained inside the `<template>` tag behaves as if it
were added to the `<object>` tag defining the widget itself. You may set
properties on a widget by inserting `<property>` tags into the `<template>`
tag, and also add `<child>` tags to add children and extend a widget in the
normal way you would with `<object>` tags.

Additionally, `<object>` tags can also be added before and after the
initial `<template>` tag in the normal way, allowing one to define
auxiliary objects which might be referenced by other widgets declared as
children of the `<template>` tag.

Since, unlike the `<object>` tag, the `<template>` tag does not contain an
"id" attribute, if you need to refer to the instance of the object itself
that the template will create, simply refer to the template class name in
an applicable element content.

Here is an example of a template definition, which includes an example of
this in the `<signal>` tag:

```xml <interface> <template class="FooWidget" parent="GtkBox"> <property
name="orientation">horizontal</property> <property
name="spacing">4</property> <child> <object class="GtkButton"
id="hello_button"> <property name="label">Hello World</property> <signal
name="clicked" handler="hello_button_clicked" object="FooWidget"
swapped="yes"/> </object> </child> <child> <object class="GtkButton"
id="goodbye_button"> <property name="label">Goodbye World</property>
</object> </child> </template> </interface> ```

Typically, you'll place the template fragment into a file that is bundled
with your project, using `GResource`. In order to load the template, you
need to call [methodGtk.WidgetClass.set_template_from_resource] from the
class initialization of your `GtkWidget` type:

```c static void foo_widget_class_init (FooWidgetClass *klass) { // ...

gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui"); } ```

You will also need to call [methodGtk.Widget.init_template] from the
instance initialization function:

```c static void foo_widget_init (FooWidget *self) {
gtk_widget_init_template (GTK_WIDGET (self));

// Initialize the rest of the widget... } ```

as well as calling [methodGtk.Widget.dispose_template] from the dispose
function:

```c static void foo_widget_dispose (GObject *gobject) { FooWidget *self =
FOO_WIDGET (gobject);

// Dispose objects for which you have a reference...

// Clear the template children for this widget type
gtk_widget_dispose_template (GTK_WIDGET (self), FOO_TYPE_WIDGET);

G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject); } ```

You can access widgets defined in the template using the
[methodGtk.Widget.get_template_child] function, but you will typically
declare a pointer in the instance private data structure of your type using
the same name as the widget in the template definition, and call
[methodGtk.WidgetClass.bind_template_child_full] (or one of its wrapper
macros [funcGtk.widget_class_bind_template_child] and
[funcGtk.widget_class_bind_template_child_private]) with that name, e.g.

```c typedef struct { GtkWidget *hello_button; GtkWidget *goodbye_button;
} FooWidgetPrivate;

G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX)

static void foo_widget_dispose (GObject *gobject) {
gtk_widget_dispose_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET);

G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject); }

static void foo_widget_class_init (FooWidgetClass *klass) { // ...
G_OBJECT_CLASS (klass)->dispose = foo_widget_dispose;

gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui");
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass),
FooWidget, hello_button); gtk_widget_class_bind_template_child_private
(GTK_WIDGET_CLASS (klass), FooWidget, goodbye_button); }

static void foo_widget_init (FooWidget *widget) { gtk_widget_init_template
(GTK_WIDGET (widget)); } ```

You can also use [methodGtk.WidgetClass.bind_template_callback_full] (or
is wrapper macro [funcGtk.widget_class_bind_template_callback]) to connect
a signal callback defined in the template with a function visible in the
scope of the class, e.g.

```c // the signal handler has the instance and user data swapped //
because of the swapped="yes" attribute in the template XML static void
hello_button_clicked (FooWidget *self, GtkButton *button) { g_print
("Hello, world!\n"); }

static void foo_widget_class_init (FooWidgetClass *klass) { // ...
gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass),
"/com/example/ui/foowidget.ui"); gtk_widget_class_bind_template_callback
(GTK_WIDGET_CLASS (klass), hello_button_clicked); } ```

Action_Set_Enabled

procedure Action_Set_Enabled
   (Widget      : not null access Gtk_Widget_Record;
    Action_Name : UTF8_String;
    Enabled     : Boolean)

Enables or disables an action installed with [methodGtk.WidgetClass.install_action].

Parameters
Widget
Action_Name

action name, such as "clipboard.paste"

Enabled

whether the action is now enabled

Activate

function Activate
   (Widget : not null access Gtk_Widget_Record) return Boolean

Activates the widget. The activation will emit the signal set using [methodGtk.WidgetClass.set_activate_signal] during class initialization. Activation is what happens when you press <kbd>Enter</kbd> on a widget. If you wish to handle the activation keybinding yourself, it is recommended to use [methodGtk.WidgetClass.add_shortcut] with an action created with [ctorGtk.SignalAction.new]. If Widget is not activatable, the function returns false.

Parameters
Widget
Return Value

true if the widget was activated

Activate_Action_Variant

function Activate_Action_Variant
   (Widget : not null access Gtk_Widget_Record;
    Name   : UTF8_String;
    Args   : Glib.Variant.Gvariant) return Boolean

Activates an action for the widget. The action is looked up in the action groups associated with Widget and its ancestors. If the action is in an action group added with [methodGtk.Widget.insert_action_group], the Name is expected to be prefixed with the prefix that was used when the group was inserted. The arguments must match the actions expected parameter type, as returned by [methodGio.Action.get_parameter_type].

Parameters
Widget
Name

the name of the action to activate

Args

parameters to use

Return Value

true if the action was activated

Activate_Default

procedure Activate_Default (Widget : not null access Gtk_Widget_Record)

Activates the default.activate action for the widget. The action is looked up in the same was as for [methodGtk.Widget.activate_action].

Parameters
Widget

Add_Controller

procedure Add_Controller
   (Widget     : not null access Gtk_Widget_Record;
    Controller : not null access Gtk.Event_Controller.Gtk_Event_Controller_Record'Class)

Adds an event controller to the widget. The event controllers of a widget handle the events that are propagated to the widget. You will usually want to call this function right after creating any kind of [classGtk.EventController].

Parameters
Widget
Controller

an event controller that hasn't been added to a widget yet. Has transfer-ownership='full'.

Add_Css_Class

procedure Add_Css_Class
   (Widget    : not null access Gtk_Widget_Record;
    Css_Class : UTF8_String)

Adds a style class to the widget. After calling this function, the widget's style will match for Css_Class, according to CSS matching rules. Use [methodGtk.Widget.remove_css_class] to remove the style again.

Parameters
Widget
Css_Class

style class to add to Widget, without the leading period

Add_Mnemonic_Label

procedure Add_Mnemonic_Label
   (Widget : not null access Gtk_Widget_Record;
    Label  : not null access Gtk_Widget_Record'Class)

Adds a widget to the list of mnemonic labels for this widget. See [methodGtk.Widget.list_mnemonic_labels]. Note that the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well.

Parameters
Widget
Label

a widget that acts as a mnemonic label for Widget

Add_Tick_Callback

function Add_Tick_Callback
   (Widget   : not null access Gtk_Widget_Record;
    Callback : Gtk_Tick_Callback) return Guint

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren't changing widget properties that would trigger that (for example, changing the text of a label), then you will have to call [methodGtk.Widget.queue_resize] or [methodGtk.Widget.queue_draw] yourself. [methodGdk.FrameClock.get_frame_time] should generally be used for timing continuous animations and [methodGdk.FrameTimings.get_predicted_presentation_time] should be used if you are trying to display isolated frames at particular times. This is a more convenient alternative to connecting directly to the [signalGdk.FrameClock::update] signal of the frame clock, since you don't have to worry about when a frame clock is assigned to a widget. To remove a tick callback, pass the ID that is returned by this function to [methodGtk.Widget.remove_tick_callback].

Parameters
Widget
Callback

function to call for updating animations

Return Value

an ID for this callback

Align_Baseline

Align_Baseline : constant Gtk_Align := 4;

Align_Baseline_Center

Align_Baseline_Center : constant Gtk_Align := 5;

Align_Baseline_Fill

Align_Baseline_Fill : constant Gtk_Align := 4;

Align_Center

Align_Center : constant Gtk_Align := 3;

Align_End

Align_End : constant Gtk_Align := 2;

Align_Fill

Align_Fill : constant Gtk_Align := 0;

Align_Start

Align_Start : constant Gtk_Align := 1;

Allocate

procedure Allocate
   (Widget    : not null access Gtk_Widget_Record;
    Width     : Glib.Gint;
    Height    : Glib.Gint;
    Baseline  : Glib.Gint;
    Transform : Gsk.Transform.Gsk_Transform)

Assigns size, position, (optionally) a baseline and transform to a child widget. In this function, the allocation and baseline may be adjusted. The given allocation will be forced to be bigger than the widget's minimum size, as well as at least 0×0 in size. This function is only used by widget implementations. For a version that does not take a transform, see [methodGtk.Widget.size_allocate].

Parameters
Widget
Width

new width

Height

new height

Baseline

new baseline, or -1

Transform

transformation to be applied. Has transfer-ownership='full'.

Can_Focus_Property

Can_Focus_Property : constant Glib.Properties.Property_Boolean;

Whether the widget or any of its descendents can accept the input focus.

This property is meant to be set by widget implementations, typically in their instance init function.

Can_Target_Property

Can_Target_Property : constant Glib.Properties.Property_Boolean;

Whether the widget can receive pointer events.

Cb_GObject_Boolean_Boolean

type Cb_GObject_Boolean_Boolean is not null access function
  (Self          : access Glib.Object.GObject_Record'Class;
   Group_Cycling : Boolean) return Boolean;
Parameters
Self
Group_Cycling
Return Value

Cb_GObject_Gint_Gint_Boolean_GObject_Boolean

type Cb_GObject_Gint_Gint_Boolean_GObject_Boolean is not null access function
  (Self          : access Glib.Object.GObject_Record'Class;
   X             : Glib.Gint;
   Y             : Glib.Gint;
   Keyboard_Mode : Boolean;
   Tooltip       : not null access Glib.Object.GObject_Record'Class)
return Boolean;
Parameters
Self
X
Y
Keyboard_Mode
Tooltip
Return Value

Cb_GObject_Gtk_Direction_Type_Boolean

type Cb_GObject_Gtk_Direction_Type_Boolean is not null access function
  (Self      : access Glib.Object.GObject_Record'Class;
   Direction : Gtk.Enums.Gtk_Direction_Type) return Boolean;
Parameters
Self
Direction
Return Value

Cb_GObject_Gtk_Direction_Type_Void

type Cb_GObject_Gtk_Direction_Type_Void is not null access procedure
  (Self      : access Glib.Object.GObject_Record'Class;
   Direction : Gtk.Enums.Gtk_Direction_Type);
Parameters
Self
Direction

Cb_GObject_Gtk_State_Flags_Void

type Cb_GObject_Gtk_State_Flags_Void is not null access procedure
  (Self  : access Glib.Object.GObject_Record'Class;
   Flags : Gtk.Enums.Gtk_State_Flags);
Parameters
Self
Flags

Cb_GObject_Gtk_Text_Direction_Void

type Cb_GObject_Gtk_Text_Direction_Void is not null access procedure
  (Self               : access Glib.Object.GObject_Record'Class;
   Previous_Direction : Gtk.Enums.Gtk_Text_Direction);
Parameters
Self
Previous_Direction

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Cb_Gtk_Widget_Boolean_Boolean

type Cb_Gtk_Widget_Boolean_Boolean is not null access function
  (Self          : access Gtk_Widget_Record'Class;
   Group_Cycling : Boolean) return Boolean;
Parameters
Self
Group_Cycling
Return Value

Cb_Gtk_Widget_Gint_Gint_Boolean_GObject_Boolean

type Cb_Gtk_Widget_Gint_Gint_Boolean_GObject_Boolean is not null access function
  (Self          : access Gtk_Widget_Record'Class;
   X             : Glib.Gint;
   Y             : Glib.Gint;
   Keyboard_Mode : Boolean;
   Tooltip       : not null access Glib.Object.GObject_Record'Class)
return Boolean;
Parameters
Self
X
Y
Keyboard_Mode
Tooltip
Return Value

Cb_Gtk_Widget_Gtk_Direction_Type_Boolean

type Cb_Gtk_Widget_Gtk_Direction_Type_Boolean is not null access function
  (Self      : access Gtk_Widget_Record'Class;
   Direction : Gtk.Enums.Gtk_Direction_Type) return Boolean;
Parameters
Self
Direction
Return Value

Cb_Gtk_Widget_Gtk_Direction_Type_Void

type Cb_Gtk_Widget_Gtk_Direction_Type_Void is not null access procedure
  (Self      : access Gtk_Widget_Record'Class;
   Direction : Gtk.Enums.Gtk_Direction_Type);
Parameters
Self
Direction

Cb_Gtk_Widget_Gtk_State_Flags_Void

type Cb_Gtk_Widget_Gtk_State_Flags_Void is not null access procedure
  (Self  : access Gtk_Widget_Record'Class;
   Flags : Gtk.Enums.Gtk_State_Flags);
Parameters
Self
Flags

Cb_Gtk_Widget_Gtk_Text_Direction_Void

type Cb_Gtk_Widget_Gtk_Text_Direction_Void is not null access procedure
  (Self               : access Gtk_Widget_Record'Class;
   Previous_Direction : Gtk.Enums.Gtk_Text_Direction);
Parameters
Self
Previous_Direction

Cb_Gtk_Widget_Void

type Cb_Gtk_Widget_Void is not null access procedure (Self : access Gtk_Widget_Record'Class);
Parameters
Self

Child_Focus

function Child_Focus
   (Widget    : not null access Gtk_Widget_Record;
    Direction : Gtk.Enums.Gtk_Direction_Type) return Boolean

Called by widgets as the user moves around the window using keyboard shortcuts. The Direction argument indicates what kind of motion is taking place (up, down, left, right, tab forward, tab backward). This function calls the [vfuncGtk.Widget.focus] virtual function; widgets can override the virtual function in order to implement appropriate focus behavior. The default focus virtual function for a widget should return true if moving in Direction left the focus on a focusable location inside that widget, and false if moving in Direction moved the focus outside the widget. When returning true, widgets normally call [methodGtk.Widget.grab_focus] to place the focus accordingly; when returning false, they don't modify the current focus location. This function is used by custom widget implementations; if you're writing an app, you'd use [methodGtk.Widget.grab_focus] to move the focus to a particular widget.

Parameters
Widget
Direction

direction of focus movement

Return Value

true if focus ended up inside Widget

Compute_Bounds

function Compute_Bounds
   (Widget     : not null access Gtk_Widget_Record;
    Target     : not null access Gtk_Widget_Record'Class;
    Out_Bounds : not null access Graphene.Rect.Graphene_Rect_T)
    return Boolean

Computes the bounds for Widget in the coordinate space of Target. The bounds of widget are (the bounding box of) the region that it is expected to draw in. See the coordinate system overview to learn more. If the operation is successful, true is returned. If Widget has no bounds or the bounds cannot be expressed in Target's coordinate space (for example if both widgets are in different windows), false is returned and Bounds is set to the zero rectangle. It is valid for Widget and Target to be the same widget.

Parameters
Widget
Target

the target widget

Out_Bounds

the rectangle taking the bounds

Return Value

true if the bounds could be computed

Compute_Expand

function Compute_Expand
   (Widget      : not null access Gtk_Widget_Record;
    Orientation : Gtk.Enums.Gtk_Orientation) return Boolean

Computes whether a parent widget should give this widget extra space when possible. Widgets with children should check this, rather than looking at [methodGtk.Widget.get_hexpand] or [methodGtk.Widget.get_vexpand]. This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded. The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.

Parameters
Widget
Orientation

expand direction

Return Value

whether widget tree rooted here should be expanded

Compute_Point

function Compute_Point
   (Widget    : not null access Gtk_Widget_Record;
    Target    : not null access Gtk_Widget_Record'Class;
    Point     : not null access Graphene.Point.Graphene_Point_T;
    Out_Point : not null access Graphene.Point.Graphene_Point_T)
    return Boolean

Translates the given Point in Widget's coordinates to coordinates in Target's coordinate system. In order to perform this operation, both widgets must share a a common ancestor. If that is not the case, Out_Point is set to (0, 0) and false is returned.

Parameters
Widget
Target

the widget to transform into

Point

a point in Widget's coordinate system

Out_Point

set to the corresponding coordinates in Target's coordinate system

Return Value

true if Src_Widget and Dest_Widget have a common ancestor, false otherwise

Compute_Transform

function Compute_Transform
   (Widget        : not null access Gtk_Widget_Record;
    Target        : not null access Gtk_Widget_Record'Class;
    Out_Transform : not null access Graphene.Matrix.Graphene_Matrix_T)
    return Boolean

Computes a matrix suitable to describe a transformation from Widget's coordinate system into Target's coordinate system. The transform can not be computed in certain cases, for example when Widget and Target do not share a common ancestor. In that case Out_Transform gets set to the identity matrix. To learn more about widget coordinate systems, see the coordinate system overview.

Parameters
Widget
Target

the target widget that the matrix will transform to

Out_Transform

location to store the final transformation

Return Value

true if the transform could be computed

Contains

function Contains
   (Widget : not null access Gtk_Widget_Record;
    X      : Gdouble;
    Y      : Gdouble) return Boolean

Tests if a given point is contained in the widget. The coordinates for (x, y) must be in widget coordinates, so (0, 0) is assumed to be the top left of Widget's content area.

Parameters
Widget
X

X coordinate to test, relative to Widget's origin

Y

Y coordinate to test, relative to Widget's origin

Return Value

true if Widget contains the point (x, y)

Convert

function Convert (R : Gtk.Widget.Gtk_Widget) return System.Address
Parameters
R
Return Value

Convert

function Convert (R : System.Address) return Gtk.Widget.Gtk_Widget
Parameters
R
Return Value

Create_Pango_Context

function Create_Pango_Context
   (Widget : not null access Gtk_Widget_Record)
    return Pango.Context.Pango_Context

Creates a new PangoContext that is configured for the widget. The PangoContext will have the appropriate font map, font options, font description, and base direction set. See also [methodGtk.Widget.get_pango_context].

Parameters
Widget
Return Value

the new PangoContext. Has transfer-ownership='full'.

Create_Pango_Layout

function Create_Pango_Layout
   (Widget : not null access Gtk_Widget_Record;
    Text   : UTF8_String := "") return Pango.Layout.Pango_Layout

Creates a new PangoLayout that is configured for the widget. The PangoLayout will have the appropriate font map, font description, and base direction set. If you keep a PangoLayout created in this way around, you need to re-create it when the widgets PangoContext is replaced. This can be tracked by listening to changes of the [propertyGtk.Widget:root] property on the widget.

Parameters
Widget
Text

text to set on the layout

Return Value

the new PangoLayout. Has transfer-ownership='full'.

Css_Classes_Property

Css_Classes_Property : constant Glib.Properties.Property_String :=
Glib.Properties.Build ("css-classes");

Unknown type: unspecified

Css_Name_Property

Css_Name_Property : constant Glib.Properties.Property_String;

The name of this widget in the CSS tree.

This property is meant to be set by widget implementations, typically in their instance init function.

Cursor_Property

Cursor_Property : constant Glib.Properties.Property_Boxed;

Type: Gdk.Cursor The cursor used by Widget.

Dispose_Template

procedure Dispose_Template
   (Widget      : not null access Gtk_Widget_Record;
    Widget_Type : GType)

Clears the template children for the widget. This function is the opposite of [methodGtk.Widget.init_template], and it is used to clear all the template children from a widget instance. If you bound a template child to a field in the instance structure, or in the instance private data structure, the field will be set to NULL after this function returns. You should call this function inside the GObjectClass.dispose implementation of any widget that called [methodGtk.Widget.init_template]. Typically, you will want to call this function last, right before chaining up to the parent type's dispose implementation, e.g.

*self = SOME_WIDGET (gobject);
// Clear the template data for SomeWidget gtk_widget_dispose_template
(GTK_WIDGET (self), SOME_TYPE_WIDGET);
G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject); } ```
Since: gtk+ 4.8
Parameters
Widget
Widget_Type

the type of the widget to finalize the template for

Drag_Check_Threshold

function Drag_Check_Threshold
   (Widget    : not null access Gtk_Widget_Record;
    Start_X   : Glib.Gint;
    Start_Y   : Glib.Gint;
    Current_X : Glib.Gint;
    Current_Y : Glib.Gint) return Boolean

Checks to see if a drag movement has passed the GTK drag threshold.

Parameters
Widget
Start_X

X coordinate of start of drag

Start_Y

Y coordinate of start of drag

Current_X

current X coordinate

Current_Y

current Y coordinate

Return Value

true if the drag threshold has been passed

Error_Bell

procedure Error_Bell (Widget : not null access Gtk_Widget_Record)

Notifies the user about an input-related error on the widget. If the [propertyGtk.Settings:gtk-error-bell] setting is true, it calls [methodGdk.Surface.beep], otherwise it does nothing. Note that the effect of [methodGdk.Surface.beep] can be configured in many ways, depending on the windowing backend and the desktop environment or window manager that is used.

Parameters
Widget

Focus_On_Click_Property

Focus_On_Click_Property : constant Glib.Properties.Property_Boolean;

Whether the widget should grab focus when it is clicked with the mouse.

This property is only relevant for widgets that can take focus.

Focusable_Property

Focusable_Property : constant Glib.Properties.Property_Boolean;

Whether this widget itself will accept the input focus.

From_Object_Free

function From_Object_Free
  (B : not null access Gtk_Requisition) return Gtk_Requisition

Return the underlying object and free the pointer. This is meant to be used internally by GtkAda, and should not in general be called by user code.

Parameters
B
Return Value

Get_Allocated_Baseline

function Get_Allocated_Baseline
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the baseline that has currently been allocated to the widget. This function is intended to be used when implementing handlers for the GtkWidgetClass.snapshot function, and when allocating child widgets in GtkWidgetClass.size_allocate. Deprecated since 4.12, 1

Parameters
Widget
Return Value

the baseline of the Widget, or -1 if none

Get_Allocated_Height

function Get_Allocated_Height
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the height that has currently been allocated to the widget. To learn more about widget sizes, see the coordinate system overview. Deprecated since 4.12, 1

Parameters
Widget
Return Value

the height of the Widget

Get_Allocated_Width

function Get_Allocated_Width
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the width that has currently been allocated to the widget. To learn more about widget sizes, see the coordinate system overview. Deprecated since 4.12, 1

Parameters
Widget
Return Value

the width of the Widget

Get_Allocation

procedure Get_Allocation
   (Widget     : not null access Gtk_Widget_Record;
    Allocation : out Gdk.Rectangle.Gdk_Rectangle)

Retrieves the widget's allocation. Note, when implementing a layout widget: a widget's allocation will be its "adjusted" allocation, that is, the widget's parent typically calls [methodGtk.Widget.size_allocate] with an allocation, and that allocation is then adjusted (to handle margin and alignment for example) before assignment to the widget. [methodGtk.Widget.get_allocation] returns the adjusted allocation that was actually assigned to the widget. The adjusted allocation is guaranteed to be completely contained within the [methodGtk.Widget.size_allocate] allocation, however. So a layout widget is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the widget assigned. Deprecated since 4.12, 1

Parameters
Widget
Allocation

a pointer to a GtkAllocation to copy to

Get_Ancestor

function Get_Ancestor
   (Widget      : not null access Gtk_Widget_Record;
    Widget_Type : GType) return Gtk_Widget

Gets the first ancestor of the widget with type Widget_Type. For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX) gets the first GtkBox that's an ancestor of Widget. No reference will be added to the returned widget; it should not be unreferenced. Note that unlike [methodGtk.Widget.is_ancestor], this function considers Widget to be an ancestor of itself.

Parameters
Widget
Widget_Type

ancestor type

Return Value

the ancestor widget. Has transfer-ownership='none'.

Get_Baseline

function Get_Baseline
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the baseline that has currently been allocated to the widget. This function is intended to be used when implementing handlers for the GtkWidgetClass.snapshot function, and when allocating child widgets in GtkWidgetClass.size_allocate. Since: gtk+ 4.12

Parameters
Widget
Return Value

the baseline of the Widget, or -1 if none

Get_Can_Focus

function Get_Can_Focus
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the input focus can enter the widget or any of its children. See [methodGtk.Widget.set_can_focus].

Parameters
Widget
Return Value

true if the input focus can enter Widget

Get_Can_Target

function Get_Can_Target
   (Widget : not null access Gtk_Widget_Record) return Boolean

Queries whether the widget can be the target of pointer events.

Parameters
Widget
Return Value

true if Widget can receive pointer events

Get_Child_Visible

function Get_Child_Visible
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets the value set with [methodGtk.Widget.set_child_visible]. If you feel a need to use this function, your code probably needs reorganization. This function is only useful for widget implementations and should never be called by an application.

Parameters
Widget
Return Value

true if the widget is mapped with the parent

Get_Color

procedure Get_Color
   (Widget : not null access Gtk_Widget_Record;
    Color  : out Gdk.RGBA.Gdk_RGBA)

Gets the current foreground color for the widget's style. This function should only be used in snapshot implementations that need to do custom drawing with the foreground color. Since: gtk+ 4.10

Parameters
Widget
Color

return location for the color

Get_Css_Classes

function Get_Css_Classes
   (Widget : not null access Gtk_Widget_Record)
    return GNAT.Strings.String_List

Returns the list of style classes applied to the widget.

Parameters
Widget
Return Value

a NULL-terminated list of css classes currently applied to Widget

Get_Css_Name

function Get_Css_Name
   (Widget : not null access Gtk_Widget_Record) return UTF8_String

Returns the CSS name of the widget.

Parameters
Widget
Return Value

the CSS name

Get_Cursor

function Get_Cursor
   (Widget : not null access Gtk_Widget_Record)
    return Gdk.Cursor.Gdk_Cursor

Gets the cursor set on the widget. See [methodGtk.Widget.set_cursor] for details.

Parameters
Widget
Return Value

the cursor that is set on Widget. Has transfer-ownership='none'.

Get_Default_Direction

function Get_Default_Direction return Gtk.Enums.Gtk_Text_Direction

Obtains the default reading direction. See [funcGtk.Widget.set_default_direction].

Return Value

the current default direction

Get_Direction

function Get_Direction
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Enums.Gtk_Text_Direction

Gets the reading direction for the widget. See [methodGtk.Widget.set_direction].

Parameters
Widget
Return Value

the reading direction for the widget

Get_Display

function Get_Display
   (Widget : not null access Gtk_Widget_Record) return Gdk.Gdk_Display

Get the display for the window that the widget belongs to. This function can only be called after the widget has been added to a widget hierarchy with a GtkRoot at the top. In general, you should only create display-specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.

Parameters
Widget
Return Value

the display for this widget. Has transfer-ownership='none'.

Get_First_Child

function Get_First_Child
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the widget's first child. This function is primarily meant for widget implementations.

Parameters
Widget
Return Value

the widget's first child. Has transfer-ownership='none'.

Get_Focus_Child

function Get_Focus_Child
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the focus child of the widget.

Parameters
Widget
Return Value

the current focus child of Widget. Has transfer-ownership='none'.

Get_Focus_On_Click

function Get_Focus_On_Click
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns whether the widget should grab focus when it is clicked with the mouse. See [methodGtk.Widget.set_focus_on_click].

Parameters
Widget
Return Value

true if the widget should grab focus when it is clicked with the mouse

Get_Focusable

function Get_Focusable
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget can own the input focus. See [methodGtk.Widget.set_focusable].

Parameters
Widget
Return Value

true if Widget can own the input focus

Get_Font_Map

function Get_Font_Map
   (Widget : not null access Gtk_Widget_Record)
    return Pango.Font_Map.Pango_Font_Map

Gets the font map of the widget. See [methodGtk.Widget.set_font_map].

Parameters
Widget
Return Value

the font map of Widget. Has transfer-ownership='none'.

Get_Font_Options

function Get_Font_Options
   (Widget : not null access Gtk_Widget_Record)
    return Cairo.Cairo_Font_Options

Returns the cairo_font_options_t of the widget. Seee [methodGtk.Widget.set_font_options]. Deprecated since 4.16, 1

Parameters
Widget
Return Value

the cairo_font_options_t of widget

Get_Frame_Clock

function Get_Frame_Clock
   (Widget : not null access Gtk_Widget_Record)
    return Gdk.Frame_Clock.Gdk_Frame_Clock

Obtains the frame clock for a widget. The frame clock is a global "ticker" that can be used to drive animations and repaints. The most common reason to get the frame clock is to call [methodGdk.FrameClock.get_frame_time], in order to get a time to use for animating. For example you might record the start of the animation with an initial value from [methodGdk.FrameClock.get_frame_time], and then update the animation by calling [methodGdk.FrameClock.get_frame_time] again during each repaint. [methodGdk.FrameClock.request_phase] will result in a new frame on the clock, but won't necessarily repaint any widgets. To repaint a widget, you have to use [methodGtk.Widget.queue_draw] which invalidates the widget (thus scheduling it to receive a draw on the next frame). [methodGtk.Widget.queue_draw] will also end up requesting a frame on the appropriate frame clock. A widget's frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget's frame clock. Unrealized widgets do not have a frame clock.

Parameters
Widget
Return Value

the frame clock. Has transfer-ownership='none'.

Get_Halign

function Get_Halign
   (Widget : not null access Gtk_Widget_Record) return Gtk_Align

Gets the horizontal alignment of the widget. For backwards compatibility reasons this method will never return one of the baseline alignments, but instead it will convert it to [enumGtk.Align.fill] or [enumGtk.Align.center]. Baselines are not supported for horizontal alignment.

Parameters
Widget
Return Value

the horizontal alignment of Widget

Get_Has_Tooltip

function Get_Has_Tooltip
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns the current value of the has-tooltip property.

Parameters
Widget
Return Value

current value of has-tooltip on Widget

Get_Height

function Get_Height
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the content height of the widget. This function returns the height passed to its size-allocate implementation, which is the height you should be using in [vfuncGtk.Widget.snapshot]. For pointer events, see [methodGtk.Widget.contains]. To learn more about widget sizes, see the coordinate system overview.

Parameters
Widget
Return Value

The height of Widget

Get_Hexpand

function Get_Hexpand
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets whether the widget would like any available extra horizontal space. When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Widgets with children should use [methodGtk.Widget.compute_expand] rather than this function, to see whether any of its children, has the expand flag set. If any child of a widget wants to expand, the parent may ask to expand also. This function only looks at the widget's own hexpand flag, rather than computing whether the entire widget tree rooted at this widget wants to expand.

Parameters
Widget
Return Value

whether hexpand flag is set

Get_Hexpand_Set

function Get_Hexpand_Set
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets whether the hexpand flag has been explicitly set. If [propertyGtk.Widget:hexpand] property is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand. There are few reasons to use this function, but it's here for completeness and consistency.

Parameters
Widget
Return Value

whether hexpand has been explicitly set

Get_Last_Child

function Get_Last_Child
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the widget's last child. This function is primarily meant for widget implementations.

Parameters
Widget
Return Value

the widget's last child. Has transfer-ownership='none'.

Get_Layout_Manager

function Get_Layout_Manager
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Layout_Manager.Gtk_Layout_Manager

Retrieves the layout manager of the widget. See [methodGtk.Widget.set_layout_manager].

Parameters
Widget
Return Value

the layout manager of Widget. Has transfer-ownership='none'.

Get_Limit_Events

function Get_Limit_Events
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets the value of the [propertyGtk.Widget:limit-events] property. Since: gtk+ 4.18

Parameters
Widget
Return Value

Get_Mapped

function Get_Mapped
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns whether the widget is mapped.

Parameters
Widget
Return Value

true if the widget is mapped

Get_Margin_Bottom

function Get_Margin_Bottom
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Gets the bottom margin of the widget.

Parameters
Widget
Return Value

The bottom margin of Widget

Get_Margin_End

function Get_Margin_End
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Gets the end margin of the widget.

Parameters
Widget
Return Value

The end margin of Widget

Get_Margin_Start

function Get_Margin_Start
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Gets the start margin of the widget.

Parameters
Widget
Return Value

The start margin of Widget

Get_Margin_Top

function Get_Margin_Top
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Gets the top margin of the widget.

Parameters
Widget
Return Value

The top margin of Widget

Get_Name

function Get_Name
   (Widget : not null access Gtk_Widget_Record) return UTF8_String

Retrieves the name of a widget. See [methodGtk.Widget.set_name] for the significance of widget names.

Parameters
Widget
Return Value

name of the widget

Get_Native

function Get_Native
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Native.Gtk_Native

Returns the nearest GtkNative ancestor of the widget. This function will return NULL if the widget is not contained inside a widget tree with a native ancestor. GtkNative widgets will return themselves here.

Parameters
Widget
Return Value

the GtkNative ancestor of Widget

Get_Next_Sibling

function Get_Next_Sibling
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the widget's next sibling. This function is primarily meant for widget implementations.

Parameters
Widget
Return Value

the widget's next sibling. Has transfer-ownership='none'.

Get_Opacity

function Get_Opacity
   (Widget : not null access Gtk_Widget_Record) return Gdouble

Fetches the requested opacity for the widget. See [methodGtk.Widget.set_opacity].

Parameters
Widget
Return Value

the requested opacity for this widget

Get_Overflow

function Get_Overflow
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Enums.Gtk_Overflow

Returns the widget's overflow value.

Parameters
Widget
Return Value

The widget's overflow value

Get_Pango_Context

function Get_Pango_Context
   (Widget : not null access Gtk_Widget_Record)
    return Pango.Context.Pango_Context

Gets a PangoContext that is configured for the widget. The PangoContext will have the appropriate font map, font description, and base direction set. Unlike the context returned by [methodGtk.Widget.create_pango_context], this context is owned by the widget (it can be used until the screen for the widget changes or the widget is removed from its toplevel), and will be updated to match any changes to the widget's attributes. This can be tracked by listening to changes of the [propertyGtk.Widget:root] property on the widget.

Parameters
Widget
Return Value

the PangoContext for the widget. Has transfer-ownership='none'.

Get_Parent

function Get_Parent
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the parent widget of the widget.

Parameters
Widget
Return Value

the parent widget of Widget. Has transfer-ownership='none'.

Get_Preferred_Size

procedure Get_Preferred_Size
   (Widget       : not null access Gtk_Widget_Record;
    Minimum_Size : out Gtk_Requisition;
    Natural_Size : out Gtk_Requisition)

Retrieves the minimum and natural size of a widget, taking into account the widget's preference for height-for-width management. This is used to retrieve a suitable size by container widgets which do not impose any restrictions on the child placement. It can be used to deduce toplevel window and menu sizes as well as child widgets in free-form containers such as GtkFixed. Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width. Use [methodGtk.Widget.measure] if you want to support baseline alignment.

Parameters
Widget
Minimum_Size

location for storing the minimum size

Natural_Size

location for storing the natural size

Get_Prev_Sibling

function Get_Prev_Sibling
   (Widget : not null access Gtk_Widget_Record) return Gtk_Widget

Returns the widget's previous sibling. This function is primarily meant for widget implementations.

Parameters
Widget
Return Value

the widget's previous sibling. Has transfer-ownership='none'.

Get_Primary_Clipboard

function Get_Primary_Clipboard
   (Widget : not null access Gtk_Widget_Record)
    return Gdk.Clipboard.Gdk_Clipboard

Gets the primary clipboard of the widget. This is a utility function to get the primary clipboard object for the display that Widget is using. Note that this function always works, even when Widget is not realized yet.

Parameters
Widget
Return Value

the appropriate clipboard object. Has transfer-ownership='none'.

Get_Realized

function Get_Realized
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget is realized.

Parameters
Widget
Return Value

true if Widget is realized

Get_Receives_Default

function Get_Receives_Default
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default. See [methodGtk.Widget.set_receives_default].

Parameters
Widget
Return Value

true if Widget acts as the default widget when focused

Get_Request_Mode

function Get_Request_Mode
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Enums.Gtk_Size_Request_Mode

Gets whether the widget prefers a height-for-width layout or a width-for-height layout. Single-child widgets generally propagate the preference of their child, more complex widgets need to request something either in context of their children or in context of their allocation capabilities.

Parameters
Widget
Return Value

The GtkSizeRequestMode preferred by Widget.

Get_Scale_Factor

function Get_Scale_Factor
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Retrieves the internal scale factor that maps from window coordinates to the actual device pixels. On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2). See [methodGdk.Surface.get_scale_factor]. Note that modern systems may support fractional scaling, where the scale factor is not an integer. On such systems, this function will return the next higher integer value, but you probably want to use [methodGdk.Surface.get_scale] to get the fractional scale value.

Parameters
Widget
Return Value

the scale factor for Widget

Get_Sensitive

function Get_Sensitive
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns the widget's sensitivity. This function returns the value that has been set using [methodGtk.Widget.set_sensitive]). The effective sensitivity of a widget is however determined by both its own and its parent widget's sensitivity. See [methodGtk.Widget.is_sensitive].

Parameters
Widget
Return Value

true if the widget is sensitive

Get_Settings

function Get_Settings
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Settings.Gtk_Settings

Gets the settings object holding the settings used for the widget. Note that this function can only be called when the GtkWidget is attached to a toplevel, since the settings object is specific to a particular display. If you want to monitor the widget for changes in its settings, connect to the notify::display signal.

Parameters
Widget
Return Value

the relevant settings object. Has transfer-ownership='none'.

Get_Size

function Get_Size
   (Widget      : not null access Gtk_Widget_Record;
    Orientation : Gtk.Enums.Gtk_Orientation) return Glib.Gint

Returns the content width or height of the widget. Which dimension is returned depends on Orientation. This is equivalent to calling [methodGtk.Widget.get_width] for [enumGtk.Orientation.horizontal] or [methodGtk.Widget.get_height] for [enumGtk.Orientation.vertical], but can be used when writing orientation-independent code, such as when implementing [ifaceGtk.Orientable] widgets. To learn more about widget sizes, see the coordinate system overview.

Parameters
Widget
Orientation

the orientation to query

Return Value

the size of Widget in Orientation

Get_Size_Request

procedure Get_Size_Request
   (Widget : not null access Gtk_Widget_Record;
    Width  : out Glib.Gint;
    Height : out Glib.Gint)

Gets the size request that was explicitly set for the widget. A value of -1 stored in Width or Height indicates that that dimension has not been set explicitly and the natural requisition of the widget will be used instead. See [methodGtk.Widget.set_size_request]. To get the size a widget will actually request, call [methodGtk.Widget.measure] instead of this function.

Parameters
Widget
Width

return location for width

Height

return location for height

Get_State_Flags

function Get_State_Flags
   (Widget : not null access Gtk_Widget_Record)
    return Gtk.Enums.Gtk_State_Flags

Returns the widget state as a flag set. It is worth mentioning that the effective [flagsGtk.StateFlags.insensitive] state will be returned, that is, also based on parent insensitivity, even if Widget itself is sensitive. Also note that if you are looking for a way to obtain the [flagsGtk.StateFlags] to pass to a [classGtk.StyleContext] method, you should look at [methodGtk.StyleContext.get_state].

Parameters
Widget
Return Value

the state flags of widget

Get_Template_Child

function Get_Template_Child
   (Widget      : not null access Gtk_Widget_Record;
    Widget_Type : GType;
    Name        : UTF8_String) return Glib.Object.GObject

Fetches an object build from the template XML for Widget_Type in the widget. This will only report children which were previously declared with [methodGtk.WidgetClass.bind_template_child_full] or one of its variants. This function is only meant to be called for code which is private to the Widget_Type which declared the child and is meant for language bindings which cannot easily make use of the GObject structure offsets.

Parameters
Widget
Widget_Type

The type of the widget class that defines the child in the template

Name

ID of the child defined in the template XML

Return Value

the object built in the template XML with the id Name. Has transfer-ownership='none'.

Get_Tooltip_Markup

function Get_Tooltip_Markup
   (Widget : not null access Gtk_Widget_Record) return UTF8_String

Gets the contents of the tooltip for the widget. If the tooltip has not been set using [methodGtk.Widget.set_tooltip_markup], this function returns NULL.

Parameters
Widget
Return Value

the tooltip text

Get_Tooltip_Text

function Get_Tooltip_Text
   (Widget : not null access Gtk_Widget_Record) return UTF8_String

Gets the contents of the tooltip for the widget. If the Widget's tooltip was set using [methodGtk.Widget.set_tooltip_markup], this function will return the escaped text.

Parameters
Widget
Return Value

the tooltip text

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Valign

function Get_Valign
   (Widget : not null access Gtk_Widget_Record) return Gtk_Align

Gets the vertical alignment of the widget.

Parameters
Widget
Return Value

the vertical alignment of Widget

Get_Vexpand

function Get_Vexpand
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets whether the widget would like any available extra vertical space. See [methodGtk.Widget.get_hexpand] for more detail.

Parameters
Widget
Return Value

whether vexpand flag is set

Get_Vexpand_Set

function Get_Vexpand_Set
   (Widget : not null access Gtk_Widget_Record) return Boolean

Gets whether the vexpand flag has been explicitly set. See [methodGtk.Widget.get_hexpand_set] for more detail.

Parameters
Widget
Return Value

whether vexpand has been explicitly set

Get_Visible

function Get_Visible
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget is visible. If you want to take into account whether the widget's parent is also marked as visible, use [methodGtk.Widget.is_visible] instead. This function does not check if the widget is obscured in any way. See [methodGtk.Widget.set_visible].

Parameters
Widget
Return Value

true if the widget is visible

Get_Width

function Get_Width
   (Widget : not null access Gtk_Widget_Record) return Glib.Gint

Returns the content width of the widget. This function returns the width passed to its size-allocate implementation, which is the width you should be using in [vfuncGtk.Widget.snapshot]. For pointer events, see [methodGtk.Widget.contains]. To learn more about widget sizes, see the coordinate system overview.

Parameters
Widget
Return Value

The width of Widget

Grab_Focus

function Grab_Focus
   (Widget : not null access Gtk_Widget_Record) return Boolean

Causes Widget to have the keyboard focus for the window that it belongs to. If Widget is not focusable, or its [vfuncGtk.Widget.grab_focus] implementation cannot transfer the focus to a descendant of Widget that is focusable, it will not take focus and false will be returned. Calling [methodGtk.Widget.grab_focus] on an already focused widget is allowed, should not have an effect, and return true.

Parameters
Widget
Return Value

true if focus is now inside Widget

Gtk_Align

type Gtk_Align is mod 2 ** Integer'Size;

Controls how a widget deals with extra space in a single dimension.

Alignment only matters if the widget receives a "too large" allocation, for example if you packed the widget with the [propertyGtk.Widget:hexpand] property inside a [classBox], then the widget might get extra space. If you have for example a 16x16 icon inside a 32x32 space, the icon could be scaled and stretched, it could be centered, or it could be positioned to one side of the space.

Note that in horizontal context GTK_ALIGN_START and GTK_ALIGN_END are interpreted relative to text direction.

Baseline support is optional for containers and widgets, and is only available for vertical alignment. GTK_ALIGN_BASELINE_CENTER and GTK_ALIGN_BASELINE_FILL are treated similar to GTK_ALIGN_CENTER and GTK_ALIGN_FILL, except that it positions the widget to line up the baselines, where that is supported.

Gtk_Align_Properties

package Gtk_Align_Properties is
   new Generic_Internal_Flags_Property (Gtk_Align);

Gtk_Requisition

type Gtk_Requisition is record
   Width : Glib.Gint;
   Height : Glib.Gint;
end record;

Represents the desired size of a widget.

See GtkWidget's geometry management section for more information.

Record components
Width
Height

Gtk_Tick_Callback

type Gtk_Tick_Callback is access function
  (Widget      : not null access Gtk_Widget_Record'Class;
   Frame_Clock : not null access Gdk.Frame_Clock.Gdk_Frame_Clock_Record'Class)
return Boolean;

Callback type for adding a function to update animations. See [methodGtk.Widget.add_tick_callback].

Parameters
Widget

the widget

Frame_Clock

the frame clock for the widget

Return Value

G_SOURCE_CONTINUE if the tick callback should continue to be called, G_SOURCE_REMOVE if it should be removed

Gtk_Widget

type Gtk_Widget is access all Gtk_Widget_Record'Class;

Gtk_Widget_Record

type Gtk_Widget_Record is new GObject_Record with null record;

Halign_Property

Halign_Property : constant Gtk.Widget.Property_Gtk_Align;

Type: Gtk_Align How to distribute horizontal space if widget gets extra space.

Has_Css_Class

function Has_Css_Class
   (Widget    : not null access Gtk_Widget_Record;
    Css_Class : UTF8_String) return Boolean

Returns whether a style class is currently applied to the widget.

Parameters
Widget
Css_Class

style class, without the leading period

Return Value

true if Css_Class is currently applied to Widget

Has_Default

function Has_Default
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget is the current default widget within its toplevel.

Parameters
Widget
Return Value

true if Widget is the current default widget within its toplevel

Has_Default_Property

Has_Default_Property : constant Glib.Properties.Property_Boolean;

Whether the widget is the default widget.

Has_Focus

function Has_Focus
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines if the widget has the global input focus. See [methodGtk.Widget.is_focus] for the difference between having the global input focus, and only having the focus within a toplevel.

Parameters
Widget
Return Value

true if the widget has the global input focus

Has_Focus_Property

Has_Focus_Property : constant Glib.Properties.Property_Boolean;

Whether the widget has the input focus.

Has_Tooltip_Property

Has_Tooltip_Property : constant Glib.Properties.Property_Boolean;

Enables or disables the emission of the [signalGtk.Widget::query-tooltip] signal on Widget.

A true value indicates that Widget can have a tooltip, in this case the widget will be queried using [signalGtk.Widget::query-tooltip] to determine whether it will provide a tooltip or not.

Has_Visible_Focus

function Has_Visible_Focus
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines if the widget should show a visible indication that it has the global input focus. This is a convenience function that takes into account whether focus indication should currently be shown in the toplevel window of Widget. See [methodGtk.Window.get_focus_visible] for more information about focus indication. To find out if the widget has the global input focus, use [methodGtk.Widget.has_focus].

Parameters
Widget
Return Value

true if the widget should display a "focus rectangle"

Height_Request_Property

Height_Request_Property : constant Glib.Properties.Property_Int;

Overrides for height request of the widget.

If this is -1, the natural request will be used.

Hexpand_Property

Hexpand_Property : constant Glib.Properties.Property_Boolean;

Whether to expand horizontally.

Hexpand_Set_Property

Hexpand_Set_Property : constant Glib.Properties.Property_Boolean;

Whether to use the hexpand property.

Hide

procedure Hide (Widget : not null access Gtk_Widget_Record)

Reverses the effects of [method.Gtk.Widget.show]. This is causing the widget to be hidden (invisible to the user). Deprecated since 4.10, 1

Parameters
Widget

In_Destruction

function In_Destruction
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work.

Parameters
Widget
Return Value

true if Widget is being destroyed

Inherited_Measure

procedure Inherited_Measure
  (Klass                              : Glib.Object.Ada_GObject_Class;
   Widget                             : access Gtk_Widget_Record'Class;
   Orientation                        : Gtk.Enums.Gtk_Orientation;
   For_Size                           : Glib.Gint;
   Minimum, Natural                   : out Glib.Gint;
   Minimum_Baseline, Natural_Baseline : out Glib.Gint)

Call the parent class "measure" implementation. Useful when an overriding handler still needs the inherited behaviour.

Parameters
Klass
Widget
Orientation
For_Size
Minimum
Natural
Minimum_Baseline
Natural_Baseline

Inherited_Realize

procedure Inherited_Realize
  (Klass  : Glib.Object.Ada_GObject_Class;
   Widget : access Gtk_Widget_Record'Class)

Call the parent class "realize" implementation.

Parameters
Klass
Widget

Inherited_Size_Allocate

procedure Inherited_Size_Allocate
  (Klass                   : Glib.Object.Ada_GObject_Class;
   Widget                  : access Gtk_Widget_Record'Class;
   Width, Height, Baseline : Glib.Gint)

Call the parent class "size_allocate" implementation.

Parameters
Klass
Widget
Width
Height
Baseline

Inherited_Snapshot

procedure Inherited_Snapshot
  (Klass    : Glib.Object.Ada_GObject_Class;
   Widget   : access Gtk_Widget_Record'Class;
   Snapshot : System.Address)

Call the parent class "snapshot" implementation.

Parameters
Klass
Widget
Snapshot

Init_Template

procedure Init_Template (Widget : not null access Gtk_Widget_Record)

Creates and initializes child widgets defined in templates. This function must be called in the instance initializer for any class which assigned itself a template using [methodGtk.WidgetClass.set_template]. It is important to call this function in the instance initializer of a widget subclass and not in GObject.constructed or GObject.constructor for two reasons:

parent classes have been created in their relative instance initializers

important to build the composite widgets before the construct properties are set. Properties passed to g_object_new should take precedence over properties set in the private template XML A good rule of thumb is to call this function as the first thing in an instance initialization function.

Parameters
Widget

Insert_Action_Group

procedure Insert_Action_Group
   (Widget : not null access Gtk_Widget_Record;
    Name   : UTF8_String;
    Group  : Glib.Action_Group.Gaction_Group)

Inserts an action group into the widget's actions. Children of Widget that implement [ifaceGtk.Actionable] can then be associated with actions in Group by setting their "action-name" to Prefix.action-name. Note that inheritance is defined for individual actions. I.e. even if you insert a group with prefix Prefix, actions with the same prefix will still be inherited from the parent, unless the group contains an action with the same name. If Group is NULL, a previously inserted group for Name is removed from Widget.

Parameters
Widget
Name

the prefix for actions in Group

Group

an action group

Insert_After

procedure Insert_After
   (Widget           : not null access Gtk_Widget_Record;
    Parent           : not null access Gtk_Widget_Record'Class;
    Previous_Sibling : access Gtk_Widget_Record'Class)

Sets the parent widget of the widget. In contrast to [methodGtk.Widget.set_parent], this function inserts Widget at a specific position into the list of children of the Parent widget. It will be placed after Previous_Sibling, or at the beginning if Previous_Sibling is NULL. After calling this function, gtk_widget_get_prev_sibling (widget) will return Previous_Sibling. If Parent is already set as the parent widget of Widget, this function can also be used to reorder Widget in the child widget list of Parent. This function is primarily meant for widget implementations; if you are just using a widget, you must use its own API for adding children.

Parameters
Widget
Parent

the parent widget to insert Widget into

Previous_Sibling

the new previous sibling of Widget

Insert_Before

procedure Insert_Before
   (Widget       : not null access Gtk_Widget_Record;
    Parent       : not null access Gtk_Widget_Record'Class;
    Next_Sibling : access Gtk_Widget_Record'Class)

Sets the parent widget of the widget. In contrast to [methodGtk.Widget.set_parent], this function inserts Widget at a specific position into the list of children of the Parent widget. It will be placed before Next_Sibling, or at the end if Next_Sibling is NULL. After calling this function, gtk_widget_get_next_sibling (widget) will return Next_Sibling. If Parent is already set as the parent widget of Widget, this function can also be used to reorder Widget in the child widget list of Parent. This function is primarily meant for widget implementations; if you are just using a widget, you must use its own API for adding children.

Parameters
Widget
Parent

the parent widget to insert Widget into

Next_Sibling

the new next sibling of Widget

Is_Ancestor

function Is_Ancestor
   (Widget   : not null access Gtk_Widget_Record;
    Ancestor : not null access Gtk_Widget_Record'Class) return Boolean

Determines whether the widget is a descendent of Ancestor.

Parameters
Widget
Ancestor

another GtkWidget

Return Value

true if Ancestor contains Widget as a child, grandchild, great grandchild, etc

Is_Drawable

function Is_Drawable
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget can be drawn to. A widget can be drawn if it is mapped and visible.

Parameters
Widget
Return Value

true if Widget is drawable

Is_Focus

function Is_Focus
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines if the widget is the focus widget within its toplevel. This does not mean that the [propertyGtk.Widget:has-focus] property is necessarily set; [propertyGtk.Widget:has-focus] will only be set if the toplevel widget additionally has the global input focus.

Parameters
Widget
Return Value

true if the widget is the focus widget

Is_Sensitive

function Is_Sensitive
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns the widget's effective sensitivity. This means it is sensitive itself and also its parent widget is sensitive.

Parameters
Widget
Return Value

true if the widget is effectively sensitive

Is_Visible

function Is_Visible
   (Widget : not null access Gtk_Widget_Record) return Boolean

Determines whether the widget and all its parents are marked as visible. This function does not check if the widget is obscured in any way. See also [methodGtk.Widget.get_visible] and [methodGtk.Widget.set_visible].

Parameters
Widget
Return Value

true if the widget and all its parents are visible

Keynav_Failed

function Keynav_Failed
   (Widget    : not null access Gtk_Widget_Record;
    Direction : Gtk.Enums.Gtk_Direction_Type) return Boolean

Emits the [signalGtk.Widget::keynav-failed] signal on the widget. This function should be called whenever keyboard navigation within a single widget hits a boundary. The return value of this function should be interpreted in a way similar to the return value of [methodGtk.Widget.child_focus]. When true is returned, stay in the widget, the failed keyboard navigation is ok and/or there is nowhere we can/should move the focus to. When false is returned, the caller should continue with keyboard navigation outside the widget, e.g. by calling [methodGtk.Widget.child_focus] on the widget's toplevel. The default [signalGtk.Widget::keynav-failed] handler returns false for [enumGtk.DirectionType.tab-forward] and [enumGtk.DirectionType.tab-backward]. For the other values of [enumGtk.DirectionType] it returns true. Whenever the default handler returns true, it also calls [methodGtk.Widget.error_bell] to notify the user of the failed keyboard navigation. A use case for providing an own implementation of ::keynav-failed (either by connecting to it or by overriding it) would be a row of [classGtk.Entry] widgets where the user should be able to navigate the entire row with the cursor keys, as e.g. known from user interfaces that require entering license keys.

Parameters
Widget
Direction

direction of focus movement

Return Value

true if stopping keyboard navigation is fine, false if the emitting widget should try to handle the keyboard navigation attempt in its parent widget

Layout_Manager_Property

Layout_Manager_Property : constant Glib.Properties.Property_Object;

Type: Gtk.Layout_Manager.Gtk_Layout_Manager The [classGtk.LayoutManager] instance to use to compute the preferred size of the widget, and allocate its children.

This property is meant to be set by widget implementations, typically in their instance init function.

Limit_Events_Property

Limit_Events_Property : constant Glib.Properties.Property_Boolean;

Makes this widget act like a modal dialog, with respect to event delivery.

Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See [methodGtk.EventController.set_propagation_limit].

List_Mnemonic_Labels

function List_Mnemonic_Labels
   (Widget : not null access Gtk_Widget_Record) return Widget_List.Glist

Returns the widgets for which this widget is the target of a mnemonic. Typically, these widgets will be labels. See, for example, [methodGtk.Label.set_mnemonic_widget]. The widgets in the list are not individually referenced. If you want to iterate through the list and perform actions involving callbacks that might destroy the widgets, you must call g_list_foreach (result, (GFunc)g_object_ref, NULL) first, and then unref all the widgets afterwards.

Parameters
Widget
Return Value

the list of mnemonic labels

Map

procedure Map (Widget : not null access Gtk_Widget_Record)

Causes a widget to be mapped if it isn't already. This function is only for use in widget implementations.

Parameters
Widget

Margin_Bottom_Property

Margin_Bottom_Property : constant Glib.Properties.Property_Int;

Margin on bottom side of widget.

This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [methodGtk.Widget.set_size_request] for example.

Margin_End_Property

Margin_End_Property : constant Glib.Properties.Property_Int;

Margin on end of widget, horizontally.

This property supports left-to-right and right-to-left text directions.

This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [methodGtk.Widget.set_size_request] for example.

Margin_Start_Property

Margin_Start_Property : constant Glib.Properties.Property_Int;

Margin on start of widget, horizontally.

This property supports left-to-right and right-to-left text directions.

This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [methodGtk.Widget.set_size_request] for example.

Margin_Top_Property

Margin_Top_Property : constant Glib.Properties.Property_Int;

Margin on top side of widget.

This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from [methodGtk.Widget.set_size_request] for example.

Measure

procedure Measure
   (Widget           : not null access Gtk_Widget_Record;
    Orientation      : Gtk.Enums.Gtk_Orientation;
    For_Size         : Glib.Gint;
    Minimum          : out Glib.Gint;
    Natural          : out Glib.Gint;
    Minimum_Baseline : out Glib.Gint;
    Natural_Baseline : out Glib.Gint)

Measures Widget in the orientation Orientation and for the given For_Size. As an example, if Orientation is Gtk.Enums.Orientation_Horizontal and For_Size is 300, this functions will compute the minimum and natural width of Widget if it is allocated at a height of 300 pixels. See GtkWidget's geometry management section for a more details on implementing GtkWidgetClass.measure.

Parameters
Widget
Orientation

the orientation to measure

For_Size

Size for the opposite of Orientation, i.e. if Orientation is Gtk.Enums.Orientation_Horizontal, this is the height the widget should be measured with. The Gtk.Enums.Orientation_Vertical case is analogous. This way, both height-for-width and width-for-height requests can be implemented. If no size is known, -1 can be passed.

Minimum

location to store the minimum size

Natural

location to store the natural size

Minimum_Baseline

location to store the baseline position for the minimum size, or -1 to report no baseline

Natural_Baseline

location to store the baseline position for the natural size, or -1 to report no baseline

Measure_Handler

type Measure_Handler is access procedure
  (Widget                             : System.Address;
   Orientation                        : Gtk.Enums.Gtk_Orientation;
   For_Size                           : Glib.Gint;
   Minimum, Natural                   : out Glib.Gint;
   Minimum_Baseline, Natural_Baseline : out Glib.Gint);

Report the widget's minimum and natural size for Orientation. For_Size is the available size in the opposite orientation, or -1 when unknown. Set Minimum_Baseline/Natural_Baseline to -1 when no baseline applies.

Parameters
Widget
Orientation
For_Size
Minimum
Natural
Minimum_Baseline
Natural_Baseline

Mnemonic_Activate

function Mnemonic_Activate
   (Widget        : not null access Gtk_Widget_Record;
    Group_Cycling : Boolean) return Boolean

Emits the [signalGtk.Widget::mnemonic-activate] signal.

Parameters
Widget
Group_Cycling

true if there are other widgets with the same mnemonic

Return Value

true if the signal has been handled

Name_Property

Name_Property : constant Glib.Properties.Property_String;

The name of the widget.

Observe_Children

function Observe_Children
   (Widget : not null access Gtk_Widget_Record)
    return Glib.List_Model.Glist_Model

Returns a list model to track the children of the widget. Calling this function will enable extra internal bookkeeping to track children and emit signals on the returned listmodel. It may slow down operations a lot. Applications should try hard to avoid calling this function because of the slowdowns.

Parameters
Widget
Return Value

a list model tracking Widget's children

Observe_Controllers

function Observe_Controllers
   (Widget : not null access Gtk_Widget_Record)
    return Glib.List_Model.Glist_Model

Returns a list model to track the event controllers of the widget. Calling this function will enable extra internal bookkeeping to track controllers and emit signals on the returned listmodel. It may slow down operations a lot. Applications should try hard to avoid calling this function because of the slowdowns.

Parameters
Widget
Return Value

a list model tracking Widget's controllers

On_Destroy

procedure On_Destroy
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Signals that all holders of a reference to the widget should release the reference that they hold.

May result in finalization of the widget if all references are released.

This signal is not suitable for saving widget state.

Parameters
Self
Call
Slot
After

On_Destroy

procedure On_Destroy
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Signals that all holders of a reference to the widget should release the reference that they hold.

May result in finalization of the widget if all references are released.

This signal is not suitable for saving widget state.

Parameters
Self
Call
After

On_Direction_Changed

procedure On_Direction_Changed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Gtk_Text_Direction_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when the text direction of a widget changes.

Parameters
Self
Call
Slot
After

On_Direction_Changed

procedure On_Direction_Changed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Gtk_Text_Direction_Void;
    After : Boolean := False)

Emitted when the text direction of a widget changes.

Parameters
Self
Call
After

On_Hide

procedure On_Hide
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when Widget is hidden.

Parameters
Self
Call
Slot
After

On_Hide

procedure On_Hide
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when Widget is hidden.

Parameters
Self
Call
After

On_Keynav_Failed

procedure On_Keynav_Failed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Gtk_Direction_Type_Boolean;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted if keyboard navigation fails.

See [methodGtk.Widget.keynav_failed] for details.

Callback parameters: -- @param Direction the direction of movement

Parameters
Self
Call
Slot
After

On_Keynav_Failed

procedure On_Keynav_Failed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Gtk_Direction_Type_Boolean;
    After : Boolean := False)

Emitted if keyboard navigation fails.

See [methodGtk.Widget.keynav_failed] for details.

Callback parameters: -- @param Direction the direction of movement

Parameters
Self
Call
After

On_Map

procedure On_Map
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when Widget is going to be mapped.

A widget is mapped when the widget is visible (which is controlled with [propertyGtk.Widget:visible]) and all its parents up to the toplevel widget are also visible.

The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of [signalGtk.Widget::unmap].

Parameters
Self
Call
Slot
After

On_Map

procedure On_Map
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when Widget is going to be mapped.

A widget is mapped when the widget is visible (which is controlled with [propertyGtk.Widget:visible]) and all its parents up to the toplevel widget are also visible.

The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of [signalGtk.Widget::unmap].

Parameters
Self
Call
After

On_Mnemonic_Activate

procedure On_Mnemonic_Activate
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Boolean_Boolean;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when a widget is activated via a mnemonic.

The default handler for this signal activates Widget if Group_Cycling is false, or just makes Widget grab focus if Group_Cycling is true.

Callback parameters: -- @param Group_Cycling true if there are other widgets with the same -- mnemonic

Parameters
Self
Call
Slot
After

On_Mnemonic_Activate

procedure On_Mnemonic_Activate
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Boolean_Boolean;
    After : Boolean := False)

Emitted when a widget is activated via a mnemonic.

The default handler for this signal activates Widget if Group_Cycling is false, or just makes Widget grab focus if Group_Cycling is true.

Callback parameters: -- @param Group_Cycling true if there are other widgets with the same -- mnemonic

Parameters
Self
Call
After

On_Move_Focus

procedure On_Move_Focus
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Gtk_Direction_Type_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when the focus is moved.

The ::move-focus signal is a keybinding signal.

The default bindings for this signal are <kbd>Tab</kbd> to move forward, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.

Parameters
Self
Call
Slot
After

On_Move_Focus

procedure On_Move_Focus
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Gtk_Direction_Type_Void;
    After : Boolean := False)

Emitted when the focus is moved.

The ::move-focus signal is a keybinding signal.

The default bindings for this signal are <kbd>Tab</kbd> to move forward, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.

Parameters
Self
Call
After

On_Query_Tooltip

procedure On_Query_Tooltip
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Gint_Gint_Boolean_GObject_Boolean;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when the widget's tooltip is about to be shown.

This happens when the [propertyGtk.Widget:has-tooltip] property is true and the hover timeout has expired with the cursor hovering above Widget; or emitted when Widget got focus in keyboard mode.

Using the given coordinates, the signal handler should determine whether a tooltip should be shown for Widget. If this is the case true should be returned, false otherwise. Note that if Keyboard_Mode is true, the values of X and Y are undefined and should not be used.

The signal handler is free to manipulate Tooltip with the therefore destined function calls.

Callback parameters: -- @param X the x coordinate of the cursor position in widget coordinates -- @param Y the y coordinate of the cursor position in widget coordinates -- @param Keyboard_Mode true if the tooltip was triggered using the -- keyboard -- @param Tooltip a GtkTooltip

Parameters
Self
Call
Slot
After

On_Query_Tooltip

procedure On_Query_Tooltip
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Gint_Gint_Boolean_GObject_Boolean;
    After : Boolean := False)

Emitted when the widget's tooltip is about to be shown.

This happens when the [propertyGtk.Widget:has-tooltip] property is true and the hover timeout has expired with the cursor hovering above Widget; or emitted when Widget got focus in keyboard mode.

Using the given coordinates, the signal handler should determine whether a tooltip should be shown for Widget. If this is the case true should be returned, false otherwise. Note that if Keyboard_Mode is true, the values of X and Y are undefined and should not be used.

The signal handler is free to manipulate Tooltip with the therefore destined function calls.

Callback parameters: -- @param X the x coordinate of the cursor position in widget coordinates -- @param Y the y coordinate of the cursor position in widget coordinates -- @param Keyboard_Mode true if the tooltip was triggered using the -- keyboard -- @param Tooltip a GtkTooltip

Parameters
Self
Call
After

On_Realize

procedure On_Realize
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when Widget is associated with a GdkSurface.

This means that [methodGtk.Widget.realize] has been called or the widget has been mapped (that is, it is going to be drawn).

Parameters
Self
Call
Slot
After

On_Realize

procedure On_Realize
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when Widget is associated with a GdkSurface.

This means that [methodGtk.Widget.realize] has been called or the widget has been mapped (that is, it is going to be drawn).

Parameters
Self
Call
After

On_Show

procedure On_Show
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when Widget is shown.

Parameters
Self
Call
Slot
After

On_Show

procedure On_Show
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when Widget is shown.

Parameters
Self
Call
After

On_State_Flags_Changed

procedure On_State_Flags_Changed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Gtk_State_Flags_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when the widget state changes.

See [methodGtk.Widget.get_state_flags].

Parameters
Self
Call
Slot
After

On_State_Flags_Changed

procedure On_State_Flags_Changed
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Gtk_State_Flags_Void;
    After : Boolean := False)

Emitted when the widget state changes.

See [methodGtk.Widget.get_state_flags].

Parameters
Self
Call
After

On_Unmap

procedure On_Unmap
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when Widget is going to be unmapped.

A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.

As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

Parameters
Self
Call
Slot
After

On_Unmap

procedure On_Unmap
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when Widget is going to be unmapped.

A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.

As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

Parameters
Self
Call
After

On_Unrealize

procedure On_Unrealize
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

Emitted when the GdkSurface associated with Widget is destroyed.

This means that [methodGtk.Widget.unrealize] has been called or the widget has been unmapped (that is, it is going to be hidden).

Parameters
Self
Call
Slot
After

On_Unrealize

procedure On_Unrealize
   (Self  : not null access Gtk_Widget_Record;
    Call  : Cb_Gtk_Widget_Void;
    After : Boolean := False)

Emitted when the GdkSurface associated with Widget is destroyed.

This means that [methodGtk.Widget.unrealize] has been called or the widget has been unmapped (that is, it is going to be hidden).

Parameters
Self
Call
After

Opacity_Property

Opacity_Property : constant Glib.Properties.Property_Double;

Type: Gdouble The requested opacity of the widget.

Overflow_Property

Overflow_Property : constant Gtk.Enums.Property_Gtk_Overflow;

How content outside the widget's content area is treated.

This property is meant to be set by widget implementations, typically in their instance init function.

Parent_Property

Parent_Property : constant Glib.Properties.Property_Object;

Type: Gtk_Widget The parent widget of this widget.

Pick

function Pick
   (Widget : not null access Gtk_Widget_Record;
    X      : Gdouble;
    Y      : Gdouble;
    Flags  : Gtk.Enums.Gtk_Pick_Flags) return Gtk_Widget

Finds the descendant of the widget closest to a point. The point (x, y) must be given in widget coordinates, so (0, 0) is assumed to be the top left of Widget's content area. Usually widgets will return NULL if the given coordinate is not contained in Widget checked via [methodGtk.Widget.contains]. Otherwise they will recursively try to find a child that does not return NULL. Widgets are however free to customize their picking algorithm. This function is used on the toplevel to determine the widget below the mouse cursor for purposes of hover highlighting and delivering events.

Parameters
Widget
X

x coordinate to test, relative to Widget's origin

Y

y coordinate to test, relative to Widget's origin

Flags

flags to influence what is picked

Return Value

the widget's descendant at (x, y). Has transfer-ownership='none'.

Property_Gtk_Align

type Property_Gtk_Align is new Gtk_Align_Properties.Property;

Queue_Allocate

procedure Queue_Allocate (Widget : not null access Gtk_Widget_Record)

Flags the widget for a rerun of the [vfuncGtk.Widget.size_allocate] function. Use this function instead of [methodGtk.Widget.queue_resize] when the Widget's size request didn't change but it wants to reposition its contents. An example user of this function is [methodGtk.Widget.set_halign]. This function is only for use in widget implementations.

Parameters
Widget

Queue_Draw

procedure Queue_Draw (Widget : not null access Gtk_Widget_Record)

Schedules this widget to be redrawn. The redraw will happen in the paint phase of the current or the next frame. This means Widget's [vfuncGtk.Widget.snapshot] implementation will be called.

Parameters
Widget

Queue_Resize

procedure Queue_Resize (Widget : not null access Gtk_Widget_Record)

Flags a widget to have its size renegotiated. This should be called when a widget for some reason has a new size request. For example, when you change the text in a [classGtk.Label], the label queues a resize to ensure there's enough space for the new text. Note that you cannot call Gtk.Widget.Queue_Resize on a widget from inside its implementation of the [vfuncGtk.Widget.size_allocate] virtual method. Calls to Gtk.Widget.Queue_Resize from inside [vfuncGtk.Widget.size_allocate] will be silently ignored. This function is only for use in widget implementations.

Parameters
Widget

Realize

procedure Realize (Widget : not null access Gtk_Widget_Record)

Creates the GDK resources associated with a widget. Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically. Realizing a widget requires all the widget's parent widgets to be realized; calling this function realizes the widget's parents in addition to Widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen. This function is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as [signalGtk.Widget::realize].

Parameters
Widget

Realize_Handler

type Realize_Handler is access procedure (Widget : System.Address);

Called when the widget is realized.

Parameters
Widget

Receives_Default_Property

Receives_Default_Property : constant Glib.Properties.Property_Boolean;

Whether the widget will receive the default action when it is focused.

Remove_Controller

procedure Remove_Controller
   (Widget     : not null access Gtk_Widget_Record;
    Controller : not null access Gtk.Event_Controller.Gtk_Event_Controller_Record'Class)

Removes an event controller from the widget. The removed event controller will not receive any more events, and should not be used again. Widgets will remove all event controllers automatically when they are destroyed, there is normally no need to call this function.

Parameters
Widget
Controller

an event controller

Remove_Css_Class

procedure Remove_Css_Class
   (Widget    : not null access Gtk_Widget_Record;
    Css_Class : UTF8_String)

Removes a style from the widget. After this, the style of Widget will stop matching for Css_Class.

Parameters
Widget
Css_Class

style class to remove from Widget, without the leading period

Remove_Mnemonic_Label

procedure Remove_Mnemonic_Label
   (Widget : not null access Gtk_Widget_Record;
    Label  : not null access Gtk_Widget_Record'Class)

Removes a widget from the list of mnemonic labels for this widget. See [methodGtk.Widget.list_mnemonic_labels]. The widget must have previously been added to the list with [methodGtk.Widget.add_mnemonic_label].

Parameters
Widget
Label

a widget that is a mnemonic label for Widget

Remove_Tick_Callback

procedure Remove_Tick_Callback
   (Widget : not null access Gtk_Widget_Record;
    Id     : Guint)

Removes a tick callback previously registered with [methodGtk.Widget.add_tick_callback].

Parameters
Widget
Id

an ID returned by [methodGtk.Widget.add_tick_callback]

Root_Property

Root_Property : constant Glib.Properties.Property_Interface;

Type: Gtk.Root.Gtk_Root The GtkRoot widget of the widget tree containing this widget.

This will be NULL if the widget is not contained in a root widget.

Scale_Factor_Property

Scale_Factor_Property : constant Glib.Properties.Property_Int;

The scale factor of the widget.

Sensitive_Property

Sensitive_Property : constant Glib.Properties.Property_Boolean;

Whether the widget responds to input.

Set_Can_Focus

procedure Set_Can_Focus
   (Widget    : not null access Gtk_Widget_Record;
    Can_Focus : Boolean)

Sets whether the input focus can enter the widget or any of its children. Applications should set Can_Focus to false to mark a widget as for pointer/touch use only. Note that having Can_Focus be true is only one of the necessary conditions for being focusable. A widget must also be sensitive and focusable and not have an ancestor that is marked as not can-focus in order to receive input focus. See [methodGtk.Widget.grab_focus] for actually setting the input focus on a widget.

Parameters
Widget
Can_Focus

whether the input focus can enter the widget or any of its children

Set_Can_Target

procedure Set_Can_Target
   (Widget     : not null access Gtk_Widget_Record;
    Can_Target : Boolean)

Sets whether the widget can be the target of pointer events.

Parameters
Widget
Can_Target

whether this widget should be able to receive pointer events

Set_Child_Visible

procedure Set_Child_Visible
   (Widget        : not null access Gtk_Widget_Record;
    Child_Visible : Boolean)

Sets whether the widget should be mapped along with its parent. The child visibility can be set for widget before it is added to a container with [methodGtk.Widget.set_parent], to avoid mapping children unnecessary before immediately unmapping them. However it will be reset to its default state of true when the widget is removed from a container. Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself. This function is only useful for widget implementations and should never be called by an application.

Parameters
Widget
Child_Visible

whether Widget should be mapped along with its parent

Set_Css_Classes

procedure Set_Css_Classes
   (Widget  : not null access Gtk_Widget_Record;
    Classes : GNAT.Strings.String_List)

Replaces the current style classes of the widget with Classes.

Parameters
Widget
Classes

NULL-terminated list of style classes

Set_Cursor

procedure Set_Cursor
   (Widget : not null access Gtk_Widget_Record;
    Cursor : access Gdk.Cursor.Gdk_Cursor_Record'Class)

Sets the cursor to be shown when the pointer hovers over the widget. If the Cursor is NULL, Widget will use the cursor inherited from its parent.

Parameters
Widget
Cursor

the new cursor

Set_Cursor_From_Name

procedure Set_Cursor_From_Name
   (Widget : not null access Gtk_Widget_Record;
    Name   : UTF8_String := "")

Sets the cursor to be shown when the pointer hovers over the widget. This is a utility function that creates a cursor via [ctorGdk.Cursor.new_from_name] and then sets it on Widget with [methodGtk.Widget.set_cursor]. See those functions for details. On top of that, this function allows Name to be NULL, which will do the same as calling [methodGtk.Widget.set_cursor] with a NULL cursor.

Parameters
Widget
Name

the name of the cursor

Set_Default_Direction

procedure Set_Default_Direction (Dir : Gtk.Enums.Gtk_Text_Direction)

Sets the default reading direction for widgets. See [methodGtk.Widget.set_direction].

Parameters
Dir

the new default direction, either [enumGtk.TextDirection.ltr] or [enumGtk.TextDirection.rtl]

Set_Default_Measure_Handler

procedure Set_Default_Measure_Handler
  (Klass : Glib.Object.GObject_Class; Handler : Measure_Handler)

Override the class "measure" vfunc. Only needed when writing your own widgets.

Parameters
Klass
Handler

Set_Default_Realize_Handler

procedure Set_Default_Realize_Handler
  (Klass : Glib.Object.GObject_Class; Handler : Realize_Handler)

Override the class "realize" vfunc.

Parameters
Klass
Handler

Set_Default_Size_Allocate_Handler

procedure Set_Default_Size_Allocate_Handler
  (Klass : Glib.Object.GObject_Class; Handler : Size_Allocate_Handler)

Override the class "size_allocate" vfunc.

Parameters
Klass
Handler

Set_Default_Snapshot_Handler

procedure Set_Default_Snapshot_Handler
  (Klass : Glib.Object.GObject_Class; Handler : Snapshot_Handler)

Override the class "snapshot" vfunc.

Parameters
Klass
Handler

Set_Direction

procedure Set_Direction
   (Widget : not null access Gtk_Widget_Record;
    Dir    : Gtk.Enums.Gtk_Text_Direction)

Sets the reading direction on the widget. This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done. Generally, applications will let the default reading direction prevail, except for widgets where the children are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification). If the direction is set to [enumGtk.TextDirection.none], then the value set by [funcGtk.Widget.set_default_direction] will be used.

Parameters
Widget
Dir

the new direction

Set_Focus_Child

procedure Set_Focus_Child
   (Widget : not null access Gtk_Widget_Record;
    Child  : access Gtk_Widget_Record'Class)

Set the focus child of the widget. This function is only suitable for widget implementations. If you want a certain widget to get the input focus, call [methodGtk.Widget.grab_focus] on it.

Parameters
Widget
Child

a direct child widget of Widget or NULL to unset the focus child

Set_Focus_On_Click

procedure Set_Focus_On_Click
   (Widget         : not null access Gtk_Widget_Record;
    Focus_On_Click : Boolean)

Sets whether the widget should grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don't want the keyboard focus removed from the main area of the application.

Parameters
Widget
Focus_On_Click

whether the widget should grab focus when clicked with the mouse

Set_Focusable

procedure Set_Focusable
   (Widget    : not null access Gtk_Widget_Record;
    Focusable : Boolean)

Sets whether the widget can own the input focus. Widget implementations should set Focusable to true in their init function if they want to receive keyboard input. Note that having Focusable be true is only one of the necessary conditions for being focusable. A widget must also be sensitive and can-focus and not have an ancestor that is marked as not can-focus in order to receive input focus. See [methodGtk.Widget.grab_focus] for actually setting the input focus on a widget.

Parameters
Widget
Focusable

whether or not Widget can own the input focus

Set_Font_Map

procedure Set_Font_Map
   (Widget   : not null access Gtk_Widget_Record;
    Font_Map : access Pango.Font_Map.Pango_Font_Map_Record'Class)

Sets the font map to use for text rendering in the widget. The font map is the object that is used to look up fonts. Setting a custom font map can be useful in special situations, e.g. when you need to add application-specific fonts to the set of available fonts. When not set, the widget will inherit the font map from its parent.

Parameters
Widget
Font_Map

a PangoFontMap

Set_Font_Options

procedure Set_Font_Options
   (Widget  : not null access Gtk_Widget_Record;
    Options : in out Cairo.Cairo_Font_Options)

Sets the cairo_font_options_t used for text rendering in the widget. When not set, the default font options for the GdkDisplay will be used. Deprecated since 4.16, 1

Parameters
Widget
Options

a cairo_font_options_t struct to unset any previously set default font options

Set_Halign

procedure Set_Halign
   (Widget : not null access Gtk_Widget_Record;
    Align  : Gtk_Align)

Sets the horizontal alignment of the widget.

Parameters
Widget
Align

the horizontal alignment

Set_Has_Tooltip

procedure Set_Has_Tooltip
   (Widget      : not null access Gtk_Widget_Record;
    Has_Tooltip : Boolean)

Sets the has-tooltip property on the widget.

Parameters
Widget
Has_Tooltip

whether or not Widget has a tooltip

Set_Hexpand

procedure Set_Hexpand
   (Widget : not null access Gtk_Widget_Record;
    Expand : Boolean)

Sets whether the widget would like any available extra horizontal space. When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand. Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room. By default, widgets automatically expand if any of their children want to expand. (To see if a widget will automatically expand given its current children and state, call [methodGtk.Widget.compute_expand]. A widget can decide how the expandability of children affects its own expansion by overriding the compute_expand virtual method on GtkWidget.). Setting hexpand explicitly with this function will override the automatic expand behavior. This function forces the widget to expand or not to expand, regardless of children. The override occurs because [methodGtk.Widget.set_hexpand] sets the hexpand-set property (see [methodGtk.Widget.set_hexpand_set]) which causes the widget's hexpand value to be used, rather than looking at children and widget state.

Parameters
Widget
Expand

whether to expand

Set_Hexpand_Set

procedure Set_Hexpand_Set
   (Widget : not null access Gtk_Widget_Record;
    Set    : Boolean)

Sets whether the hexpand flag will be used. The [propertyGtk.Widget:hexpand-set] property will be set automatically when you call [methodGtk.Widget.set_hexpand] to set hexpand, so the most likely reason to use this function would be to unset an explicit expand flag. If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand. There are few reasons to use this function, but it's here for completeness and consistency.

Parameters
Widget
Set

value for hexpand-set property

Set_Layout_Manager

procedure Set_Layout_Manager
   (Widget         : not null access Gtk_Widget_Record;
    Layout_Manager : access Gtk.Layout_Manager.Gtk_Layout_Manager_Record'Class)

Sets the layout manager to use for measuring and allocating children of the widget.

Parameters
Widget
Layout_Manager

a layout manager. Has transfer-ownership='full'.

Set_Limit_Events

procedure Set_Limit_Events
   (Widget       : not null access Gtk_Widget_Record;
    Limit_Events : Boolean)

Sets whether the widget acts like a modal dialog, with respect to event delivery. Since: gtk+ 4.18

Parameters
Widget
Limit_Events

whether to limit events

Set_Margin_Bottom

procedure Set_Margin_Bottom
   (Widget : not null access Gtk_Widget_Record;
    Margin : Glib.Gint)

Sets the bottom margin of the widget.

Parameters
Widget
Margin

the bottom margin

Set_Margin_End

procedure Set_Margin_End
   (Widget : not null access Gtk_Widget_Record;
    Margin : Glib.Gint)

Sets the end margin of the widget.

Parameters
Widget
Margin

the end margin

Set_Margin_Start

procedure Set_Margin_Start
   (Widget : not null access Gtk_Widget_Record;
    Margin : Glib.Gint)

Sets the start margin of the widget.

Parameters
Widget
Margin

the start margin

Set_Margin_Top

procedure Set_Margin_Top
   (Widget : not null access Gtk_Widget_Record;
    Margin : Glib.Gint)

Sets the top margin of the widget.

Parameters
Widget
Margin

the top margin

Set_Name

procedure Set_Name
   (Widget : not null access Gtk_Widget_Record;
    Name   : UTF8_String)

Sets a widgets name. Setting a name allows you to refer to the widget from a CSS file. You can apply a style to widgets with a particular name in the CSS file. See the documentation for the CSS syntax (on the same page as the docs for [classGtk.StyleContext]. Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *...), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.

Parameters
Widget
Name

name for the widget

Set_Opacity

procedure Set_Opacity
   (Widget  : not null access Gtk_Widget_Record;
    Opacity : Gdouble)

Requests the widget to be rendered partially transparent. An opacity of 0 is fully transparent and an opacity of 1 is fully opaque. Opacity works on both toplevel widgets and child widgets, although there are some limitations: For toplevel widgets, applying opacity depends on the capabilities of the windowing system. On X11, this has any effect only on X displays with a compositing manager, see [methodGdk.Display.is_composited]. On Windows and Wayland it will always work, although setting a window's opacity after the window has been shown may cause some flicker. Note that the opacity is inherited through inclusion — if you set a toplevel to be partially translucent, all of its content will appear translucent, since it is ultimatively rendered on that toplevel. The opacity value itself is not inherited by child widgets (since that would make widgets deeper in the hierarchy progressively more translucent). As a consequence, [classGtk.Popover] instances and other [ifaceGtk.Native] widgets with their own surface will use their own opacity value, and thus by default appear non-translucent, even if they are attached to a toplevel that is translucent.

Parameters
Widget
Opacity

desired opacity, between 0 and 1

Set_Overflow

procedure Set_Overflow
   (Widget   : not null access Gtk_Widget_Record;
    Overflow : Gtk.Enums.Gtk_Overflow)

Sets how the widget treats content that is drawn outside the it's content area. See the definition of [enumGtk.Overflow] for details. This setting is provided for widget implementations and should not be used by application code. The default value is [enumGtk.Overflow.visible].

Parameters
Widget
Overflow

desired overflow value

Set_Parent

procedure Set_Parent
   (Widget : not null access Gtk_Widget_Record;
    Parent : not null access Gtk_Widget_Record'Class)

Sets the parent widget of the widget. This takes care of details such as updating the state and style of the child to reflect its new location and resizing the parent. The opposite function is [methodGtk.Widget.unparent]. This function is useful only when implementing subclasses of GtkWidget.

Parameters
Widget
Parent

parent widget

Set_Receives_Default

procedure Set_Receives_Default
   (Widget           : not null access Gtk_Widget_Record;
    Receives_Default : Boolean)

Sets whether the widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.

Parameters
Widget
Receives_Default

whether or not Widget can be a default widget

Set_Sensitive

procedure Set_Sensitive
   (Widget    : not null access Gtk_Widget_Record;
    Sensitive : Boolean := True)

Sets the sensitivity of the widget. A widget is sensitive if the user can interact with it. Insensitive widgets are "grayed out" and the user can't interact with them. Insensitive widgets are known as "inactive", "disabled", or "ghosted" in some other toolkits.

Parameters
Widget
Sensitive

true to make the widget sensitive

Set_Size_Request

procedure Set_Size_Request
   (Widget : not null access Gtk_Widget_Record;
    Width  : Glib.Gint := -1;
    Height : Glib.Gint := -1)

Sets the minimum size of the widget. That is, the widget's size request will be at least Width by Height. You can use this function to force a widget to be larger than it normally would be. In most cases, [methodGtk.Window.set_default_size] is a better choice for toplevel windows than this function; setting the default size will still allow users to shrink the window. Setting the size request will force them to leave the window at least as large as the size request. Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it is basically impossible to hardcode a size that will always work. The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested. If the size request in a given direction is -1 (unset), then the "natural" size request of the widget will be used instead. The size request set here does not include any margin from the properties [propertyGtk.Widget:margin-start], [propertyGtk.Widget:margin-end], [propertyGtk.Widget:margin-top], and [propertyGtk.Widget:margin-bottom], but it does include pretty much all other padding or border properties set by any subclass of GtkWidget.

Parameters
Widget
Width

width Widget should request, or -1 to unset

Height

height Widget should request, or -1 to unset

Set_State_Flags

procedure Set_State_Flags
   (Widget : not null access Gtk_Widget_Record;
    Flags  : Gtk.Enums.Gtk_State_Flags;
    Clear  : Boolean)

Turns on flag values in the current widget state. Typical widget states are insensitive, prelighted, etc. This function accepts the values [flagsGtk.StateFlags.dir-ltr] and [flagsGtk.StateFlags.dir-rtl] but ignores them. If you want to set the widget's direction, use [methodGtk.Widget.set_direction]. This function is for use in widget implementations.

Parameters
Widget
Flags

state flags to turn on

Clear

whether to clear state before turning on Flags

Set_Tooltip_Markup

procedure Set_Tooltip_Markup
   (Widget : not null access Gtk_Widget_Record;
    Markup : UTF8_String := "")

Sets the contents of the tooltip for widget. Markup must contain Pango markup. This function will take care of setting the [propertyGtk.Widget:has-tooltip] as a side effect, and of the default handler for the [signalGtk.Widget::query-tooltip] signal. See also [methodGtk.Tooltip.set_markup].

Parameters
Widget
Markup

the contents of the tooltip for Widget

Set_Tooltip_Text

procedure Set_Tooltip_Text
   (Widget : not null access Gtk_Widget_Record;
    Text   : UTF8_String := "")

Sets the contents of the tooltip for the widget. If Text contains any markup, it will be escaped. This function will take care of setting [propertyGtk.Widget:has-tooltip] as a side effect, and of the default handler for the [signalGtk.Widget::query-tooltip] signal. See also [methodGtk.Tooltip.set_text].

Parameters
Widget
Text

the contents of the tooltip for Widget

Set_Valign

procedure Set_Valign
   (Widget : not null access Gtk_Widget_Record;
    Align  : Gtk_Align)

Sets the vertical alignment of the widget.

Parameters
Widget
Align

the vertical alignment

Set_Vexpand

procedure Set_Vexpand
   (Widget : not null access Gtk_Widget_Record;
    Expand : Boolean)

Sets whether the widget would like any available extra vertical space. See [methodGtk.Widget.set_hexpand] for more detail.

Parameters
Widget
Expand

whether to expand

Set_Vexpand_Set

procedure Set_Vexpand_Set
   (Widget : not null access Gtk_Widget_Record;
    Set    : Boolean)

Sets whether the vexpand flag will be used. See [methodGtk.Widget.set_hexpand_set] for more detail.

Parameters
Widget
Set

value for vexpand-set property

Set_Visible

procedure Set_Visible
   (Widget  : not null access Gtk_Widget_Record;
    Visible : Boolean)

Sets the visibility state of Widget. Note that setting this to true doesn't mean the widget is actually viewable, see [methodGtk.Widget.get_visible].

Parameters
Widget
Visible

whether the widget should be shown or not

Should_Layout

function Should_Layout
   (Widget : not null access Gtk_Widget_Record) return Boolean

Returns whether the widget should contribute to the measuring and allocation of its parent. This is false for invisible children, but also for children that have their own surface, such as [classGtk.Popover] instances.

Parameters
Widget
Return Value

true if child should be included in measuring and allocating

Show

procedure Show (Widget : not null access Gtk_Widget_Record)

Flags a widget to be displayed. Any widget that isn't shown will not appear on the screen. Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen. When a toplevel widget is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel widget is realized and mapped. Deprecated since 4.10, 1

Parameters
Widget

Signal_Destroy

Signal_Destroy : constant Glib.Signal_Name := "destroy";

Signals that all holders of a reference to the widget should release the reference that they hold.

May result in finalization of the widget if all references are released.

This signal is not suitable for saving widget state.

Signal_Direction_Changed

Signal_Direction_Changed : constant Glib.Signal_Name := "direction-changed";

Emitted when the text direction of a widget changes.

Signal_Hide

Signal_Hide : constant Glib.Signal_Name := "hide";

Emitted when Widget is hidden.

Signal_Keynav_Failed

Signal_Keynav_Failed : constant Glib.Signal_Name := "keynav-failed";

Emitted if keyboard navigation fails.

See [methodGtk.Widget.keynav_failed] for details.

Callback parameters: -- @param Direction the direction of movement

Signal_Map

Signal_Map : constant Glib.Signal_Name := "map";

Emitted when Widget is going to be mapped.

A widget is mapped when the widget is visible (which is controlled with [propertyGtk.Widget:visible]) and all its parents up to the toplevel widget are also visible.

The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of [signalGtk.Widget::unmap].

Signal_Mnemonic_Activate

Signal_Mnemonic_Activate : constant Glib.Signal_Name := "mnemonic-activate";

Emitted when a widget is activated via a mnemonic.

The default handler for this signal activates Widget if Group_Cycling is false, or just makes Widget grab focus if Group_Cycling is true.

Callback parameters: -- @param Group_Cycling true if there are other widgets with the same -- mnemonic

Signal_Move_Focus

Signal_Move_Focus : constant Glib.Signal_Name := "move-focus";

Emitted when the focus is moved.

The ::move-focus signal is a keybinding signal.

The default bindings for this signal are <kbd>Tab</kbd> to move forward, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.

Signal_Query_Tooltip

Signal_Query_Tooltip : constant Glib.Signal_Name := "query-tooltip";

Emitted when the widget's tooltip is about to be shown.

This happens when the [propertyGtk.Widget:has-tooltip] property is true and the hover timeout has expired with the cursor hovering above Widget; or emitted when Widget got focus in keyboard mode.

Using the given coordinates, the signal handler should determine whether a tooltip should be shown for Widget. If this is the case true should be returned, false otherwise. Note that if Keyboard_Mode is true, the values of X and Y are undefined and should not be used.

The signal handler is free to manipulate Tooltip with the therefore destined function calls.

Callback parameters: -- @param X the x coordinate of the cursor position in widget coordinates -- @param Y the y coordinate of the cursor position in widget coordinates -- @param Keyboard_Mode true if the tooltip was triggered using the -- keyboard -- @param Tooltip a GtkTooltip

Signal_Realize

Signal_Realize : constant Glib.Signal_Name := "realize";

Emitted when Widget is associated with a GdkSurface.

This means that [methodGtk.Widget.realize] has been called or the widget has been mapped (that is, it is going to be drawn).

Signal_Show

Signal_Show : constant Glib.Signal_Name := "show";

Emitted when Widget is shown.

Signal_State_Flags_Changed

Signal_State_Flags_Changed : constant Glib.Signal_Name := "state-flags-changed";

Emitted when the widget state changes.

See [methodGtk.Widget.get_state_flags].

Signal_Unmap

Signal_Unmap : constant Glib.Signal_Name := "unmap";

Emitted when Widget is going to be unmapped.

A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden.

As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.

Signal_Unrealize

Signal_Unrealize : constant Glib.Signal_Name := "unrealize";

Emitted when the GdkSurface associated with Widget is destroyed.

This means that [methodGtk.Widget.unrealize] has been called or the widget has been unmapped (that is, it is going to be hidden).

Size_Allocate

procedure Size_Allocate
   (Widget     : not null access Gtk_Widget_Record;
    Allocation : Gdk.Rectangle.Gdk_Rectangle;
    Baseline   : Glib.Gint)

Allocates widget with a transformation that translates the origin to the position in Allocation. This is a simple form of [methodGtk.Widget.allocate].

Parameters
Widget
Allocation

position and size to be allocated to Widget

Baseline

the baseline of the child, or -1

Size_Allocate_Handler

type Size_Allocate_Handler is access procedure
  (Widget : System.Address; Width, Height, Baseline : Glib.Gint);

Position and size the widget (and its children) within the allocated Width x Height area. Baseline is -1 when unused.

Parameters
Widget
Width
Height
Baseline

Snapshot_Handler

type Snapshot_Handler is access procedure
  (Widget : System.Address; Snapshot : System.Address);

Render the widget. Snapshot is the underlying C GtkSnapshot to draw into.

Parameters
Widget
Snapshot

Tooltip_Markup_Property

Tooltip_Markup_Property : constant Glib.Properties.Property_String;

Sets the text of tooltip to be the given string, which is marked up with Pango markup.

Also see [methodGtk.Tooltip.set_markup].

This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: [propertyGtk.Widget:has-tooltip] will automatically be set to true and there will be taken care of [signalGtk.Widget::query-tooltip] in the default signal handler.

Note that if both [propertyGtk.Widget:tooltip-text] and [propertyGtk.Widget:tooltip-markup] are set, the last one wins.

Tooltip_Text_Property

Tooltip_Text_Property : constant Glib.Properties.Property_String;

Sets the text of tooltip to be the given string.

Also see [methodGtk.Tooltip.set_text].

This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: [propertyGtk.Widget:has-tooltip] will automatically be set to true and there will be taken care of [signalGtk.Widget::query-tooltip] in the default signal handler.

Note that if both [propertyGtk.Widget:tooltip-text] and [propertyGtk.Widget:tooltip-markup] are set, the last one wins.

Translate_Coordinates

procedure Translate_Coordinates
   (Widget      : not null access Gtk_Widget_Record;
    Dest_Widget : not null access Gtk_Widget_Record'Class;
    Src_X       : Gdouble;
    Src_Y       : Gdouble;
    Dest_X      : out Gdouble;
    Dest_Y      : out Gdouble;
    Result      : out Boolean)

Translates coordinates relative to Src_Widget's allocation to coordinates relative to Dest_Widget's allocations. In order to perform this operation, both widget must share a common ancestor. If that is not the case, Dest_X and Dest_Y are set to 0 and false is returned. Deprecated since 4.12, 1

Parameters
Widget
Dest_Widget

another widget

Src_X

X position in widget coordinates of Src_Widget

Src_Y

Y position in widget coordinates of Src_Widget

Dest_X

location to store X position in widget coordinates of Dest_Widget

Dest_Y

location to store Y position in widget coordinates of Dest_Widget

Result

true if Src_Widget and Dest_Widget have a common ancestor, false otherwise

Trigger_Tooltip_Query

procedure Trigger_Tooltip_Query
   (Widget : not null access Gtk_Widget_Record)

Triggers a tooltip query on the display of the widget.

Parameters
Widget

Unmap

procedure Unmap (Widget : not null access Gtk_Widget_Record)

Causes a widget to be unmapped if it's currently mapped. This function is only for use in widget implementations.

Parameters
Widget

Unparent

procedure Unparent (Widget : not null access Gtk_Widget_Record)

Removes Widget from its parent. This function is only for use in widget implementations, typically in dispose.

Parameters
Widget

Unrealize

procedure Unrealize (Widget : not null access Gtk_Widget_Record)

Causes a widget to be unrealized. This frees all GDK resources associated with the widget. This function is only useful in widget implementations.

Parameters
Widget

Unset_State_Flags

procedure Unset_State_Flags
   (Widget : not null access Gtk_Widget_Record;
    Flags  : Gtk.Enums.Gtk_State_Flags)

Turns off flag values for the current widget state. See [methodGtk.Widget.set_state_flags]. This function is for use in widget implementations.

Parameters
Widget
Flags

state flags to turn off

Valign_Property

Valign_Property : constant Gtk.Widget.Property_Gtk_Align;

Type: Gtk_Align How to distribute vertical space if widget gets extra space.

Vexpand_Property

Vexpand_Property : constant Glib.Properties.Property_Boolean;

Whether to expand vertically.

Vexpand_Set_Property

Vexpand_Set_Property : constant Glib.Properties.Property_Boolean;

Whether to use the vexpand property.

Visible_Property

Visible_Property : constant Glib.Properties.Property_Boolean;

Whether the widget is visible.

Widget_List

package Widget_List is new Generic_List (Gtk.Widget.Gtk_Widget);

Widget_SList

package Widget_SList is new Generic_SList (Gtk.Widget.Gtk_Widget);

Width_Request_Property

Width_Request_Property : constant Glib.Properties.Property_Int;

Overrides for width request of the widget.

If this is -1, the natural request will be used.

Simple Types

Record Types

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations