#ifndef _BOARD_DISPLAY_H_ #define _BOARD_DISPLAY_H_ #include #include #include #include typedef struct _TetringoBoardDisplay TetringoBoardDisplay; typedef struct _TetringoBoardDisplayClass TetringoBoardDisplayClass; typedef struct _TetringoBoardDisplayPriv TetringoBoardDisplayPriv; struct _TetringoBoardDisplay { GObject parent_object; TetringoBoardDisplayPriv *priv; }; struct _TetringoBoardDisplayClass { GObjectClass parent_class; }; #define TETRINGO_TYPE_BOARD_DISPLAY (tetringo_board_display_get_type()) #define TETRINGO_BOARD_DISPLAY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), TETRINGO_TYPE_BOARD_DISPLAY, TetringoBoardDisplay)) #define TETRINGO_BOARD_DISPLAY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), TETRINGO_TYPE_BOARD_DISPLAY, TetringoBoardDisplayClass)) #define TETRINGO_IS_BOARD_DISPLAY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), TETRINGO_TYPE_BOARD_DISPLAY)) #define TETRINGO_IS_BOARD_DISPLAY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), TETRINGO_TYPE_BOARD_DISPLAY)) #define TETRINGO_BOARD_DISPLAY_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS ((obj), TETRINGO_TYPE_BOARD_DISPLAY, TetringoBoardDisplayClass)) GType tetringo_board_display_get_type(void); TetringoBoardDisplay *tetringo_board_display_new(TetringoBoard *board, SDL_Surface *normal_block, SDL_Surface *unused_block, SDL_Surface *used_block, guint x, guint y, guint block_size, guint sep_width); gboolean tetringo_board_display_is_fading( const TetringoBoardDisplay *board_display); void tetringo_board_display_hover_piece(TetringoBoardDisplay *board_display, guint row, guint col); void tetringo_board_display_remove_hover_piece( TetringoBoardDisplay *board_display); void tetringo_board_display_get_cell_from_xy( const TetringoBoardDisplay *board_display, guint x, guint y, guint *out_row, guint *out_col); #endif /* _BOARD_DISPLAY_H_ */