Lines Matching defs:pane

312                           xoffset + (gr->pane->max_num_vertices - gr->index - 1) * 2 - 1,
327 const struct hud_pane *pane)
333 const unsigned last_line = pane->last_line;
337 pane->x1, pane->y1,
338 pane->x2, pane->y2);
342 unsigned x = pane->x2 + 2;
343 unsigned y = pane->inner_y1 +
344 pane->inner_height * (last_line - i) / last_line -
347 number_to_human_readable(pane->max_value * i / last_line,
348 pane->type, str);
352 /* draw info below the pane */
354 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
355 unsigned x = pane->x1 + 2;
356 unsigned y = pane->y2 + 2 + i*hud->font.glyph_height;
358 number_to_human_readable(gr->current_value, pane->type, str);
365 line_verts[num++] = (float) pane->x1;
366 line_verts[num++] = (float) pane->y1;
367 line_verts[num++] = (float) pane->x2;
368 line_verts[num++] = (float) pane->y1;
370 line_verts[num++] = (float) pane->x2;
371 line_verts[num++] = (float) pane->y1;
372 line_verts[num++] = (float) pane->x2;
373 line_verts[num++] = (float) pane->y2;
375 line_verts[num++] = (float) pane->x1;
376 line_verts[num++] = (float) pane->y2;
377 line_verts[num++] = (float) pane->x2;
378 line_verts[num++] = (float) pane->y2;
380 line_verts[num++] = (float) pane->x1;
381 line_verts[num++] = (float) pane->y1;
382 line_verts[num++] = (float) pane->x1;
383 line_verts[num++] = (float) pane->y2;
387 float y = round((pane->max_value * i / (double)last_line) *
388 pane->yscale + pane->inner_y2);
391 line_verts[num++] = pane->x1;
393 line_verts[num++] = pane->x2;
402 const struct hud_pane *pane)
408 /* draw info below the pane */
410 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
411 unsigned x = pane->x1;
412 unsigned y = pane->y_simple + i*hud->font.glyph_height;
414 number_to_human_readable(gr->current_value, pane->type, str);
422 const struct hud_pane *pane)
427 /* draw colored quads below the pane */
429 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
430 unsigned x = pane->x1 + 2;
431 unsigned y = pane->y2 + 2 + i*hud->font.glyph_height;
439 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
440 hud_draw_graph_line_strip(hud, gr, pane->inner_x1, pane->inner_y2, pane->yscale);
468 struct hud_pane *pane;
606 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) {
607 if (pane)
608 hud_pane_draw_colored_objects(hud, pane);
628 struct hud_pane *pane;
634 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) {
635 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
646 struct hud_pane *pane;
682 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) {
683 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
687 if (pane->sort_items) {
688 LIST_FOR_EACH_ENTRY_SAFE(gr, next, &pane->graph_list, head) {
690 if (&gr->head == pane->graph_list.prev)
705 hud_pane_accumulate_vertices_simple(hud, pane);
707 hud_pane_accumulate_vertices(hud, pane);
768 hud_pane_set_max_value(struct hud_pane *pane, uint64_t value)
786 fixup_bytes(pane->type, i + 1, &exp10);
795 fixup_bytes(pane->type, i + 1, &exp10);
800 pane->last_line = 5; /* lines in +1/5 increments */
803 pane->last_line = 8; /* lines in +1/4 increments. */
807 pane->last_line = leftmost_digit * 2; /* lines in +1/2 increments */
813 pane->last_line = leftmost_digit; /* lines in +1 increments */
823 pane->last_line = leftmost_digit * 2; /* lines in +1/2 increments. */
832 pane->last_line = 5 + i; /* lines in +1/5 increments. */
838 pane->max_value = leftmost_digit * exp10;
839 pane->yscale = -(int)pane->inner_height / (float)pane->max_value;
843 hud_pane_update_dyn_ceiling(struct hud_graph *gr, struct hud_pane *pane)
848 if (pane->dyn_ceil_last_ran != gr->index) {
849 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
857 tmp = tmp > pane->initial_max_value ? tmp : pane->initial_max_value;
858 hud_pane_set_max_value(pane, tmp);
863 * again needlessly in case the pane has more than one graph.
865 pane->dyn_ceil_last_ran = gr->index;
875 struct hud_pane *pane = CALLOC_STRUCT(hud_pane);
877 if (!pane)
880 pane->hud = hud;
881 pane->x1 = x1;
882 pane->y1 = y1;
883 pane->x2 = x2;
884 pane->y2 = y2;
885 pane->y_simple = y_simple;
886 pane->inner_x1 = x1 + 1;
887 pane->inner_x2 = x2 - 1;
888 pane->inner_y1 = y1 + 1;
889 pane->inner_y2 = y2 - 1;
890 pane->inner_width = pane->inner_x2 - pane->inner_x1;
891 pane->inner_height = pane->inner_y2 - pane->inner_y1;
892 pane->period = period;
893 pane->max_num_vertices = (x2 - x1 + 2) / 2;
894 pane->ceiling = ceiling;
895 pane->dyn_ceiling = dyn_ceiling;
896 pane->dyn_ceil_last_ran = 0;
897 pane->sort_items = sort_items;
898 pane->initial_max_value = max_value;
899 hud_pane_set_max_value(pane, max_value);
900 list_inithead(&pane->graph_list);
901 return pane;
916 * Add a graph to an existing pane.
917 * One pane can contain multiple graphs over each other.
920 hud_pane_add_graph(struct hud_pane *pane, struct hud_graph *gr)
939 unsigned color = pane->next_color % ARRAY_SIZE(colors);
943 gr->vertices = MALLOC(pane->max_num_vertices * sizeof(float) * 2);
947 gr->pane = pane;
948 list_addtail(&gr->head, &pane->graph_list);
949 pane->num_graphs++;
950 pane->next_color++;
957 value = value > gr->pane->ceiling ? gr->pane->ceiling : value;
968 if (gr->index == gr->pane->max_num_vertices) {
977 if (gr->num_vertices < gr->pane->max_num_vertices) {
981 if (gr->pane->dyn_ceiling == true) {
982 hud_pane_update_dyn_ceiling(gr, gr->pane);
984 if (value > gr->pane->max_value) {
985 hud_pane_set_max_value(gr->pane, value);
1186 struct hud_pane *pane = NULL;
1225 * Keep track of overall column width to avoid pane overlapping in case
1226 * later we create a new column while the bottom pane in the current
1231 if (!pane) {
1232 pane = hud_pane_create(hud, x, y, x + width, y + height, y_simple,
1234 if (!pane)
1239 pane->next_color = 0;
1249 hud_fps_graph_install(pane);
1252 hud_frametime_graph_install(pane);
1255 hud_cpu_graph_install(pane, ALL_CPUS);
1258 hud_cpu_graph_install(pane, i);
1261 hud_thread_busy_install(pane, name, false);
1264 hud_thread_counter_install(pane, name, HUD_COUNTER_OFFLOADED);
1267 hud_thread_counter_install(pane, name, HUD_COUNTER_DIRECT);
1270 hud_thread_counter_install(pane, name, HUD_COUNTER_SYNCS);
1273 hud_thread_busy_install(pane, name, true);
1277 hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_RX);
1280 hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_TX);
1283 hud_nic_graph_install(pane, arg_name, NIC_RSSI_DBM);
1284 pane->type = PIPE_DRIVER_QUERY_TYPE_DBM;
1287 hud_diskstat_graph_install(pane, arg_name, DISKSTAT_RD);
1288 pane->type = PIPE_DRIVER_QUERY_TYPE_BYTES;
1291 hud_diskstat_graph_install(pane, arg_name, DISKSTAT_WR);
1292 pane->type = PIPE_DRIVER_QUERY_TYPE_BYTES;
1295 hud_cpufreq_graph_install(pane, i, CPUFREQ_MINIMUM);
1296 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ;
1299 hud_cpufreq_graph_install(pane, i, CPUFREQ_CURRENT);
1300 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ;
1303 hud_cpufreq_graph_install(pane, i, CPUFREQ_MAXIMUM);
1304 pane->type = PIPE_DRIVER_QUERY_TYPE_HZ;
1309 hud_sensors_temp_graph_install(pane, arg_name,
1311 pane->type = PIPE_DRIVER_QUERY_TYPE_TEMPERATURE;
1314 hud_sensors_temp_graph_install(pane, arg_name,
1316 pane->type = PIPE_DRIVER_QUERY_TYPE_TEMPERATURE;
1319 hud_sensors_temp_graph_install(pane, arg_name,
1321 pane->type = PIPE_DRIVER_QUERY_TYPE_VOLTS;
1324 hud_sensors_temp_graph_install(pane, arg_name,
1326 pane->type = PIPE_DRIVER_QUERY_TYPE_AMPS;
1329 hud_sensors_temp_graph_install(pane, arg_name,
1331 pane->type = PIPE_DRIVER_QUERY_TYPE_WATTS;
1336 hud_pipe_query_install(&hud->batch_query, pane,
1345 hud_pipe_query_install(&hud->batch_query, pane,
1375 hud_pipe_query_install(&hud->batch_query, pane, name,
1386 if (!hud_driver_query_install(&hud->batch_query, pane,
1398 if (!pane) {
1409 hud_pane_set_max_value(pane, i);
1410 pane->initial_max_value = i;
1422 if (!pane) {
1433 if (added && !list_is_empty(&pane->graph_list)) {
1435 graph = list_entry(pane->graph_list.prev, struct hud_graph, head);
1452 if (!pane)
1455 y += height + hud->font.glyph_height * (pane->num_graphs + 2);
1456 y_simple += hud->font.glyph_height * (pane->num_graphs + 1);
1459 if (pane && pane->num_graphs) {
1460 list_addtail(&pane->head, &hud->pane_list);
1461 pane = NULL;
1472 if (pane && pane->num_graphs) {
1473 list_addtail(&pane->head, &hud->pane_list);
1474 pane = NULL;
1486 /* Reset to defaults for the next pane in case these were modified. */
1494 if (pane) {
1495 if (pane->num_graphs) {
1496 list_addtail(&pane->head, &hud->pane_list);
1499 FREE(pane);
1503 LIST_FOR_EACH_ENTRY(pane, &hud->pane_list, head) {
1506 LIST_FOR_EACH_ENTRY(gr, &pane->graph_list, head) {
1520 puts(" in panes. Multiple graphs can be drawn in the same pane.");
1523 puts(" '+' separates names which will share a pane.");
1525 puts(" for the given pane.");
1526 puts(" ',' creates a new pane below the last one.");
1527 puts(" ';' creates a new pane at the top of the next column.");
1535 puts(" of a pane, along with limiting overall maximum value of the");
1537 puts(" Several modifiers may be applied to the same pane simultaneously.");
1539 puts(" 'x[value]' sets the location of the pane on the x axis relative");
1541 puts(" 'y[value]' sets the location of the pane on the y axis relative");
1790 struct hud_pane *pane, *pane_tmp;
1796 LIST_FOR_EACH_ENTRY_SAFE(pane, pane_tmp, &hud->pane_list, head) {
1797 LIST_FOR_EACH_ENTRY_SAFE(graph, graph_tmp, &pane->graph_list, head) {
1801 list_del(&pane->head);
1802 FREE(pane);