diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-11 13:03:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-11 13:03:30 (GMT) |
commit | f734823e12648903b16fe8b38bb9ee48454ad6a4 (patch) | |
tree | 610a619c6f3cba3910a5070cd03883f9bef99649 /generic/tkFrame.c | |
parent | 4965fa07310bf1b153dcb200719fc1c4aaded61c (diff) | |
download | tk-f734823e12648903b16fe8b38bb9ee48454ad6a4.zip tk-f734823e12648903b16fe8b38bb9ee48454ad6a4.tar.gz tk-f734823e12648903b16fe8b38bb9ee48454ad6a4.tar.bz2 |
Eliminate More C++-related warnings, when compiling against Tcl 9.0 headers.
Diffstat (limited to 'generic/tkFrame.c')
-rw-r--r-- | generic/tkFrame.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 8c5ab4c..81f1f2c 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -184,32 +184,32 @@ static const char *const labelAnchorStrings[] = { static const Tk_OptionSpec commonOptSpec[] = { {TK_OPTION_BORDER, "-background", "background", "Background", - DEF_FRAME_BG_COLOR, -1, offsetof(Frame, border), + DEF_FRAME_BG_COLOR, TCL_AUTO_LENGTH, offsetof(Frame, border), TK_OPTION_NULL_OK, DEF_FRAME_BG_MONO, 0}, {TK_OPTION_SYNONYM, "-bg", NULL, NULL, - NULL, 0, -1, 0, "-background", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-background", 0}, {TK_OPTION_STRING, "-colormap", "colormap", "Colormap", - DEF_FRAME_COLORMAP, -1, offsetof(Frame, colormapName), + DEF_FRAME_COLORMAP, TCL_AUTO_LENGTH, offsetof(Frame, colormapName), TK_OPTION_NULL_OK, 0, 0}, /* * Having -container is useless in a labelframe since a container has * no border. It should be deprecated. */ {TK_OPTION_BOOLEAN, "-container", "container", "Container", - DEF_FRAME_CONTAINER, -1, offsetof(Frame, isContainer), 0, 0, 0}, + DEF_FRAME_CONTAINER, TCL_AUTO_LENGTH, offsetof(Frame, isContainer), 0, 0, 0}, {TK_OPTION_CURSOR, "-cursor", "cursor", "Cursor", - DEF_FRAME_CURSOR, -1, offsetof(Frame, cursor), + DEF_FRAME_CURSOR, TCL_AUTO_LENGTH, offsetof(Frame, cursor), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-height", "height", "Height", - DEF_FRAME_HEIGHT, -1, offsetof(Frame, height), 0, 0, 0}, + DEF_FRAME_HEIGHT, TCL_AUTO_LENGTH, offsetof(Frame, height), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightbackground", "highlightBackground", - "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, -1, + "HighlightBackground", DEF_FRAME_HIGHLIGHT_BG, TCL_AUTO_LENGTH, offsetof(Frame, highlightBgColorPtr), 0, 0, 0}, {TK_OPTION_COLOR, "-highlightcolor", "highlightColor", "HighlightColor", - DEF_FRAME_HIGHLIGHT, -1, offsetof(Frame, highlightColorPtr), + DEF_FRAME_HIGHLIGHT, TCL_AUTO_LENGTH, offsetof(Frame, highlightColorPtr), 0, 0, 0}, {TK_OPTION_PIXELS, "-highlightthickness", "highlightThickness", - "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, -1, + "HighlightThickness", DEF_FRAME_HIGHLIGHT_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, highlightWidth), 0, 0, 0}, {TK_OPTION_PIXELS, "-padx", "padX", "Pad", DEF_FRAME_PADX, offsetof(Frame, padXPtr), @@ -218,60 +218,60 @@ static const Tk_OptionSpec commonOptSpec[] = { DEF_FRAME_PADY, offsetof(Frame, padYPtr), offsetof(Frame, padY), 0, 0, 0}, {TK_OPTION_STRING, "-takefocus", "takeFocus", "TakeFocus", - DEF_FRAME_TAKE_FOCUS, -1, offsetof(Frame, takeFocus), + DEF_FRAME_TAKE_FOCUS, TCL_AUTO_LENGTH, offsetof(Frame, takeFocus), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_STRING, "-visual", "visual", "Visual", - DEF_FRAME_VISUAL, -1, offsetof(Frame, visualName), + DEF_FRAME_VISUAL, TCL_AUTO_LENGTH, offsetof(Frame, visualName), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_PIXELS, "-width", "width", "Width", - DEF_FRAME_WIDTH, -1, offsetof(Frame, width), 0, 0, 0}, + DEF_FRAME_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, width), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0} }; static const Tk_OptionSpec frameOptSpec[] = { {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage", - DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1, + DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, "-borderwidth", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, - NULL, 0, -1, 0, "-backgroundimage", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-backgroundimage", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0}, + DEF_FRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_FRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0}, + DEF_FRAME_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0}, + DEF_FRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0}, {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile", - DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0}, + DEF_FRAME_BG_TILE, TCL_AUTO_LENGTH, offsetof(Frame, tile), 0, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, commonOptSpec, 0} }; static const Tk_OptionSpec toplevelOptSpec[] = { {TK_OPTION_STRING, "-backgroundimage", "backgroundImage", "BackgroundImage", - DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), -1, + DEF_FRAME_BG_IMAGE, offsetof(Frame, bgimgPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, "-borderwidth", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0}, {TK_OPTION_SYNONYM, "-bgimg", NULL, NULL, - NULL, 0, -1, 0, "-backgroundimage", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-backgroundimage", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_FRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), 0, 0, 0}, + DEF_FRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_TOPLEVEL_CLASS, -1, offsetof(Frame, className), 0, 0, 0}, + DEF_TOPLEVEL_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0}, {TK_OPTION_STRING, "-menu", "menu", "Menu", - DEF_TOPLEVEL_MENU, -1, offsetof(Frame, menuName), + DEF_TOPLEVEL_MENU, TCL_AUTO_LENGTH, offsetof(Frame, menuName), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_FRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0}, + DEF_FRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0}, {TK_OPTION_STRING, "-screen", "screen", "Screen", - DEF_TOPLEVEL_SCREEN, -1, offsetof(Frame, screenName), + DEF_TOPLEVEL_SCREEN, TCL_AUTO_LENGTH, offsetof(Frame, screenName), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_BOOLEAN, "-tile", "tile", "Tile", - DEF_FRAME_BG_TILE, -1, offsetof(Frame, tile), 0, 0, 0}, + DEF_FRAME_BG_TILE, TCL_AUTO_LENGTH, offsetof(Frame, tile), 0, 0, 0}, {TK_OPTION_STRING, "-use", "use", "Use", - DEF_TOPLEVEL_USE, -1, offsetof(Frame, useThis), + DEF_TOPLEVEL_USE, TCL_AUTO_LENGTH, offsetof(Frame, useThis), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, commonOptSpec, 0} @@ -279,27 +279,27 @@ static const Tk_OptionSpec toplevelOptSpec[] = { static const Tk_OptionSpec labelframeOptSpec[] = { {TK_OPTION_SYNONYM, "-bd", NULL, NULL, - NULL, 0, -1, 0, "-borderwidth", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-borderwidth", 0}, {TK_OPTION_PIXELS, "-borderwidth", "borderWidth", "BorderWidth", - DEF_LABELFRAME_BORDER_WIDTH, -1, offsetof(Frame, borderWidth), + DEF_LABELFRAME_BORDER_WIDTH, TCL_AUTO_LENGTH, offsetof(Frame, borderWidth), 0, 0, 0}, {TK_OPTION_STRING, "-class", "class", "Class", - DEF_LABELFRAME_CLASS, -1, offsetof(Frame, className), 0, 0, 0}, + DEF_LABELFRAME_CLASS, TCL_AUTO_LENGTH, offsetof(Frame, className), 0, 0, 0}, {TK_OPTION_SYNONYM, "-fg", "foreground", NULL, - NULL, 0, -1, 0, "-foreground", 0}, + NULL, 0, TCL_AUTO_LENGTH, 0, "-foreground", 0}, {TK_OPTION_FONT, "-font", "font", "Font", - DEF_LABELFRAME_FONT, -1, offsetof(Labelframe, tkfont), 0, 0, 0}, + DEF_LABELFRAME_FONT, TCL_AUTO_LENGTH, offsetof(Labelframe, tkfont), 0, 0, 0}, {TK_OPTION_COLOR, "-foreground", "foreground", "Foreground", - DEF_LABELFRAME_FG, -1, offsetof(Labelframe, textColorPtr), 0, 0, 0}, + DEF_LABELFRAME_FG, TCL_AUTO_LENGTH, offsetof(Labelframe, textColorPtr), 0, 0, 0}, {TK_OPTION_STRING_TABLE, "-labelanchor", "labelAnchor", "LabelAnchor", - DEF_LABELFRAME_LABELANCHOR, -1, offsetof(Labelframe, labelAnchor), + DEF_LABELFRAME_LABELANCHOR, TCL_AUTO_LENGTH, offsetof(Labelframe, labelAnchor), 0, labelAnchorStrings, 0}, {TK_OPTION_WINDOW, "-labelwidget", "labelWidget", "LabelWidget", - NULL, -1, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0}, + NULL, TCL_AUTO_LENGTH, offsetof(Labelframe, labelWin), TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_RELIEF, "-relief", "relief", "Relief", - DEF_LABELFRAME_RELIEF, -1, offsetof(Frame, relief), 0, 0, 0}, + DEF_LABELFRAME_RELIEF, TCL_AUTO_LENGTH, offsetof(Frame, relief), 0, 0, 0}, {TK_OPTION_STRING, "-text", "text", "Text", - DEF_LABELFRAME_TEXT, offsetof(Labelframe, textPtr), -1, + DEF_LABELFRAME_TEXT, offsetof(Labelframe, textPtr), TCL_AUTO_LENGTH, TK_OPTION_NULL_OK, 0, 0}, {TK_OPTION_END, NULL, NULL, NULL, NULL, 0, 0, 0, commonOptSpec, 0} |