summaryrefslogtreecommitdiffstats
path: root/generic/ttk
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk')
-rw-r--r--generic/ttk/ttk.decls20
-rw-r--r--generic/ttk/ttkDecls.h140
-rw-r--r--generic/ttk/ttkGenStubs.tcl61
3 files changed, 116 insertions, 105 deletions
diff --git a/generic/ttk/ttk.decls b/generic/ttk/ttk.decls
index b3f2538..889a130 100644
--- a/generic/ttk/ttk.decls
+++ b/generic/ttk/ttk.decls
@@ -1,5 +1,5 @@
#
-# $Id: ttk.decls,v 1.2 2006/12/10 19:19:44 jenglish Exp $
+# $Id: ttk.decls,v 1.2.4.1 2010/02/07 23:24:13 nijtmans Exp $
#
library ttk
@@ -27,7 +27,7 @@ declare 4 current {
declare 5 current {
int Ttk_RegisterElementSpec(
- Ttk_Theme theme,
+ Ttk_Theme theme,
const char *elementName,
Ttk_ElementSpec *elementSpec,
void *clientData);
@@ -36,7 +36,7 @@ declare 5 current {
declare 6 current {
Ttk_ElementImpl Ttk_RegisterElement(
Tcl_Interp *interp,
- Ttk_Theme theme,
+ Ttk_Theme theme,
const char *elementName,
Ttk_ElementSpec *elementSpec,
void *clientData);
@@ -44,7 +44,7 @@ declare 6 current {
declare 7 current {
int Ttk_RegisterElementFactory(
- Tcl_Interp *interp,
+ Tcl_Interp *interp,
const char *name,
Ttk_ElementFactory factoryProc,
void *clientData);
@@ -64,7 +64,7 @@ declare 10 current {
}
declare 11 current {
Tcl_Obj *Ttk_NewStateSpecObj(
- unsigned int onbits,unsigned int offbits);
+ unsigned int onbits, unsigned int offbits);
}
declare 12 current {
Ttk_StateMap Ttk_GetStateMapFromObj(
@@ -85,15 +85,15 @@ declare 14 current {
#
declare 20 current {
int Ttk_GetPaddingFromObj(
- Tcl_Interp *interp,
- Tk_Window tkwin,
- Tcl_Obj *objPtr,
+ Tcl_Interp *interp,
+ Tk_Window tkwin,
+ Tcl_Obj *objPtr,
Ttk_Padding *pad_rtn);
}
declare 21 current {
int Ttk_GetBorderFromObj(
- Tcl_Interp *interp,
- Tcl_Obj *objPtr,
+ Tcl_Interp *interp,
+ Tcl_Obj *objPtr,
Ttk_Padding *pad_rtn);
}
declare 22 current {
diff --git a/generic/ttk/ttkDecls.h b/generic/ttk/ttkDecls.h
index 6e515d6..0bdcd93 100644
--- a/generic/ttk/ttkDecls.h
+++ b/generic/ttk/ttkDecls.h
@@ -1,5 +1,5 @@
/*
- * $Id: ttkDecls.h,v 1.6 2008/03/27 12:04:02 das Exp $
+ * $Id: ttkDecls.h,v 1.6.2.1 2010/02/07 23:24:13 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_ElementImpl Ttk_RegisterElement (Tcl_Interp * interp,
- Ttk_Theme theme, const char * elementName,
- Ttk_ElementSpec * elementSpec,
- void * clientData);
+TTKAPI Ttk_ElementImpl 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,
- Ttk_ElementFactory factoryProc,
- void * clientData);
+TTKAPI int Ttk_RegisterElementFactory(Tcl_Interp *interp,
+ const char *name,
+ Ttk_ElementFactory factoryProc,
+ 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) */
@@ -141,47 +141,47 @@ typedef struct TtkStubs {
int revision;
struct TtkStubHooks *hooks;
- Ttk_Theme (*ttk_GetTheme) (Tcl_Interp * interp, const char * name); /* 0 */
- Ttk_Theme (*ttk_GetDefaultTheme) (Tcl_Interp * interp); /* 1 */
- Ttk_Theme (*ttk_GetCurrentTheme) (Tcl_Interp * interp); /* 2 */
- Ttk_Theme (*ttk_CreateTheme) (Tcl_Interp * interp, const char * name, Ttk_Theme parent); /* 3 */
- void (*ttk_RegisterCleanup) (Tcl_Interp * interp, void * deleteData, Ttk_CleanupProc * cleanupProc); /* 4 */
- int (*ttk_RegisterElementSpec) (Ttk_Theme theme, const char * elementName, Ttk_ElementSpec * elementSpec, void * clientData); /* 5 */
- Ttk_ElementImpl (*ttk_RegisterElement) (Tcl_Interp * interp, Ttk_Theme theme, const char * elementName, Ttk_ElementSpec * elementSpec, void * clientData); /* 6 */
- int (*ttk_RegisterElementFactory) (Tcl_Interp * interp, const char * name, Ttk_ElementFactory factoryProc, void * clientData); /* 7 */
- void (*ttk_RegisterLayout) (Ttk_Theme theme, const char * className, Ttk_LayoutSpec layoutSpec); /* 8 */
+ Ttk_Theme (*ttk_GetTheme) (Tcl_Interp *interp, const char *name); /* 0 */
+ Ttk_Theme (*ttk_GetDefaultTheme) (Tcl_Interp *interp); /* 1 */
+ Ttk_Theme (*ttk_GetCurrentTheme) (Tcl_Interp *interp); /* 2 */
+ Ttk_Theme (*ttk_CreateTheme) (Tcl_Interp *interp, const char *name, Ttk_Theme parent); /* 3 */
+ void (*ttk_RegisterCleanup) (Tcl_Interp *interp, void *deleteData, Ttk_CleanupProc *cleanupProc); /* 4 */
+ int (*ttk_RegisterElementSpec) (Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, void *clientData); /* 5 */
+ Ttk_ElementImpl (*ttk_RegisterElement) (Tcl_Interp *interp, Ttk_Theme theme, const char *elementName, Ttk_ElementSpec *elementSpec, void *clientData); /* 6 */
+ int (*ttk_RegisterElementFactory) (Tcl_Interp *interp, const char *name, Ttk_ElementFactory factoryProc, void *clientData); /* 7 */
+ void (*ttk_RegisterLayout) (Ttk_Theme theme, const char *className, Ttk_LayoutSpec layoutSpec); /* 8 */
void (*reserved9)(void);
- int (*ttk_GetStateSpecFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Ttk_StateSpec * spec_rtn); /* 10 */
+ int (*ttk_GetStateSpecFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_StateSpec *spec_rtn); /* 10 */
Tcl_Obj * (*ttk_NewStateSpecObj) (unsigned int onbits, unsigned int offbits); /* 11 */
- Ttk_StateMap (*ttk_GetStateMapFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr); /* 12 */
- Tcl_Obj * (*ttk_StateMapLookup) (Tcl_Interp * interp, Ttk_StateMap map, Ttk_State state); /* 13 */
+ Ttk_StateMap (*ttk_GetStateMapFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr); /* 12 */
+ Tcl_Obj * (*ttk_StateMapLookup) (Tcl_Interp *interp, Ttk_StateMap map, Ttk_State state); /* 13 */
int (*ttk_StateTableLookup) (Ttk_StateTable map[], Ttk_State state); /* 14 */
void (*reserved15)(void);
void (*reserved16)(void);
void (*reserved17)(void);
void (*reserved18)(void);
void (*reserved19)(void);
- int (*ttk_GetPaddingFromObj) (Tcl_Interp * interp, Tk_Window tkwin, Tcl_Obj * objPtr, Ttk_Padding * pad_rtn); /* 20 */
- int (*ttk_GetBorderFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Ttk_Padding * pad_rtn); /* 21 */
- int (*ttk_GetStickyFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, Ttk_Sticky * sticky_rtn); /* 22 */
+ int (*ttk_GetPaddingFromObj) (Tcl_Interp *interp, Tk_Window tkwin, Tcl_Obj *objPtr, Ttk_Padding *pad_rtn); /* 20 */
+ int (*ttk_GetBorderFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Padding *pad_rtn); /* 21 */
+ int (*ttk_GetStickyFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, Ttk_Sticky *sticky_rtn); /* 22 */
Ttk_Padding (*ttk_MakePadding) (short l, short t, short r, short b); /* 23 */
Ttk_Padding (*ttk_UniformPadding) (short borderWidth); /* 24 */
Ttk_Padding (*ttk_AddPadding) (Ttk_Padding pad1, Ttk_Padding pad2); /* 25 */
Ttk_Padding (*ttk_RelievePadding) (Ttk_Padding padding, int relief, int n); /* 26 */
Ttk_Box (*ttk_MakeBox) (int x, int y, int width, int height); /* 27 */
int (*ttk_BoxContains) (Ttk_Box box, int x, int y); /* 28 */
- Ttk_Box (*ttk_PackBox) (Ttk_Box * cavity, int w, int h, Ttk_Side side); /* 29 */
+ Ttk_Box (*ttk_PackBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side); /* 29 */
Ttk_Box (*ttk_StickBox) (Ttk_Box parcel, int w, int h, Ttk_Sticky sticky); /* 30 */
Ttk_Box (*ttk_AnchorBox) (Ttk_Box parcel, int w, int h, Tk_Anchor anchor); /* 31 */
Ttk_Box (*ttk_PadBox) (Ttk_Box b, Ttk_Padding p); /* 32 */
Ttk_Box (*ttk_ExpandBox) (Ttk_Box b, Ttk_Padding p); /* 33 */
- Ttk_Box (*ttk_PlaceBox) (Ttk_Box * cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 34 */
+ Ttk_Box (*ttk_PlaceBox) (Ttk_Box *cavity, int w, int h, Ttk_Side side, Ttk_Sticky sticky); /* 34 */
Tcl_Obj * (*ttk_NewBoxObj) (Ttk_Box box); /* 35 */
void (*reserved36)(void);
void (*reserved37)(void);
void (*reserved38)(void);
void (*reserved39)(void);
- int (*ttk_GetOrientFromObj) (Tcl_Interp * interp, Tcl_Obj * objPtr, int * orient); /* 40 */
+ int (*ttk_GetOrientFromObj) (Tcl_Interp *interp, Tcl_Obj *objPtr, int *orient); /* 40 */
} TtkStubs;
#ifdef __cplusplus
diff --git a/generic/ttk/ttkGenStubs.tcl b/generic/ttk/ttkGenStubs.tcl
index 961f36b..b868adb 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.1 2007/03/07 23:46:34 das Exp $
+# $Id: ttkGenStubs.tcl,v 1.1.4.1 2010/02/07 23:24:13 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,11 +430,14 @@ 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 $line \n
+ append text [string trimright $line] \n
set line "\t\t\t\t"
set pad 28
}
@@ -448,11 +451,14 @@ 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 $line \n
+ append text [string trimright $line] \n
set line "\t\t\t\t"
set pad 28
}
@@ -530,8 +536,11 @@ proc genStubs::makeSlot {name decl index} {
TCL_VARARGS {
set sep "("
foreach arg [lrange $args 1 end] {
- append text $sep [lindex $arg 0] " " [lindex $arg 1] \
- [lindex $arg 2]
+ append text $sep [lindex $arg 0]
+ if {[string index $text end] ne "*"} {
+ append text " "
+ }
+ append text [lindex $arg 1] [lindex $arg 2]
set sep ", "
}
append text ", ...)"
@@ -539,14 +548,17 @@ proc genStubs::makeSlot {name decl index} {
default {
set sep "("
foreach arg $args {
- append text $sep [lindex $arg 0] " " [lindex $arg 1] \
- [lindex $arg 2]
+ append text $sep [lindex $arg 0]
+ if {[string index $text end] ne "*"} {
+ append text " "
+ }
+ append text [lindex $arg 1] [lindex $arg 2]
set sep ", "
}
append text ")"
}
}
-
+
append text "; /* $index */\n"
return $text
}
@@ -782,7 +794,7 @@ proc genStubs::emitInit {name textVar} {
} else {
append text " 0,\n"
}
-
+
forAllStubs $name makeInit noGuard text {" 0, /* $i */\n"}
append text "\};\n"
@@ -874,14 +886,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: lassign list varname ?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