summaryrefslogtreecommitdiff
path: root/iup/src
diff options
context:
space:
mode:
authorNicolas Noble <pixel@nobis-crew.org>2010-09-09 10:47:04 -0700
committerNicolas Noble <pixel@nobis-crew.org>2010-09-09 10:47:04 -0700
commitbe46128d75ff8f2739b856dcc4ec41bebb90a666 (patch)
tree6f8ac0c4aead39bbbc38beaec5a1c403059f9047 /iup/src
parent53d6ee570041c7e47c02dd8b4ca753a3b020369f (diff)
Adding the SetRedraw() directive - only for Windows.
Diffstat (limited to 'iup/src')
-rwxr-xr-xiup/src/gtk/iupgtk_common.c6
-rwxr-xr-xiup/src/iup_drv.h4
-rwxr-xr-xiup/src/iup_layout.c10
-rwxr-xr-xiup/src/mot/iupmot_common.c6
-rwxr-xr-xiup/src/win/iupwin_common.c5
5 files changed, 31 insertions, 0 deletions
diff --git a/iup/src/gtk/iupgtk_common.c b/iup/src/gtk/iupgtk_common.c
index d84c1c8..a27087e 100755
--- a/iup/src/gtk/iupgtk_common.c
+++ b/iup/src/gtk/iupgtk_common.c
@@ -107,6 +107,12 @@ void iupdrvRedrawNow(Ihandle *ih)
gdk_window_process_updates(window, FALSE);
}
+void iupdrvSetRedraw(Ihandle *ih, int value)
+{
+ (void)ih;
+ (void)value;
+}
+
void iupdrvScreenToClient(Ihandle* ih, int *x, int *y)
{
gint win_x = 0, win_y = 0;
diff --git a/iup/src/iup_drv.h b/iup/src/iup_drv.h
index 1071347..ec8a253 100755
--- a/iup/src/iup_drv.h
+++ b/iup/src/iup_drv.h
@@ -66,6 +66,10 @@ void iupdrvPostRedraw(Ihandle *ih);
* \ingroup drv */
void iupdrvRedrawNow(Ihandle *ih);
+/** Sets if a control is drawable or not.
+ * \ingroup drv */
+void iupdrvSetRedraw(Ihandle *ih, int value);
+
/** Reparent the native control.
* \ingroup drv */
void iupdrvReparent(Ihandle* ih);
diff --git a/iup/src/iup_layout.c b/iup/src/iup_layout.c
index 9387135..fc9dcf6 100755
--- a/iup/src/iup_layout.c
+++ b/iup/src/iup_layout.c
@@ -91,6 +91,16 @@ void IupRedraw(Ihandle* ih, int children)
iLayoutDisplayRedrawChildren(ih);
}
+void IupSetRedraw(Ihandle* ih, int value)
+{
+ iupASSERT(iupObjectCheck(ih));
+ if (!iupObjectCheck(ih))
+ return;
+
+ if (ih->handle && ih->iclass->nativetype != IUP_TYPEVOID)
+ iupdrvSetRedraw(ih, value);
+}
+
void iupLayoutUpdate(Ihandle* ih)
{
Ihandle* child;
diff --git a/iup/src/mot/iupmot_common.c b/iup/src/mot/iupmot_common.c
index 286e075..554504f 100755
--- a/iup/src/mot/iupmot_common.c
+++ b/iup/src/mot/iupmot_common.c
@@ -235,6 +235,12 @@ void iupdrvRedrawNow(Ihandle *ih)
XmUpdateDisplay(ih->handle);
}
+void iupdrvSetRedraw(Ihandle *ih, int value)
+{
+ (void)ih;
+ (void)value;
+}
+
void iupdrvScreenToClient(Ihandle* ih, int *x, int *y)
{
Window child;
diff --git a/iup/src/win/iupwin_common.c b/iup/src/win/iupwin_common.c
index 0f53e68..afa4235 100755
--- a/iup/src/win/iupwin_common.c
+++ b/iup/src/win/iupwin_common.c
@@ -100,6 +100,11 @@ void iupdrvRedrawNow(Ihandle *ih)
RedrawWindow(ih->handle,NULL,NULL,RDW_ERASE|RDW_INVALIDATE|RDW_INTERNALPAINT|RDW_UPDATENOW);
}
+void iupdrvRedrawNow(Ihandle *ih, int value)
+{
+ SendMessage(ih->handle, WM_SETREDRAW, value ? TRUE : FALSE, 0);
+}
+
void iupdrvPostRedraw(Ihandle *ih)
{
/* Post a REDRAW */