Changeset c9a7adc in mainline for uspace/app/uidemo/uidemo.c
- Timestamp:
- 2020-10-14T17:32:49Z (5 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4ed00d3
- Parents:
- f6df5a3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/uidemo/uidemo.c
rf6df5a3 rc9a7adc 34 34 35 35 #include <display.h> 36 #include <gfx/color.h> 37 #include <gfx/coord.h> 38 #include <gfx/render.h> 36 39 #include <stdio.h> 37 40 #include <str.h> … … 135 138 ui_demo_t demo; 136 139 gfx_rect_t rect; 140 gfx_color_t *color = NULL; 137 141 errno_t rc; 138 142 … … 184 188 ui_pbutton_set_rect(demo.pb1, &rect); 185 189 190 ui_pbutton_set_default(demo.pb1, true); 191 186 192 rc = ui_pbutton_create(ui_res, "Cancel", &demo.pb2); 187 193 if (rc != EOK) { … … 195 201 rect.p1.y = 80; 196 202 ui_pbutton_set_rect(demo.pb2, &rect); 203 204 rc = gfx_color_new_rgb_i16(0xc8c8, 0xc8c8, 0xc8c8, &color); 205 if (rc != EOK) { 206 printf("Error allocating color.\n"); 207 return rc; 208 } 209 210 rc = gfx_set_color(gc, color); 211 if (rc != EOK) { 212 printf("Error setting color.\n"); 213 return rc; 214 } 215 216 rc = gfx_fill_rect(gc, ¶ms.rect); 217 if (rc != EOK) { 218 printf("Error filling background.\n"); 219 return rc; 220 } 221 222 gfx_color_delete(color); 223 color = NULL; 197 224 198 225 rc = ui_pbutton_paint(demo.pb1);
Note:
See TracChangeset
for help on using the changeset viewer.