Tải bản đầy đủ - 0 (trang)
Chapter 5. The Tk C Interface

Chapter 5. The Tk C Interface

Tải bản đầy đủ - 0trang

Data Types

The more commonly used Tk data structures are listed here:

Tk_3DBorder

Token for a three-dimensional window border

Tk_Anchor

Enumerated type describing point by which to anchor an object

Tk_ArgvInfo

Structure used to specify how to handle argv options

Tk_BindingTable

Token for a binding table

Tk_Canvas

Token for a canvas object

Tk_CanvasTextInfo

Structure providing information about the selection and insertion cursors

Tk_ConfigSpec

Structure used to specify information for configuring a widget

Tk_Cursor

Token for a cursor

Tk_ErrorHandler

Token for an X protocol error handler



Tk_EventProc

Type of procedure used to handle events

Tk_Font

Token for a font

Tk_FontMetrics

Data structure describing properties of a font

Tk_GenericProc

Type of procedure used to handle generic X events

Tk_GeomMgr

Structure describing a geometry manager

Tk_GetSelProc

Type of procedure to process the selection

Tk_Image

Token for an image



Data Types 157

www.it-ebooks.info



Tk C

Interface



Tk_ErrorProc

Type of procedure used to handle X protocol errors



Tk_ImageChangedProc

Type of procedure to invoke when an image changes

Tk_ImageMaster

Token for an image master

Tk_ImageType

Token for an image instance

Tk_ItemType

Structure defining a type of canvas item

Tk_Justify

Enumerated type describing a style of justification

Tk_LostSelProc

Type of procedure invoked when window loses selection

Tk_PhotoHandle

Token for a photo image

Tk_PhotoImageBlock

Structure describing a block of pixels in memory

Tk_PhotoImageFormat

Structure representing a particular file format for storing images

Tk_RestrictProc

Type of procedure used to filter incoming events

Tk_SelectionProc

Type of procedure used to return selection

Tk_TextLayout

Token for a text layout

Tk_Uid

Type used as unique identifiers for strings

Tk_Window

Token for a window



Group Listing of Functions

Note that a few of these routines are implemented as macros for the sake of efficiency, but logically they behave the same as functions.



Windows

XSetWindowAttributes *Tk_Attributes(Tk_Window tkwin)

void Tk_ChangeWindowAttributes(Tk_Window tkwin, unsigned long valueMask,

XSetWindowAttributes *attsPtr)

XWindowChanges *Tk_Changes(Tk_Window tkwin)



158



Chapter 5 – The Tk C Interface



www.it-ebooks.info



Group

Listing of Functions

www.it-ebooks.info



159



Tk C

Interface



Tk_Uid Tk_Class(Tk_Window tkwin)

void Tk_ConfigureWindow(Tk_Window tkwin, unsigned int valueMask,

XWindowChanges *valuePtr)

Tk_Window Tk_CoordsToWindow(int rootX, int rootY, Tk_Window tkwin)

Tk_Window Tk_CreateWindowFromPath(Tcl_Interp *interp, Tk_Window tkwin,

char *pathName, char *screenName)

Tk_Window Tk_CreateWindow(Tcl_Interp *interp, Tk_Window parent,

char *name, char *screenName)

int Tk_Depth(Tk_Window tkwin)

void Tk_DestroyWindow(Tk_Window tkwin)

char *Tk_DisplayName(Tk_Window tkwin)

Display Tk_Display(Tk_Window tkwin)

void Tk_DrawFocusHighlight(Tk_Window tkwin, GC gc, int width,

Drawable drawable)

char *Tk_GetAtomName(Tk_Window tkwin, Atom atom)

GC Tk_GetGC(Tk_Window tkwin, unsigned long valueMask, XGCValues *valuePtr)

int Tk_GetNumMainWindows(void)

Tk_Uid Tk_GetOption(Tk_Window tkwin, char *name, char *className)

void Tk_GetRootCoords(Tk_Window tkwin, int *xPtr, int *yPtr)

void Tk_GetVRootGeometry(Tk_Window tkwin, int *xPtr, int *yPtr, int *widthPtr,

int *heightPtr)

int Tk_Height(Tk_Window tkwin)

Tk_Window Tk_IdToWindow(Display *display, Window window)

Atom Tk_InternAtom(Tk_Window tkwin, char *name)

int Tk_IsContainer(Tk_Window tkwin)

int Tk_IsEmbedded(Tk_Window tkwin)

int Tk_IsMapped(Tk_Window tkwin)

int Tk_IsTopLevel(Tk_Window tkwin)

Tk_Window Tk_MainWindow(Tcl_Interp *interp)

void Tk_MaintainGeometry(Tk_Window slave, Tk_Window master, int x, int y,

int width, int height)

void Tk_MakeWindowExist(Tk_Window tkwin)

void Tk_MoveToplevelWindow(Tk_Window tkwin, int x, int y)

Tk_Uid Tk_Name(Tk_Window tkwin)

Tk_Window Tk_NameToWindow(Tcl_Interp *interp, char *pathName,

Tk_Window tkwin)

Tk_Window Tk_Parent(Tk_Window tkwin)

char *Tk_PathName(Tk_Window tkwin)

int Tk_RestackWindow(Tk_Window tkwin, int aboveBelow, Tk_Window other)

int Tk_ScreenNumber(Tk_Window tkwin)

Screen *Tk_Screen(Tk_Window tkwin)

void Tk_SetClass(Tk_Window tkwin, char *className)



void Tk_SetWindowBackground(Tk_Window tkwin, unsigned long pixel)

void Tk_SetWindowBorderPixmap(Tk_Window tkwin, Pixmap pixmap)

void Tk_SetWindowBorder(Tk_Window tkwin, unsigned long pixel)

void Tk_SetWindowBorderWidth(Tk_Window tkwin, int width)

int Tk_StrictMotif(Tk_Window tkwin)

void Tk_Ungrab(Tk_Window tkwin)

void Tk_UnmaintainGeometry(Tk_Window slave, Tk_Window master)

void Tk_UnsetGrid(Tk_Window tkwin)

void Tk_UpdatePointer(Tk_Window tkwin, int x, int y, int state)

Visual *Tk_Visual(Tk_Window tkwin)

int Tk_Width(Tk_Window tkwin)

Window Tk_WindowId(Tk_Window tkwin)

int Tk_X(Tk_Window tkwin)

int Tk_Y(Tk_Window tkwin)



Configuring Widgets

int Tk_ConfigureInfo(Tcl_Interp *interp, Tk_Window tkwin, Tk_ConfigSpec *specs,

char *widgRec, char *argvName, int flags)

int Tk_ConfigureValue(Tcl_Interp *interp, Tk_Window tkwin,

Tk_ConfigSpec *specs, char *widgRec, char *argvName, int flags)

int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin,

Tk_ConfigSpec *specs, int argc, char **argv, char *widgRec, int flags)

void Tk_FreeOptions(Tk_ConfigSpec *specs, char *widgRec, Display *display,

int needFlags)

int Tk_Offset(type, field)



Bitmaps and Photo Images

void Tk_CreateImageType(Tk_ImageType *typePtr)

void Tk_CreatePhotoImageFormat(Tk_PhotoImageFormat *formatPtr)

int Tk_DefineBitmap(Tcl_Interp *interp, Tk_Uid name, char *source, int width,

int height)

void Tk_DeleteImage(Tcl_Interp *interp, char *name)

Tk_PhotoHandle Tk_FindPhoto(Tcl_Interp *interp, char *imageName)

void Tk_FreeBitmap(Display *display, Pixmap bitmap)

void Tk_FreeImage(Tk_Image image)

void Tk_FreePixmap(Display *display, Pixmap pixmap)

Pixmap Tk_GetBitmapFromData(Tcl_Interp *interp, Tk_Window tkwin,

char *source, int width, int height)

Pixmap Tk_GetBitmap(Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid string)

ClientData Tk_GetImageMasterData(Tcl_Interp *interp, char *name,

Tk_ImageType **typePtrPtr)



160



Chapter 5 – The Tk C Interface



www.it-ebooks.info



Tk_Image Tk_GetImage(Tcl_Interp *interp, Tk_Window tkwin, char *name,

Tk_ImageChangedProc *changeProc, ClientData clientData)

void Tk_ImageChanged(Tk_ImageMaster master, int x, int y, int width, int height,

int imageWidth, int imageHeight)

char *Tk_NameOfBitmap(Display *display, Pixmap bitmap)

char *Tk_NameOfImage(Tk_ImageMaster imageMaster)

void Tk_PhotoBlank(Tk_PhotoHandle handle)

void Tk_PhotoExpand(Tk_PhotoHandle handle, int width, int height )

int Tk_PhotoGetImage(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr)

void Tk_PhotoGetSize(Tk_PhotoHandle handle, int *widthPtr, int *heightPtr)

void Tk_PhotoPutBlock(Tk_PhotoHandle handle, Tk_PhotoImageBlock *blockPtr,

int x, int y, int width, int height)

void Tk_PhotoPutZoomedBlock(Tk_PhotoHandle handle,

Tk_PhotoImageBlock *blockPtr, int x, int y, int width, int height, int zoomX,

int zoomY, int subsampleX, int subsampleY)

void Tk_PhotoSetSize(Tk_PhotoHandle handle, int width, int height)

void Tk_RedrawImage(Tk_Image image, int imageX, int imageY, int width,

int height, Drawable drawable, int drawableX, int drawableY)

void Tk_SetWindowBackgroundPixmap(Tk_Window tkwin, Pixmap pixmap)

void Tk_SizeOfBitmap(Display *display, Pixmap bitmap, int *widthPtr,

int *heightPtr)

void Tk_SizeOfImage(Tk_Image image, int *widthPtr, int *heightPtr)



Tk C

Interface



Events

void Tk_BindEvent(Tk_BindingTable bindingTable, XEvent *eventPtr,

Tk_Window tkwin, int numObjects, ClientData *objectPtr)

Tk_BindingTable Tk_CreateBindingTable(Tcl_Interp *interp)

unsigned long Tk_CreateBinding(Tcl_Interp *interp,

Tk_BindingTable bindingTable, ClientData object, *eventString,

char *command, int append)

void Tk_CreateEventHandler(Tk_Window token, unsigned long mask,

Tk_EventProc *proc, ClientData clientData)

void Tk_CreateGenericHandler(Tk_GenericProc *proc, ClientData clientData)

void Tk_DeleteAllBindings(Tk_BindingTable bindingTable, ClientData object)

void Tk_DeleteBindingTable(Tk_BindingTable bindingTable)

int Tk_DeleteBinding(Tcl_Interp *interp, Tk_BindingTable bindingTable,

ClientData object, char *eventString)

void Tk_DeleteEventHandler(Tk_Window token, unsigned long mask,

Tk_EventProc *proc, ClientData clientData)

void Tk_DeleteGenericHandler(Tk_GenericProc *proc, ClientData clientData)

void Tk_GetAllBindings(Tcl_Interp *interp, Tk_BindingTable bindingTable,

ClientData object)



Group

Listing of Functions

www.it-ebooks.info



161



char *Tk_GetBinding(Tcl_Interp *interp, Tk_BindingTable bindingTable,

ClientData object, char *eventString)

void Tk_HandleEvent(XEvent *eventPtr)

void Tk_MainLoop(void)

void Tk_QueueWindowEvent(XEvent *eventPtr, Tcl_QueuePosition position)

Tk_RestrictProc *Tk_RestrictEvents(Tk_RestrictProc *proc, ClientData arg,

ClientData *prevArgPtr)



Displaying Widgets

GC Tk_3DBorderGC(Tk_Window tkwin, Tk_3DBorder border, int which)

void Tk_3DHorizontalBevel(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int leftIn, int rightIn,

int topBevel, int relief )

void Tk_3DVerticalBevel(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int leftBevel, int relief )

void Tk_Draw3DPolygon(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, XPoint *pointPtr, int numPoints, int borderWidth,

int leftRelief )

void Tk_Draw3DRectangle(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int borderWidth,

int relief )

void Tk_Fill3DPolygon(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, XPoint *pointPtr, int numPoints, int borderWidth,

int leftRelief )

void Tk_Fill3DRectangle(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int borderWidth,

int relief )

void Tk_Free3DBorder(Tk_3DBorder border)

Tk_3DBorder Tk_Get3DBorder(Tcl_Interp *interp, Tk_Window tkwin,

Tk_Uid colorName)

char *Tk_NameOf3DBorder(Tk_3DBorder border)

void Tk_SetBackgroundFromBorder(Tk_Window tkwin,

Tk_3DBorder border)



Canvases

void Tk_CanvasDrawableCoords(Tk_Canvas canvas, double x, double y,

short *drawableXPtr, short *drawableYPtr)

void Tk_CanvasEventuallyRedraw(Tk_Canvas canvas, int x1, int y1, int x2, int y2)

int Tk_CanvasGetCoord(Tcl_Interp *interp, Tk_Canvas canvas, char *string,

double *doublePtr)

Tk_CanvasTextInfo *Tk_CanvasGetTextInfo(Tk_Canvas canvas)



162



Chapter 5 – The Tk C Interface



www.it-ebooks.info



int Tk_CanvasPsBitmap(Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap,

int x, int y, int width, int height)

int Tk_CanvasPsColor(Tcl_Interp *interp, Tk_Canvas canvas, XColor *colorPtr)

int Tk_CanvasPsFont(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Font font)

void Tk_CanvasPsPath(Tcl_Interp *interp, Tk_Canvas canvas, double *coordPtr,

int numPoints)

int Tk_CanvasPsStipple(Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap)

double Tk_CanvasPsY(Tk_Canvas canvas, double y)

void Tk_CanvasSetStippleOrigin(Tk_Canvas canvas, GC gc)

int Tk_CanvasTagsParseProc(ClientData clientData, Tcl_Interp *interp,

Tk_Window tkwin, char *value, char *widgRec, int offset)

char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin,

char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)

Tk_Window Tk_CanvasTkwin(Tk_Canvas canvas)

void Tk_CanvasWindowCoords(Tk_Canvas canvas, double x, double y,

short *screenXPtr, short *screenYPtr)

void Tk_CreateItemType(Tk_ItemType *typePtr)

Pixmap Tk_GetPixmap(Display *display, Drawable d, int width, int height,

int depth)



Text



Group

Listing of Functions

www.it-ebooks.info



163



Tk C

Interface



int Tk_CharBbox(Tk_TextLayout layout, int index, int *xPtr, int *yPtr, int *widthPtr,

int *heightPtr)

Tk_TextLayout Tk_ComputeTextLayout(Tk_Font font, const char *string,

int numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr,

int *heightPtr)

int Tk_DistanceToTextLayout(Tk_TextLayout layout, int x, int y)

void Tk_DrawChars(Display *display, Drawable drawable, GC gc, Tk_Font tkfont,

const char *source, int numChars, int x, int y)

void Tk_DrawTextLayout(Display *display, Drawable drawable, GC gc,

Tk_TextLayout layout, int x, int y, int firstChar, int lastChar)

Font Tk_FontId(Tk_Font font)

void Tk_FreeFont(Tk_Font)

void Tk_FreeTextLayout(Tk_TextLayout textLayout)

Tk_Font Tk_GetFontFromObj(Tcl_Interp *interp, Tk_Window tkwin,

Tcl_Obj *objPtr)

void Tk_GetFontMetrics(Tk_Font font, Tk_FontMetrics *fmPtr)

Tk_Font Tk_GetFont(Tcl_Interp *interp, Tk_Window tkwin, const char *string)

int Tk_GetJustify(Tcl_Interp *interp, char *string, Tk_Justify *justifyPtr)

int Tk_IntersectTextLayout(Tk_TextLayout layout, int x, int y, int width, int height)

int Tk_MeasureChars(Tk_Font tkfont, const char *source, int maxChars,

int maxPixels, int flags, int *lengthPtr)



char *Tk_NameOfFont(Tk_Font font)

char *Tk_NameOfJustify(Tk_Justify justify)

int Tk_PointToChar(Tk_TextLayout layout, int x, int y)

int Tk_PostscriptFontName(Tk_Font tkfont, Tcl_DString *dsPtr)

void Tk_TextLayoutToPostscript(Tcl_Interp *interp, Tk_TextLayout layout)

int Tk_TextWidth(Tk_Font font, const char *string, int numChars)

void Tk_UnderlineChars(Display *display, Drawable drawable, GC gc,

Tk_Font tkfont, const char *source, int x, int y, int firstChar, int lastChar)

void Tk_UnderlineTextLayout(Display *display, Drawable drawable, GC gc,

Tk_TextLayout layout, int x, int y, int underline)



The Selection

void Tk_ClearSelection(Tk_Window tkwin, Atom selection)

int Tk_ClipboardAppend(Tcl_Interp *interp, Tk_Window tkwin, Atom target,

Atom format, char *buffer)

int Tk_ClipboardClear(Tcl_Interp *interp, Tk_Window tkwin)

void Tk_CreateSelHandler(Tk_Window tkwin, Atom selection, Atom target,

Tk_SelectionProc *proc, ClientData clientData, Atom format)

void Tk_DeleteSelHandler(Tk_Window tkwin, Atom selection, Atom target)

int Tk_GetSelection(Tcl_Interp *interp, Tk_Window tkwin, Atom selection,

Atom target, Tk_GetSelProc *proc, ClientData clientData)

void Tk_OwnSelection(Tk_Window tkwin, Atom selection, Tk_LostSelProc *proc,

ClientData clientData)



Geometry Management

void Tk_GeometryRequest(Tk_Window tkwin, int reqWidth, int reqHeight)

int Tk_InternalBorderWidth(Tk_Window tkwin)

void Tk_ManageGeometry(Tk_Window tkwin, Tk_GeomMgr *mgrPtr,

ClientData clientData)

void Tk_MapWindow(Tk_Window tkwin)

void Tk_MoveResizeWindow(Tk_Window tkwin, int x, int y, int width, int height)

void Tk_MoveWindow(Tk_Window tkwin, int x, int y)

int Tk_ReqHeight(Tk_Window tkwin)

int Tk_ReqWidth(Tk_Window tkwin)

void Tk_ResizeWindow(Tk_Window tkwin, int width, int height)

void Tk_SetGrid(Tk_Window tkwin, int reqWidth, int reqHeight,

int gridWidth, int gridHeight)

void Tk_SetInternalBorder(Tk_Window tkwin, int width)

void Tk_UnmapWindow(Tk_Window tkwin)



164



Chapter 5 – The Tk C Interface



www.it-ebooks.info



Application Startup and Initialization

int Tk_Init(Tcl_Interp *interp)

void Tk_Main(int argc, char **argv, Tcl_AppInitProc *appInitProc)

int Tk_ParseArgv(Tcl_Interp *interp, Tk_Window tkwin, int *argcPtr, char **argv,

Tk_ArgvInfo *argTable, int flags)

int Tk_SafeInit(Tcl_Interp *interp)

char *Tk_SetAppName(Tk_Window tkwin, char *name)



Error Handling

void Tk_DeleteErrorHandler(Tk_ErrorHandler handler)

Tk_ErrorHandler Tk_CreateErrorHandler(Display *display, int errNum, int request,

int minorCode, Tk_ErrorProc *errorProc, ClientData clientData)



Color



Tk C

Interface



XColor *Tk_3DBorderColor(Tk_3DBorder border)

Colormap Tk_Colormap(Tk_Window tkwin)

void Tk_FreeColor(XColor *colorPtr)

void Tk_FreeColormap(Display *display, Colormap colormap)

GC Tk_GCForColor(XColor *colorPtr, Drawable drawable)

XColor *Tk_GetColorByValue(Tk_Window tkwin, XColor *colorPtr)

XColor *Tk_GetColor(Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid name)

Colormap Tk_GetColormap(Tcl_Interp *interp, Tk_Window tkwin, char *string)

char *Tk_NameOfColor(XColor *colorPtr)

void Tk_PreserveColormap(Display *display, Colormap colormap)

void Tk_SetWindowColormap(Tk_Window tkwin, Colormap colormap)

int Tk_SetWindowVisual(Tk_Window tkwin, Visual *visual, int depth,

Colormap colormap)



Cursors

void Tk_DefineCursor(Tk_Window window, Tk_Cursor cursor)

void Tk_FreeCursor(Display *display, Tk_Cursor cursor)

Tk_Cursor Tk_GetCursor(Tcl_Interp *interp, Tk_Window tkwin, Tk_Uid string)

Tk_Cursor Tk_GetCursorFromData(Tcl_Interp *interp, Tk_Window tkwin,

char *source, char *mask, int width, int height, int xHot, int yHot, Tk_Uid fg,

Tk_Uid bg)

char *Tk_NameOfCursor(Display *display, Tk_Cursor cursor)

void Tk_UndefineCursor(Tk_Window window)



Group

Listing of Functions

www.it-ebooks.info



165



Miscellaneous

void Tk_FreeGC(Display *display, GC gc)

void Tk_FreeXId(Display *display, XID xid)

int Tk_GetAnchor(Tcl_Interp *interp, char *string, Tk_Anchor *anchorPtr)

int Tk_GetCapStyle(Tcl_Interp *interp, char *string, int *capPtr)

Tk_ItemType *Tk_GetItemTypes(void)

int Tk_GetJoinStyle(Tcl_Interp *interp, char *string, int *joinPtr)

int Tk_GetPixels(Tcl_Interp *interp, Tk_Window tkwin, char *string, int *intPtr)

int Tk_GetRelief(Tcl_Interp *interp, char *name, int *reliefPtr)

int Tk_GetScreenMM(Tcl_Interp *interp, Tk_Window tkwin, char *string,

double *doublePtr)

int Tk_GetScrollInfo(Tcl_Interp *interp, int argc, char **argv, double *dblPtr,

int *intPtr)

Tk_Uid Tk_GetUid(const char *string)

Visual *Tk_GetVisual(Tcl_Interp *interp, Tk_Window tkwin, char *string,

int *depthPtr, Colormap *colormapPtr)

int Tk_Grab(Tcl_Interp *interp, Tk_Window tkwin, int grabGlobal)

char *Tk_NameOfAnchor(Tk_Anchor anchor)

char *Tk_NameOfCapStyle(int cap)

char *Tk_NameOfJoinStyle(int join)

char *Tk_NameOfRelief(int relief )



Alphabetical Summary of Functions

XColor *Tk_3DBorderColor(Tk_3DBorder border)

GC Tk_3DBorderGC(Tk_Window tkwin, Tk_3DBorder border, int which)

void Tk_3DHorizontalBevel(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int leftIn, int rightIn,

int topBevel, int relief )

void Tk_3DVerticalBevel(Tk_Window tkwin, Drawable drawable,

Tk_3DBorder border, int x, int y, int width, int height, int leftBevel, int relief )

XSetWindowAttributes *Tk_Attributes(Tk_Window tkwin)

void Tk_BindEvent(Tk_BindingTable bindingTable, XEvent *eventPtr,

Tk_Window tkwin, int numObjects, ClientData *objectPtr)

void Tk_CanvasDrawableCoords(Tk_Canvas canvas, double x, double y,

short *drawableXPtr, short *drawableYPtr)

void Tk_CanvasEventuallyRedraw(Tk_Canvas canvas, int x1, int y1, int x2, int y2)

int Tk_CanvasGetCoord(Tcl_Interp *interp, Tk_Canvas canvas, char *string,

double *doublePtr)

Tk_CanvasTextInfo *Tk_CanvasGetTextInfo(Tk_Canvas canvas)

int Tk_CanvasPsBitmap(Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap,

int x, int y, int width, int height)



166



Chapter 5 – The Tk C Interface



www.it-ebooks.info



Alphabetical www.it-ebooks.info

Summary of Functions



167



Tk C

Interface



int Tk_CanvasPsColor(Tcl_Interp *interp, Tk_Canvas canvas, XColor *colorPtr)

int Tk_CanvasPsFont(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Font font)

void Tk_CanvasPsPath(Tcl_Interp *interp, Tk_Canvas canvas, double *coordPtr,

int numPoints)

int Tk_CanvasPsStipple(Tcl_Interp *interp, Tk_Canvas canvas, Pixmap bitmap)

double Tk_CanvasPsY(Tk_Canvas canvas, double y)

void Tk_CanvasSetStippleOrigin(Tk_Canvas canvas, GC gc)

int Tk_CanvasTagsParseProc(ClientData clientData, Tcl_Interp *interp,

Tk_Window tkwin, char *value, char *widgRec, int offset)

char *Tk_CanvasTagsPrintProc(ClientData clientData, Tk_Window tkwin,

char *widgRec, int offset, Tcl_FreeProc **freeProcPtr)

Tk_Window Tk_CanvasTkwin(Tk_Canvas canvas)

void Tk_CanvasWindowCoords(Tk_Canvas canvas, double x, double y,

short *screenXPtr, short *screenYPtr)

void Tk_ChangeWindowAttributes(Tk_Window tkwin, unsigned long valueMask,

XSetWindowAttributes *attsPtr)

XWindowChanges *Tk_Changes(Tk_Window tkwin)

int Tk_CharBbox(Tk_TextLayout layout, int index, int *xPtr, int *yPtr, int *widthPtr,

int *heightPtr)

Tk_Uid Tk_Class(Tk_Window tkwin)

void Tk_ClearSelection(Tk_Window tkwin, Atom selection)

int Tk_ClipboardAppend(Tcl_Interp *interp, Tk_Window tkwin, Atom target,

Atom format, char *buffer)

int Tk_ClipboardClear(Tcl_Interp *interp, Tk_Window tkwin)

Colormap Tk_Colormap(Tk_Window tkwin)

Tk_TextLayout Tk_ComputeTextLayout(Tk_Font font, const char *string,

int numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr,

int *heightPtr)

int Tk_ConfigureInfo(Tcl_Interp *interp, Tk_Window tkwin,

Tk_ConfigSpec *specs, char *widgRec, char *argvName, int flags)

int Tk_ConfigureValue(Tcl_Interp *interp, Tk_Window tkwin,

Tk_ConfigSpec *specs, char *widgRec, char *argvName, int flags)

int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin,

Tk_ConfigSpec *specs, int argc, char **argv, char *widgRec, int flags)

void Tk_ConfigureWindow(Tk_Window tkwin, unsigned int valueMask,

XWindowChanges *valuePtr)

Tk_Window Tk_CoordsToWindow(int rootX, int rootY, Tk_Window tkwin)

unsigned long Tk_CreateBinding(Tcl_Interp *interp,

Tk_BindingTable bindingTable, ClientData object, *eventString,

char *command, int append)

Tk_BindingTable Tk_CreateBindingTable(Tcl_Interp *interp)

Tk_ErrorHandler Tk_CreateErrorHandler(Display *display, int errNum, int request,

int minorCode, Tk_ErrorProc *errorProc, ClientData clientData)



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 5. The Tk C Interface

Tải bản đầy đủ ngay(0 tr)

×