diff options
author | chengyemao <chengyemao> | 2004-12-20 01:13:12 (GMT) |
---|---|---|
committer | chengyemao <chengyemao> | 2004-12-20 01:13:12 (GMT) |
commit | 8134195fa2c51134660f2f437f37355c53cf3841 (patch) | |
tree | 9083c856a5ab3bdcf23e28abc9a2c79372c13f3c /win/tkWinEmbed.c | |
parent | d312734f0a944d1b6ac83bbd10f95d7332d3e3e6 (diff) | |
download | tk-8134195fa2c51134660f2f437f37355c53cf3841.zip tk-8134195fa2c51134660f2f437f37355c53cf3841.tar.gz tk-8134195fa2c51134660f2f437f37355c53cf3841.tar.bz2 |
featrue implementation of Tk container and embedded including TK_MOVEWINDOW, TK_ICONIFY, TK_DEICONIFY, TK_WITHDRAW; replaced TK_TITLE with TK_GETFRAMEWID for setting container's title across process boundary; bug fix in wm overrideredirect for TK_EMBEDDED window
Diffstat (limited to 'win/tkWinEmbed.c')
-rw-r--r-- | win/tkWinEmbed.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/win/tkWinEmbed.c b/win/tkWinEmbed.c index d43f3b5..a9f987e 100644 --- a/win/tkWinEmbed.c +++ b/win/tkWinEmbed.c @@ -11,11 +11,10 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinEmbed.c,v 1.13 2004/12/19 18:14:26 chengyemao Exp $ + * RCS: @(#) $Id: tkWinEmbed.c,v 1.14 2004/12/20 01:13:12 chengyemao Exp $ */ #include "tkWinInt.h" -extern TkWinProcs *tkWinProcs; /* * One of the following structures exists for each container in this @@ -51,6 +50,7 @@ static void EmbeddedEventProc _ANSI_ARGS_(( static void EmbedGeometryRequest _ANSI_ARGS_(( Container*containerPtr, int width, int height)); static void EmbedWindowDeleted _ANSI_ARGS_((TkWindow *winPtr)); + /* *---------------------------------------------------------------------- @@ -194,7 +194,7 @@ TkpUseWindow(interp, tkwin, string) if(id == 0 || id != (long)hwnd) { char msg[256]; if(id == 0) { - sprintf(msg, "The window \"%s\" is already in use", string); + sprintf(msg, "The window \"%s\" is either unable or already to be used as a container", string); Tcl_SetResult(interp, msg, TCL_VOLATILE); return TCL_ERROR; } else { @@ -436,11 +436,8 @@ TkWinEmbeddedEventProc(hwnd, message, wParam, lParam) TkWinSetWindowPos(GetParent(containerPtr->parentHWnd), (HWND)wParam, (int)lParam); break; - case TK_TITLE: - /* - * lParam - a pointer to a unicode string - */ - (*tkWinProcs->setWindowText)(GetParent(containerPtr->parentHWnd), (LPCTSTR)lParam); + case TK_GETFRAMEWID: + result = (long)GetParent(containerPtr->parentHWnd); break; case TK_CLAIMFOCUS: @@ -454,15 +451,16 @@ TkWinEmbeddedEventProc(hwnd, message, wParam, lParam) } break; - /* - * Return 0 since the current Tk container implementation - * is unable to provide these services. - * - */ + case TK_WITHDRAW: + TkpWinToplevelWithDraw(containerPtr->parentPtr); + break; + case TK_ICONIFY: + TkpWinToplevelIconify(containerPtr->parentPtr); + break; + case TK_DEICONIFY: - case TK_WITHDRAW: - result = 0; + TkpWinToplevelDeiconify(containerPtr->parentPtr); break; case TK_MOVEWINDOW: @@ -470,6 +468,16 @@ TkWinEmbeddedEventProc(hwnd, message, wParam, lParam) * wParam - x value of the frame's upper left; * lParam - y value of the frame's upper left; */ + result = TkpWinToplevelMove(containerPtr->parentPtr, wParam, lParam); + break; + + /* + * Return 0 since the current Tk container implementation + * is unable to provide following services. + * + */ + + default: result = 0; break; } |