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.RGBA
    58. Gdk.Popup_Layout
    59. Gdk.Rectangle
    60. Gdk.Seat
    61. Gdk.Snapshot
    62. Gdk.Surface
    63. Gdk.Texture
    64. Gdk.Toplevel_Layout
    65. Glib
    66. Glib.Action
    67. Glib.Action_Group
    68. Glib.Action_Map
    69. 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
    70. Glib.App_Launch_Context
    71. Glib.Application
    72. Glib.Bytes
    73. Glib.Cancellable
      1. Glib.Cancellable.Connect_User_Data
    74. Glib.Convert
    75. Glib.Enums
    76. Glib.Error
    77. Glib.File_IO_Stream
    78. Glib.Error_Enums
    79. Glib.File_Info
    80. Glib.File_Input_Stream
    81. Glib.GFile
    82. Glib.GSlist
      1. Glib.GSlist.Generic_SList
    83. Glib.File_Output_Stream
    84. Glib.G_Icon
    85. 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
    86. Glib.Glist
      1. Glib.Glist.Generic_List
    87. Glib.Gnodes
      1. Glib.Gnodes.Gnode_Data
    88. Glib.IOChannel
    89. Glib.Graphs
    90. Glib.IO_Stream
    91. Glib.Graphs.Layouts
      1. Glib.Graphs.Layouts.Layered_Layouts
    92. Glib.Input_Stream
    93. Glib.Key_File
    94. Glib.List_Model
    95. Glib.List_Store
    96. Glib.Loadable_Icon
    97. Glib.Main
      1. Glib.Main.Generic_Sources
    98. Glib.Menu
    99. Glib.Menu_Model
    100. Glib.Messages
    101. Glib.Module
    102. Glib.Notification
    103. Glib.Object
      1. Glib.Object.User_Data
      2. Glib.Object.User_Data_Closure
    104. Glib.Option
      1. Glib.Option.Set_Translate_Func_User_Data
    105. Glib.Output_Stream
    106. Glib.Poll
    107. Glib.Properties
    108. Glib.Properties.Creation
    109. Glib.Resource
    110. Glib.Simple_Action
    111. Glib.Simple_Action_Group
    112. Glib.Spawn
    113. Glib.String
    114. Glib.Test
    115. Glib.Type_Conversion_Hooks
      1. Glib.Type_Conversion_Hooks.Hook_Registrator
    116. Glib.Types
      1. Glib.Types.Implements
    117. Glib.Unicode
    118. Glib.Utils
    119. Glib.Values
    120. Glib.Variant
    121. Glib.XML
    122. Graphene
    123. Graphene.Box
    124. Graphene.Config
    125. Graphene.Euler
    126. Graphene.Frustum
    127. Graphene.Matrix
    128. Graphene.Plane
    129. Graphene.Point
    130. Graphene.Point3d
    131. Graphene.Quad
    132. Graphene.Quaternion
    133. Graphene.Ray
    134. Graphene.Rect
    135. Graphene.Size
    136. Graphene.Sphere
    137. Graphene.Triangle
    138. Graphene.Vec2
    139. Graphene.Vec3
    140. Graphene.Vec4
    141. Gtk
    142. Gtk.About_Dialog
    143. Gtk.Accessible
    144. Gtk.Accessible_Hyperlink
    145. Gtk.Accessible_Hypertext
    146. Gtk.Accessible_Text
    147. Gtk.Activate_Action
    148. Gtk.Adjustment
    149. Gtk.Alert_Dialog
    150. Gtk.Alternative_Trigger
    151. Gtk.Any_Filter
    152. Gtk.Application
    153. Gtk.Application_Window
    154. Gtk.Arguments
    155. Gtk.Aspect_Frame
    156. Gtk.Atcontext
    157. Gtk.Bin_Layout
    158. Gtk.Bitset
    159. Gtk.Bookmark_List
    160. Gtk.Bool_Filter
    161. Gtk.Box
    162. Gtk.Box_Layout
    163. Gtk.Buildable
    164. Gtk.Builder
    165. Gtk.Builder_CScope
    166. Gtk.Builder_List_Item_Factory
    167. Gtk.Builder_Scope
    168. Gtk.Button
    169. Gtk.Callback_Action
      1. Gtk.Callback_Action.Callback_Action_With_Data
    170. Gtk.Cclosure_Expression
    171. 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
    172. Gtk.Cell_Area_Box
      1. Gtk.Cell_Area_Box.Set_Cell_Data_Func_User_Data
    173. Gtk.Cell_Area_Context
    174. Gtk.Cell_Editable
    175. Gtk.Cell_Layout
      1. Gtk.Cell_Layout.Set_Cell_Data_Func_User_Data
    176. Gtk.Cell_Renderer
    177. Gtk.Cell_Renderer_Accel
    178. Gtk.Cell_Renderer_Combo
    179. Gtk.Cell_Renderer_Progress
    180. Gtk.Cell_Renderer_Spin
    181. Gtk.Cell_Renderer_Spinner
    182. Gtk.Cell_Renderer_Text
    183. Gtk.Cell_Renderer_Toggle
    184. Gtk.Cell_View
      1. Gtk.Cell_View.Set_Cell_Data_Func_User_Data
    185. Gtk.Center_Box
    186. Gtk.Center_Layout
    187. Gtk.Check_Button
    188. Gtk.Closure_Expression
    189. Gtk.Color_Dialog
    190. Gtk.Color_Dialog_Button
    191. Gtk.Column_View
    192. Gtk.Column_View_Cell
    193. Gtk.Column_View_Column
    194. Gtk.Column_View_Row
    195. Gtk.Column_View_Sorter
    196. Gtk.Constant_Expression
    197. Gtk.Constraint_Layout
    198. Gtk.Constraint_Target
    199. Gtk.Css_Provider
    200. Gtk.Custom_Filter
      1. Gtk.Custom_Filter.Custom_Filter_User_Data
    201. Gtk.Custom_Sorter
      1. Gtk.Custom_Sorter.Custom_Sorter_User_Data
    202. Gtk.Dialog
    203. Gtk.Drawing_Area
      1. Gtk.Drawing_Area.Set_Draw_Func_User_Data
    204. Gtk.Drop_Down
    205. Gtk.Editable
    206. Gtk.Entry_Buffer
    207. Gtk.Entry_Completion
      1. Gtk.Entry_Completion.Set_Cell_Data_Func_User_Data
      2. Gtk.Entry_Completion.Set_Match_Func_User_Data
    208. Gtk.Enums
    209. Gtk.Event_Controller
    210. Gtk.Event_Controller_Focus
    211. Gtk.Event_Controller_Key
    212. Gtk.Event_Controller_Legacy
    213. Gtk.Event_Controller_Motion
    214. Gtk.Event_Controller_Scroll
    215. Gtk.Every_Filter
    216. Gtk.Expander
    217. Gtk.Expression
      1. Gtk.Expression.Watch_User_Data
    218. Gtk.Expression_Watch
    219. Gtk.File_Filter
    220. Gtk.Filter
    221. Gtk.Filter_List_Model
    222. Gtk.Fixed_Layout
    223. Gtk.Flatten_List_Model
    224. Gtk.Font_Dialog
    225. Gtk.Font_Dialog_Button
    226. Gtk.Frame
    227. Gtk.GEntry
    228. Gtk.Gesture
    229. Gtk.Gesture_Click
    230. Gtk.Gesture_Drag
    231. Gtk.Gesture_Single
    232. Gtk.Grid
    233. Gtk.Grid_Layout
    234. Gtk.Grid_View
    235. Gtk.Header_Bar
    236. Gtk.IM_Context
    237. Gtk.IM_Context_Simple
    238. Gtk.IM_Multi_Context
    239. Gtk.Keyval_Trigger
    240. Gtk.Label
    241. Gtk.Layout_Manager
    242. Gtk.Link_Button
    243. Gtk.List_Base
    244. 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
    245. Gtk.List_Box_Row
    246. Gtk.List_Item
    247. Gtk.List_Item_Factory
    248. 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
    249. Gtk.List_View
    250. Gtk.Main
    251. Gtk.Map_List_Model
      1. Gtk.Map_List_Model.Map_List_Model_User_Data
    252. Gtk.Menu_Button
      1. Gtk.Menu_Button.Set_Create_Popup_Func_User_Data
    253. Gtk.Message_Dialog
    254. Gtk.Mnemonic_Action
    255. Gtk.Mnemonic_Trigger
    256. Gtk.Multi_Filter
    257. Gtk.Multi_Selection
    258. Gtk.Multi_Sorter
    259. Gtk.Named_Action
    260. Gtk.Native
    261. Gtk.Native_Dialog
    262. Gtk.Never_Trigger
    263. Gtk.No_Selection
    264. Gtk.Notebook
    265. Gtk.Notebook_Page
    266. Gtk.Nothing_Action
    267. Gtk.Numeric_Sorter
    268. Gtk.Object_Expression
    269. Gtk.Orientable
    270. Gtk.Overlay_Layout
    271. Gtk.Page_Setup
    272. Gtk.Paned
    273. Gtk.Paper_Size
    274. Gtk.Popover
    275. Gtk.Popover_Menu
    276. Gtk.Popover_Menu_Bar
    277. Gtk.Print_Context
    278. Gtk.Print_Dialog
    279. Gtk.Print_Operation
    280. Gtk.Print_Operation_Preview
    281. Gtk.Print_Settings
      1. Gtk.Print_Settings.Foreach_User_Data
    282. Gtk.Print_Setup
    283. Gtk.Property_Expression
    284. Gtk.Revealer
    285. Gtk.Root
    286. Gtk.Scroll_Info
    287. Gtk.Scrollable
    288. Gtk.Scrolled_Window
    289. Gtk.Search_Bar
    290. Gtk.Search_Entry
    291. Gtk.Section_Model
    292. Gtk.Selection_Filter_Model
    293. Gtk.Selection_Model
    294. Gtk.Separator
    295. Gtk.Shortcut
    296. Gtk.Shortcut_Action
    297. Gtk.Shortcut_Controller
    298. Gtk.Shortcut_Manager
    299. Gtk.Shortcut_Trigger
    300. Gtk.Signal_Action
    301. Gtk.Signal_List_Item_Factory
    302. Gtk.Single_Selection
    303. Gtk.Slice_List_Model
    304. Gtk.Snapshot
    305. Gtk.Sort_List_Model
    306. Gtk.Sorter
    307. Gtk.Spin_Button
    308. Gtk.Stack
    309. Gtk.Stack_Page
    310. Gtk.Stack_Sidebar
    311. Gtk.Stack_Switcher
    312. Gtk.String_Filter
    313. Gtk.String_List
    314. Gtk.String_Object
    315. Gtk.String_Sorter
    316. Gtk.Style_Context
    317. Gtk.Style_Provider
    318. Gtk.Text_Buffer
    319. Gtk.Text_Child_Anchor
    320. Gtk.Text_Iter
      1. Gtk.Text_Iter.Forward_Find_Char_User_Data
    321. Gtk.Text_Mark
    322. Gtk.Text_Tag
    323. Gtk.Text_Tag_Table
      1. Gtk.Text_Tag_Table.Foreach_User_Data
    324. Gtk.Text_View
    325. Gtk.Toggle_Button
    326. Gtk.Tooltip
    327. Gtk.Tree_Drag_Dest
    328. Gtk.Tree_Drag_Source
    329. Gtk.Tree_Expander
    330. Gtk.Tree_List_Model
      1. Gtk.Tree_List_Model.Gtk_Tree_List_Model_User_Data
    331. Gtk.Tree_List_Row
    332. Gtk.Tree_List_Row_Sorter
    333. Gtk.Tree_Model
      1. Gtk.Tree_Model.Foreach_User_Data
    334. 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
    335. 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
    336. Gtk.Tree_Row_Reference
    337. Gtk.Tree_Selection
      1. Gtk.Tree_Selection.Selected_Foreach_User_Data
      2. Gtk.Tree_Selection.Set_Select_Function_User_Data
    338. Gtk.Tree_Sortable
      1. Gtk.Tree_Sortable.Set_Default_Sort_Func_User_Data
      2. Gtk.Tree_Sortable.Set_Sort_Func_User_Data
    339. 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
    340. 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
    341. Gtk.Tree_View_Column
      1. Gtk.Tree_View_Column.Set_Cell_Data_Func_User_Data
    342. Gtk.Try_Expression
    343. Gtk.Widget
    344. Gtk.Window
    345. Gtkada
    346. Gtkada.Bindings
    347. Gtkada.C
      1. Gtkada.C.Unbounded_Arrays
    348. Gtkada.Intl
    349. Gtkada.Types
    350. Pango
    351. Pango.Attributes
    352. Pango.Cairo
    353. Pango.Context
    354. Pango.Coverage
    355. Pango.Enums
    356. Pango.Font
    357. Pango.Font_Face
    358. Pango.Font_Family
    359. Pango.Font_Map
    360. Pango.Font_Metrics
    361. Pango.Fontset
      1. Pango.Fontset.Foreach_User_Data
    362. Pango.Language
    363. Pango.Layout
    364. Pango.Matrix
    365. 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.Popup_Layout.Gdk_Popup_Layout
    41. Gdk.Seat.Gdk_Seat_Record
    42. Gdk.Snapshot.Gdk_Snapshot_Record
    43. Gdk.Surface.Gdk_Surface_Record
    44. Gdk.Texture.Gdk_Texture_Record
    45. Glib.App_Launch_Context.Gapp_Launch_Context_Record
    46. Glib.Application.Gapplication_Command_Line_Record
    47. Glib.Application.Gapplication_Record
    48. Glib.Bytes.Gbytes
    49. Gdk.Toplevel_Layout.Gdk_Toplevel_Layout
    50. Glib.C_Boxed
    51. Glib.File_IO_Stream.Gfile_Iostream_Record
    52. Glib.Cancellable.Gcancellable_Record
    53. Glib.File_Info.Gfile_Info_Record
    54. Glib.File_Input_Stream.Gfile_Input_Stream_Record
    55. Glib.File_Output_Stream.Gfile_Output_Stream_Record
    56. Glib.Graphs.Layouts.Base_Dummy_Vertex
    57. Glib.Graphs.Edge
    58. Glib.IO_Stream.Giostream_Record
    59. Glib.Graphs.Vertex
    60. Glib.Input_Stream.Ginput_Stream_Record
    61. Glib.List_Store.Glist_Store_Record
    62. Glib.Menu.Gmenu_Item_Record
    63. Glib.Menu.Gmenu_Record
    64. Glib.Menu_Model.Gmenu_Attribute_Iter_Record
    65. Glib.Menu_Model.Gmenu_Link_Iter_Record
    66. Glib.Menu_Model.Gmenu_Model_Record
    67. Glib.Object.GObject_Record
    68. Glib.Notification.Gnotification_Record
    69. Glib.Object.G_Binding_Record
    70. Glib.Option.Goption_Context
    71. Glib.Output_Stream.Goutput_Stream_Record
    72. Glib.Resource.Gresource
    73. Glib.Simple_Action.Gsimple_Action_Record
    74. Glib.Simple_Action_Group.Gsimple_Action_Group_Record
    75. Glib.Variant.Gvariant
    76. Gtk.About_Dialog.Gtk_About_Dialog_Record
    77. Gtk.Accessible_Hyperlink.Gtk_Accessible_Hyperlink_Record
    78. Gtk.Activate_Action.Gtk_Activate_Action_Record
    79. Gtk.Adjustment.Gtk_Adjustment_Record
    80. Gtk.Alert_Dialog.Gtk_Alert_Dialog_Record
    81. Gtk.Alternative_Trigger.Gtk_Alternative_Trigger_Record
    82. Gtk.Any_Filter.Gtk_Any_Filter_Record
    83. Gtk.Application.Gtk_Application_Record
    84. Gtk.Application_Window.Gtk_Application_Window_Record
    85. Gtk.Aspect_Frame.Gtk_Aspect_Frame_Record
    86. Gtk.Atcontext.Gtk_Atcontext_Record
    87. Gtk.Bin_Layout.Gtk_Bin_Layout_Record
    88. Gtk.Bitset.Gtk_Bitset
    89. Gtk.Bookmark_List.Gtk_Bookmark_List_Record
    90. Gtk.Bool_Filter.Gtk_Bool_Filter_Record
    91. Gtk.Box.Gtk_Box_Record
    92. Gtk.Box_Layout.Gtk_Box_Layout_Record
    93. Gtk.Builder.Gtk_Builder_Record
    94. Gtk.Builder_CScope.Gtk_Builder_C_Scope_Record
    95. Gtk.Builder_List_Item_Factory.Gtk_Builder_List_Item_Factory_Record
    96. Gtk.Button.Gtk_Button_Record
    97. Gtk.Callback_Action.Gtk_Callback_Action_Record
    98. Gtk.Cclosure_Expression.Gtk_Cclosure_Expression_Record
    99. Gtk.Cell_Area.Gtk_Cell_Area_Record
    100. Gtk.Cell_Area_Box.Gtk_Cell_Area_Box_Record
    101. Gtk.Cell_Area_Context.Gtk_Cell_Area_Context_Record
    102. Gtk.Cell_Renderer.Gtk_Cell_Renderer_Record
    103. Gtk.Cell_Renderer_Accel.Gtk_Cell_Renderer_Accel_Record
    104. Gtk.Cell_Renderer_Combo.Gtk_Cell_Renderer_Combo_Record
    105. Gtk.Cell_Renderer_Progress.Gtk_Cell_Renderer_Progress_Record
    106. Gtk.Cell_Renderer_Spin.Gtk_Cell_Renderer_Spin_Record
    107. Gtk.Cell_Renderer_Spinner.Gtk_Cell_Renderer_Spinner_Record
    108. Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record
    109. Gtk.Cell_Renderer_Toggle.Gtk_Cell_Renderer_Toggle_Record
    110. Gtk.Cell_View.Gtk_Cell_View_Record
    111. Gtk.Center_Box.Gtk_Center_Box_Record
    112. Gtk.Center_Layout.Gtk_Center_Layout_Record
    113. Gtk.Check_Button.Gtk_Check_Button_Record
    114. Gtk.Closure_Expression.Gtk_Closure_Expression_Record
    115. Gtk.Color_Dialog.Gtk_Color_Dialog_Record
    116. Gtk.Color_Dialog_Button.Gtk_Color_Dialog_Button_Record
    117. Gtk.Column_View.Gtk_Column_View_Record
    118. Gtk.Column_View_Cell.Gtk_Column_View_Cell_Record
    119. Gtk.Column_View_Column.Gtk_Column_View_Column_Record
    120. Gtk.Column_View_Row.Gtk_Column_View_Row_Record
    121. Gtk.Column_View_Sorter.Gtk_Column_View_Sorter_Record
    122. Gtk.Constant_Expression.Gtk_Constant_Expression_Record
    123. Gtk.Constraint_Layout.Gtk_Constraint_Layout_Child_Record
    124. Gtk.Constraint_Layout.Gtk_Constraint_Layout_Record
    125. Gtk.Css_Provider.Gtk_Css_Provider_Record
    126. Gtk.Custom_Filter.Gtk_Custom_Filter_Record
    127. Gtk.Custom_Sorter.Gtk_Custom_Sorter_Record
    128. Gtk.Dialog.Gtk_Dialog_Record
    129. Gtk.Drawing_Area.Gtk_Drawing_Area_Record
    130. Gtk.Drop_Down.Gtk_Drop_Down_Record
    131. Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record
    132. Gtk.Entry_Completion.Gtk_Entry_Completion_Record
    133. Gtk.Event_Controller.Gtk_Event_Controller_Record
    134. Gtk.Event_Controller_Focus.Gtk_Event_Controller_Focus_Record
    135. Gtk.Event_Controller_Key.Gtk_Event_Controller_Key_Record
    136. Gtk.Event_Controller_Legacy.Gtk_Event_Controller_Legacy_Record
    137. Gtk.Event_Controller_Motion.Gtk_Event_Controller_Motion_Record
    138. Gtk.Event_Controller_Scroll.Gtk_Event_Controller_Scroll_Record
    139. Gtk.Every_Filter.Gtk_Every_Filter_Record
    140. Gtk.Expander.Gtk_Expander_Record
    141. Gtk.Expression.Dummy_Gtk_Expression_Record
    142. Gtk.Expression.Gtk_Expression_Record
    143. Gtk.Expression_Watch.Gtk_Expression_Watch
    144. Gtk.File_Filter.Gtk_File_Filter_Record
    145. Gtk.Filter.Gtk_Filter_Record
    146. Gtk.Filter_List_Model.Gtk_Filter_List_Model_Record
    147. Gtk.Fixed_Layout.Gtk_Fixed_Layout_Child_Record
    148. Gtk.Fixed_Layout.Gtk_Fixed_Layout_Record
    149. Gtk.Flatten_List_Model.Gtk_Flatten_List_Model_Record
    150. Gtk.Font_Dialog.Gtk_Font_Dialog_Record
    151. Gtk.Font_Dialog_Button.Gtk_Font_Dialog_Button_Record
    152. Gtk.Frame.Gtk_Frame_Record
    153. Gtk.GEntry.Gtk_Entry_Record
    154. Gtk.Gesture.Gtk_Gesture_Record
    155. Gtk.Gesture_Click.Gtk_Gesture_Click_Record
    156. Gtk.Gesture_Drag.Gtk_Gesture_Drag_Record
    157. Gtk.Gesture_Single.Gtk_Gesture_Single_Record
    158. Gtk.Grid.Gtk_Grid_Record
    159. Gtk.Grid_Layout.Gtk_Grid_Layout_Child_Record
    160. Gtk.Grid_Layout.Gtk_Grid_Layout_Record
    161. Gtk.Grid_View.Gtk_Grid_View_Record
    162. Gtk.Header_Bar.Gtk_Header_Bar_Record
    163. Gtk.IM_Context.Gtk_IM_Context_Record
    164. Gtk.IM_Context_Simple.Gtk_IM_Context_Simple_Record
    165. Gtk.IM_Multi_Context.Gtk_IM_Multi_Context_Record
    166. Gtk.Keyval_Trigger.Gtk_Keyval_Trigger_Record
    167. Gtk.Label.Gtk_Label_Record
    168. Gtk.Layout_Manager.Gtk_Layout_Child_Record
    169. Gtk.Layout_Manager.Gtk_Layout_Manager_Record
    170. Gtk.Link_Button.Gtk_Link_Button_Record
    171. Gtk.List_Base.Gtk_List_Base_Record
    172. Gtk.List_Box.Gtk_List_Box_Record
    173. Gtk.List_Box_Row.Gtk_List_Box_Row_Record
    174. Gtk.List_Item.Gtk_List_Item_Record
    175. Gtk.List_Item_Factory.Gtk_List_Item_Factory_Record
    176. Gtk.List_Store.Gtk_List_Store_Record
    177. Gtk.List_View.Gtk_List_View_Record
    178. Gtk.Map_List_Model.Gtk_Map_List_Model_Record
    179. Gtk.Menu_Button.Gtk_Menu_Button_Record
    180. Gtk.Message_Dialog.Gtk_Message_Dialog_Record
    181. Gtk.Mnemonic_Action.Gtk_Mnemonic_Action_Record
    182. Gtk.Mnemonic_Trigger.Gtk_Mnemonic_Trigger_Record
    183. Gtk.Multi_Filter.Gtk_Multi_Filter_Record
    184. Gtk.Multi_Selection.Gtk_Multi_Selection_Record
    185. Gtk.Multi_Sorter.Gtk_Multi_Sorter_Record
    186. Gtk.Named_Action.Gtk_Named_Action_Record
    187. Gtk.Native_Dialog.Gtk_Native_Dialog_Record
    188. Gtk.Never_Trigger.Gtk_Never_Trigger_Record
    189. Gtk.No_Selection.Gtk_No_Selection_Record
    190. Gtk.Notebook.Gtk_Notebook_Record
    191. Gtk.Notebook_Page.Gtk_Notebook_Page_Record
    192. Gtk.Nothing_Action.Gtk_Nothing_Action_Record
    193. Gtk.Numeric_Sorter.Gtk_Numeric_Sorter_Record
    194. Gtk.Object_Expression.Gtk_Object_Expression_Record
    195. Gtk.Overlay_Layout.Gtk_Overlay_Layout_Child_Record
    196. Gtk.Overlay_Layout.Gtk_Overlay_Layout_Record
    197. Gtk.Page_Setup.Gtk_Page_Setup_Record
    198. Gtk.Paned.Gtk_Paned_Record
    199. Gtk.Paper_Size.Gtk_Paper_Size
    200. Gtk.Popover.Gtk_Popover_Record
    201. Gtk.Popover_Menu.Gtk_Popover_Menu_Record
    202. Gtk.Popover_Menu_Bar.Gtk_Popover_Menu_Bar_Record
    203. Gtk.Print_Context.Gtk_Print_Context_Record
    204. Gtk.Print_Dialog.Gtk_Print_Dialog_Record
    205. Gtk.Print_Operation.Gtk_Print_Operation_Record
    206. Gtk.Print_Settings.Gtk_Print_Settings_Record
    207. Gtk.Print_Setup.Gtk_Print_Setup
    208. Gtk.Property_Expression.Gtk_Property_Expression_Record
    209. Gtk.Revealer.Gtk_Revealer_Record
    210. Gtk.Scroll_Info.Gtk_Scroll_Info
    211. Gtk.Scrolled_Window.Gtk_Scrolled_Window_Record
    212. Gtk.Search_Bar.Gtk_Search_Bar_Record
    213. Gtk.Search_Entry.Gtk_Search_Entry_Record
    214. Gtk.Selection_Filter_Model.Gtk_Selection_Filter_Model_Record
    215. Gtk.Separator.Gtk_Separator_Record
    216. Gtk.Shortcut.Gtk_Shortcut_Record
    217. Gtk.Shortcut_Action.Gtk_Shortcut_Action_Record
    218. Gtk.Shortcut_Controller.Gtk_Shortcut_Controller_Record
    219. Gtk.Shortcut_Trigger.Gtk_Shortcut_Trigger_Record
    220. Gtk.Signal_Action.Gtk_Signal_Action_Record
    221. Gtk.Signal_List_Item_Factory.Gtk_Signal_List_Item_Factory_Record
    222. Gtk.Single_Selection.Gtk_Single_Selection_Record
    223. Gtk.Slice_List_Model.Gtk_Slice_List_Model_Record
    224. Gtk.Snapshot.Gtk_Snapshot_Record
    225. Gtk.Sort_List_Model.Gtk_Sort_List_Model_Record
    226. Gtk.Sorter.Gtk_Sorter_Record
    227. Gtk.Spin_Button.Gtk_Spin_Button_Record
    228. Gtk.Stack.Gtk_Stack_Record
    229. Gtk.Stack_Page.Gtk_Stack_Page_Record
    230. Gtk.Stack_Sidebar.Gtk_Stack_Sidebar_Record
    231. Gtk.Stack_Switcher.Gtk_Stack_Switcher_Record
    232. Gtk.String_Filter.Gtk_String_Filter_Record
    233. Gtk.String_List.Gtk_String_List_Record
    234. Gtk.String_Object.Gtk_String_Object_Record
    235. Gtk.String_Sorter.Gtk_String_Sorter_Record
    236. Gtk.Style_Context.Gtk_Style_Context_Record
    237. Gtk.Text_Buffer.Gtk_Text_Buffer_Record
    238. Gtk.Text_Child_Anchor.Gtk_Text_Child_Anchor_Record
    239. Gtk.Text_Mark.Gtk_Text_Mark_Record
    240. Gtk.Text_Tag.Gtk_Text_Tag_Record
    241. Gtk.Text_Tag_Table.Gtk_Text_Tag_Table_Record
    242. Gtk.Text_View.Gtk_Text_View_Record
    243. Gtk.Toggle_Button.Gtk_Toggle_Button_Record
    244. Gtk.Tooltip.Gtk_Tooltip_Record
    245. Gtk.Tree_Expander.Gtk_Tree_Expander_Record
    246. Gtk.Tree_List_Model.Gtk_Tree_List_Model_Record
    247. Gtk.Tree_List_Row.Gtk_Tree_List_Row_Record
    248. Gtk.Tree_List_Row_Sorter.Gtk_Tree_List_Row_Sorter_Record
    249. Gtk.Tree_Model.Gtk_Root_Tree_Model_Record
    250. Gtk.Tree_Model.Gtk_Tree_Path
    251. Gtk.Tree_Model_Filter.Gtk_Tree_Model_Filter_Record
    252. Gtk.Tree_Model_Sort.Gtk_Tree_Model_Sort_Record
    253. Gtk.Tree_Row_Reference.Gtk_Tree_Row_Reference
    254. Gtk.Tree_Selection.Gtk_Tree_Selection_Record
    255. Gtk.Tree_Store.Gtk_Tree_Store_Record
    256. Gtk.Tree_View.Gtk_Tree_View_Record
    257. Gtk.Tree_View_Column.Gtk_Tree_View_Column_Record
    258. Gtk.Try_Expression.Gtk_Try_Expression_Record
    259. Gtk.Widget.Gtk_Widget_Record
    260. Gtk.Window.Gtk_Window_Group_Record
    261. Gtk.Window.Gtk_Window_Record
    262. Pango.Attributes.Pango_Attr_List
    263. Pango.Context.Pango_Context_Record
    264. Pango.Coverage.Pango_Coverage_Record
    265. Pango.Font.Pango_Font_Record
    266. Pango.Font_Face.Pango_Font_Face_Record
    267. Pango.Font_Family.Pango_Font_Family_Record
    268. Pango.Font_Map.Pango_Font_Map_Record
    269. Pango.Font_Metrics.Pango_Font_Metrics
    270. Pango.Fontset.Pango_Fontset_Record
    271. Pango.Language.Pango_Language
    272. Pango.Layout.Pango_Layout_Iter
    273. Pango.Layout.Pango_Layout_Record
    274. 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

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;

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

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_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_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_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_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_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_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_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_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_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_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_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

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_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.

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 Glib.Properties.Property_Boxed;

Type: 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.

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_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_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_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_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_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_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

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