- uint_least32_t gp[3] = {
- state->board.goal[0],
- state->board.goal[1],
- state->board.goal[2]
- };
-
- return redraw_tile(state, display, d, gp, x, y, w, h);
-}
-
-void x11_redraw_goal(struct app_state *state, uint_fast32_t mask)
-{
- Display *display = XtDisplay(state->goal);
- Window goal = XtWindow(state->goal);
- Dimension w, h;
- int i;
-
- XtVaGetValues(state->goal, XtNwidth, &w, XtNheight, &h, (char *)NULL);
- w /= 3; h /= 3;
-
- for (i = 0; i < 9; i++) {
- int x = i%3, y = i/3;
-
- if (mask & 1)
- redraw_goal_tile(state, display, goal, x, y, w, h);
-
- /*
- * Goal bitmaps have a gap of 2 tiles between each row.
- * This funny shift will accomodate that.
- */
- mask >>= 1|x;
- }
-}
-
-/* Render the goal area as the window's icon */
-void x11_redraw_icon(struct app_state *state, Widget shell)
-{
- Display *display = XtDisplay(shell);
- Dimension tilesz = ICON_SIZE/3;
- unsigned long ewmhseq[9];
- unsigned i;
-
- for (i = 0; i < 9; i++) {
- int tile;
-
- tile = redraw_goal_tile(state, display, state->icon_pixmap,
- i%3, i/3, tilesz, tilesz);
-
- ewmhseq[i] = COLOUR_MAX*0x10101 * (tile-1) + 0x20100;
- }
-