mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-04 23:02:02 +01:00
fix curses drawtable fallback
This commit is contained in:
parent
80f894b869
commit
3c7af0023e
2 changed files with 8 additions and 6 deletions
|
@ -189,7 +189,6 @@ GTK_OBJS = \
|
||||||
$(BUILD_PLAT_DIR)/gtkboard.o \
|
$(BUILD_PLAT_DIR)/gtkboard.o \
|
||||||
$(BUILD_PLAT_DIR)/gtkdraw.o \
|
$(BUILD_PLAT_DIR)/gtkdraw.o \
|
||||||
$(BUILD_PLAT_DIR)/gtkask.o \
|
$(BUILD_PLAT_DIR)/gtkask.o \
|
||||||
$(BUILD_PLAT_DIR)/gtkaskm.o \
|
|
||||||
$(BUILD_PLAT_DIR)/gtkletterask.o \
|
$(BUILD_PLAT_DIR)/gtkletterask.o \
|
||||||
$(BUILD_PLAT_DIR)/gtkpasswdask.o \
|
$(BUILD_PLAT_DIR)/gtkpasswdask.o \
|
||||||
$(BUILD_PLAT_DIR)/gtknewgame.o \
|
$(BUILD_PLAT_DIR)/gtknewgame.o \
|
||||||
|
|
|
@ -85,7 +85,7 @@ curses_draw_boardBegin( DrawCtx* XP_UNUSED(p_dctx),
|
||||||
DrawFocusState XP_UNUSED(dfs) )
|
DrawFocusState XP_UNUSED(dfs) )
|
||||||
{
|
{
|
||||||
return XP_TRUE;
|
return XP_TRUE;
|
||||||
} /* draw_finish */
|
} /* curses_draw_boardBegin */
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
curses_draw_trayBegin( DrawCtx* XP_UNUSED(p_dctx),
|
curses_draw_trayBegin( DrawCtx* XP_UNUSED(p_dctx),
|
||||||
|
@ -95,7 +95,7 @@ curses_draw_trayBegin( DrawCtx* XP_UNUSED(p_dctx),
|
||||||
DrawFocusState XP_UNUSED(dfs) )
|
DrawFocusState XP_UNUSED(dfs) )
|
||||||
{
|
{
|
||||||
return XP_TRUE;
|
return XP_TRUE;
|
||||||
} /* draw_finish */
|
} /* curses_draw_trayBegin */
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
curses_draw_scoreBegin( DrawCtx* p_dctx, const XP_Rect* rect,
|
curses_draw_scoreBegin( DrawCtx* p_dctx, const XP_Rect* rect,
|
||||||
|
@ -579,25 +579,28 @@ curses_draw_frameTray( DrawCtx* p_dctx, XP_Rect* rect )
|
||||||
} /* curses_draw_frameTray */
|
} /* curses_draw_frameTray */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static XP_Bool
|
||||||
draw_doNothing( DrawCtx* XP_UNUSED(dctx), ... )
|
draw_doNothing( DrawCtx* XP_UNUSED(dctx), ... )
|
||||||
{
|
{
|
||||||
|
return XP_FALSE;
|
||||||
} /* draw_doNothing */
|
} /* draw_doNothing */
|
||||||
|
|
||||||
DrawCtx*
|
DrawCtx*
|
||||||
cursesDrawCtxtMake( WINDOW* boardWin )
|
cursesDrawCtxtMake( WINDOW* boardWin )
|
||||||
{
|
{
|
||||||
CursesDrawCtx* dctx = malloc( sizeof(CursesDrawCtx) );
|
CursesDrawCtx* dctx = malloc( sizeof(CursesDrawCtx) );
|
||||||
int ii;
|
|
||||||
|
|
||||||
dctx->vtable = malloc( sizeof(*(((CursesDrawCtx*)dctx)->vtable)) );
|
dctx->vtable = malloc( sizeof(*(((CursesDrawCtx*)dctx)->vtable)) );
|
||||||
|
|
||||||
for ( ii = 0; ii < VSIZE(dctx->vtable); ++ii ) {
|
for ( int ii = 0;
|
||||||
|
ii < sizeof(*dctx->vtable)/sizeof(draw_doNothing);
|
||||||
|
++ii ) {
|
||||||
((void**)(dctx->vtable))[ii] = draw_doNothing;
|
((void**)(dctx->vtable))[ii] = draw_doNothing;
|
||||||
}
|
}
|
||||||
|
|
||||||
SET_VTABLE_ENTRY( dctx->vtable, draw_destroyCtxt, curses );
|
SET_VTABLE_ENTRY( dctx->vtable, draw_destroyCtxt, curses );
|
||||||
SET_VTABLE_ENTRY( dctx->vtable, draw_dictChanged, curses );
|
SET_VTABLE_ENTRY( dctx->vtable, draw_dictChanged, curses );
|
||||||
|
|
||||||
SET_VTABLE_ENTRY( dctx->vtable, draw_boardBegin, curses );
|
SET_VTABLE_ENTRY( dctx->vtable, draw_boardBegin, curses );
|
||||||
SET_VTABLE_ENTRY( dctx->vtable, draw_objFinished, curses );
|
SET_VTABLE_ENTRY( dctx->vtable, draw_objFinished, curses );
|
||||||
SET_VTABLE_ENTRY( dctx->vtable, draw_trayBegin, curses );
|
SET_VTABLE_ENTRY( dctx->vtable, draw_trayBegin, curses );
|
||||||
|
|
Loading…
Reference in a new issue