Changeset 10cb47e in mainline for uspace/app
- Timestamp:
- 2016-08-31T15:43:01Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bdfdc51c
- Parents:
- 58563585
- Location:
- uspace/app
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/barber/barber.c
r58563585 r10cb47e 308 308 309 309 winreg = argv[1]; 310 window_t *main_window = window_open(argv[1], 310 window_t *main_window = window_open(argv[1], NULL, 311 311 WINDOW_MAIN | WINDOW_DECORATED, "barber"); 312 312 if (!main_window) { … … 315 315 } 316 316 317 frame_canvas = create_canvas(window_root(main_window), 317 frame_canvas = create_canvas(window_root(main_window), NULL, 318 318 FRAME_WIDTH, FRAME_HEIGHT, frames[frame]); 319 319 -
uspace/app/fontviewer/fontviewer.c
r58563585 r10cb47e 260 260 } 261 261 262 main_window = window_open(argv[1], WINDOW_MAIN, "fontviewer");262 main_window = window_open(argv[1], NULL, WINDOW_MAIN, "fontviewer"); 263 263 if (!main_window) { 264 264 printf("Cannot open main window.\n"); … … 282 282 } 283 283 284 canvas = create_canvas(window_root(main_window), 284 canvas = create_canvas(window_root(main_window), NULL, 285 285 WINDOW_WIDTH, WINDOW_HEIGHT, surface); 286 286 if (canvas == NULL) { -
uspace/app/vdemo/vdemo.c
r58563585 r10cb47e 85 85 lbl->confirm = on_confirm; 86 86 lbl->cancel = on_cancel; 87 bool initialized = init_label( 88 &lbl->label, parent, caption,points, background, foreground);87 bool initialized = init_label(&lbl->label, parent, NULL, caption, 88 points, background, foreground); 89 89 lbl->label.widget.destroy = my_label_destroy; 90 90 return initialized; … … 110 110 { 111 111 if (argc >= 2) { 112 window_t *main_window = window_open(argv[1], 112 window_t *main_window = window_open(argv[1], NULL, 113 113 WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vdemo"); 114 114 if (!main_window) { … … 128 128 my_label_t *lbl_action = create_my_label(NULL, "Hello there!", 16, 129 129 lbl_bg, lbl_text); 130 button_t *btn_confirm = create_button(NULL, "Confirm", 16, btn_bg, 131 btn_fg, btn_text); 132 button_t *btn_cancel = create_button(NULL, "Cancel", 16, btn_bg, 133 btn_fg, btn_text); 134 grid_t *grid = create_grid(window_root(main_window), 2, 2, grd_bg); 130 button_t *btn_confirm = create_button(NULL, NULL, "Confirm", 16, 131 btn_bg, btn_fg, btn_text); 132 button_t *btn_cancel = create_button(NULL, NULL, "Cancel", 16, 133 btn_bg, btn_fg, btn_text); 134 grid_t *grid = create_grid(window_root(main_window), NULL, 2, 2, 135 grd_bg); 135 136 if (!lbl_action || !btn_confirm || !btn_cancel || !grid) { 136 137 window_close(main_window); -
uspace/app/viewer/viewer.c
r58563585 r10cb47e 157 157 } 158 158 } else { 159 canvas = create_canvas(window_root(main_window), 159 canvas = create_canvas(window_root(main_window), NULL, 160 160 img_width, img_height, local_surface); 161 161 if (canvas == NULL) { … … 219 219 flags |= WINDOW_DECORATED; 220 220 221 main_window = window_open(argv[1], flags, "viewer");221 main_window = window_open(argv[1], NULL, flags, "viewer"); 222 222 if (!main_window) { 223 223 printf("Cannot open main window.\n"); -
uspace/app/vlaunch/vlaunch.c
r58563585 r10cb47e 85 85 } 86 86 87 static void on_ vterm(widget_t *widget, void *data)87 static void on_btn_click(widget_t *widget, void *data) 88 88 { 89 app_launch("/app/vterm"); 90 } 91 92 static void on_vdemo(widget_t *widget, void *data) 93 { 94 app_launch("/app/vdemo"); 95 } 96 97 static void on_vlaunch(widget_t *widget, void *data) 98 { 99 app_launch("/app/vlaunch"); 89 const char *app = (const char *) widget_get_data(widget); 90 app_launch(app); 100 91 } 101 92 … … 114 105 115 106 winreg = argv[1]; 116 window_t *main_window = window_open(argv[1], 107 window_t *main_window = window_open(argv[1], NULL, 117 108 WINDOW_MAIN | WINDOW_DECORATED | WINDOW_RESIZEABLE, "vlaunch"); 118 109 if (!main_window) { … … 130 121 pixel_t lbl_text = PIXEL(255, 0, 0, 0); 131 122 132 canvas_t *logo_canvas = create_canvas(NULL, LOGO_WIDTH, LOGO_HEIGHT,123 canvas_t *logo_canvas = create_canvas(NULL, NULL, LOGO_WIDTH, LOGO_HEIGHT, 133 124 logo); 134 label_t *lbl_caption = create_label(NULL, "Launch application:", 16,135 lbl_bg, lbl_text);136 button_t *btn_vterm = create_button(NULL, " vterm", 16, btn_bg,137 btn_fg, btn_text);138 button_t *btn_vdemo = create_button(NULL, " vdemo", 16, btn_bg,139 btn_fg, btn_text);140 button_t *btn_vlaunch = create_button(NULL, " vlaunch", 16, btn_bg,141 btn_fg, btn_text);142 grid_t *grid = create_grid(window_root(main_window), 1, 5, grd_bg);125 label_t *lbl_caption = create_label(NULL, NULL, "Launch application:", 126 16, lbl_bg, lbl_text); 127 button_t *btn_vterm = create_button(NULL, "/app/vterm", "vterm", 128 16, btn_bg, btn_fg, btn_text); 129 button_t *btn_vdemo = create_button(NULL, "/app/vdemo", "vdemo", 130 16, btn_bg, btn_fg, btn_text); 131 button_t *btn_vlaunch = create_button(NULL, "/app/vlaunch", "vlaunch", 132 16, btn_bg, btn_fg, btn_text); 133 grid_t *grid = create_grid(window_root(main_window), NULL, 1, 5, grd_bg); 143 134 144 135 if ((!logo_canvas) || (!lbl_caption) || (!btn_vterm) || … … 149 140 } 150 141 151 sig_connect(&btn_vterm->clicked, NULL, on_vterm);152 sig_connect(&btn_vdemo->clicked, NULL, on_vdemo);153 sig_connect(&btn_vlaunch->clicked, NULL, on_vlaunch);142 sig_connect(&btn_vterm->clicked, &btn_vterm->widget, on_btn_click); 143 sig_connect(&btn_vdemo->clicked, &btn_vdemo->widget, on_btn_click); 144 sig_connect(&btn_vlaunch->clicked, &btn_vlaunch->widget, on_btn_click); 154 145 155 146 grid->add(grid, &logo_canvas->widget, 0, 0, 1, 1); -
uspace/app/vterm/vterm.c
r58563585 r10cb47e 49 49 } 50 50 51 window_t *main_window = window_open(argv[1], 51 window_t *main_window = window_open(argv[1], NULL, 52 52 WINDOW_MAIN | WINDOW_DECORATED, "vterm"); 53 53 if (!main_window) { … … 58 58 window_resize(main_window, 0, 0, 648, 508, WINDOW_PLACEMENT_ANY); 59 59 terminal_t *terminal_widget = 60 create_terminal(window_root(main_window), 640, 480);60 create_terminal(window_root(main_window), NULL, 640, 480); 61 61 if (!terminal_widget) { 62 62 window_close(main_window);
Note:
See TracChangeset
for help on using the changeset viewer.