Exemplo n.º 1
0
/*
 * Function    : _libaroma_window_ui_thread
 * Return Value: byte
 * Descriptions: window ui thread
 */
byte _libaroma_window_ui_thread(LIBAROMA_WINDOWP win) {
  int i;
  byte need_sync = 0;
  if (win->active==1){
#ifdef LIBAROMA_CONFIG_OPENMP
  #pragma omp parallel for
#endif
    for (i=0;i<win->childn;i++){
      LIBAROMA_CONTROLP c=win->childs[i];
      if (c->handler->thread!=NULL){
        if (c->handler->thread(c)){
          if (libaroma_control_draw(c,0)){
            libaroma_wm_updatesync(
              c->x+win->x,
              c->y+win->y,
              c->w,
              c->h,
              0
            );
            need_sync=1;
          }
        }
      }
    }
  }
  return need_sync;
} /* End of _libaroma_window_ui_thread */
Exemplo n.º 2
0
/*
 * Function    : _libaroma_ctl_pager_window_invalidate
 * Return Value: byte
 * Descriptions: window invalidate
 */
byte _libaroma_ctl_pager_window_invalidate(LIBAROMA_WINDOWP win, byte sync){
  LIBAROMA_CONTROLP ctl=(LIBAROMA_CONTROLP) win->client_data;
  _LIBAROMA_CTL_CHECK(
    _libaroma_ctl_pager_handler, _LIBAROMA_CTL_PAGERP, 0
  );
  if (me->win!=win){
    return 0;
  }
  if ((me->win->dc)&&(me->win->bg)){
    libaroma_draw(me->win->dc,me->win->bg,0,0,0);
    /* draw childs */
    int i;
#ifdef LIBAROMA_CONFIG_OPENMP
  #pragma omp parallel for
#endif
    for (i=0;i<win->childn;i++){
      /* draw no sync */
      libaroma_control_draw(win->childs[i], 0);
    }
  }
  if (sync){
    return _libaroma_ctl_pager_window_sync(win,0,0,win->w,win->h);
  }
  return 1;
} /* End of _libaroma_ctl_pager_window_invalidate */
Exemplo n.º 3
0
/*
 * Function    : libaroma_window_invalidate
 * Return Value: byte
 * Descriptions: invalidate window drawing
 */
byte libaroma_window_invalidate(LIBAROMA_WINDOWP win, byte sync){
  __CHECK_WM(0);
  if (win==NULL){
    ALOGW("window_invalidate win is null");
    return 0;
  }
  if (win->handler!=NULL){
    if (win->handler->invalidate!=NULL){
      return win->handler->invalidate(win,sync);
    }
  }
  if (win->parent!=NULL){
    return 0;
  }
  
  if (!libaroma_window_isactive(win)){
    ALOGW("window_invalidate win is not active window");
    return 0;
  }
  if (win->dc==NULL){
    ALOGW("window_invalidate dc is null");
    return 0;
  }
  
  if ((!win->lock_sync)||(sync==10)){
    /* draw bg */
    libaroma_draw(
      win->dc,
      win->bg,
      0, 0, 1);
    
    /* draw childs */
    int i;
#ifdef LIBAROMA_CONFIG_OPENMP
  #pragma omp parallel for
#endif
    for (i=0;i<win->childn;i++){
      /* draw no sync */
      libaroma_control_draw(win->childs[i], 0);
    }
  
    /* sync */
    if (sync){
      libaroma_window_sync(win, 0, 0, win->w, win->h);
    }
  }
  return 1;
} /* End of libaroma_window_invalidate */
Exemplo n.º 4
0
/*
 * Function    : _libaroma_ctl_fragment_window_invalidate
 * Return Value: byte
 * Descriptions: window invalidate
 */
byte _libaroma_ctl_fragment_window_invalidate(LIBAROMA_WINDOWP win, byte sync){
  _VALIDATE_FRAGMENT(0);
  if ((win->dc)&&(win->bg)){
    libaroma_draw(win->dc,win->bg,0,0,0);
    int i;
#ifdef LIBAROMA_CONFIG_OPENMP
  #pragma omp parallel for
#endif
    for (i=0;i<win->childn;i++){
      /* draw no sync */
      libaroma_control_draw(win->childs[i], 0);
    }
  }
  if (sync){
    return _libaroma_ctl_fragment_window_sync(win,0,0,win->w,win->h);
  }
  return 1;
} /* End of _libaroma_ctl_fragment_window_invalidate */