␊ |
int lasttime = 0; // we need this for animating maybe␊ |
␊ |
// ====================================================================␊ |
␊ |
/*␊ |
* ATTENTION: the enum and the following array images[] MUST match !!!␊ |
|
␉iFontSmall,␊ |
};␊ |
␊ |
// ====================================================================␊ |
␊ |
image_t images[] = {␊ |
␉{.name = "background", .image = NULL},␊ |
␉{.name = "logo", .image = NULL},␊ |
|
␉{.name = "font_small", .image = NULL},␊ |
};␊ |
␊ |
// ====================================================================␊ |
␊ |
int imageCnt = 0;␊ |
␊ |
extern int␉gDeviceCount;␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
static int loadGraphics(void)␊ |
{␊ |
␉LOADPNG(background, IMG_REQUIRED);␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
static int unloadGraphics(void)␊ |
{␊ |
␉int i;␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int freeBackBuffer( window_t *window )␊ |
{␊ |
␉if (gui.backbuffer && gui.backbuffer->pixels) {␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
pixmap_t *getCroppedPixmapAtPosition( pixmap_t *from, position_t pos, uint16_t width, uint16_t height )␊ |
{␊ |
␉pixmap_t *cropped = malloc( sizeof( pixmap_t ) );␊ |
|
␉return cropped;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int createBackBuffer( window_t *window )␊ |
{␊ |
␉gui.backbuffer = malloc(sizeof(pixmap_t));␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int createWindowBuffer( window_t *window )␊ |
{␊ |
␉window->pixmap = malloc(sizeof(pixmap_t));␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int freeWindowBuffer( window_t *window )␊ |
{␊ |
␉if (window->pixmap && window->pixmap->pixels) {␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void fillPixmapWithColor(pixmap_t *pm, uint32_t color)␊ |
{␊ |
␉int x,y;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawBackground()␊ |
{␊ |
␉// reset text cursor␊ |
|
␉memcpy( gui.backbuffer->pixels, gui.screen.pixmap->pixels, gui.backbuffer->width * gui.backbuffer->height * 4 );␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void setupDeviceList(config_file_t *theme)␊ |
{␊ |
␉unsigned int pixel;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void loadThemeValues(config_file_t *theme)␊ |
{␊ |
␉unsigned int screen_width = gui.screen.width;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int initGUI(void)␊ |
{␊ |
␉int␉␉val;␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
bool is_image_loaded(int i)␊ |
{␉␊ |
␉return (images[i].image != NULL) ? true : false;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawDeviceIcon(BVRef device, pixmap_t *buffer, position_t p, bool isSelected)␊ |
{␊ |
␉int devicetype;␊ |
|
␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawDeviceList (int start, int end, int selection)␊ |
{␊ |
␉int␉␉␉i;␊ |
|
␉␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void clearGraphicBootPrompt()␊ |
{␊ |
␉// clear text buffer␊ |
|
␉return;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void updateGraphicBootPrompt()␊ |
{␊ |
␉fillPixmapWithColor( gui.bootprompt.pixmap, gui.bootprompt.bgcolor);␊ |
|
␉return;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
static inline␊ |
void vramwrite (void *data, int width, int height)␊ |
{␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void updateVRAM()␊ |
{␊ |
␉if (gui.redraw) {␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
struct putc_info //Azi: exists on console.c & printf.c␊ |
{␊ |
␉char * str;␊ |
␉char * last_str;␊ |
};␊ |
␊ |
// ====================================================================␊ |
␊ |
static int␊ |
sputc(int c, struct putc_info * pi) //Azi: same as above␊ |
{␊ |
|
␉return c;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int gprintf( window_t * window, const char * fmt, ...)␊ |
{␊ |
␉char *formattedtext;␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int dprintf( window_t * window, const char * fmt, ...)␊ |
{␊ |
␉char *formattedtext;␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int vprf(const char * fmt, va_list ap)␊ |
{␊ |
␉int i;␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
pixmap_t* charToPixmap(unsigned char ch, font_t *font) {␊ |
␉unsigned int cha = (unsigned int)ch - 32;␊ |
␉if (cha >= font->count) {␊ |
|
␉return font->chars[cha] ? font->chars[cha] : NULL;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
position_t drawChar(unsigned char ch, font_t *font, pixmap_t *blendInto, position_t p) {␊ |
␉pixmap_t* pm = charToPixmap(ch, font);␊ |
␉if (pm && ((p.x + pm->width) < blendInto->width)) {␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawStr(char *ch, font_t *font, pixmap_t *blendInto, position_t p)␊ |
{␊ |
␉int i=0;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawStrCenteredAt(char *text, font_t *font, pixmap_t *blendInto, position_t p)␊ |
{␊ |
␉int i = 0;␊ |
|
␉drawStr(text, font, blendInto, p);␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int destroyFont(font_t *font)␊ |
{␊ |
␉int i;␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int initFont(font_t *font, image_t *data)␊ |
{␊ |
␉unsigned int x = 0, y = 0, x2 = 0, x3 = 0;␊ |
|
␉return 0;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void colorFont(font_t *font, uint32_t color)␊ |
{␊ |
␉if( !color ) {␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void makeRoundedCorners(pixmap_t *p)␊ |
{␊ |
␉int x,y;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void showInfoBox(char *title, char *text_orig)␊ |
{␊ |
␉char* text;␊ |
|
␉free(text);␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void animateProgressBar()␊ |
{␊ |
␉int y;␊ |
|
␉}␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawProgressBar(pixmap_t *blendInto, uint16_t width, position_t p, uint8_t progress)␊ |
{␊ |
␉if(progress>100) {␊ |
|
␉free(progressbar.pixels);␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
void drawInfoMenuItems()␊ |
{␊ |
␉int i,n;␊ |
|
␉gui.redraw = true;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int drawInfoMenu()␊ |
{␊ |
␉drawInfoMenuItems();␊ |
|
␉return 1;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
int updateInfoMenu(int key)␊ |
{␊ |
␉switch (key)␊ |
|
␉return DO_NOT_BOOT;␊ |
}␊ |
␊ |
// ====================================================================␊ |
␊ |
uint16_t bootImageWidth = 0; ␊ |
uint16_t bootImageHeight = 0; ␊ |
uint8_t *bootImageData = NULL; ␊ |
|
␉␉␉}␊ |
␉␉␉free(appleBootPict); ␊ |
␉␉} ␊ |
␉} ␊ |
␉}␊ |
}␊ |
// ====================================================================␊ |