mirror of
https://github.com/elasota/Aerofoil.git
synced 2026-02-04 10:38:52 +00:00
API cleanup, fix some lingering InvalWindowRects
This commit is contained in:
@@ -42,6 +42,9 @@ namespace PortabilityLayer
|
||||
|
||||
int16_t ButtonWidget::Capture(const Point &pos, WidgetUpdateCallback_t callback)
|
||||
{
|
||||
if (!m_enabled || !m_visible)
|
||||
return 0;
|
||||
|
||||
bool drawingDownState = false;
|
||||
bool isInBounds = m_rect.Contains(pos);
|
||||
for (;;)
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
#include "PLArrayViewIterator.h"
|
||||
#include "PLWidgets.h"
|
||||
|
||||
int FindControl(Point point, WindowPtr window, ControlHandle *outControl)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int FindControl(Point point, WindowPtr window, PortabilityLayer::Widget **outControl)
|
||||
{
|
||||
// Returns clicked part
|
||||
@@ -32,78 +26,3 @@ int FindControl(Point point, WindowPtr window, PortabilityLayer::Widget **outCon
|
||||
*outControl = nullptr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetControlValue(ControlHandle control, int value)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void SetControlMaximum(ControlHandle control, int value)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void MoveControl(ControlHandle control, int x, int y)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void SizeControl(ControlHandle control, int width, int height)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
int GetControlValue(ControlHandle control)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ControlHandle NewControl(WindowPtr window, const Rect *rect, const PLPasStr &label, Boolean visible, int value, int minValue, int maxValue, int cdef, long userdata)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ControlActionUPP NewControlActionUPP(ControlActionProc proc)
|
||||
{
|
||||
return proc;
|
||||
}
|
||||
|
||||
void DisposeControlActionUPP(ControlActionUPP upp)
|
||||
{
|
||||
}
|
||||
|
||||
Boolean TrackControl(ControlHandle control, Point point, ControlActionUPP proc)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return false;
|
||||
}
|
||||
|
||||
Boolean TrackControl(PortabilityLayer::Widget *widget, Point point, ControlActionUPP proc)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return false;
|
||||
}
|
||||
|
||||
long GetControlReference(ControlHandle control)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return 0;
|
||||
}
|
||||
|
||||
ControlHandle GetNewControl(int resID, WindowPtr window)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void HiliteControl(ControlHandle control, int unknown)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void HiliteControl(PortabilityLayer::Widget *widget, int unknown)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
@@ -30,22 +30,5 @@ enum ControlParts
|
||||
|
||||
|
||||
int FindControl(Point point, WindowPtr window, PortabilityLayer::Widget **outControl); // Returns part
|
||||
int FindControl(Point point, WindowPtr window, ControlHandle *outControl);
|
||||
|
||||
|
||||
void SetControlValue(ControlHandle control, int value);
|
||||
void SetControlMaximum(ControlHandle control, int value);
|
||||
void MoveControl(ControlHandle control, int x, int y);
|
||||
void SizeControl(ControlHandle control, int width, int height);
|
||||
int GetControlValue(ControlHandle control);
|
||||
ControlHandle NewControl(WindowPtr window, const Rect *rect, const PLPasStr &label, Boolean visible, int value, int minValue, int maxValue, int cdef, long userdata);
|
||||
ControlActionUPP NewControlActionUPP(ControlActionProc proc);
|
||||
void DisposeControlActionUPP(ControlActionUPP upp);
|
||||
Boolean TrackControl(ControlHandle control, Point point, ControlActionUPP proc);
|
||||
Boolean TrackControl(PortabilityLayer::Widget *control, Point point, ControlActionUPP proc);
|
||||
long GetControlReference(ControlHandle control); // Returns userdata
|
||||
ControlHandle GetNewControl(int resID, WindowPtr window);
|
||||
void HiliteControl(ControlHandle control, int unknown);
|
||||
void HiliteControl(PortabilityLayer::Widget *widget, int unknown);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -538,12 +538,6 @@ void GetTime(DateTimeRec *dateTime)
|
||||
dateTime->minute = minute;
|
||||
}
|
||||
|
||||
UInt32 GetDblTime()
|
||||
{
|
||||
PL_NotYetImplemented_Minor();
|
||||
return 30;
|
||||
}
|
||||
|
||||
void FlushEvents(int mask, int unknown)
|
||||
{
|
||||
PortabilityLayer::EventQueue *queue = PortabilityLayer::EventQueue::GetInstance();
|
||||
@@ -558,11 +552,6 @@ void ExitToShell()
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void InvalWindowRect(WindowPtr window, const Rect *rect)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
Handle NewHandle(Size size)
|
||||
{
|
||||
PortabilityLayer::MMHandleBlock *hBlock = PortabilityLayer::MemoryManager::GetInstance()->AllocHandle(size);
|
||||
@@ -608,11 +597,6 @@ void DisposePtr(void *ptr)
|
||||
PortabilityLayer::MemoryManager::GetInstance()->Release(ptr);
|
||||
}
|
||||
|
||||
void BlockMove(const void *src, void *dest, Size size)
|
||||
{
|
||||
memcpy(dest, src, size);
|
||||
}
|
||||
|
||||
bool WaitForEvent(TimeTaggedVOSEvent *eventOut, uint32_t ticks)
|
||||
{
|
||||
for (;;)
|
||||
@@ -631,21 +615,6 @@ bool WaitForEvent(TimeTaggedVOSEvent *eventOut, uint32_t ticks)
|
||||
return false;
|
||||
}
|
||||
|
||||
void DrawControls(WindowPtr window)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void DrawGrowIcon(WindowPtr window)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void DebugStr(const PLPasStr &str)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void PL_NotYetImplemented()
|
||||
{
|
||||
assert(false);
|
||||
|
||||
@@ -247,7 +247,6 @@ static const int nullEvent = 0;
|
||||
//void FlushEvents(int eventMask, int stopMask);
|
||||
|
||||
void InitCursor();
|
||||
CursHandle GetCursor(int cursorID);
|
||||
void HideCursor();
|
||||
|
||||
void Delay(int ticks, UInt32 *endTickCount);
|
||||
@@ -295,12 +294,8 @@ Boolean WaitMouseUp();
|
||||
|
||||
short Random();
|
||||
void GetTime(DateTimeRec *dateTime);
|
||||
UInt32 GetDblTime();
|
||||
|
||||
void FlushEvents(int mask, int unknown);
|
||||
void ExitToShell();
|
||||
|
||||
void InvalWindowRect(WindowPtr window, const Rect *rect);
|
||||
|
||||
Handle NewHandle(Size size);
|
||||
long GetHandleSize(Handle handle);
|
||||
@@ -311,15 +306,9 @@ void *NewPtr(Size size);
|
||||
void *NewPtrClear(Size size);
|
||||
void DisposePtr(void *ptr);
|
||||
|
||||
void BlockMove(const void *src, void *dest, Size size);
|
||||
|
||||
bool WaitForEvent(TimeTaggedVOSEvent *evt, uint32_t ticks);
|
||||
|
||||
void DrawControls(WindowPtr window);
|
||||
void DrawGrowIcon(WindowPtr window);
|
||||
|
||||
void DebugStr(const PLPasStr &str);
|
||||
|
||||
static const Boolean PL_TRUE = 1;
|
||||
static const Boolean PL_FALSE = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user