[tekui-devel] tekui: Minor corrections in Windows Display driver and a demo

Timm S. Mueller tmueller at schulze-mueller.de
Tue Mar 17 12:23:46 CET 2009


details:   http://hg.teklib.org/tekui/rev/1664a6dcf274
changeset: 62:1664a6dcf274
user:      Timm S. Mueller <tmueller at schulze-mueller.de>
date:      Tue Mar 17 11:36:06 2009 +0100
description:
Minor corrections in Windows Display driver and a demo

diffs (truncated from 141 to 100 lines):

diff -r 86acbc0291c4 -r 1664a6dcf274 bin/demo_presentation.lua
--- a/bin/demo_presentation.lua	Mon Mar 16 12:33:17 2009 +0100
+++ b/bin/demo_presentation.lua	Tue Mar 17 11:36:06 2009 +0100
@@ -167,11 +167,11 @@
 		{
 			["show"] =
 			{
-				{ ui.NOTIFY_ID, "buttons-presentation-button", "setValue", "Selected", true }
+				{ ui.NOTIFY_ID, "presentation-window-button", "setValue", "Selected", true }
 			},
 			["hide"] =
 			{
-				{ ui.NOTIFY_ID, "buttons-presentation-button", "setValue", "Selected", false }
+				{ ui.NOTIFY_ID, "presentation-window-button", "setValue", "Selected", false }
 			}
 		}
 	},
diff -r 86acbc0291c4 -r 1664a6dcf274 src/display_windows/display_win_api.c
--- a/src/display_windows/display_win_api.c	Mon Mar 16 12:33:17 2009 +0100
+++ b/src/display_windows/display_win_api.c	Tue Mar 17 11:36:06 2009 +0100
@@ -81,8 +81,8 @@
 		{
 			TINT m1, m2, m3, m4;
 			win_getminmax(win, &m1, &m2, &m3, &m4, TTRUE);
-			win->fbv_Width = TCLAMP(m1, win->fbv_Width, m3);
-			win->fbv_Height = TCLAMP(m2, win->fbv_Height, m4);
+			win->fbv_Width = TCLAMP(m1, (TINT) win->fbv_Width, m3);
+			win->fbv_Height = TCLAMP(m2, (TINT) win->fbv_Height, m4);
 		}
 
 		if (win->fbv_Left != 0xffffffff && win->fbv_Top != 0xffffffff)
@@ -431,7 +431,7 @@
 		SelectObject(win->fbv_HDC, ((struct FBPen *) pen)->brush);
 	}
 
-	Polygon(win->fbv_HDC, array, 3);
+	Polygon(win->fbv_HDC, (LPPOINT) array, 3);
 
 	if (num > 3)
 	{
@@ -457,8 +457,6 @@
 			Polygon(win->fbv_HDC, points, 3);
 		}
 	}
-
-	win->fbv_Dirty = TTRUE;
 }
 
 /*****************************************************************************/
@@ -488,7 +486,7 @@
 		SelectObject(win->fbv_HDC, ((struct FBPen *) pen)->brush);
 	}
 
-	Polygon(win->fbv_HDC, array, 3);
+	Polygon(win->fbv_HDC, (LPPOINT) array, 3);
 
 	if (num > 3)
 	{
@@ -512,8 +510,6 @@
 			Polygon(win->fbv_HDC, points, 3);
 		}
 	}
-
-	win->fbv_Dirty = TTRUE;
 }
 
 /*****************************************************************************/
@@ -556,7 +552,6 @@
 	else
 		ScrollDC(win->fbv_HDC, dx, dy, &r, &r, NULL, NULL);
 
-	win->fbv_Dirty = TTRUE;
 }
 
 /*****************************************************************************/
@@ -627,7 +622,6 @@
 		req->tvr_Op.DrawBuffer.Buf,
 		(const void *) bmi,
 		DIB_RGB_COLORS);
-	win->fbv_Dirty = TTRUE;
 }
 
 /*****************************************************************************/
@@ -758,8 +752,8 @@
 
 	win_getminmax(win, &win->fbv_MinWidth, &win->fbv_MinHeight,
 		&win->fbv_MaxWidth, &win->fbv_MaxHeight, TFALSE);
-	neww = data.neww < 0 ? win->fbv_Width : data.neww;
-	newh = data.newh < 0 ? win->fbv_Height : data.newh;
+	neww = data.neww < 0 ? (TINT) win->fbv_Width : data.neww;
+	newh = data.newh < 0 ? (TINT) win->fbv_Height : data.newh;
 
 	if (neww < win->fbv_MinWidth || newh < win->fbv_MinHeight)
 	{
@@ -864,7 +858,6 @@
 	data.bgpen = TNULL;
 	TInitHook(&hook, drawtagfunc, &data);
 	TForEachTag(req->tvr_Op.DrawTags.Tags, &hook);
-	data.v->fbv_Dirty = TTRUE;
 }


More information about the tekui-devel mailing list