diff options
Diffstat (limited to 'generic/ttk')
-rw-r--r-- | generic/ttk/ttkDecls.h | 102 | ||||
-rw-r--r-- | generic/ttk/ttkGenStubs.tcl | 41 |
2 files changed, 74 insertions, 69 deletions
diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h index 8b64432..ea4d18d 100644 --- a/generic/ttk/ttkDecls.h +++ b/generic/ttk/ttkDecls.h @@ -1,5 +1,5 @@ /* - * $Id: ttkDecls.h,v 1.8 2009/02/08 19:35:35 jenglish Exp $ + * $Id: ttkDecls.h,v 1.9 2010/01/29 18:07:32 nijtmans Exp $ * * This file is (mostly) automatically generated from ttk.decls. */ @@ -32,52 +32,52 @@ extern const char *TtkInitializeStubs( */ /* 0 */ -TTKAPI Ttk_Theme Ttk_GetTheme (Tcl_Interp * interp, const char * name); +TTKAPI Ttk_Theme Ttk_GetTheme(Tcl_Interp *interp, const char *name); /* 1 */ -TTKAPI Ttk_Theme Ttk_GetDefaultTheme (Tcl_Interp * interp); +TTKAPI Ttk_Theme Ttk_GetDefaultTheme(Tcl_Interp *interp); /* 2 */ -TTKAPI Ttk_Theme Ttk_GetCurrentTheme (Tcl_Interp * interp); +TTKAPI Ttk_Theme Ttk_GetCurrentTheme(Tcl_Interp *interp); /* 3 */ -TTKAPI Ttk_Theme Ttk_CreateTheme (Tcl_Interp * interp, - const char * name, Ttk_Theme parent); +TTKAPI Ttk_Theme Ttk_CreateTheme(Tcl_Interp *interp, const char *name, + Ttk_Theme parent); /* 4 */ -TTKAPI void Ttk_RegisterCleanup (Tcl_Interp * interp, - void * deleteData, - Ttk_CleanupProc * cleanupProc); +TTKAPI void Ttk_RegisterCleanup(Tcl_Interp *interp, + void *deleteData, + Ttk_CleanupProc *cleanupProc); /* 5 */ -TTKAPI int Ttk_RegisterElementSpec (Ttk_Theme theme, - const char * elementName, - Ttk_ElementSpec * elementSpec, - void * clientData); +TTKAPI int Ttk_RegisterElementSpec(Ttk_Theme theme, + const char *elementName, + Ttk_ElementSpec *elementSpec, + void *clientData); /* 6 */ -TTKAPI Ttk_ElementClass * Ttk_RegisterElement (Tcl_Interp * interp, - Ttk_Theme theme, const char * elementName, - Ttk_ElementSpec * elementSpec, - void * clientData); +TTKAPI Ttk_ElementClass * Ttk_RegisterElement(Tcl_Interp *interp, + Ttk_Theme theme, const char *elementName, + Ttk_ElementSpec *elementSpec, + void *clientData); /* 7 */ -TTKAPI int Ttk_RegisterElementFactory (Tcl_Interp * interp, - const char * name, +TTKAPI int Ttk_RegisterElementFactory(Tcl_Interp *interp, + const char *name, Ttk_ElementFactory factoryProc, - void * clientData); + void *clientData); /* 8 */ -TTKAPI void Ttk_RegisterLayout (Ttk_Theme theme, - const char * className, +TTKAPI void Ttk_RegisterLayout(Ttk_Theme theme, + const char *className, Ttk_LayoutSpec layoutSpec); /* Slot 9 is reserved */ /* 10 */ -TTKAPI int Ttk_GetStateSpecFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Ttk_StateSpec * spec_rtn); +TTKAPI int Ttk_GetStateSpecFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn); /* 11 */ -TTKAPI Tcl_Obj * Ttk_NewStateSpecObj (unsigned int onbits, +TTKAPI Tcl_Obj * Ttk_NewStateSpecObj(unsigned int onbits, unsigned int offbits); /* 12 */ -TTKAPI Ttk_StateMap Ttk_GetStateMapFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr); +TTKAPI Ttk_StateMap Ttk_GetStateMapFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr); /* 13 */ -TTKAPI Tcl_Obj * Ttk_StateMapLookup (Tcl_Interp * interp, +TTKAPI Tcl_Obj * Ttk_StateMapLookup(Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state); /* 14 */ -TTKAPI int Ttk_StateTableLookup (Ttk_StateTable map[], +TTKAPI int Ttk_StateTableLookup(Ttk_StateTable map[], Ttk_State state); /* Slot 15 is reserved */ /* Slot 16 is reserved */ @@ -85,53 +85,53 @@ TTKAPI int Ttk_StateTableLookup (Ttk_StateTable map[], /* Slot 18 is reserved */ /* Slot 19 is reserved */ /* 20 */ -TTKAPI int Ttk_GetPaddingFromObj (Tcl_Interp * interp, - Tk_Window tkwin, Tcl_Obj * objPtr, - Ttk_Padding * pad_rtn); +TTKAPI int Ttk_GetPaddingFromObj(Tcl_Interp *interp, + Tk_Window tkwin, Tcl_Obj *objPtr, + Ttk_Padding *pad_rtn); /* 21 */ -TTKAPI int Ttk_GetBorderFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Ttk_Padding * pad_rtn); +TTKAPI int Ttk_GetBorderFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Ttk_Padding *pad_rtn); /* 22 */ -TTKAPI int Ttk_GetStickyFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, Ttk_Sticky * sticky_rtn); +TTKAPI int Ttk_GetStickyFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn); /* 23 */ -TTKAPI Ttk_Padding Ttk_MakePadding (short l, short t, short r, short b); +TTKAPI Ttk_Padding Ttk_MakePadding(short l, short t, short r, short b); /* 24 */ -TTKAPI Ttk_Padding Ttk_UniformPadding (short borderWidth); +TTKAPI Ttk_Padding Ttk_UniformPadding(short borderWidth); /* 25 */ -TTKAPI Ttk_Padding Ttk_AddPadding (Ttk_Padding pad1, Ttk_Padding pad2); +TTKAPI Ttk_Padding Ttk_AddPadding(Ttk_Padding pad1, Ttk_Padding pad2); /* 26 */ -TTKAPI Ttk_Padding Ttk_RelievePadding (Ttk_Padding padding, int relief, +TTKAPI Ttk_Padding Ttk_RelievePadding(Ttk_Padding padding, int relief, int n); /* 27 */ -TTKAPI Ttk_Box Ttk_MakeBox (int x, int y, int width, int height); +TTKAPI Ttk_Box Ttk_MakeBox(int x, int y, int width, int height); /* 28 */ -TTKAPI int Ttk_BoxContains (Ttk_Box box, int x, int y); +TTKAPI int Ttk_BoxContains(Ttk_Box box, int x, int y); /* 29 */ -TTKAPI Ttk_Box Ttk_PackBox (Ttk_Box * cavity, int w, int h, +TTKAPI Ttk_Box Ttk_PackBox(Ttk_Box *cavity, int w, int h, Ttk_Side side); /* 30 */ -TTKAPI Ttk_Box Ttk_StickBox (Ttk_Box parcel, int w, int h, +TTKAPI Ttk_Box Ttk_StickBox(Ttk_Box parcel, int w, int h, Ttk_Sticky sticky); /* 31 */ -TTKAPI Ttk_Box Ttk_AnchorBox (Ttk_Box parcel, int w, int h, +TTKAPI Ttk_Box Ttk_AnchorBox(Ttk_Box parcel, int w, int h, Tk_Anchor anchor); /* 32 */ -TTKAPI Ttk_Box Ttk_PadBox (Ttk_Box b, Ttk_Padding p); +TTKAPI Ttk_Box Ttk_PadBox(Ttk_Box b, Ttk_Padding p); /* 33 */ -TTKAPI Ttk_Box Ttk_ExpandBox (Ttk_Box b, Ttk_Padding p); +TTKAPI Ttk_Box Ttk_ExpandBox(Ttk_Box b, Ttk_Padding p); /* 34 */ -TTKAPI Ttk_Box Ttk_PlaceBox (Ttk_Box * cavity, int w, int h, +TTKAPI Ttk_Box Ttk_PlaceBox(Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 35 */ -TTKAPI Tcl_Obj * Ttk_NewBoxObj (Ttk_Box box); +TTKAPI Tcl_Obj * Ttk_NewBoxObj(Ttk_Box box); /* Slot 36 is reserved */ /* Slot 37 is reserved */ /* Slot 38 is reserved */ /* Slot 39 is reserved */ /* 40 */ -TTKAPI int Ttk_GetOrientFromObj (Tcl_Interp * interp, - Tcl_Obj * objPtr, int * orient); +TTKAPI int Ttk_GetOrientFromObj(Tcl_Interp *interp, + Tcl_Obj *objPtr, int *orient); #endif /* !defined(USE_TTK_STUBS) */ diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl index 29307dc..f190143 100644 --- a/generic/ttk/ttkGenStubs.tcl +++ b/generic/ttk/ttkGenStubs.tcl @@ -1,14 +1,14 @@ # ttkGenStubs.tcl -- # # This script generates a set of stub files for a given -# interface. -# +# interface. +# # # Copyright (c) 1998-1999 by Scriptics Corporation. # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# $Id: ttkGenStubs.tcl,v 1.2 2008/10/22 20:56:43 nijtmans Exp $ +# $Id: ttkGenStubs.tcl,v 1.3 2010/01/29 18:07:31 nijtmans Exp $ # # SOURCE: tcl/tools/genStubs.tcl, revision 1.20 # @@ -281,7 +281,7 @@ proc genStubs::addPlatformGuard {plat text} { return "#if !(defined(__WIN32__) || defined(MAC_OSX_TK)) /* X11 */\n${text}#endif /* X11 */\n" } } - return "$text" + return $text } # genStubs::emitSlots -- @@ -418,7 +418,7 @@ proc genStubs::makeDecl {name decl index} { append text ";\n" return $text } - append line "$fname " + append line $fname set arg1 [lindex $args 0] switch -exact $arg1 { @@ -430,8 +430,11 @@ proc genStubs::makeDecl {name decl index} { foreach arg [lrange $args 1 end] { append line $sep set next {} - append next [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append next [lindex $arg 0] + if {[string index $next end] ne "*"} { + append next " " + } + append next [lindex $arg 1] [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { append text [string trimright $line] \n @@ -448,8 +451,11 @@ proc genStubs::makeDecl {name decl index} { foreach arg $args { append line $sep set next {} - append next [lindex $arg 0] " " [lindex $arg 1] \ - [lindex $arg 2] + append next [lindex $arg 0] + if {[string index $next end] ne "*"} { + append next " " + } + append next [lindex $arg 1] [lindex $arg 2] if {[string length $line] + [string length $next] \ + $pad > 76} { append text [string trimright $line] \n @@ -546,7 +552,7 @@ proc genStubs::makeSlot {name decl index} { append text ")" } } - + append text "; /* $index */\n" return $text } @@ -874,14 +880,13 @@ proc genStubs::init {} { # Returns any values that were not assigned to variables. if {[string length [namespace which lassign]] == 0} { -proc lassign {valueList args} { - if {[llength $args] == 0} { - error "wrong # args: should be \"lassign list ?varName ...?\"" - } - - uplevel [list foreach $args $valueList {break}] - return [lrange $valueList [llength $args] end] -} + proc lassign {valueList args} { + if {[llength $args] == 0} { + error "wrong # args: should be \"lassign list varName ?varName ...?\"" + } + uplevel [list foreach $args $valueList {break}] + return [lrange $valueList [llength $args] end] + } } genStubs::init |