And wrote up the new Windows control.c. Let's take this to the bridge!... oh right, box.c :|

This commit is contained in:
Pietro Gagliardi 2015-08-31 15:16:36 -04:00
parent cefd262f42
commit 25bbd58915
1 changed files with 37 additions and 0 deletions

37
redo/windows/control.c Normal file
View File

@ -0,0 +1,37 @@
// 16 august 2015
#include "uipriv_windows.h"
static uintmax_t type_uiWindowsControl = 0;
uintmax_t uiWindowsControlType(void)
{
if (type_uiWindowsControl == 0)
type_uiWindowsControl = uiRegisterType("uiWindowsControl", uiControlType(), sizeof (uiWindowsControl));
return type_uiWindowsControl;
}
static void defaultCommitShow(uiControl *c)
{
ShowWindow((HWND) uiControlHandle(c), SW_SHOW);
}
static void defaultCommitHide(uiControl *c)
{
ShowWindow((HWND) uiControlHandle(c), SW_HIDE);
}
void osCommitEnable(uiControl *c)
{
EnableWindow((HWND) uiControlHandle(c), TRUE);
}
void osCommitDisable(uiControl *c)
{
EnableWindow((HWND) uiControlHandle(c), FALSE);
}
void uiWindowsFinishControl(uiControl *c)
{
c->CommitShow = defaultCommitShow;
c->CommitHide = defaultCommitHide;
}