mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
203 lines
6.3 KiB
203 lines
6.3 KiB
/***************************************************************************\
|
|
*
|
|
* DirectUser-Display
|
|
*
|
|
\***************************************************************************/
|
|
|
|
class EventGadget
|
|
{
|
|
event HRESULT OnEvent(in EventMsg * pmsg);
|
|
|
|
dapi HRESULT GetFilter(out UINT nFilter);
|
|
dapi HRESULT SetFilter(in UINT nNewFilter, in UINT nMask);
|
|
dapi HRESULT AddHandlerG(in MSGID nEventMsg, in EventGadget * pgbHandler);
|
|
dapi HRESULT AddHandlerD(in MSGID nEventMsg, in DUser::EventDelegate ed);
|
|
dapi HRESULT RemoveHandlerG(in MSGID nEventMsg, in EventGadget * pgbHandler);
|
|
dapi HRESULT RemoveHandlerD(in MSGID nEventMsg, in DUser::EventDelegate ed);
|
|
};
|
|
|
|
|
|
class Listener : public EventGadget
|
|
{
|
|
};
|
|
|
|
|
|
class Visual : public EventGadget
|
|
{
|
|
dapi HRESULT GetExtension(out DeviceVisual * pDeviceVisual);
|
|
|
|
dapi HRESULT DeleteTree();
|
|
|
|
dapi HRESULT SetOrder(in Visual * pgvOther, in UINT nCmd);
|
|
dapi HRESULT SetParent(in Visual * pgvParent, in Visual * pgvOther, in UINT nCmd);
|
|
|
|
dapi HRESULT GetRelative(in UINT nCmd, out Visual * pgv);
|
|
dapi HRESULT GetStyle(out UINT nStyle);
|
|
dapi HRESULT SetStyle(in UINT nNewStyle, in UINT nMask);
|
|
dapi HRESULT SetKeyboardFocus();
|
|
dapi HRESULT IsParentChainStyle(in UINT nStyle, out BOOL fResult, in UINT nFlags);
|
|
|
|
dapi HRESULT GetProperty(in PRID id, out void * pvValue);
|
|
dapi HRESULT SetProperty(in PRID id, in void * pvValue);
|
|
dapi HRESULT RemoveProperty(in PRID id);
|
|
|
|
dapi HRESULT Invalidate(UINT nFlags);
|
|
dapi HRESULT InvalidateRects(const RECT * rgrcClientPxl, int cRects, UINT nFlags);
|
|
dapi HRESULT GetScale(out DirectUser::Geometry::SizeF sizefScale);
|
|
dapi HRESULT SetScale(in DirectUser::Geometry::SizeF sizefScale);
|
|
dapi HRESULT GetRotation(out float flRotationRad);
|
|
dapi HRESULT SetRotation(in float flRotationRad);
|
|
dapi HRESULT GetCenterPoint(out DirectUser::Geometry::PointF ptfCenter);
|
|
dapi HRESULT SetCenterPoint(in DirectUser::Geometry::PointF ptfCenter);
|
|
|
|
dapi HRESULT GetSize(out DirectUser::Geometry::Size sizeLogicalPxl);
|
|
dapi HRESULT GetRect(out DirectUser::Geometry::Rect rcPxl);
|
|
dapi HRESULT SetRect(in UINT nFlags, in DirectUser::Geometry::Rect rcPxl);
|
|
|
|
dapi HRESULT ComputeContainerRect(out DirectUser::Geometry::Rect rcPxl);
|
|
dapi HRESULT MapPoints(in Visual * pgvTo, in /* out */ POINT * rgptClientPxl, in int cPts);
|
|
dapi HRESULT FindFromPoint(in POINT ptThisClientPxl, in UINT nStyle, out POINT ptFoundClientPxl, out Visual * pgvFound);
|
|
};
|
|
|
|
|
|
class Root : public Visual
|
|
{
|
|
dapi HRESULT GetFocus(out Visual * pgvFocus);
|
|
dapi HRESULT GetBackgroundColor(out DUser::Color clrBackground);
|
|
dapi HRESULT SetBackgroundColor(in DUser::Color clrBackground);
|
|
dapi HRESULT GetFullScreen(out bool fFullScreen);
|
|
dapi HRESULT SetFullScreen(in bool fFullScreen);
|
|
dapi HRESULT SetPreBeginSceneROs(DUser::IRenderOperation ** rgpROs, int cROs);
|
|
};
|
|
|
|
|
|
//
|
|
// Device extensions
|
|
//
|
|
|
|
class DeviceVisual
|
|
{
|
|
dapi HRESULT GetVisual(out Visual * pgvVisual);
|
|
};
|
|
|
|
|
|
class D3d7DeviceVisual : public DeviceVisual
|
|
{
|
|
dapi HRESULT GetVertexAlpha(out BYTE bAlpha);
|
|
dapi HRESULT SetVertexAlpha(in BYTE bAlpha);
|
|
dapi HRESULT GetLight(in int nID, in void * plight);
|
|
dapi HRESULT SetLight(in int nID, in void * plight);
|
|
dapi HRESULT RemoveLight(in int nID);
|
|
};
|
|
|
|
|
|
//
|
|
// DirectUser-Animations
|
|
//
|
|
|
|
class Interpolation
|
|
{
|
|
dapi HRESULT AddRef();
|
|
dapi HRESULT Release();
|
|
dapi HRESULT Compute(in float flProgress, in float flStart, in float flEnd, out float flResult);
|
|
};
|
|
|
|
|
|
class LinearInterpolation : public Interpolation
|
|
{
|
|
};
|
|
|
|
|
|
class LogInterpolation : public Interpolation
|
|
{
|
|
dapi HRESULT SetScale(in float flScale);
|
|
};
|
|
|
|
|
|
class ExpInterpolation : public Interpolation
|
|
{
|
|
dapi HRESULT SetScale(in float flScale);
|
|
};
|
|
|
|
|
|
class SCurveInterpolation : public Interpolation
|
|
{
|
|
dapi HRESULT SetScale(in float flScale);
|
|
};
|
|
|
|
class Flow
|
|
{
|
|
dapi HRESULT AddRef();
|
|
dapi HRESULT Release();
|
|
|
|
dapi HRESULT GetPRID(out PRID prid);
|
|
dapi HRESULT GetKeyFrame(in Flow::ETime time, out DUser::KeyFrame * pkf);
|
|
dapi HRESULT SetKeyFrame(in Flow::ETime time, in const DUser::KeyFrame * pkf);
|
|
|
|
dapi HRESULT OnReset(in Visual * pgvSubject);
|
|
dapi HRESULT OnAction(in Visual * pgvSubject, in Interpolation * pipol, in float flProgress);
|
|
};
|
|
|
|
|
|
class AlphaVertexFlow : public Flow
|
|
{
|
|
|
|
};
|
|
|
|
|
|
class RectFlow : public Flow
|
|
{
|
|
|
|
};
|
|
|
|
|
|
class RotateFlow : public Flow
|
|
{
|
|
|
|
};
|
|
|
|
|
|
class ScaleFlow : public Flow
|
|
{
|
|
|
|
};
|
|
|
|
class LightFlow : public Flow
|
|
{
|
|
|
|
};
|
|
|
|
|
|
class Sequence : public Listener
|
|
{
|
|
dapi HRESULT AddRef();
|
|
dapi HRESULT Release();
|
|
|
|
dapi HRESULT GetLength(out float flLength);
|
|
dapi HRESULT GetDelay(out float flDelay);
|
|
dapi HRESULT SetDelay(in float flDelay);
|
|
dapi HRESULT GetFlow(out Flow * pflow);
|
|
dapi HRESULT SetFlow(in Flow * pflow);
|
|
|
|
dapi HRESULT GetLoop(out int repeatCount);
|
|
dapi HRESULT SetLoop(in int repeatCount);
|
|
|
|
dapi HRESULT GetKeyFrameCount(out int cFrames);
|
|
dapi HRESULT AddKeyFrame(in float flTime, out int idxKeyFrame);
|
|
dapi HRESULT RemoveKeyFrame(in int idxKeyFrame);
|
|
dapi HRESULT RemoveAllKeyFrames();
|
|
dapi HRESULT FindKeyFrame(in float flTime, out int idxKeyFrame);
|
|
|
|
dapi HRESULT GetTime(in int idxKeyFrame, out float flTime);
|
|
dapi HRESULT SetTime(in int idxKeyFrame, in float flTime);
|
|
dapi HRESULT GetKeyFrame(in int idxKeyFrame, out DUser::KeyFrame * pkf);
|
|
dapi HRESULT SetKeyFrame(in int idxKeyFrame, in const DUser::KeyFrame * pkfSrc);
|
|
dapi HRESULT GetInterpolation(in int idxKeyFrame, out Interpolation * pipol);
|
|
dapi HRESULT SetInterpolation(in int idxKeyFrame, in Interpolation * pipol);
|
|
|
|
dapi HRESULT Play(in Visual * pgvSubject, in Sequence::AnimationInfo * pai);
|
|
dapi HRESULT Stop();
|
|
dapi HRESULT Reset(in Visual * pgvSubject);
|
|
dapi HRESULT GotoTime(in Visual * pgvSubject, in float flTime);
|
|
};
|
|
|