diff options
author | nijtmans <nijtmans> | 2010-02-18 22:31:31 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-02-18 22:31:31 (GMT) |
commit | da7deecd72e7ddb17c8a6786f300574ee14c2ca1 (patch) | |
tree | 1238f511be6483dd179a703699b32f89de970ee1 /generic/tkButton.h | |
parent | 09e45d149fcc63d92f4bee4d5db56a420c67d8ad (diff) | |
download | tk-da7deecd72e7ddb17c8a6786f300574ee14c2ca1.zip tk-da7deecd72e7ddb17c8a6786f300574ee14c2ca1.tar.gz tk-da7deecd72e7ddb17c8a6786f300574ee14c2ca1.tar.bz2 |
Put all Tk_OptionSpec for buttons and labels
in const memory. With some changes to win32
and macosx, preventing direct writes to
read-only memory.
Diffstat (limited to 'generic/tkButton.h')
-rw-r--r-- | generic/tkButton.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/generic/tkButton.h b/generic/tkButton.h index 6eb1ce5..2211255 100644 --- a/generic/tkButton.h +++ b/generic/tkButton.h @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkButton.h,v 1.17 2010/01/13 23:08:07 nijtmans Exp $ + * RCS: @(#) $Id: tkButton.h,v 1.18 2010/02/18 22:31:31 nijtmans Exp $ */ #ifndef _TKBUTTON @@ -295,17 +295,25 @@ typedef struct { #define TRISTATED (1 << 4) /* - * Declaration of variables shared between the files in the button module. + * Declaration of button class functions structure + * and button/label defaults, for use in optionSpecs. */ MODULE_SCOPE const Tk_ClassProcs tkpButtonProcs; +MODULE_SCOPE char tkDefButtonHighlightWidth[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefButtonPadx[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefButtonPady[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefButtonBorderWidth[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefLabelHighlightWidth[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefLabelPadx[TCL_INTEGER_SPACE]; +MODULE_SCOPE char tkDefLabelPady[TCL_INTEGER_SPACE]; /* * Declaration of functions used in the implementation of the button widget. */ #ifndef TkpButtonSetDefaults -MODULE_SCOPE void TkpButtonSetDefaults(Tk_OptionSpec *specPtr); +MODULE_SCOPE void TkpButtonSetDefaults(); #endif MODULE_SCOPE void TkButtonWorldChanged(ClientData instanceData); MODULE_SCOPE void TkpComputeButtonGeometry(TkButton *butPtr); |