Changeset 28462


Ignore:
Timestamp:
04/08/14 16:14:20 (10 years ago)
Author:
obi
Message:

upgrade mipsel stuff

Location:
titan/titan
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • titan/titan/defaults.h

    r25406 r28462  
    123123        status.virtualzap = getconfigint("virtualzap", NULL);
    124124        status.fontsizeadjust = getskinconfigint("fontsizeadjust", NULL);
     125        status.rcskipms = getconfigint("rcskipms", NULL);
    125126       
    126127        if(checkbox("ATEMIO7600") == 1) delconfig("fastzap");
  • titan/titan/rc.h

    r23286 r28462  
    214214        int ret = 0, len = 0, fromthread = 0, longpress = 0, longpresscount = 0;
    215215        struct rc *node;
     216        struct timeval aktrctime;
    216217
    217218        if(pthread_self() != status.mainthread)
     
    273274                                continue;
    274275                        }
    275 
    276                         if(time(NULL) - rcdata.time.tv_sec > 1)
     276                       
     277                        gettimeofday(&aktrctime, NULL);
     278                        if(status.rcskipms > 0 && ((aktrctime.tv_sec - rcdata.time.tv_sec) * 1000000LL + aktrctime.tv_usec - rcdata.time.tv_usec) > status.rcskipms)
    277279                        {
    278280                                usleep(10000);
    279281                                continue;
    280282                        }
    281 
     283                       
     284                        printf(".\n");
     285                       
    282286                        debug(100, "key code=%d, type=%d, value=%d", rcdata.code, rcdata.type, rcdata.value);
    283287                        treffer = 1;
  • titan/titan/skin.h

    r28456 r28462  
    2323        else
    2424                printf("screen = NULL\n");
    25 }
    26 
    27 int getrectdiff(int x, int y, int w, int h, int x1, int y1, int w1, int h1, int* x2, int* y2, int* w2, int* h2)
    28 {
    29         int xx = x + w;
    30         int xx1 = x1 + w1;
    31         int yy = y + h;
    32         int yy1 = y1 + h1;
    33        
    34         *x2 = OMAX(x, x1);
    35         *w2 = OMIN(xx, xx1); (*w2) = (*w2) - (*x2);
    36         *y2 = OMAX(y, y1);
    37         *h2 = OMIN(yy, yy1); (*h2) = (*h2) - (*y2);
    38        
    39         if(*w2 <= 0 || *h2 <=0) return 1;
    40         return 0;       
    41 }
    42 
    43 void resetchangeflag(struct skin* node)
    44 {
    45         if(node == NULL) return;
    46         struct skin* child = node->child;
    47 
    48         node->flag = setbit(node->flag, 1);
    49 
    50         while(child != NULL)
    51         {
    52                 child->flag = setbit(child->flag, 1);
    53                 child = child->next;
    54         }
    5525}
    5626
     
    552522        newnode->titlebgcol = -1;
    553523        newnode->deaktivcol = -1;
    554         newnode->flag = setbit(newnode->flag, 1);
    555524
    556525        if(line != NULL)
     
    601570                        free(ret);
    602571                }
    603                 ret = getxmlentry(line, " picwidth=");
    604                 if(ret != NULL)
    605                 {
    606                         newnode->picwidth = convertxmlentry(ret, &newnode->picprozwidth);
    607                         free(ret);
    608                 }
    609                 ret = getxmlentry(line, " picheight=");
    610                 if(ret != NULL)
    611                 {
    612                         newnode->picheight = convertxmlentry(ret, &newnode->picprozheight);
    613                         free(ret);
     572                // disable skinadjust is verry slow...
     573                if(checkbox("ATEMIO5200") != 1)
     574                {
     575                        ret = getxmlentry(line, " picwidth=");
     576                        if(ret != NULL)
     577                        {
     578                                newnode->picwidth = convertxmlentry(ret, &newnode->picprozwidth);
     579                                free(ret);
     580                        }
     581                        ret = getxmlentry(line, " picheight=");
     582                        if(ret != NULL)
     583                        {
     584                                newnode->picheight = convertxmlentry(ret, &newnode->picprozheight);
     585                                free(ret);
     586                        }
    614587                }
    615588                ret = getxmlentry(line, " picquality=");
     
    647620                {
    648621                        newnode->hidden = convertxmlentry(ret, NULL);
    649                         free(ret);
    650                 }
    651                 ret = getxmlentry(line, " usesavebg=");
    652                 if(ret != NULL)
    653                 {
    654                         newnode->usesavebg = atoi(ret);
    655622                        free(ret);
    656623                }
     
    27102677{
    27112678        m_lock(&status.drawingmutex, 0);
    2712         resetchangeflag(node);
    27132679        clearrect(node->rposx, node->rposy, node->rwidth, node->rheight);
    27142680        clearshadow(node);
     
    27182684void clearscreennolock(struct skin* node)
    27192685{
    2720         resetchangeflag(node);
    27212686        clearrect(node->rposx, node->rposy, node->rwidth, node->rheight);
    27222687        clearshadow(node);
     
    28912856}
    28922857
    2893 void drawtitlebgcolpart(struct skin* node, int posx, int posy, int width, int height)
    2894 {
    2895         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    2896         int rposx = 0, rposy = 0, rwidth = 0, rheight = 0;
    2897 
    2898         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    2899                 fillrect(iposx, iposy, iwidth, iheight, node->bgcol, node->transparent);
    2900         if(status.picbordersize > 0)
    2901         {
    2902                 rposx = node->rposx + status.picbordersize;
    2903                 rposy = node->rposy + status.picbordersize;
    2904                 rwidth = node->rwidth - (status.picbordersize << 1);
    2905                 rheight = node->rheight - (node->rheight - node->titlesize);
    2906 
    2907                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    2908                         fillrect(iposx, iposy, iwidth, iheight, node->titlebgcol, node->transparent);
    2909         }
    2910         else
    2911         {
    2912                 rposx = node->rposx;
    2913                 rposy = node->rposy;
    2914                 rwidth = node->rwidth;
    2915                 rheight = node->rheight - (node->rheight - node->titlesize);
    2916 
    2917                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    2918                         fillrect(iposx, iposy, iwidth, iheight, node->titlebgcol, node->transparent);
    2919         }
    2920 }
    2921 
    29222858void drawbginnercol(struct skin* node)
    29232859{
     
    29282864{
    29292865        fillrect(node->rposx + node->bgspace, node->rposy + node->bgspace, node->rwidth - (node->bgspace << 1), node->rheight - (node->bgspace << 1), node->bgcol, node->transparent);
    2930 }
    2931 
    2932 void drawbgcolpart(struct skin* node, int posx, int posy, int width, int height)
    2933 {
    2934         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    2935         int rposx = node->rposx + node->bgspace;
    2936         int rposy = node->rposy + node->bgspace;
    2937         int rwidth = node->rwidth - (node->bgspace << 1);
    2938         int rheight = node->rheight - (node->bgspace << 1);
    2939 
    2940         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    2941                 fillrect(iposx, iposy, iwidth, iheight, node->bgcol, node->transparent);
    29422866}
    29432867
     
    29632887}
    29642888
    2965 void drawprogressbarpart(struct skin* node, int posx, int posy, int width, int height)
    2966 {
    2967         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    2968         int rposx = node->rposx + node->bordersize;
    2969         int rposy = node->rposy + node->bordersize;
    2970         int rwidth = 0;
    2971         int rheight = node->iheight;
    2972 
    2973         if(node->progresssize > 100) node->progresssize = 100;
    2974         rwidth = (((node->iwidth * 100) / 100) * node->progresssize) / 100;
    2975 
    2976         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    2977                 fillrect(iposx, iposy, iwidth, iheight, node->progresscol, node->transparent);
    2978 }
    2979 
    29802889void drawmultiprogressbar(struct skin* node)
    29812890{
     
    29932902                if(val2 > val1)
    29942903                        fillrect(node->rposx + node->bordersize + node->bgspace + val1, node->rposy + node->bgspace + node->bordersize, val2 - val1 + (node->bgspace << 1), node->iheight + (node->bgspace << 1), node->progresscol, node->transparent);
    2995                 epgrecord = epgrecord->next;
    2996         }
    2997 }
    2998 
    2999 void drawmultiprogressbarpart(struct skin* node, int posx, int posy, int width, int height)
    3000 {
    3001         struct epgrecord* epgrecord = node->epgrecord;
    3002         int val1 = 0, val2 = 0;
    3003         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    3004         int rposx = 0, rposy = 0, rwidth = 0, rheight = 0;
    3005 
    3006 
    3007         while(epgrecord != NULL)
    3008         {
    3009                
    3010                 if(epgrecord->posx > 100) epgrecord->posx = 100;
    3011                 val1 = (((node->iwidth * 100) / 100) * epgrecord->posx) / 100;
    3012                 if(epgrecord->size > 100) epgrecord->size = 100;
    3013                 val2 = (((node->iwidth * 100) / 100) * epgrecord->size) / 100;
    3014 
    3015                 if(val2 > val1)
    3016                 {
    3017                         rposx = node->rposx + node->bordersize + node->bgspace + val1;
    3018                         rposy = node->rposy + node->bgspace + node->bordersize;
    3019                         rwidth = val2 - val1 + (node->bgspace << 1);
    3020                         rheight = node->iheight + (node->bgspace << 1);
    3021 
    3022                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3023                                 fillrect(iposx, iposy, iwidth, iheight, node->progresscol, node->transparent);
    3024 
    3025                 }
    30262904                epgrecord = epgrecord->next;
    30272905        }
     
    30992977                if(node->bordertype == 0 || checkbit(node->bordertype, 3) == 1)
    31002978                        fillrect(node->rposx + node->rwidth - node->bordersize, node->rposy, node->bordersize, node->rheight, node->bordercol, node->transparent);
    3101         }
    3102 }
    3103 
    3104 void drawborderpart(struct skin* node, int posx, int posy, int width, int height)
    3105 {
    3106         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    3107         int rposx = 0, rposy = 0, rwidth = 0, rheight = 0;
    3108 
    3109         if(node->bordertype == 0 || checkbit(node->bordertype, 0) == 1)
    3110         {
    3111                 rposx = node->rposx;
    3112                 rposy = node->rposy;
    3113                 rwidth = node->rwidth;
    3114                 rheight = node->bordersize;
    3115 
    3116                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3117                         fillrect(iposx, iposy, iwidth, iheight, node->bordercol, node->transparent);
    3118         }
    3119         if(node->bordertype == 0 || checkbit(node->bordertype, 1) == 1)
    3120         {
    3121                 rposx = node->rposx;
    3122                 rposy = node->rposy + node->rheight - node->bordersize;
    3123                 rwidth = node->rwidth;
    3124                 rheight = node->bordersize;
    3125 
    3126                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3127                         fillrect(iposx, iposy, iwidth, iheight, node->bordercol, node->transparent);
    3128         }
    3129         if(node->bordertype == 0 || checkbit(node->bordertype, 2) == 1)
    3130         {
    3131                 rposx = node->rposx;
    3132                 rposy = node->rposy;
    3133                 rwidth = node->bordersize;
    3134                 rheight = node->rheight;
    3135 
    3136                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3137                         fillrect(iposx, iposy, iwidth, iheight, node->bordercol, node->transparent);
    3138         }
    3139         if(node->bordertype == 0 || checkbit(node->bordertype, 3) == 1)
    3140         {
    3141                 rposx = node->rposx + node->rwidth - node->bordersize;
    3142                 rposy = node->rposy;
    3143                 rwidth = node->bordersize;
    3144                 rheight = node->rheight;
    3145 
    3146                 if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3147                         fillrect(iposx, iposy, iwidth, iheight, node->bordercol, node->transparent);
    31482979        }
    31492980}
     
    32063037}
    32073038
    3208 void drawshadowpart(struct skin* node, int posx, int posy, int width, int height)
    3209 {
    3210         int iposx = 0, iposy = 0, iwidth = 0, iheight = 0;
    3211         int rposx = 0, rposy = 0, rwidth = 0, rheight = 0;
    3212 
    3213         switch(node->shadowpos)
    3214         {
    3215                 case BOTTOMLEFT:
    3216                         rposx = node->rposx - node->shadowsize;
    3217                         rposy = node->rposy + node->rheight;
    3218                         rwidth = node->rwidth;
    3219                         rheight = node->shadowsize;
    3220 
    3221                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3222                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3223 
    3224                         rposx = node->rposx - node->shadowsize;
    3225                         rposy = node->rposy + node->shadowsize;
    3226                         rwidth = node->shadowsize;
    3227                         rheight = node->rheight;
    3228 
    3229                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3230                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3231 
    3232                         break;
    3233                 case BOTTOMRIGHT:
    3234                         rposx = node->rposx + node->shadowsize;
    3235                         rposy = node->rposy + node->rheight;
    3236                         rwidth = node->rwidth;
    3237                         rheight = node->shadowsize;
    3238 
    3239                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3240                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3241 
    3242                         rposx = node->rposx + node->rwidth;
    3243                         rposy = node->rposy + node->shadowsize;
    3244                         rwidth = node->shadowsize;
    3245                         rheight = node->rheight;
    3246 
    3247                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3248                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3249 
    3250                         break;
    3251                 case TOPLEFT:
    3252                         rposx = node->rposx - node->shadowsize;
    3253                         rposy = node->rposy - node->shadowsize;
    3254                         rwidth = node->rwidth;
    3255                         rheight = node->shadowsize;
    3256 
    3257                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3258                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3259 
    3260                         rposx = node->rposx - node->shadowsize;
    3261                         rposy = node->rposy - node->shadowsize;
    3262                         rwidth = node->shadowsize;
    3263                         rheight = node->rheight;
    3264 
    3265                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3266                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3267 
    3268                         break;
    3269                 default:
    3270                         rposx = node->rposx + node->shadowsize;
    3271                         rposy = node->rposy - node->shadowsize;
    3272                         rwidth = node->rwidth;
    3273                         rheight = node->shadowsize;
    3274 
    3275                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3276                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3277 
    3278                         rposx = node->rposx + node->rwidth;
    3279                         rposy = node->rposy - node->shadowsize;
    3280                         rwidth = node->shadowsize;
    3281                         rheight = node->rheight;
    3282 
    3283                         if(getrectdiff(posx, posy, width, height, rposx, rposy, rwidth, rheight, &iposx, &iposy, &iwidth, &iheight) == 0)
    3284                                 fillrect(iposx, iposy, iwidth, iheight, node->shadowcol, node->transparent);
    3285 
    3286                         break;
    3287         }
    3288 }
    3289 
    3290 //flag 0: draw all parts before node
    3291 //flag 1: draw all parts after node
    3292 struct skin* drawnodepart(struct skin* tmp, struct skin* screen, struct skin* parent, struct skin* node, int flag)
    3293 {
    3294         int posx = 0, posy = 0, width = 0, height = 0;
    3295         struct skin* child = NULL;
    3296        
    3297         if(screen == NULL || node == NULL || screen == node) return NULL;
    3298         if(checkbit(node->flag, 1) == 0 || checkbit(screen->flag, 1) == 1) return NULL;
    3299 
    3300 //printf("drawnodepart %s %d\n", node->name, flag);     
    3301         if(flag == 0)
    3302                 child = screen;
    3303         else
    3304                 child = tmp;
    3305 
    3306         while(child != NULL)
    3307         {
    3308                 if(flag == 0 && child == node) return child->drawnext;
    3309                 if(child->hidden == YES || child->locked == YES || checkbit(child->flag, 0) == 0 || checkbit(child->flag, 1) == 1 || child == node)
    3310                 {
    3311                         if(child == screen)
    3312                                 child = screen->drawnext;
    3313                         else
    3314                                 child = child->drawnext;
    3315                         continue;
    3316                 }
    3317                
    3318                 if(getrectdiff(node->rposx, node->rposy, node->rwidth, node->rheight, child->rposx, child->rposy, child->rwidth, child->rheight, &posx, &posy, &width, &height) == 1)
    3319                 {
    3320                         if(child == screen)
    3321                                 child = screen->drawnext;
    3322                         else
    3323                                 child = child->drawnext;
    3324                         continue;
    3325                 }
    3326                
    3327                 if(child->shadowsize > 0)
    3328                         drawshadowpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3329                 if(child->bgcol > -1)
    3330                 {
    3331                         //if(node->child != NULL && status.picbordersize > 0)
    3332                         //      drawbginnercol(node);
    3333                         //else
    3334 //printf("drawbgcolpart %s %s x=%d y=%d w=%d h=%d\n", node->name, child->name, node->rposx, node->rposy, node->rwidth, node->rheight);
    3335                                 drawbgcolpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3336                 }
    3337                 /*
    3338                 if(node->child != NULL && status.bgpic != NULL)
    3339                         drawpic(status.bgpic, node->iposx, node->iposy, node->iwidth, node->iheight, node->iwidth, node->iheight, node->halign, node->valign, node->transparent, node->picquality, node->picmem);
    3340                 if(child->gradient > 0)
    3341                         drawbggradient(child);
    3342                 */
    3343                 if(child->titlebgcol > -1)
    3344                         drawtitlebgcolpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3345                 //if(child->titlegradient > 0)
    3346                 //      drawtitlebggradient(child);
    3347                 if(child->progresssize > 0)
    3348 {
    3349 //printf("1) %s %d\n", child->name, child->progresssize);
    3350                         drawprogressbarpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3351 }
    3352                 if(child->type & MULTIPROGRESSBAR)
    3353                         drawmultiprogressbarpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3354                 if(child->bordersize > 0)
    3355                 {
    3356                         //if(node->child != NULL && status.picbordersize > 0)
    3357                                 //drawpicborder(node);
    3358                         //else
    3359                                 drawborderpart(child, node->rposx, node->rposy, node->rwidth, node->rheight);
    3360                         //if((node->child != NULL && status.borderradius > 0) || node->borderradius > 0)
    3361                                 //drawroundborder(node, bglt, bglb, bgrt, bgrb);
    3362                 }
    3363 
    3364                
    3365                 if(child == screen)
    3366                         child = screen->drawnext;
    3367                 else
    3368                         child = child->drawnext;
    3369         }
    3370        
    3371         return NULL;
    3372 }
    3373 
    33743039//flag 0: del background
    33753040//flag 1: don't del background
     
    33783043        long color = 0, color2 = 0;
    33793044        int len = 0;
    3380         char* bglt = NULL, *bglb = NULL, *bgrt = NULL, *bgrb = NULL, *tmpstr = NULL;
    3381 /*
    3382 printf("drawnode: node->flag=%d\n",node->flag);
    3383 printf("drawnode: node->hidden=%d\n",node->hidden);
    3384 printf("drawnode: node->locked=%d\n",node->locked);
    3385 printf("drawnode: node->text=%s\n",node->text);
    3386 printf("drawnode: node->bgcol=%ld\n",node->bgcol);
    3387 printf("drawnode: node->bgcol2=%ld\n",node->bgcol2);
    3388 printf("drawnode: node->titlebgcol=%ld\n",node->titlebgcol);
    3389 printf("drawnode: node->titlebgcol2=%ld\n",node->titlebgcol2);
    3390 printf("drawnode: node->progresscol=%ld\n",node->progresscol);
    3391 printf("drawnode: node->bordercol=%ld\n",node->bordercol);
    3392 printf("drawnode: node->shadowcol=%ld\n",node->shadowcol);
    3393 printf("drawnode: node->deaktivcol=%ld\n",node->deaktivcol);
    3394 printf("drawnode: node->gradient=%d\n",node->gradient);
    3395 printf("drawnode: node->transparent=%d\n",node->transparent);
    3396 printf("drawnode: node->rposx=%d\n",node->rposx);
    3397 printf("drawnode: node->rposy=%d\n",node->rposy);
    3398 printf("drawnode: node->rwidth=%d\n",node->rwidth);
    3399 printf("drawnode: node->rheight=%d\n",node->rheight);
    3400 printf("drawnode: node->usesavebg=%d\n",node->usesavebg);
    3401 printf("drawnode: node->name=%s\n",node->name);
    3402 printf("drawnode: node->savebg=%s\n",node->savebg);
     3045        char* bglt = NULL, *bglb = NULL, *bgrt = NULL, *bgrb = NULL;
    34033046       
    3404                 debug(555, "#############################################");
    3405                 debug(555, "node->text=%s", node->text);
    3406                 debug(555, "node->name=%s", node->name);
    3407                 debug(555, "node->rposx=%d", node->rposx);
    3408                 debug(555, "node->rposy=%d", node->rposy);
    3409                 debug(555, "node->rwidth=%d", node->rwidth);
    3410                 debug(555, "node->rheight=%d", node->rheight);
    3411                 debug(555, "node->usesavebg=%d", node->usesavebg);
    3412                 debug(555, "#############################################");
    3413 */
    3414 
    3415 //      printf("text=%s bgcol=%ld bgcol2=%ld\n", node->text, node->bgcol, node->bgcol2);
    3416 //printf("drawnode: weiter check\n");
    3417 
    3418         if(checkbit(node->flag, 1) == 0) return;
    3419 //printf("drawnode: weiter ok\n");
    3420 
    3421         if((node->usesavebg == 1 || node->usesavebg == 2) && node->savebg != NULL)
    3422         {
    3423                 debug(555, "--------------------------------------------");
    3424                 debug(555, "drawnode: restore savebg");
    3425 //              printf("drawnode: restore savebg: %d\n",node->usesavebg);
    3426                
    3427                 tmpstr = ostrcat(node->savebg, NULL, 0, 0);
    3428                 restorescreen(node->savebg, node);
    3429                 if(node->usesavebg == 1)
    3430                         node->savebg = ostrcat(tmpstr, NULL, 0, 0);
    3431                 else
    3432                         node->savebg = NULL;
    3433                 free(tmpstr), tmpstr = NULL;
    3434                 debug(555, "node->rposx=%d", node->rposx);
    3435                 debug(555, "node->rposy=%d", node->rposy);
    3436                 debug(555, "node->rwidth=%d", node->rwidth);
    3437                 debug(555, "node->rheight=%d", node->rheight);
    3438                 debug(555, "node->text=%s", node->text);
    3439                 debug(555, "node->name=%s", node->name);
    3440                 debug(555, "node->hidden=%d", node->hidden);
    3441                 debug(555, "--------------------------------------------");
    3442         }
    3443 
    3444 //      if(node->usesavebg == 1 && node->hidden == 0 && node->savebg == NULL)
    3445         if((node->usesavebg == 1 || node->usesavebg == 2)/* && node->rposx != 0 && node->rposy != 0 && node->rheight != 0 && node->rheight != 1*/ && node->savebg == NULL)
    3446         {
    3447                 debug(555, "--------------------------------------------");
    3448                 debug(555, "drawnode: backup savebg");
    3449 //              printf("drawnode: backup savebg: %d\n",node->usesavebg);
    3450                 node->savebg = savescreen(node);
    3451                 debug(555, "node->rposx=%d", node->rposx);
    3452                 debug(555, "node->rposy=%d", node->rposy);
    3453                 debug(555, "node->rwidth=%d", node->rwidth);
    3454                 debug(555, "node->rheight=%d", node->rheight);
    3455                 debug(555, "node->text=%s", node->text);
    3456                 debug(555, "node->name=%s", node->name);
    3457                 debug(555, "node->hidden=%d", node->hidden);
    3458                 debug(555, "--------------------------------------------");
    3459         }
    3460 
    3461         if(node->hidden == YES || node->locked == YES) return;
    3462                
     3047        node->flag = setbit(node->flag, 0);
     3048
    34633049        if(node->bordersize > 0)
    34643050        {
     
    34773063        }
    34783064
    3479 /*
    34803065        if(flag == 0 && node->bgcol == -1)
    34813066        {
     
    34833068                        clearrect(node->rposx + node->bordersize, node->rposy + node->bordersize, node->rwidth - (node->bordersize << 1), node->rheight - (node->bordersize << 1));
    34843069                else
    3485                         clearrect(node->rposx, node->rposy, node->rwidth, node->rheight);
    3486         }
    3487 */
     3070                        clearscreennolock(node);
     3071        }
    34883072
    34893073        if(node->deaktivcol > -1)
     
    35113095        if(node->gradient > 0)
    35123096                drawbggradient(node);
    3513        
    35143097        if(node->titlebgcol > -1)
    35153098                drawtitlebgcol(node);
    3516 
    35173099        if(node->titlegradient > 0)
    35183100                drawtitlebggradient(node);
    3519 
    35203101        if(node->progresssize > 0)
    35213102                drawprogressbar(node);
    3522 
    35233103        if(node->type & MULTIPROGRESSBAR)
    35243104                drawmultiprogressbar(node);
    3525 
    35263105        if(node->selectpic != NULL && !(node->type & FILELIST))
    35273106                drawpic(node->selectpic, node->iposx, node->iposy, node->iwidth, node->iheight, node->iwidth, node->iheight, LEFT, TOP, node->transparent, node->picquality, node->picmem);
    3528 
    35293107        if(node->pic != NULL && !(node->type & FILELIST))
    35303108                drawpic(node->pic, node->iposx, node->iposy, node->rpicwidth, node->rpicheight, node->iwidth, node->iheight, node->halign, node->valign, node->transparent, node->picquality, node->picmem);
     
    36673245{
    36683246        struct skin* child = NULL, *last = NULL, *found = NULL;
    3669         int selcol = 0, change = 1;
     3247        int selcol = 0;
    36703248
    36713249        if(node->type == FILELIST)
     
    36913269                        else if(ostrcmp(child->parent, node->name) != 0 || child->hidden == YES)
    36923270                        {
    3693                                 child->pagecount = 0;
    36943271                                child = child->next;
    36953272                                continue;
     
    36983275                else if(child->parentpointer != node || child->hidden == YES)
    36993276                {
    3700                         child->pagecount = 0;
    37013277                        child = child->next;
    37023278                        continue;
     
    37053281                if(child->locked == YES)
    37063282                {
    3707                         child->pagecount = 0;
    37083283                        child = child->next;
    37093284                        continue;
     
    37183293                {
    37193294                        node->pagecount++;
    3720 /*
    3721                         if(node->aktpage == -1)
    3722                         {
    3723                                 if(found == NULL) change = node->pagecount;
    3724                         }
    3725                         else
    3726                         {
    3727                                 if(node->pagecount == node->aktpage) change = node->pagecount;
    3728                         }
    3729 */
    37303295                        node->poscount = child->rheight;
    37313296                }
     
    37413306                node->linecount++;
    37423307                last = child;
    3743 
    3744 /*
    3745                 if(node->aktpage == -1)
    3746                 {
    3747                         if(change == node->pagecount && checkbit(child->flag, 1) == 0) change = 0;
    3748                 }
    3749                 else
    3750                 {
    3751                         if(change == node->aktpage && checkbit(child->flag, 1) == 0) change = 0;
    3752                 }
    3753 */
    37543308
    37553309                if(node->aktline == -1 && child->pagecount == node->aktpage)
     
    37753329                child = child->next;
    37763330        }
    3777 
    3778         //if(change > 0) node->flag = setbit(node->flag, 1);
    37793331
    37803332        if(found == NULL)
     
    39893541}
    39903542
    3991 int checknodechange(struct skin* parent, struct skin* node)
    3992 {
    3993         int ret = 0, hash = 0;
    3994 
    3995         if(parent == NULL || node == NULL) return ret;
    3996 
    3997         hash = ((hash << 5) + hash) ^ node->hidden;
    3998         hash = ((hash << 5) + hash) ^ node->locked;
    3999         hash = ((hash << 5) + hash) ^ node->iposx;
    4000         hash = ((hash << 5) + hash) ^ node->iposy;
    4001         hash = ((hash << 5) + hash) ^ node->iwidth;
    4002         hash = ((hash << 5) + hash) ^ node->iheight;
    4003         hash = ((hash << 5) + hash) ^ node->rposx;
    4004         hash = ((hash << 5) + hash) ^ node->rposy;
    4005         hash = ((hash << 5) + hash) ^ node->rwidth;
    4006         hash = ((hash << 5) + hash) ^ node->rheight;
    4007         hash = ((hash << 5) + hash) ^ node->bordersize;
    4008         hash = ((hash << 5) + hash) ^ node->progresssize;
    4009         hash = ((hash << 5) + hash) ^ node->bgcol;
    4010         hash = ((hash << 5) + hash) ^ node->aktpage;
    4011         if(! (node->type & LISTBOX) || (node->type & FILELIST) || (node->type & GRID))
    4012         {
    4013                 hash = ((hash << 5) + hash) ^ node->linecount;
    4014                 hash = ((hash << 5) + hash) ^ node->pagecount;
    4015                 hash = ((hash << 5) + hash) ^ node->poscount;
    4016         }
    4017 
    4018         if(hash != node->hash)
    4019         {
    4020                 node->hash = hash;
    4021                 node->flag = setbit(node->flag, 1);
    4022                 ret = 1;
    4023         }
    4024 
    4025         return ret;
    4026 }
    4027 
    40283543int setnodeattr(struct skin* node, struct skin* parent, int screencalc)
    40293544{
    40303545        if(node != skin) node->flag = clearbit(node->flag, 0);
    40313546        if((parent->type & LISTBOX) || (parent->type & FILELIST) || (parent->type & GRID))
    4032         {
    4033                 if(node->pagecount != parent->aktpage)
    4034                 {
    4035                         node->flag = setbit(node->flag, 1);
    4036                         return 1;
    4037                 }
    4038         }
     3547                if(node->pagecount != parent->aktpage) return 1;
    40393548
    40403549        int shadowlx = 0, shadowrx = 0, shadowoy = 0, shadowuy = 0;
     
    40733582        if(screencalc != 2)
    40743583        {
    4075                 if(checkbit(parent->flag, 0) == 0)
    4076                         return 1;
    4077                 if(node->hidden == YES || parent->hidden == YES || node->locked == YES || parent->locked == YES)
    4078                         return 0;
     3584                if(node->hidden == YES || parent->hidden == YES || node->locked == YES || parent->locked == YES) return 1;
     3585                if(checkbit(parent->flag, 0) == 0) return 1;
    40793586        }
    40803587
     
    41153622                node->rpicheight = node->picheight;
    41163623
    4117 
    41183624        if(node->rposx - shadowlx < parent->iposx)
    41193625        {
     
    41933699        {
    41943700                char* pos = NULL;
    4195 
    41963701                calctext(node->input, NULL, &node->linecount, &node->pagecount, &node->poscount, 1, node->aktpage);
    41973702
     
    43053810        struct fb* merkskinfb = NULL;
    43063811        int ret;
    4307         struct skin *child = NULL, *parent = NULL, *oldparent = NULL, *oldchild = NULL;
     3812        struct skin *child = NULL, *parent = NULL, *oldparent = NULL;
    43083813
    43093814        if(node == NULL)
     
    44163921        }
    44173922
     3923        if(screencalc == 0 || flag == 4)
     3924        {
     3925                if(flag == 0 || flag == 2 || flag == 4) clearscreenalways();
     3926                drawnode(node, 0);
     3927        }
    44183928        parent = node;
    44193929        oldparent = node;
    4420         oldchild = node;
    44213930        child = node->child;
    4422         node->drawnext = NULL;
    4423         if(screencalc == 0 || flag == 4)
    4424         {
    4425                 if(flag == 0 || flag == 2 || flag == 4) clearscreenalways();
    4426                 node->flag = setbit(node->flag, 0);
    4427                 checknodechange(parent, node);
    4428                
    4429 //printf("aaaaaaaaaaaaaaaaa\n");
    4430                 drawnode(node, 0);
    4431         }
    4432 
    4433         //calc
     3931
    44343932        while(child != NULL)
    44353933        {
     
    44443942                        parent = oldparent;
    44453943
    4446                 child->drawnext = NULL;
    4447                 if(setnodeattr(child, parent, screencalc) == 0)
    4448                 {
    4449                         child->flag = setbit(child->flag, 0);
    4450                         oldchild->drawnext = child;
    4451                         oldchild = child;
    4452                 }
    4453                
     3944                if(setnodeattr(child, parent, screencalc) == 0 && screencalc == 0)
     3945                        drawnode(child, 1);
    44543946                child = child->next;
    44553947        }
    4456        
    4457         //draw
    4458         if(screencalc == 0)
    4459         {
    4460                 child = node->drawnext;
    4461                 while(child != NULL)
    4462                 {
    4463                         if(child->parentpointer != NULL)
    4464                                 parent = child->parentpointer;
    4465                         else if(child->parent != NULL)
    4466                         {
    4467                                 parent = getscreennode(node, child->parent);
    4468                                 if(parent == status.skinerr) parent = oldparent;
    4469                         }
    4470                         else
    4471                                 parent = oldparent;
    4472 
    4473                         checknodechange(parent, child);
    4474                         struct skin* tmp = drawnodepart(NULL, node, parent, child, 0);
    4475 /*
    4476 printf("bbbbbbbbbbb\n");
    4477 printf("node->bgcol=%ld\n",node->bgcol);
    4478 printf("node->name=%s\n",node->name);
    4479 printf("node->pic=%s\n",node->pic);
    4480 printf("node->picmem=%d\n",node->picmem);
    4481 printf("child->bgcol=%ld\n",child->bgcol);
    4482 printf("child->name=%s\n",child->name);
    4483 printf("child->pic=%s\n",child->pic);
    4484 printf("child->picmem=%d\n",child->picmem);
    4485 printf("child->usesavebg=%d\n",child->usesavebg);
    4486 
    4487                         if(node->bgcol == -1 && child->pic != NULL)
    4488                         {
    4489                                 debug(555, "add 1 %s->%s: %s", node->name, child->name, child->text);
    4490                                 printf("add 1 %s->%s: %s\n",node->name,child->name,child->text);
    4491                                 child->usesavebg = 1;
    4492                         }
    4493                         else
    4494 */                     
    4495                         if(node->bgcol == -1 && node->pic != NULL && node->usesavebg != 1)
    4496                         {
    4497                                 debug(555, "add 2 %s->%s: %s", node->name, child->name, child->text);
    4498 //                              printf("add 2 %s->%s: %s\n",node->name,child->name,child->text);
    4499                                 child->usesavebg = 2;
    4500                         }
    4501                         else
    4502                         {
    4503                                 debug(555, "skip %s->%s: %s", node->name, child->name, child->text);
    4504 //                              printf("skip %s->%s: %s\n",node->name,child->name,child->text);
    4505                         }                       
    4506 //printf("2child->usesavebg=%d\n",child->usesavebg);
    4507 
    4508 
    4509                         drawnode(child, 1);
    4510 //printf("ccccccccccc\n");
    4511                         drawnodepart(tmp, node, parent, child, 1);
    4512 //printf("ddddddddddd\n");
    4513                         child->flag = clearbit(child->flag, 1);
    4514                         child = child->drawnext;
    4515                 }
    4516         }
    4517 
    4518         if(screencalc == 0 || flag == 4) node->flag = clearbit(node->flag, 1);
    45193948
    45203949        if(flag == 0 || flag == 2 || flag == 4)
     
    45263955
    45273956                        if(merkskinfb != NULL)
    4528                         {
     3957                        {       
    45293958                                if(node->name != NULL && ostrstr(node->name, "LCD_spf") != NULL)
    45303959                                        write_FB_to_JPEG_file(skinfb->fb, skinfb->width, skinfb->height, "/tmp/titanlcd.jpg", 75);
     
    45834012        if(node != NULL)
    45844013        {
     4014                free(node->input);
    45854015                if(text != NULL)
    45864016                {
    45874017                        if((node->type & INPUTBOXNUM) && node->mask != NULL && strlen(text) == 0)
    4588                         {
    4589                                 if(ostrcmp(node->input, node->mask) != 0) node->flag = setbit(node->flag, 1);
    4590                                 free(node->input);
    45914018                                node->input = strdup(node->mask);
    4592                         }
    45934019                        else
    4594                         {
    4595                                 if(ostrcmp(node->input, text) != 0) node->flag = setbit(node->flag, 1);
    4596                                 free(node->input);
    45974020                                node->input = strdup(text);
    4598                         }
    45994021                }
    46004022                else
    46014023                {
    46024024                        if((node->type & INPUTBOXNUM) && node->mask != NULL)
    4603                         {
    4604                                 if(ostrcmp(node->input, node->mask) != 0) node->flag = setbit(node->flag, 1);
    4605                                 free(node->input);
    46064025                                node->input = strdup(node->mask);
    4607                         }
    46084026                        else
    4609                         {
    4610                                 if(ostrcmp(node->input, text) != 0) node->flag = setbit(node->flag, 1);
    4611                                 free(node->input);
    46124027                                node->input = text;
    4613                         }
    46144028                }
    46154029                ret = 0;
     
    46254039        if(node != NULL)
    46264040        {
     4041                free(node->text);
    46274042                if(text != NULL)
    4628                 {
    4629                         if(ostrcmp(node->text, text) != 0) node->flag = setbit(node->flag, 1);
    4630                         free(node->text);
    46314043                        node->text = strdup(text);
    4632                 }
    46334044                else
    4634                 {
    4635                         if(node->text != NULL) node->flag = setbit(node->flag, 1);
    4636                         free(node->text);
    46374045                        node->text = text;
    4638                 }
    46394046                ret = 0;
    46404047        }
     
    46494056        if(node != NULL)
    46504057        {
     4058                free(node->text2);
    46514059                if(text != NULL)
    4652                 {
    4653                         if(ostrcmp(node->text2, text) != 0) node->flag = setbit(node->flag, 1);
    4654                         free(node->text2);
    46554060                        node->text2 = strdup(text);
    4656                 }
    46574061                else
    4658                 {
    4659                         if(node->text2 != NULL) node->flag = setbit(node->flag, 1);
    4660                         free(node->text2);
    46614062                        node->text2 = text;
    4662                 }
    46634063                ret = 0;
    46644064        }
     
    46934093        if(node != NULL)
    46944094        {
     4095                free(node->pic);
    46954096                if(text != NULL)
    46964097                {
    4697                         char* tmpstr = changepicpath(text);
    4698                         if(ostrcmp(node->pic, tmpstr) != 0) node->flag = setbit(node->flag, 1);
    4699                         free(node->pic);
    47004098                        node->picmem = 1;
    4701                         node->pic = tmpstr;
     4099                        node->pic = changepicpath(text);
    47024100
    47034101                        if(getpic(node->pic) == NULL)
     
    47144112                }
    47154113                else
    4716                 {
    4717                         if(node->pic != NULL) node->flag = setbit(node->flag, 1);
    4718                         free(node->pic);
    47194114                        node->pic = text;
    4720                 }
    47214115                ret = 0;
    47224116        }
     
    47324126        {
    47334127                node->picmem = 0;
     4128                free(node->pic);
    47344129                if(text != NULL)
    4735                 {
    4736                         char* tmpstr = changepicpath(text);
    4737                         if(ostrcmp(node->pic, tmpstr) != 0) node->flag = setbit(node->flag, 1);
    4738                         free(node->pic);
    4739                         node->pic = tmpstr;
    4740                 }
     4130                        node->pic = changepicpath(text);
    47414131                else
    4742                 {
    4743                         if(node->pic != NULL) node->flag = setbit(node->flag, 1);
    4744                         free(node->pic);
    47454132                        node->pic = text;
    4746                 }
    47474133                ret = 0;
    47484134        }
     
    47574143        if(node != NULL)
    47584144        {
     4145                free(node->selectpic);
    47594146                if(text != NULL)
    4760                 {
    4761                         char* tmpstr = changepicpath(text);
    4762                         if(ostrcmp(node->selectpic, tmpstr) != 0) node->flag = setbit(node->flag, 1);
    4763                         free(node->selectpic);
    4764                         node->selectpic = tmpstr;
    4765                 }
     4147                        node->selectpic = changepicpath(text);
    47664148                else
    4767                 {
    4768                         if(node->selectpic != NULL) node->flag = setbit(node->flag, 1);
    4769                         free(node->selectpic);
    47704149                        node->selectpic = text;
    4771                 }
    47724150                ret = 0;
    47734151        }
     
    47824160        if(node != NULL)
    47834161        {
     4162                free(node->title);
    47844163                if(text != NULL)
    47854164                {
    4786                         if(ostrcmp(node->title, text) != 0) node->flag = setbit(node->flag, 1);
    4787                         free(node->title);
    47884165                        node->title = strdup(text);
    47894166                        node->titlesize = node->fontsize + 6;
     
    47914168                else
    47924169                {
    4793                         if(node->title != NULL) node->flag = setbit(node->flag, 1);
    4794                         free(node->title);
    47954170                        node->title = text;
    47964171                        node->titlesize = 0;
     
    48514226        if(node != NULL)
    48524227        {
     4228                free(node->parent);
    48534229                if(text != NULL)
    4854                 {
    4855                         if(ostrcmp(node->parent, text) != 0) node->flag = setbit(node->flag, 1);
    4856                         free(node->parent);
    48574230                        node->parent = strdup(text);
    4858                 }
    48594231                else
    4860                 {
    4861                         if(node->parent != NULL) node->flag = setbit(node->flag, 1);
    4862                         free(node->parent);
    48634232                        node->parent = text;
    4864                 }
    48654233                ret = 0;
    48664234        }
     
    48754243        if(node != NULL)
    48764244        {
     4245                free(node->font);
    48774246                if(text != NULL)
    4878                 {
    4879                         if(ostrcmp(node->font, text) != 0) node->flag = setbit(node->flag, 1);
    4880                         free(node->font);
    48814247                        node->font = strdup(text);
    4882                 }
    48834248                else
    4884                 {
    4885                         if(node->font != NULL) node->flag = setbit(node->flag, 1);
    4886                         free(node->font);
    48874249                        node->font = text;
    4888                 }
    48894250                ret = 0;
    48904251        }
     
    49334294        if(node != NULL)
    49344295        {
     4296                free(node->choiceboxvalue);
    49354297                if(text != NULL)
    4936                 {
    4937                         if(ostrcmp(node->choiceboxvalue, text) != 0) node->flag = setbit(node->flag, 1);
    4938                         free(node->choiceboxvalue);
    49394298                        node->choiceboxvalue = strdup(text);
    4940                 }
    49414299                else
    4942                 {
    4943                         if(node->choiceboxvalue != NULL) node->flag = setbit(node->flag, 1);
    4944                         free(node->choiceboxvalue);
    49454300                        node->choiceboxvalue = text;
    4946                 }
    49474301                ret = 0;
    49484302        }
  • titan/titan/struct.h

    r28446 r28462  
    15091509        unsigned int drawscreencount;
    15101510        int autoseek;
     1511        //skip all rc input events older than this value in millisec
     1512        int rcskipms;
    15111513} status;
    15121514
Note: See TracChangeset for help on using the changeset viewer.