wonx/WWCursor.c
Hiroaki Sakai 103ffe29f1 We implemented mmap (). Specifically, see README.
Added service function.  (A service function dumping information for debugging,
Added service function for screen drawing ON / OFF control) Specifically, see README.

Make the object's destructor called from bios_exit ()
Add appropriate Destroy function to each object.  Delete objects properly
We have checked the termination process as a whole, as done.

Fix to accept interrupts even during key_wait ().
(Previously, only key input was accepted)

Some timer interrupts are improved.  (UNIXTimer.c)

Change the wonx_include directory to wonx.

Changed to search the full path to perl automatically and insert it at the beginning of perl script.

Makefile review, improvement.

Changed ON / OFF of screen drawing to switch according to display level.
(See README for details.)
Also change to display level lowered by F9 and display level raised by F10.
In accordance with that, we have reviewed a part of ON / OFF part of drawing and key input event processing.

Fixed to display message when pressing key.

Obj ObjListData_GetPrev (ObjListData data)
Obj ObjListData_GetNext (ObjListData data)
To
ObjListData ObjListData_GetPrev (ObjListData data)
ObjListData ObjListData_GetNext (ObjListData data)
Fixed to.

Added install, uninstall target to Makefile.  Fixed challsrc.sh.

Version 2.2 - from wonx-2.2.tar.gz
2018-03-07 23:07:30 +00:00

69 lines
2.7 KiB
C

/*****************************************************************************/
/* ここから */
/*****************************************************************************/
#include "WWCursorP.h"
#include "WonX.h"
/*****************************************************************************/
/* メンバ関数の定義 */
/*****************************************************************************/
int WWCursor_ON( WWCursor p) { return (p->on = 1); }
int WWCursor_OFF( WWCursor p) { return (p->on = 0); }
int WWCursor_IsON( WWCursor p) { return (p->on != 0); }
int WWCursor_IsOFF(WWCursor p) { return (p->on == 0); }
int WWCursor_GetX( WWCursor p ) { return (p->x ); }
int WWCursor_SetX( WWCursor p, int n) { return (p->x = n); }
int WWCursor_GetY( WWCursor p ) { return (p->y ); }
int WWCursor_SetY( WWCursor p, int n) { return (p->y = n); }
int WWCursor_GetWidth( WWCursor p ) { return (p->width ); }
int WWCursor_SetWidth( WWCursor p, int n) { return (p->width = n); }
int WWCursor_GetHeight( WWCursor p ) { return (p->height ); }
int WWCursor_SetHeight( WWCursor p, int n) { return (p->height = n); }
int WWCursor_GetInterval(WWCursor p ) { return (p->interval ); }
int WWCursor_SetInterval(WWCursor p, int n) { return (p->interval = n); }
WWPalette WWCursor_GetPalette(WWCursor p)
{ return (p->palette ); }
WWPalette WWCursor_SetPalette(WWCursor p, WWPalette plt)
{ return (p->palette = plt); }
WWCursor WWCursor_Create(WWPalette palette)
{
WWCursor cursor;
cursor = (WWCursor)malloc(sizeof(_WWCursor));
if (cursor == NULL)
WonX_Error("WWCursor_Create", "Cannot allocate memory");
WWCursor_OFF(cursor);
WWCursor_SetX( cursor, 0);
WWCursor_SetY( cursor, 0);
WWCursor_SetWidth( cursor, 1);
WWCursor_SetHeight( cursor, 1);
WWCursor_SetInterval(cursor, 30);
WWCursor_SetPalette(cursor, palette);
return (cursor);
}
WWCursor WWCursor_Destroy(WWCursor cursor)
{
if (cursor == NULL)
WonX_Error("WWCursor_Destroy", "Object is not created.");
free(cursor);
return (NULL);
}
/*****************************************************************************/
/* ここまで */
/*****************************************************************************/
/*****************************************************************************/
/* End of File. */
/*****************************************************************************/