diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2009-09-04 09:39:54 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2009-09-04 09:39:54 (GMT) |
commit | 9f87c721622a74c927926066ac9fe58e4f2fc93f (patch) | |
tree | 5a471f15a88069e4f1ae1f63fdfc4c2f91120030 /generic/tk.h | |
parent | fa039e9e99407d1d286c3dbad04b0536e77ed592 (diff) | |
download | tk-9f87c721622a74c927926066ac9fe58e4f2fc93f.zip tk-9f87c721622a74c927926066ac9fe58e4f2fc93f.tar.gz tk-9f87c721622a74c927926066ac9fe58e4f2fc93f.tar.bz2 |
Improve consistency of formatting of comments and function decls
Diffstat (limited to 'generic/tk.h')
-rw-r--r-- | generic/tk.h | 118 |
1 files changed, 57 insertions, 61 deletions
diff --git a/generic/tk.h b/generic/tk.h index 167da5a..0512b1d 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk.h,v 1.131 2009/08/19 23:02:00 pspjuth Exp $ + * RCS: @(#) $Id: tk.h,v 1.132 2009/09/04 09:39:54 dkf Exp $ */ #ifndef _TK @@ -22,7 +22,7 @@ #if (TCL_MAJOR_VERSION != 8) || (TCL_MINOR_VERSION < 6) # error Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better #endif - + /* * For C++ compilers, use extern "C" */ @@ -56,7 +56,7 @@ extern "C" { #define TK_VERSION "8.6" #define TK_PATCH_LEVEL "8.6b1.1" - + /* * A special definition used to allow this header file to be included from * windows or mac resource files so that they can obtain version information. @@ -70,11 +70,9 @@ extern "C" { #ifndef RC_INVOKED #ifndef _XLIB_H -# if defined(MAC_OSX_TK) -# include <X11/Xlib.h> +# include <X11/Xlib.h> +# ifdef MAC_OSX_TK # include <X11/X.h> -# else -# include <X11/Xlib.h> # endif #endif #ifdef __STDC__ @@ -82,8 +80,8 @@ extern "C" { #endif #ifdef BUILD_tk -# undef TCL_STORAGE_CLASS -# define TCL_STORAGE_CLASS DLLEXPORT +#undef TCL_STORAGE_CLASS +#define TCL_STORAGE_CLASS DLLEXPORT #endif /* @@ -95,7 +93,7 @@ extern "C" { #ifdef XNQueryInputStyle #define TK_USE_INPUT_METHODS #endif - + /* * Dummy types that are used by clients: */ @@ -121,7 +119,7 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement; */ typedef const char *Tk_Uid; - + /* *---------------------------------------------------------------------- * @@ -222,7 +220,7 @@ typedef void (Tk_CustomOptionFreeProc) (ClientData clientData, Tk_Window tkwin, char *internalPtr); typedef struct Tk_ObjCustomOption { - const char *name; /* Name of the custom option. */ + const char *name; /* Name of the custom option. */ Tk_CustomOptionSetProc *setProc; /* Function to use to set a record's option * value from a Tcl_Obj */ @@ -298,7 +296,7 @@ typedef struct Tk_SavedOptions { * old values in a single structure. NULL * means no more structures. */ } Tk_SavedOptions; - + /* * Structure used to describe application-specific configuration options: * indicates procedures to call to parse an option and to return a text string @@ -315,8 +313,8 @@ typedef struct Tk_SavedOptions { typedef int (Tk_OptionParseProc) (ClientData clientData, Tcl_Interp *interp, Tk_Window tkwin, CONST84 char *value, char *widgRec, int offset); -typedef CONST86 char *(Tk_OptionPrintProc) (ClientData clientData, Tk_Window tkwin, - char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); +typedef CONST86 char *(Tk_OptionPrintProc) (ClientData clientData, + Tk_Window tkwin, char *widgRec, int offset, Tcl_FreeProc **freeProcPtr); typedef struct Tk_CustomOption { Tk_OptionParseProc *parseProc; @@ -353,7 +351,8 @@ typedef struct Tk_ConfigSpec { int specFlags; /* Any combination of the values defined * below; other bits are used internally by * tkConfig.c. */ - CONST86 Tk_CustomOption *customPtr; /* If type is TK_CONFIG_CUSTOM then this is a + CONST86 Tk_CustomOption *customPtr; + /* If type is TK_CONFIG_CUSTOM then this is a * pointer to info about how to parse and * print the option. Otherwise it is * irrelevant. */ @@ -395,7 +394,7 @@ typedef enum { #define TK_CONFIG_OPTION_SPECIFIED (1 << 4) #define TK_CONFIG_USER_BIT 0x100 #endif /* __NO_OLD_CONFIG */ - + /* * Structure used to specify how to handle argv options. */ @@ -439,7 +438,7 @@ typedef struct { #define TK_ARGV_NO_LEFTOVERS 0x2 #define TK_ARGV_NO_ABBREV 0x4 #define TK_ARGV_DONT_SKIP_FIRST_ARG 0x8 - + /* * Enumerated type for describing actions to be taken in response to a * restrictProc established by Tk_RestrictEvents. @@ -497,7 +496,7 @@ typedef enum { TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW, TK_ANCHOR_CENTER } Tk_Anchor; - + /* * Enumerated type for describing a style of justification: */ @@ -541,7 +540,7 @@ typedef struct Tk_FontMetrics { #define TK_IGNORE_TABS 8 #define TK_IGNORE_NEWLINES 16 - + /* * Widget class procedures used to implement platform specific widget * behavior. @@ -584,7 +583,7 @@ typedef struct Tk_ClassProcs { #define Tk_GetClassProc(procs, which) \ (((procs) == NULL) ? NULL : \ (((procs)->size <= Tk_Offset(Tk_ClassProcs, which)) ? NULL:(procs)->which)) - + /* * Each geometry manager (the packer, the placer, etc.) is represented by a * structure of the following form, which indicates procedures to invoke in @@ -616,7 +615,7 @@ typedef struct Tk_GeomMgr { #define TK_SCROLL_PAGES 2 #define TK_SCROLL_UNITS 3 #define TK_SCROLL_ERROR 4 - + /* *---------------------------------------------------------------------- * @@ -679,7 +678,7 @@ typedef struct { } XActivateDeactivateEvent; typedef XActivateDeactivateEvent XActivateEvent; typedef XActivateDeactivateEvent XDeactivateEvent; - + /* *---------------------------------------------------------------------- * @@ -882,7 +881,7 @@ typedef struct Tk_FakeWin { #define TK_TOP_HIERARCHY 0x20000 #define TK_PROP_PROPCHANGE 0x40000 #define TK_WM_MANAGEABLE 0x80000 - + /* *---------------------------------------------------------------------- * @@ -984,7 +983,7 @@ typedef int (Tk_ItemConfigureProc)(Tcl_Interp *interp, Tk_Canvas canvas, int flags); typedef int (Tk_ItemCoordProc)(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, int argc, Tcl_Obj *const argv[]); -#endif +#endif /* USE_OLD_CANVAS */ typedef void (Tk_ItemDeleteProc)(Tk_Canvas canvas, Tk_Item *itemPtr, Display *display); typedef void (Tk_ItemDisplayProc)(Tk_Canvas canvas, Tk_Item *itemPtr, @@ -1007,7 +1006,7 @@ typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas, #else typedef int (Tk_ItemIndexProc)(Tcl_Interp *interp, Tk_Canvas canvas, Tk_Item *itemPtr, Tcl_Obj *indexString, int *indexPtr); -#endif +#endif /* USE_OLD_CANVAS */ typedef void (Tk_ItemCursorProc)(Tk_Canvas canvas, Tk_Item *itemPtr, int index); typedef int (Tk_ItemSelectionProc)(Tk_Canvas canvas, Tk_Item *itemPtr, @@ -1018,14 +1017,14 @@ typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr, #else typedef void (Tk_ItemInsertProc)(Tk_Canvas canvas, Tk_Item *itemPtr, int beforeThis, Tcl_Obj *string); -#endif +#endif /* USE_OLD_CANVAS */ typedef void (Tk_ItemDCharsProc)(Tk_Canvas canvas, Tk_Item *itemPtr, int first, int last); #ifndef __NO_OLD_CONFIG typedef struct Tk_ItemType { - CONST86 char *name; /* The name of this type of item, such as + CONST86 char *name; /* The name of this type of item, such as * "line". */ int itemSize; /* Total amount of space needed for item's * record. */ @@ -1088,7 +1087,7 @@ typedef struct Tk_ItemType { #define TK_MOVABLE_POINTS 2 -#endif +#endif /* __NO_OLD_CONFIG */ /* * The following structure provides information about the selection and the @@ -1187,7 +1186,7 @@ typedef struct Tk_Outline { Pixmap disabledStipple; /* Outline Stipple pattern if state is * disabled. */ } Tk_Outline; - + /* *---------------------------------------------------------------------- * @@ -1205,7 +1204,7 @@ typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, char *name, int argc, typedef int (Tk_ImageCreateProc) (Tcl_Interp *interp, CONST86 char *name, int objc, Tcl_Obj *const objv[], CONST86 Tk_ImageType *typePtr, Tk_ImageMaster master, ClientData *masterDataPtr); -#endif +#endif /* USE_OLD_IMAGE */ typedef ClientData (Tk_ImageGetProc) (Tk_Window tkwin, ClientData masterData); typedef void (Tk_ImageDisplayProc) (ClientData instanceData, Display *display, Drawable drawable, int imageX, int imageY, int width, int height, @@ -1227,7 +1226,7 @@ typedef int (Tk_ImagePostscriptProc) (ClientData clientData, */ struct Tk_ImageType { - CONST86 char *name; /* Name of image type. */ + CONST86 char *name; /* Name of image type. */ Tk_ImageCreateProc *createProc; /* Procedure to call to create a new image of * this type. */ @@ -1330,7 +1329,7 @@ typedef int (Tk_ImageFileWriteProc) (Tcl_Interp *interp, const char *fileName, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, Tk_PhotoImageBlock *blockPtr); -#endif +#endif /* USE_OLD_IMAGE */ /* * The following structure represents a particular file format for storing @@ -1366,10 +1365,10 @@ struct Tk_PhotoImageFormat { }; #ifdef USE_OLD_IMAGE -#define Tk_CreateImageType Tk_CreateOldImageType -#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat -#endif - +#define Tk_CreateImageType Tk_CreateOldImageType +#define Tk_CreatePhotoImageFormat Tk_CreateOldPhotoImageFormat +#endif /* USE_OLD_IMAGE */ + /* *---------------------------------------------------------------------- * @@ -1404,27 +1403,27 @@ typedef void (Tk_DrawElementProc) (ClientData clientData, char *recordPtr, int y, int width, int height, int state); typedef struct Tk_ElementOptionSpec { - char *name; /* Name of the required option. */ - Tk_OptionType type; /* Accepted option type. TK_OPTION_END means - * any. */ + char *name; /* Name of the required option. */ + Tk_OptionType type; /* Accepted option type. TK_OPTION_END means + * any. */ } Tk_ElementOptionSpec; typedef struct Tk_ElementSpec { - int version; /* Version of the style support. */ - char *name; /* Name of element. */ + int version; /* Version of the style support. */ + char *name; /* Name of element. */ Tk_ElementOptionSpec *options; - /* List of required options. Last one's name - * must be NULL. */ + /* List of required options. Last one's name + * must be NULL. */ Tk_GetElementSizeProc *getSize; - /* Compute the external (resp. internal) size - * of the element from its desired internal - * (resp. external) size. */ + /* Compute the external (resp. internal) size + * of the element from its desired internal + * (resp. external) size. */ Tk_GetElementBoxProc *getBox; - /* Compute the inscribed or bounding boxes - * within a given area. */ + /* Compute the inscribed or bounding boxes + * within a given area. */ Tk_GetElementBorderWidthProc *getBorderWidth; - /* Return the element's internal border width. - * Mostly useful for widgets. */ + /* Return the element's internal border width. + * Mostly useful for widgets. */ Tk_DrawElementProc *draw; /* Draw the element in the given bounding * box. */ } Tk_ElementSpec; @@ -1437,7 +1436,7 @@ typedef struct Tk_ElementSpec { #define TK_ELEMENT_STATE_DISABLED 1<<1 #define TK_ELEMENT_STATE_FOCUS 1<<2 #define TK_ELEMENT_STATE_PRESSED 1<<3 - + /* *---------------------------------------------------------------------- * @@ -1486,21 +1485,18 @@ typedef struct Tk_ElementSpec { #define Tk_Main(argc, argv, proc) \ Tk_MainEx(argc, argv, proc, Tcl_CreateInterp()) -const char * Tk_InitStubs (Tcl_Interp *interp, const char *version, +const char * Tk_InitStubs(Tcl_Interp *interp, const char *version, int exact); -EXTERN const char * Tk_PkgInitStubsCheck (Tcl_Interp *interp, +EXTERN const char * Tk_PkgInitStubsCheck(Tcl_Interp *interp, const char *version, int exact); #ifndef USE_TK_STUBS - #define Tk_InitStubs(interp, version, exact) \ Tk_PkgInitStubsCheck(interp, version, exact) - -#endif +#endif /* USE_TK_STUBS */ #define Tk_InitImageArgs(interp, argc, argv) /**/ - - + /* *---------------------------------------------------------------------- * @@ -1530,7 +1526,7 @@ typedef int (Tk_SelectionProc) (ClientData clientData, int offset, */ #include "tkDecls.h" - + /* *---------------------------------------------------------------------- * @@ -1588,7 +1584,7 @@ typedef int (Tk_SelectionProc) (ClientData clientData, int offset, #endif #endif /* _TK */ - + /* * Local Variables: * mode: c |