⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tk.h

📁 linux系统下的音频通信
💻 H
📖 第 1 页 / 共 5 页
字号:
/* *-------------------------------------------------------------- * * Procedure prototypes and structures used for defining new canvas * items: * *-------------------------------------------------------------- *//* * For each item in a canvas widget there exists one record with * the following structure.  Each actual item is represented by * a record with the following stuff at its beginning, plus additional * type-specific stuff after that. */#define TK_TAG_SPACE 3typedef struct Tk_Item  {    int id;				/* Unique identifier for this item					 * (also serves as first tag for					 * item). */    struct Tk_Item *nextPtr;		/* Next in display list of all					 * items in this canvas.  Later items					 * in list are drawn on top of earlier					 * ones. */    Tk_Uid staticTagSpace[TK_TAG_SPACE];/* Built-in space for limited # of					 * tags. */    Tk_Uid *tagPtr;			/* Pointer to array of tags.  Usually					 * points to staticTagSpace, but					 * may point to malloc-ed space if					 * there are lots of tags. */    int tagSpace;			/* Total amount of tag space available					 * at tagPtr. */    int numTags;			/* Number of tag slots actually used					 * at *tagPtr. */    struct Tk_ItemType *typePtr;	/* Table of procedures that implement					 * this type of item. */    int x1, y1, x2, y2;			/* Bounding box for item, in integer					 * canvas units. Set by item-specific					 * code and guaranteed to contain every					 * pixel drawn in item.  Item area					 * includes x1 and y1 but not x2					 * and y2. */    int   reserved1;			/* This padding is for compatibility */    char *reserved2;			/* with Jan Nijtmans dash patch */    int   reserved3;    char *reserved4;    /*     *------------------------------------------------------------------     * Starting here is additional type-specific stuff;  see the     * declarations for individual types to see what is part of     * each type.  The actual space below is determined by the     * "itemInfoSize" of the type's Tk_ItemType record.     *------------------------------------------------------------------     */} Tk_Item;/* * Records of the following type are used to describe a type of * item (e.g.  lines, circles, etc.) that can form part of a * canvas widget. */typedef int	Tk_ItemCreateProc _ANSI_ARGS_((Tcl_Interp *interp,		    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,		    char **argv));typedef int	Tk_ItemConfigureProc _ANSI_ARGS_((Tcl_Interp *interp,		    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,		    char **argv, int flags));typedef int	Tk_ItemCoordProc _ANSI_ARGS_((Tcl_Interp *interp,		    Tk_Canvas canvas, Tk_Item *itemPtr, int argc,		    char **argv));typedef void	Tk_ItemDeleteProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, Display *display));typedef void	Tk_ItemDisplayProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, Display *display, Drawable dst,		    int x, int y, int width, int height));typedef double	Tk_ItemPointProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, double *pointPtr));typedef int	Tk_ItemAreaProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, double *rectPtr));typedef int	Tk_ItemPostscriptProc _ANSI_ARGS_((Tcl_Interp *interp,		    Tk_Canvas canvas, Tk_Item *itemPtr, int prepass));typedef void	Tk_ItemScaleProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, double originX, double originY,		    double scaleX, double scaleY));typedef void	Tk_ItemTranslateProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, double deltaX, double deltaY));typedef int	Tk_ItemIndexProc _ANSI_ARGS_((Tcl_Interp *interp,		    Tk_Canvas canvas, Tk_Item *itemPtr, char *indexString,		    int *indexPtr));typedef void	Tk_ItemCursorProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, int index));typedef int	Tk_ItemSelectionProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, int offset, char *buffer,		    int maxBytes));typedef void	Tk_ItemInsertProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, int beforeThis, char *string));typedef void	Tk_ItemDCharsProc _ANSI_ARGS_((Tk_Canvas canvas,		    Tk_Item *itemPtr, int first, int last));typedef struct Tk_ItemType {    char *name;				/* The name of this type of item, such					 * as "line". */    int itemSize;			/* Total amount of space needed for					 * item's record. */    Tk_ItemCreateProc *createProc;	/* Procedure to create a new item of					 * this type. */    Tk_ConfigSpec *configSpecs;		/* Pointer to array of configuration					 * specs for this type.  Used for					 * returning configuration info. */    Tk_ItemConfigureProc *configProc;	/* Procedure to call to change					 * configuration options. */    Tk_ItemCoordProc *coordProc;	/* Procedure to call to get and set					 * the item's coordinates. */    Tk_ItemDeleteProc *deleteProc;	/* Procedure to delete existing item of					 * this type. */    Tk_ItemDisplayProc *displayProc;	/* Procedure to display items of					 * this type. */    int alwaysRedraw;			/* Non-zero means displayProc should					 * be called even when the item has					 * been moved off-screen. */    Tk_ItemPointProc *pointProc;	/* Computes distance from item to					 * a given point. */    Tk_ItemAreaProc *areaProc;		/* Computes whether item is inside,					 * outside, or overlapping an area. */    Tk_ItemPostscriptProc *postscriptProc;					/* Procedure to write a Postscript					 * description for items of this					 * type. */    Tk_ItemScaleProc *scaleProc;	/* Procedure to rescale items of					 * this type. */    Tk_ItemTranslateProc *translateProc;/* Procedure to translate items of					 * this type. */    Tk_ItemIndexProc *indexProc;	/* Procedure to determine index of					 * indicated character.  NULL if					 * item doesn't support indexing. */    Tk_ItemCursorProc *icursorProc;	/* Procedure to set insert cursor pos.					 * to just before a given position. */    Tk_ItemSelectionProc *selectionProc;/* Procedure to return selection (in					 * STRING format) when it is in this					 * item. */    Tk_ItemInsertProc *insertProc;	/* Procedure to insert something into					 * an item. */    Tk_ItemDCharsProc *dCharsProc;	/* Procedure to delete characters					 * from an item. */    struct Tk_ItemType *nextPtr;	/* Used to link types together into					 * a list. */    char *reserved1;			/* Reserved for future extension. */    int   reserved2;			/* Carefully compatible with */    char *reserved3;			/* Jan Nijtmans dash patch */    char *reserved4;} Tk_ItemType;/* * The following structure provides information about the selection and * the insertion cursor.  It is needed by only a few items, such as * those that display text.  It is shared by the generic canvas code * and the item-specific code, but most of the fields should be written * only by the canvas generic code. */typedef struct Tk_CanvasTextInfo {    Tk_3DBorder selBorder;	/* Border and background for selected				 * characters.  Read-only to items.*/    int selBorderWidth;		/* Width of border around selection. 				 * Read-only to items. */    XColor *selFgColorPtr;	/* Foreground color for selected text.				 * Read-only to items. */    Tk_Item *selItemPtr;	/* Pointer to selected item.  NULL means				 * selection isn't in this canvas.				 * Writable by items. */    int selectFirst;		/* Index of first selected character. 				 * Writable by items. */    int selectLast;		/* Index of last selected character. 				 * Writable by items. */    Tk_Item *anchorItemPtr;	/* Item corresponding to "selectAnchor":				 * not necessarily selItemPtr.   Read-only				 * to items. */    int selectAnchor;		/* Fixed end of selection (i.e. "select to"				 * operation will use this as one end of the				 * selection).  Writable by items. */    Tk_3DBorder insertBorder;	/* Used to draw vertical bar for insertion				 * cursor.  Read-only to items. */    int insertWidth;		/* Total width of insertion cursor.  Read-only				 * to items. */    int insertBorderWidth;	/* Width of 3-D border around insert cursor.				 * Read-only to items. */    Tk_Item *focusItemPtr;	/* Item that currently has the input focus,				 * or NULL if no such item.  Read-only to				 * items.  */    int gotFocus;		/* Non-zero means that the canvas widget has				 * the input focus.  Read-only to items.*/    int cursorOn;		/* Non-zero means that an insertion cursor				 * should be displayed in focusItemPtr.				 * Read-only to items.*/} Tk_CanvasTextInfo;/* *-------------------------------------------------------------- * * Procedure prototypes and structures used for managing images: * *-------------------------------------------------------------- */typedef struct Tk_ImageType Tk_ImageType;typedef int (Tk_ImageCreateProc) _ANSI_ARGS_((Tcl_Interp *interp,	char *name, int argc, char **argv, Tk_ImageType *typePtr,	Tk_ImageMaster master, ClientData *masterDataPtr));typedef ClientData (Tk_ImageGetProc) _ANSI_ARGS_((Tk_Window tkwin,	ClientData masterData));typedef void (Tk_ImageDisplayProc) _ANSI_ARGS_((ClientData instanceData,	Display *display, Drawable drawable, int imageX, int imageY,	int width, int height, int drawableX, int drawableY));typedef void (Tk_ImageFreeProc) _ANSI_ARGS_((ClientData instanceData,	Display *display));typedef void (Tk_ImageDeleteProc) _ANSI_ARGS_((ClientData masterData));typedef void (Tk_ImageChangedProc) _ANSI_ARGS_((ClientData clientData,	int x, int y, int width, int height, int imageWidth,	int imageHeight));/* * The following structure represents a particular type of image * (bitmap, xpm image, etc.).  It provides information common to * all images of that type, such as the type name and a collection * of procedures in the image manager that respond to various * events.  Each image manager is represented by one of these * structures. */struct Tk_ImageType {    char *name;			/* Name of image type. */    Tk_ImageCreateProc *createProc;				/* Procedure to call to create a new image				 * of this type. */    Tk_ImageGetProc *getProc;	/* Procedure to call the first time				 * Tk_GetImage is called in a new way				 * (new visual or screen). */    Tk_ImageDisplayProc *displayProc;				/* Call to draw image, in response to				 * Tk_RedrawImage calls. */    Tk_ImageFreeProc *freeProc;	/* Procedure to call whenever Tk_FreeImage				 * is called to release an instance of an				 * image. */    Tk_ImageDeleteProc *deleteProc;				/* Procedure to call to delete image.  It				 * will not be called until after freeProc				 * has been called for each instance of the				 * image. */    struct Tk_ImageType *nextPtr;				/* Next in list of all image types currently				 * known.  Filled in by Tk, not by image				 * manager. */    char *reserved;		/* reserved for future expansion */};/* *-------------------------------------------------------------- * * Additional definitions used to manage images of type "photo". * *-------------------------------------------------------------- *//* * The following type is used to identify a particular photo image * to be manipulated: */typedef void *Tk_PhotoHandle;/* * The following structure describes a block of pixels in memory: */typedef struct Tk_PhotoImageBlock {    unsigned char *pixelPtr;	/* Pointer to the first pixel. */    int		width;		/* Width of block, in pixels. */    int		height;		/* Height of block, in pixels. */    int		pitch;		/* Address difference between corresponding				 * pixels in successive lines. */    int		pixelSize;	/* Address difference between successive				 * pixels in the same line. */    int		offset[3];	/* Address differences between the red, green				 * and blue components of the pixel and the				 * pixel as a whole. */    int		reserved;	/* Reserved for extensions (dash patch) */} Tk_PhotoImageBlock;/* * Procedure prototypes and structures used in reading and * writing photo images: */typedef struct Tk_PhotoImageFormat Tk_PhotoImageFormat;typedef int (Tk_ImageFileMatchProc) _ANSI_ARGS_((Tcl_Channel chan,	char *fileName, char *formatString, int *widthPtr, int *heightPtr));typedef int (Tk_ImageStringMatchProc) _ANSI_ARGS_((char *string,	char *formatString, int *widthPtr, int *heightPtr));typedef int (Tk_ImageFileReadProc) _ANSI_ARGS_((Tcl_Interp *interp,	Tcl_Channel chan, char *fileName, char *formatString,	Tk_PhotoHandle imageHandle, int destX, int destY,	int width, int height, int srcX, int srcY));typedef int (Tk_ImageStringReadProc) _ANSI_ARGS_((Tcl_Interp *interp,	char *string, char *formatString, Tk_PhotoHandle imageHandle,	int destX, int destY, int width, int height, int srcX, int srcY));typedef int (Tk_ImageFileWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,	char *fileName, char *formatString, Tk_PhotoImageBlock *blockPtr));typedef int (Tk_ImageStringWriteProc) _ANSI_ARGS_((Tcl_Interp *interp,	Tcl_DString *dataPtr, char *formatString,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -