summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkWidget.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/ttk/ttkWidget.h')
-rw-r--r--generic/ttk/ttkWidget.h66
1 files changed, 37 insertions, 29 deletions
diff --git a/generic/ttk/ttkWidget.h b/generic/ttk/ttkWidget.h
index 21cb1b3..882b8ec 100644
--- a/generic/ttk/ttkWidget.h
+++ b/generic/ttk/ttkWidget.h
@@ -1,4 +1,4 @@
-/* $Id: ttkWidget.h,v 1.9 2008/01/06 22:33:14 jenglish Exp $
+/* $Id: ttkWidget.h,v 1.9.2.1 2010/08/26 02:06:10 hobbs Exp $
* Copyright (c) 2003, Joe English
* Helper routines for widget implementations.
*/
@@ -49,20 +49,6 @@ typedef struct
} WidgetCore;
/*
- * Subcommand specifications:
- */
-typedef int (*WidgetSubcommandProc)(
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
-typedef struct {
- const char *name;
- WidgetSubcommandProc command;
-} WidgetCommandSpec;
-
-MODULE_SCOPE int TtkWidgetEnsembleCommand( /* Run an ensemble command */
- const WidgetCommandSpec *commands, int cmdIndex,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], void *recordPtr);
-
-/*
* Widget specifications:
*/
struct WidgetSpec_
@@ -70,12 +56,12 @@ struct WidgetSpec_
const char *className; /* Widget class name */
size_t recordSize; /* #bytes in widget record */
const Tk_OptionSpec *optionSpecs; /* Option specifications */
- const WidgetCommandSpec *commands; /* Widget instance subcommands */
+ const Ttk_Ensemble *commands; /* Widget instance subcommands */
/*
* Hooks:
*/
- int (*initializeProc)(Tcl_Interp *, void *recordPtr);
+ void (*initializeProc)(Tcl_Interp *, void *recordPtr);
void (*cleanupProc)(void *recordPtr);
int (*configureProc)(Tcl_Interp *, void *recordPtr, int flags);
int (*postConfigureProc)(Tcl_Interp *, void *recordPtr, int flags);
@@ -88,7 +74,7 @@ struct WidgetSpec_
/*
* Common factors for widget implementations:
*/
-MODULE_SCOPE int TtkNullInitialize(Tcl_Interp *, void *);
+MODULE_SCOPE void TtkNullInitialize(Tcl_Interp *, void *);
MODULE_SCOPE int TtkNullPostConfigure(Tcl_Interp *, void *, int);
MODULE_SCOPE void TtkNullCleanup(void *recordPtr);
MODULE_SCOPE Ttk_Layout TtkWidgetGetLayout(
@@ -104,15 +90,15 @@ MODULE_SCOPE int TtkCoreConfigure(Tcl_Interp*, void *, int mask);
/* Common widget commands:
*/
MODULE_SCOPE int TtkWidgetConfigureCommand(
- Tcl_Interp *, int, Tcl_Obj*const[], void *);
+ void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetCgetCommand(
- Tcl_Interp *, int, Tcl_Obj*const[], void *);
+ void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetInstateCommand(
- Tcl_Interp *, int, Tcl_Obj*const[], void *);
+ void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetStateCommand(
- Tcl_Interp *, int, Tcl_Obj*const[], void *);
+ void *,Tcl_Interp *, int, Tcl_Obj*const[]);
MODULE_SCOPE int TtkWidgetIdentifyCommand(
- Tcl_Interp *, int, Tcl_Obj*const[], void *);
+ void *,Tcl_Interp *, int, Tcl_Obj*const[]);
/* Widget constructor:
*/
@@ -211,20 +197,42 @@ MODULE_SCOPE void TtkScrollbarUpdateRequired(ScrollHandle);
typedef struct TtkTag *Ttk_Tag;
typedef struct TtkTagTable *Ttk_TagTable;
+typedef struct TtkTagSet { /* TODO: make opaque */
+ Ttk_Tag *tags;
+ int nTags;
+} *Ttk_TagSet;
-MODULE_SCOPE Ttk_TagTable Ttk_CreateTagTable(Tk_OptionTable, int tagRecSize);
+MODULE_SCOPE Ttk_TagTable Ttk_CreateTagTable(
+ Tcl_Interp *, Tk_Window tkwin, Tk_OptionSpec[], int recordSize);
MODULE_SCOPE void Ttk_DeleteTagTable(Ttk_TagTable);
MODULE_SCOPE Ttk_Tag Ttk_GetTag(Ttk_TagTable, const char *tagName);
MODULE_SCOPE Ttk_Tag Ttk_GetTagFromObj(Ttk_TagTable, Tcl_Obj *);
-MODULE_SCOPE Tcl_Obj **Ttk_TagRecord(Ttk_Tag);
+MODULE_SCOPE Tcl_Obj *Ttk_TagOptionValue(
+ Tcl_Interp *, Ttk_TagTable, Ttk_Tag, Tcl_Obj *optionName);
+
+MODULE_SCOPE int Ttk_EnumerateTagOptions(
+ Tcl_Interp *, Ttk_TagTable, Ttk_Tag);
+
+MODULE_SCOPE int Ttk_EnumerateTags(Tcl_Interp *, Ttk_TagTable);
+
+MODULE_SCOPE int Ttk_ConfigureTag(
+ Tcl_Interp *interp, Ttk_TagTable tagTable, Ttk_Tag tag,
+ int objc, Tcl_Obj *const objv[]);
+
+MODULE_SCOPE Ttk_TagSet Ttk_GetTagSetFromObj(
+ Tcl_Interp *interp, Ttk_TagTable, Tcl_Obj *objPtr);
+MODULE_SCOPE Tcl_Obj *Ttk_NewTagSetObj(Ttk_TagSet);
+
+MODULE_SCOPE void Ttk_FreeTagSet(Ttk_TagSet);
-MODULE_SCOPE int Ttk_GetTagListFromObj(
- Tcl_Interp *interp, Ttk_TagTable, Tcl_Obj *objPtr,
- int *nTags_rtn, void **taglist_rtn);
+MODULE_SCOPE int Ttk_TagSetContains(Ttk_TagSet, Ttk_Tag tag);
+MODULE_SCOPE int Ttk_TagSetAdd(Ttk_TagSet, Ttk_Tag tag);
+MODULE_SCOPE int Ttk_TagSetRemove(Ttk_TagSet, Ttk_Tag tag);
-MODULE_SCOPE void Ttk_FreeTagList(void **taglist);
+MODULE_SCOPE void Ttk_TagSetValues(Ttk_TagTable, Ttk_TagSet, void *record);
+MODULE_SCOPE void Ttk_TagSetApplyStyle(Ttk_TagTable,Ttk_Style,Ttk_State,void*);
/*
* Useful widget base classes: