Tk C API

The file tk.h should be considered a public declaration of the Tk C functions, defines/macros, and structures which a developer can safely depend on. (Some extensions also use things from tkInt.h, but the price for that is that they require more maintenance in order to keep working. Stick with tk.h as long as possible.)

Tk C functions include:

  • Tk_3DBorderColor
  • Tk_3DBorderGC
  • Tk_3DHorizontalBevel
  • Tk_3DVerticalBevel
  • Tk_AddOption
  • Tk_Alloc3DBorderFromObj
  • Tk_AllocBitmapFromObj
  • Tk_AllocColorFromObj
  • Tk_AllocCursorFromObj
  • Tk_AllocFontFromObj
  • Tk_AttachHWND
  • Tk_Attributes
  • Tk_BindEvent
  • Tk_CanvasDrawableCoords
  • Tk_CanvasEventuallyRedraw
  • Tk_CanvasGetCoord
  • Tk_CanvasPsBitmap
  • Tk_CanvasPsColor
  • Tk_CanvasPsFont
  • Tk_CanvasPsPath
  • Tk_CanvasPsStipple
  • Tk_CanvasPsY
  • Tk_CanvasSetStippleOrigin
  • Tk_CanvasTagsOption
  • Tk_CanvasTextInfo
  • Tk_CanvasTkwin
  • Tk_CanvasWindowCoords
  • Tk_ChangeWindowAttributes
  • Tk_Changes
  • Tk_CharBbox
  • Tk_Class
  • Tk_ClearSelection
  • Tk_ClipboardAppend
  • Tk_ClipboardClear
  • Tk_CollapseMotionEvents
  • Tk_Colormap
  • Tk_ComputeTextLayout
  • Tk_ConfigureInfo
  • Tk_ConfigureValue
  • Tk_ConfigureWidget
  • Tk_ConfigureWindow
  • Tk_CoordsToWindow
  • Tk_CreateBinding
  • Tk_CreateBindingTable
  • Tk_CreateClientMessageHandler
  • Tk_CreateErrorHandler
  • Tk_CreateEventHandler
  • Tk_CreateImageType
  • Tk_CreateItemType
  • Tk_CreateOptionTable
  • Tk_CreatePhotoImageFormat
  • Tk_CreateSelHandler
  • Tk_CreateWindow
  • Tk_CreateWindowFromPath
  • Tk_DefineBitmap
  • Tk_DefineCursor
  • Tk_DeleteAllBindings
  • Tk_DeleteBinding
  • Tk_DeleteBindingTable
  • Tk_DeleteClientMessageHandler
  • Tk_DeleteErrorHandler
  • Tk_DeleteEventHandler
  • Tk_DeleteGenericHandler
  • Tk_DeleteImage
  • Tk_DeleteOptionTable
  • Tk_DeleteSelHandler
  • Tk_Depth
  • Tk_DestroyWindow
  • Tk_Display
  • Tk_DisplayName
  • Tk_DistanceToTextLayout
  • Tk_Draw3DPolygon
  • Tk_Draw3DRectangle
  • Tk_DrawChars
  • Tk_DrawFocusHighlight
  • Tk_DrawTextLayout
  • Tk_Fill3DPolygon
  • Tk_Fill3DRectangle
  • Tk_FindPhoto
  • Tk_FontId
  • Tk_Free3DBorder
  • Tk_Free3DBorderFromObj
  • Tk_FreeBitmap
  • Tk_FreeBitmapFromObj
  • Tk_FreeColor
  • Tk_FreeColorFromObj
  • Tk_FreeColormap
  • Tk_FreeConfigOptions
  • Tk_FreeCursor
  • Tk_FreeCursorFromObj
  • Tk_FreeFont
  • Tk_FreeFontFromObj
  • Tk_FreeGC
  • Tk_FreeImage
  • Tk_FreeOptions
  • Tk_FreePixmap
  • Tk_FreeSavedOptions
  • Tk_FreeTextLayout
  • Tk_FreeXId
  • Tk_GeometryRequest
  • Tk_Get3DBorder
  • Tk_Get3DBorderFromObj
  • Tk_GetAllBindings
  • Tk_GetAnchor
  • Tk_GetAnchorFromObj
  • Tk_GetAtomName
  • Tk_GetBinding
  • Tk_GetBitmap
  • Tk_GetBitmapFromObj
  • Tk_GetCapStyle
  • Tk_GetColor
  • Tk_GetColorByValue
  • Tk_GetColorFromObj
  • Tk_GetColormap
  • Tk_GetCursor
  • Tk_GetCursorFromData
  • Tk_GetCursorFromObj
  • Tk_GetDash
  • Tk_GetFont
  • Tk_GetFontFromObj
  • Tk_GetFontMetrics
  • Tk_GetGC
  • Tk_GetHINSTANCE
  • Tk_GetHWND
  • Tk_GetImage
  • Tk_GetImageMasterData
  • Tk_GetItemTypes
  • Tk_GetJoinStyle
  • Tk_GetJustify
  • Tk_GetJustifyFromObj
  • Tk_GetMMFromObj
  • Tk_GetNumMainWindows
  • Tk_GetOption
  • Tk_GetOptionInfo
  • Tk_GetOptionValue
  • Tk_GetPixels
  • Tk_GetPixelsFromObj
  • Tk_GetPixmap
  • Tk_GetRelief
  • Tk_GetReliefFromObj
  • Tk_GetRootCoords
  • Tk_GetScreenMM
  • Tk_GetScrollInfo
  • Tk_GetScrollInfoObj
  • Tk_GetSelection
  • Tk_GetUid
  • Tk_GetVRootGeometry
  • Tk_GetVisual
  • Tk_Grab
  • Tk_HWNDToWindow
  • Tk_HandleEvent
  • Tk_Height
  • Tk_IdToWindow
  • Tk_ImageChanged
  • Tk_Init
  • Tk_InitImageArgs
  • Tk_InitOptions
  • Tk_InitStubs
  • Tk_InternAtom
  • Tk_InternalBorderBottom
  • Tk_InternalBorderLeft
  • Tk_InternalBorderRight
  • Tk_InternalBorderTop
  • Tk_IntersectTextLayout
  • Tk_IsContainer
  • Tk_IsEmbedded
  • Tk_IsMapped
  • Tk_IsTopLevel
  • Tk_Main
  • Tk_MainLoop
  • Tk_MainWindow
  • Tk_MaintainGeometry
  • Tk_MakeWindowExist
  • Tk_ManageGeometry
  • Tk_MapWindow
  • Tk_MeasureChars
  • Tk_MinReqHeight
  • Tk_MinReqWidth
  • Tk_MoveResizeWindow
  • Tk_MoveToplevelWindow
  • Tk_MoveWindow
  • Tk_Name
  • Tk_NameOf3DBorder
  • Tk_NameOfAnchor
  • Tk_NameOfBitmap
  • Tk_NameOfCapStyle
  • Tk_NameOfColor
  • Tk_NameOfCursor
  • Tk_NameOfFont
  • Tk_NameOfImage
  • Tk_NameOfJoinStyle
  • Tk_NameOfJustify
  • Tk_NameOfRelief
  • Tk_NameToWindow
  • Tk_Offset
  • Tk_OwnSelection
  • Tk_Parent
  • Tk_ParseArgv
  • Tk_PathName
  • Tk_PhotoBlank
  • Tk_PhotoExpand
  • Tk_PhotoGetImage
  • Tk_PhotoGetSize
  • Tk_PhotoPutBlock
  • Tk_PhotoPutZoomedBlock
  • Tk_PhotoSetSize
  • Tk_PointToChar
  • Tk_PostscriptFontName
  • Tk_QueueWindowEvent
  • Tk_RedrawImage
  • Tk_ReqHeight
  • Tk_ReqWidth
  • Tk_ResizeWindow
  • Tk_RestackWindow
  • Tk_RestoreSavedOptions
  • Tk_RestrictEvents
  • Tk_SafeInit
  • Tk_Screen
  • Tk_ScreenNumber
  • Tk_SetAppName
  • Tk_SetBackgroundFromBorder
  • Tk_SetCaretPos
  • Tk_SetClass
  • Tk_SetClassProcs
  • Tk_SetGrid
  • Tk_SetInternalBorder
  • Tk_SetInternalBorderEx
  • Tk_SetMinimumRequestSize
  • Tk_SetOptions
  • Tk_SetWindowBackground
  • Tk_SetWindowBorder
  • Tk_SetWindowBorderPixmap
  • Tk_SetWindowBorderWidth
  • Tk_SetWindowColormap
  • Tk_SetWindowVisual
  • Tk_SizeOfBitmap
  • Tk_SizeOfImage
  • Tk_StrictMotif
  • Tk_TextLayoutToPostscript
  • Tk_TextWidth
  • Tk_Uid
  • Tk_UndefineCursor
  • Tk_UnderlineChars
  • Tk_UnderlineTextLayout
  • Tk_Ungrab
  • Tk_UnmaintainGeometry
  • Tk_UnmapWindow
  • Tk_UnsetGrid
  • Tk_Visual
  • Tk_Width
  • Tk_WindowId
  • Tk_X
  • Tk_Y
  • Tk_SetWindowBackgroundPixmap
  • Tk_CreateGenericHandler
  • Tk_SafeInit() forward compatibility