Lines Matching refs:ip
45 static void InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win);
173 IconMgr *ip;
184 ip = Active->iconmgr;
193 tmp = ip->first;
199 tmp = ip->last;
231 new_row = ip->cur_rows - 1;
233 new_col = ip->cur_columns - 1;
234 if (new_row >= ip->cur_rows)
236 if (new_col >= ip->cur_columns)
242 for (tmp = ip->first; tmp != NULL; tmp = tmp->next) {
260 if (ip->twm_win->mapped) {
261 XRaiseWindow(dpy, ip->twm_win->frame);
288 IconMgr *ip, *tmp_ip = NULL;
296 #define TEST(ip) if ((ip)->count != 0 && (ip)->twm_win->mapped) \
299 ip = Active->iconmgr;
300 for (tmp_ip = ITER(ip); tmp_ip; tmp_ip = ITER(tmp_ip)) {
305 int origscreen = ip->scr->screen;
357 IconMgr *ip;
369 if ((ip = (IconMgr *) LookInList(Scr->IconMgrs, tmp_win->full_name,
371 ip = &Scr->iconmgr;
374 tmp->iconmgr = ip;
379 InsertInIconManager(ip, tmp, tmp_win);
398 ip->height = h * ip->count;
399 tmp->me = ip->count;
410 tmp->w = XCreateWindow(dpy, ip->w, 0, 0, (unsigned int) 1,
429 ip->count += 1;
430 PackIconManager(ip);
440 if (!ip->twm_win->icon) {
441 XMapWindow(dpy, ip->w);
442 XMapWindow(dpy, ip->twm_win->frame);
454 * \param ip the icon manager pointer
458 InsertInIconManager(IconMgr *ip, WList *tmp, TwmWindow *tmp_win)
466 if (ip->first == NULL) {
467 ip->first = tmp;
469 ip->last = tmp;
473 for (tmp1 = ip->first; tmp1 != NULL; tmp1 = tmp1->next) {
479 ip->first = tmp;
489 ip->last->next = tmp;
490 tmp->prev = ip->last;
491 ip->last = tmp;
496 RemoveFromIconManager(IconMgr *ip, WList *tmp)
499 ip->first = tmp->next;
504 ip->last = tmp->prev;
516 IconMgr *ip;
524 ip = tmp->iconmgr;
526 RemoveFromIconManager(ip, tmp);
535 ip->count -= 1;
538 PackIconManager(ip);
540 if (ip->count == 0) {
541 XUnmapWindow(dpy, ip->twm_win->frame);
588 * \param ip a pointer to the icon manager structure
591 SortIconManager(IconMgr *ip)
598 if (ip == NULL)
599 ip = Active->iconmgr;
603 for (tmp1 = ip->first; tmp1 != NULL; tmp1 = tmp1->next) {
610 RemoveFromIconManager(ip, tmp2);
611 InsertInIconManager(ip, tmp2, tmp2->twm);
617 PackIconManager(ip);
624 * \param ip a pointer to the icon manager structure
627 PackIconManager(IconMgr *ip)
637 wwidth = ip->width / ip->columns;
643 col = ip->columns;
646 for (i = 0, tmp = ip->first; tmp != NULL; i++, tmp = tmp->next) {
650 if (++col >= ip->columns) {
677 ip->cur_rows = row;
678 ip->cur_columns = maxcol;
679 ip->height = row * rowinc;
680 if (ip->height == 0)
681 ip->height = rowinc;
686 XResizeWindow(dpy, ip->w, (unsigned) newwidth, (unsigned) ip->height);
688 savewidth = ip->width;
689 if (ip->twm_win)
690 SetupWindow(ip->twm_win,
691 ip->twm_win->frame_x, ip->twm_win->frame_y,
692 newwidth, ip->height + ip->twm_win->title_height, -1);
693 ip->width = savewidth;