summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkSquare.c
diff options
context:
space:
mode:
authordas <das>2006-11-03 03:06:21 (GMT)
committerdas <das>2006-11-03 03:06:21 (GMT)
commit6a21e72df71f06d61c44e3de34afe26973732214 (patch)
treeddde20bc872b7fac3e8a946a67418e60dcc23428 /generic/ttk/ttkSquare.c
parent576cbeb2f5ccec11ea4ebb71b788d4527ee1aae3 (diff)
downloadtk-6a21e72df71f06d61c44e3de34afe26973732214.zip
tk-6a21e72df71f06d61c44e3de34afe26973732214.tar.gz
tk-6a21e72df71f06d61c44e3de34afe26973732214.tar.bz2
* generic/ttk/ttkBlink.c, generic/ttk/ttkButton.c:
* generic/ttk/ttkClamTheme.c, generic/ttk/ttkClassicTheme.c: * generic/ttk/ttkDecls.h, generic/ttk/ttkDefaultTheme.c: * generic/ttk/ttkElements.c, generic/ttk/ttkEntry.c: * generic/ttk/ttkFrame.c, generic/ttk/ttkImage.c: * generic/ttk/ttkInit.c, generic/ttk/ttkLabel.c: * generic/ttk/ttkLayout.c, generic/ttk/ttkManager.h: * generic/ttk/ttkNotebook.c, generic/ttk/ttkPanedwindow.c: * generic/ttk/ttkProgress.c, generic/ttk/ttkScale.c: * generic/ttk/ttkScroll.c, generic/ttk/ttkScrollbar.c: * generic/ttk/ttkSeparator.c, generic/ttk/ttkSquare.c: * generic/ttk/ttkStubInit.c, generic/ttk/ttkStubLib.c: * generic/ttk/ttkTheme.c, generic/ttk/ttkTheme.h: * generic/ttk/ttkThemeInt.h, generic/ttk/ttkTrack.c: * generic/ttk/ttkTreeview.c, generic/ttk/ttkWidget.c: * generic/ttk/ttkWidget.h, macosx/ttkMacOSXTheme.c: * win/ttkWinMonitor.c, win/ttkWinTheme.c, win/ttkWinXPTheme.c: ensure all global Ttk symbols have Ttk or ttk prefix; declare all externally visible Ttk symbols not contained in stubs table as MODULE_SCOPE (or as static when possible); so that 'make check{exports,stubs}' once again complete without errors.
Diffstat (limited to 'generic/ttk/ttkSquare.c')
-rw-r--r--generic/ttk/ttkSquare.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/generic/ttk/ttkSquare.c b/generic/ttk/ttkSquare.c
index eec4776..e9c9bcb 100644
--- a/generic/ttk/ttkSquare.c
+++ b/generic/ttk/ttkSquare.c
@@ -2,13 +2,15 @@
*
* Minimal sample ttk widget.
*
- * $Id: ttkSquare.c,v 1.1 2006/10/31 01:42:26 hobbs Exp $
+ * $Id: ttkSquare.c,v 1.2 2006/11/03 03:06:22 das Exp $
*/
#include <tk.h>
#include "ttkTheme.h"
#include "ttkWidget.h"
+#ifdef TTK_SQUARE_WIDGET
+
#ifndef DEFAULT_BORDERWIDTH
#define DEFAULT_BORDERWIDTH "2"
#endif
@@ -76,7 +78,7 @@ static Tk_OptionSpec SquareOptionSpecs[] =
{TK_OPTION_ANCHOR, "-anchor", "anchor", "Anchor",
NULL, Tk_Offset(Square,square.anchorObj), -1, TK_OPTION_NULL_OK, 0, 0},
- WIDGET_INHERIT_OPTIONS(CoreOptionSpecs)
+ WIDGET_INHERIT_OPTIONS(ttkCoreOptionSpecs)
};
/*
@@ -131,11 +133,11 @@ SquareDoLayout(void *clientData)
static WidgetCommandSpec SquareCommands[] =
{
- { "configure", WidgetConfigureCommand },
- { "cget", WidgetCgetCommand },
- { "identify", WidgetIdentifyCommand },
- { "instate", WidgetInstateCommand },
- { "state", WidgetStateCommand },
+ { "configure", TtkWidgetConfigureCommand },
+ { "cget", TtkWidgetCgetCommand },
+ { "identify", TtkWidgetIdentifyCommand },
+ { "instate", TtkWidgetInstateCommand },
+ { "state", TtkWidgetStateCommand },
{ NULL, NULL }
};
@@ -145,20 +147,20 @@ static WidgetCommandSpec SquareCommands[] =
* with Tk in the package initialization code (see bottom).
*/
-WidgetSpec SquareWidgetSpec =
+static WidgetSpec SquareWidgetSpec =
{
"TSquare", /* className */
sizeof(Square), /* recordSize */
SquareOptionSpecs, /* optionSpecs */
SquareCommands, /* subcommands */
- NullInitialize, /* initializeProc */
- NullCleanup, /* cleanupProc */
- CoreConfigure, /* configureProc */
- NullPostConfigure, /* postConfigureProc */
- WidgetGetLayout, /* getLayoutProc */
- WidgetSize, /* sizeProc */
+ TtkNullInitialize, /* initializeProc */
+ TtkNullCleanup, /* cleanupProc */
+ TtkCoreConfigure, /* configureProc */
+ TtkNullPostConfigure, /* postConfigureProc */
+ TtkWidgetGetLayout, /* getLayoutProc */
+ TtkWidgetSize, /* sizeProc */
SquareDoLayout, /* layoutProc */
- WidgetDisplay /* displayProc */
+ TtkWidgetDisplay /* displayProc */
};
/* ----------------------------------------------------------------------
@@ -284,8 +286,8 @@ TTK_END_LAYOUT
* free to specify a new style using completely different elements.
*/
-/* public */ int
-SquareWidget_Init(Tcl_Interp *interp)
+/* public */ MODULE_SCOPE int
+TtkSquareWidget_Init(Tcl_Interp *interp)
{
Ttk_Theme theme = Ttk_GetDefaultTheme(interp);
@@ -301,3 +303,5 @@ SquareWidget_Init(Tcl_Interp *interp)
return TCL_OK;
}
+#endif /* TTK_SQUARE_WIDGET */
+