2024-03-25 05:34:59 +00:00
|
|
|
#include <iso646.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
#include "input.h"
|
2024-04-02 20:06:14 +00:00
|
|
|
#include "instance.h"
|
2024-03-25 05:34:59 +00:00
|
|
|
#include "winhandler.h"
|
|
|
|
|
2024-04-02 20:06:14 +00:00
|
|
|
bool WindowsInit(struct Window *window)
|
2024-03-25 05:34:59 +00:00
|
|
|
{
|
|
|
|
if (!WinInitInputHandle())
|
|
|
|
return false;
|
|
|
|
|
|
|
|
if (!WinInitTimer())
|
|
|
|
return false;
|
|
|
|
|
2024-04-02 20:06:14 +00:00
|
|
|
if (!WinInitConsole())
|
2024-03-25 05:34:59 +00:00
|
|
|
return false;
|
|
|
|
|
2024-04-02 20:06:14 +00:00
|
|
|
|
|
|
|
|
2024-03-25 05:34:59 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2024-04-02 00:55:30 +00:00
|
|
|
bool WindowsBlockInput(struct RecordBuffer *buf)
|
2024-03-25 05:34:59 +00:00
|
|
|
{
|
2024-03-26 20:11:58 +00:00
|
|
|
return WinBlockInput(buf);
|
2024-03-25 05:34:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool WindowsWait(double seconds)
|
|
|
|
{
|
|
|
|
return WinWait(seconds);
|
|
|
|
}
|