summaryrefslogtreecommitdiffstats
path: root/generic/tkMenu.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
commit4ddfabceb1dd92219b221373226f24345bd86759 (patch)
treedccec125103eba842f379dfcfa174b8349ce64b9 /generic/tkMenu.c
parent1b7e7f9d63511b6a708a4b20a4f4f66b242eca97 (diff)
downloadtk-4ddfabceb1dd92219b221373226f24345bd86759.zip
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.gz
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.bz2
TIP #628 for Tk: Shared 8.7/9.0 build environment
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r--generic/tkMenu.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c
index 4730575..27a984b 100644
--- a/generic/tkMenu.c
+++ b/generic/tkMenu.c
@@ -335,9 +335,9 @@ static void DestroyMenuHashTable(ClientData clientData,
Tcl_Interp *interp);
static void DestroyMenuInstance(TkMenu *menuPtr);
static void DestroyMenuEntry(void *memPtr);
-static TkSizeT GetIndexFromCoords(Tcl_Interp *interp,
+static Tcl_Size GetIndexFromCoords(Tcl_Interp *interp,
TkMenu *menuPtr, const char *string,
- TkSizeT *indexPtr);
+ Tcl_Size *indexPtr);
static int MenuDoYPosition(Tcl_Interp *interp,
TkMenu *menuPtr, Tcl_Obj *objPtr);
static int MenuDoXPosition(Tcl_Interp *interp,
@@ -346,7 +346,7 @@ static int MenuAddOrInsert(Tcl_Interp *interp,
TkMenu *menuPtr, Tcl_Obj *indexPtr, int objc,
Tcl_Obj *const objv[]);
static void MenuCmdDeletedProc(ClientData clientData);
-static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, TkSizeT index, int type);
+static TkMenuEntry * MenuNewEntry(TkMenu *menuPtr, Tcl_Size index, int type);
static char * MenuVarProc(ClientData clientData,
Tcl_Interp *interp, const char *name1,
const char *name2, int flags);
@@ -359,7 +359,7 @@ static void RecursivelyDeleteMenu(TkMenu *menuPtr);
static void UnhookCascadeEntry(TkMenuEntry *mePtr);
static void MenuCleanup(ClientData unused);
static int GetMenuIndex(Tcl_Interp *interp, TkMenu *menuPtr,
- Tcl_Obj *objPtr, int lastOK, TkSizeT *indexPtr);
+ Tcl_Obj *objPtr, int lastOK, Tcl_Size *indexPtr);
/*
* The structure below is a list of procs that respond to certain window
@@ -630,7 +630,7 @@ MenuWidgetObjCmd(
switch ((enum options) option) {
case MENU_ACTIVATE: {
- TkSizeT index;
+ Tcl_Size index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -714,7 +714,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_DELETE: {
- TkSizeT first, last;
+ Tcl_Size first, last;
Tcl_WideInt w;
if ((objc != 3) && (objc != 4)) {
@@ -757,7 +757,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_ENTRYCGET: {
- TkSizeT index;
+ Tcl_Size index;
Tcl_Obj *resultPtr;
if (objc != 4) {
@@ -782,7 +782,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_ENTRYCONFIGURE: {
- TkSizeT index;
+ Tcl_Size index;
Tcl_Obj *resultPtr;
if (objc < 3) {
@@ -823,7 +823,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_INDEX: {
- TkSizeT index;
+ Tcl_Size index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "string");
@@ -851,7 +851,7 @@ MenuWidgetObjCmd(
}
break;
case MENU_INVOKE: {
- TkSizeT index;
+ Tcl_Size index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -868,7 +868,7 @@ MenuWidgetObjCmd(
}
case MENU_POST: {
int x, y;
- TkSizeT index = TCL_INDEX_NONE;
+ Tcl_Size index = TCL_INDEX_NONE;
if (objc != 4 && objc != 5) {
Tcl_WrongNumArgs(interp, 2, objv, "x y ?index?");
@@ -903,7 +903,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_POSTCASCADE: {
- TkSizeT index;
+ Tcl_Size index;
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "index");
@@ -921,7 +921,7 @@ MenuWidgetObjCmd(
break;
}
case MENU_TYPE: {
- TkSizeT index;
+ Tcl_Size index;
const char *typeStr;
if (objc != 3) {
@@ -996,7 +996,7 @@ int
TkInvokeMenu(
Tcl_Interp *interp, /* The interp that the menu lives in. */
TkMenu *menuPtr, /* The menu we are invoking. */
- TkSizeT index) /* The zero based index of the item we are
+ Tcl_Size index) /* The zero based index of the item we are
* invoking. */
{
int result = TCL_OK;
@@ -1484,7 +1484,7 @@ MenuWorldChanged(
ClientData instanceData) /* Information about widget. */
{
TkMenu *menuPtr = (TkMenu *)instanceData;
- TkSizeT i;
+ Tcl_Size i;
TkMenuConfigureDrawOptions(menuPtr);
for (i = 0; i < menuPtr->numEntries; i++) {
@@ -2111,7 +2111,7 @@ GetMenuIndex(
* manual entry for valid .*/
int lastOK, /* Non-zero means its OK to return index just
* *after* last entry. */
- TkSizeT *indexPtr) /* Where to store converted index. */
+ Tcl_Size *indexPtr) /* Where to store converted index. */
{
int i;
const char *string;
@@ -2239,13 +2239,13 @@ MenuCmdDeletedProc(
static TkMenuEntry *
MenuNewEntry(
TkMenu *menuPtr, /* Menu that will hold the new entry. */
- TkSizeT index, /* Where in the menu the new entry is to
+ Tcl_Size index, /* Where in the menu the new entry is to
* go. */
int type) /* The type of the new entry. */
{
TkMenuEntry *mePtr;
TkMenuEntry **newEntries;
- TkSizeT i;
+ Tcl_Size i;
ThreadSpecificData *tsdPtr = (ThreadSpecificData *)
Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData));
@@ -2343,7 +2343,7 @@ MenuAddOrInsert(
* entry, others are config options. */
{
int type;
- TkSizeT index;
+ Tcl_Size index;
TkMenuEntry *mePtr;
TkMenu *menuListPtr;
@@ -2386,7 +2386,7 @@ MenuAddOrInsert(
}
if (ConfigureMenuEntry(mePtr, objc - 1, objv + 1) != TCL_OK) {
TkMenu *errorMenuPtr;
- TkSizeT i;
+ Tcl_Size i;
for (errorMenuPtr = menuPtr->mainMenuPtr;
errorMenuPtr != NULL;
@@ -2590,7 +2590,7 @@ MenuVarProc(
int
TkActivateMenuEntry(
TkMenu *menuPtr, /* Menu in which to activate. */
- TkSizeT index) /* Index of entry to activate, or
+ Tcl_Size index) /* Index of entry to activate, or
* TCL_INDEX_NONE to deactivate all entries. */
{
TkMenuEntry *mePtr;
@@ -2691,7 +2691,7 @@ CloneMenu(
{
int returnResult;
int menuType;
- TkSizeT i;
+ Tcl_Size i;
TkMenuReferences *menuRefPtr;
Tcl_Obj *menuDupCommandArray[4];
@@ -2731,7 +2731,7 @@ CloneMenu(
&& (menuPtr->numEntries == menuRefPtr->menuPtr->numEntries)) {
TkMenu *newMenuPtr = menuRefPtr->menuPtr;
Tcl_Obj *newObjv[3];
- TkSizeT numElements;
+ Tcl_Size numElements;
/*
* Now put this newly created menu into the parent menu's instance
@@ -2866,7 +2866,7 @@ MenuDoXPosition(
TkMenu *menuPtr,
Tcl_Obj *objPtr)
{
- TkSizeT index;
+ Tcl_Size index;
TkRecomputeMenu(menuPtr);
if (GetMenuIndex(interp, menuPtr, objPtr, 0, &index) != TCL_OK) {
@@ -2903,7 +2903,7 @@ MenuDoYPosition(
TkMenu *menuPtr,
Tcl_Obj *objPtr)
{
- TkSizeT index;
+ Tcl_Size index;
TkRecomputeMenu(menuPtr);
if (GetMenuIndex(interp, menuPtr, objPtr, 0, &index) != TCL_OK) {
@@ -2941,12 +2941,12 @@ MenuDoYPosition(
*----------------------------------------------------------------------
*/
-static TkSizeT
+static Tcl_Size
GetIndexFromCoords(
Tcl_Interp *interp, /* Interpreter of menu. */
TkMenu *menuPtr, /* The menu we are searching. */
const char *string, /* The @string we are parsing. */
- TkSizeT *indexPtr) /* The index of the item that matches. */
+ Tcl_Size *indexPtr) /* The index of the item that matches. */
{
int x, y, i;
const char *p;
@@ -3024,7 +3024,7 @@ static void
RecursivelyDeleteMenu(
TkMenu *menuPtr) /* The menubar instance we are deleting. */
{
- TkSizeT i;
+ Tcl_Size i;
TkMenuEntry *mePtr;
/*