Exemplo n.º 1
0
void set_all_lineperpage(set_linespace_mode mode)
{
    char *find_lineperinch(void);

    static char m1[] = "¨Ó¹Ç¹ºÃ÷ѴµèÍ˹éÒäÁè¾Í "
                      "à¤Ã×èͧ¨Ðà»ÅÕè¹ãËéà»ç¹¨Ó¹Ç¹ÊÙ§ÊØ´à·èÒ·Õè¨ÐÂÍÁä´é";
    static char m2[] = "¡´»ØèÁ ESC à¾×èÍ·Ó§Ò¹µèÍä»";

    if (userlineperpage > find_max_userline_perpage()) {
        userlineperpage = find_max_userline_perpage();
        if (mode == INTERACTIVE) {
            savepic();
            framebox(10, 8, 10+thaistrlen(m1)+4, 11, REVERSEATTR);
            dispstrhgc(m1, 10+2, 9, REVERSEATTR);
            dispstrhgc(m2, 10+ (thaistrlen(m1)+4 - thaistrlen(m2)) / 2,
                       10, REVERSEATTR);
            while (ebioskey(0) != ESCKEY) ;
            retpic();
            writemenu(0, 1, 0); /* show new userline per page */
        }
    }
    lineperpage = find_line_perpage();
    if (mode == INTERACTIVE) {
        savepic();        /*"                             "*/
        dispprintf(19,12,0,
                   "¨Ó¹Ç¹ºÃ÷ѴµèÍ¡ÃдÒÉ 1 ¹ÔéÇ ¤×Í : %s ºÃ÷Ѵ/¹ÔéÇ",
                   find_lineperinch());
        ebioskey(0);
        retpic();
    }
}
Exemplo n.º 2
0
Arquivo: PIC.C Projeto: kytulendu/TW
void notavailable( void ) {
	savepic( );
	blockmsg( 5 );
	dispstrhgc( "¤ÓÊÑ觹ÕéÍÂÙèÃÐËÇèÒ§¡ÒþѲ¹Ò ! ¡´»ØèÁã´æ à¾×èÍ·Ó§Ò¹µèÍ", ( 14 + center_factor ) + 4, 5, REVERSEATTR );

	ebioskey( 0 );
	retpic( );
}
Exemplo n.º 3
0
Arquivo: CSCRN.C Projeto: kytulendu/TW
unsigned char *savescrn( int p_xStart, int p_yStart, int p_xEnd, int p_yEnd ) {
	unsigned char *scrnindex;
	scrnindex = ( unsigned char * ) malloc( ( p_xEnd - p_xStart + 1 ) * ( p_yEnd - p_yStart + 1 ) * 20 );
	if ( scrnindex == NULL ) {
		savepic( );
		errorsound( );
		blockmsg( 5 );
		dispstrhgc( "˹èǤÇÒÁ¨ÓäÁè¾Í ! ¡´»ØèÁã´æà¾×èÍ·Ó§Ò¹µèÍ...", ( 14 + center_factor ) + 8, 6, REVERSEATTR );
		ebioskey( 0 );
		return( NULL );
	}

	( *getwind_ptr )( p_xStart, p_yStart, ( p_yEnd - p_yStart + 1 ) * 20, ( p_xEnd - p_xStart + 1 ), scrnindex );
	return( scrnindex );
}
Exemplo n.º 4
0
int savePicCmd(char **argv, unsigned short argc){
    int ret;
    int slot;
    //turn the sensor on
    printf("Turning on sensor...\r\n");
    sensor_on();
    //capture picture slot
    slot=writePic;
    //take picture
    printf("Taking Picture please wait\r\n");
    ret=savepic();
    //check if picture saved correctly
    if(ret==IMG_RET_SUCCESS){
        printf("Image Stored Successfully\r\n");
        //save picture slot
        cmdPic=slot;
    }else{
        printf("Error taking picture\r\n");
    }
    //turn the sensor off
    sensor_off();
    return 0;
}