summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-06 20:29:39 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-10-06 20:29:39 (GMT)
commit062332b74070e0ca06b5fefaa039efafe402a624 (patch)
tree174261b05a2f8773622a82526e3353049af70b4a /macosx
parent62d36b53b20fdda3e415b341f3767ec1d61b526e (diff)
downloadtk-062332b74070e0ca06b5fefaa039efafe402a624.zip
tk-062332b74070e0ca06b5fefaa039efafe402a624.tar.gz
tk-062332b74070e0ca06b5fefaa039efafe402a624.tar.bz2
Experiment: let's see if we can deprecate Tk_Offset() in favor of offsetof()
Diffstat (limited to 'macosx')
-rw-r--r--macosx/ttkMacOSXTheme.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c
index f9611c5..c0f45bb 100644
--- a/macosx/ttkMacOSXTheme.c
+++ b/macosx/ttkMacOSXTheme.c
@@ -423,7 +423,7 @@ typedef struct {
static Ttk_ElementOptionSpec EntryElementOptions[] = {
{ "-background", TK_OPTION_BORDER,
- Tk_Offset(EntryElement,backgroundObj), "white" },
+ offsetof(EntryElement,backgroundObj), "white" },
{0}
};
@@ -603,10 +603,10 @@ typedef struct {
} TrackElement;
static Ttk_ElementOptionSpec TrackElementOptions[] = {
- { "-from", TK_OPTION_DOUBLE, Tk_Offset(TrackElement,fromObj) },
- { "-to", TK_OPTION_DOUBLE, Tk_Offset(TrackElement,toObj) },
- { "-value", TK_OPTION_DOUBLE, Tk_Offset(TrackElement,valueObj) },
- { "-orient", TK_OPTION_STRING, Tk_Offset(TrackElement,orientObj) },
+ { "-from", TK_OPTION_DOUBLE, offsetof(TrackElement,fromObj) },
+ { "-to", TK_OPTION_DOUBLE, offsetof(TrackElement,toObj) },
+ { "-value", TK_OPTION_DOUBLE, offsetof(TrackElement,valueObj) },
+ { "-orient", TK_OPTION_STRING, offsetof(TrackElement,orientObj) },
{0,0,0}
};
@@ -713,15 +713,15 @@ typedef struct {
static Ttk_ElementOptionSpec PbarElementOptions[] = {
{ "-orient", TK_OPTION_STRING,
- Tk_Offset(PbarElement,orientObj), "horizontal" },
+ offsetof(PbarElement,orientObj), "horizontal" },
{ "-value", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement,valueObj), "0" },
+ offsetof(PbarElement,valueObj), "0" },
{ "-maximum", TK_OPTION_DOUBLE,
- Tk_Offset(PbarElement,maximumObj), "100" },
+ offsetof(PbarElement,maximumObj), "100" },
{ "-phase", TK_OPTION_INT,
- Tk_Offset(PbarElement,phaseObj), "0" },
+ offsetof(PbarElement,phaseObj), "0" },
{ "-mode", TK_OPTION_STRING,
- Tk_Offset(PbarElement,modeObj), "determinate" },
+ offsetof(PbarElement,modeObj), "determinate" },
{0,0,0,0}
};