Lines Matching defs:nitems
254 unsigned long nitems;
262 result = get_property_value(wnd, "WM_STATE", 64, &nitems, &props, 1);
263 if ((result >= 0) && nitems)
276 nitems = 1;
280 nitems = 2;
284 32, PropModeAppend, (unsigned char *) atoms, nitems);
291 if (get_property_value(wnd, "_NET_WM_STATE", 64, &nitems, &props, 1) < 0)
296 for (i = 0; i < nitems; i++)
300 if (i != (nitems - 1))
302 sizeof(Atom) * (nitems - i - 1));
303 nitems--;
309 32, PropModeReplace, (unsigned char *) atoms, nitems);
442 unsigned long nitems, i;
450 if (get_property_value(wnd, "_NET_WM_ICON", 10000, &nitems, &props, 1) >= 0)
454 for (i = 0; i < nitems;)
462 if (i != nitems)
466 new_set = xmalloc((nitems + width * height + 2) * sizeof(unsigned long));
467 memcpy(new_set, cur_set, nitems * sizeof(unsigned long));
468 icon = new_set + nitems;
469 nitems += width * height + 2;
476 nitems = width * height + 2;
493 PropModeReplace, (unsigned char *) (new_set ? new_set : cur_set), nitems);
504 unsigned long nitems, i, icon_size;
511 if (get_property_value(wnd, "_NET_WM_ICON", 10000, &nitems, &props, 1) < 0)
516 for (i = 0; i < nitems;)
524 if (i == nitems)
528 new_set = xmalloc((nitems - icon_size) * sizeof(unsigned long));
532 if (i != nitems - icon_size)
534 (nitems - (i + icon_size)) * sizeof(unsigned long));
536 nitems -= icon_size;
539 PropModeReplace, (unsigned char *) new_set, nitems);