Changeset d284ce9 in mainline for uspace/lib/ui/src/ui.c


Ignore:
Timestamp:
2020-10-27T21:56:15Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f03d1308
Parents:
f7a90df
Message:

Let ui_window handle window decoration, display window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/ui/src/ui.c

    rf7a90df rd284ce9  
    3636#include <display.h>
    3737#include <errno.h>
     38#include <fibril.h>
    3839#include <stdlib.h>
    3940#include <ui/ui.h>
     
    6566        ui->display = display;
    6667        ui->myoutput = true;
     68        *rui = ui;
    6769        return EOK;
    6870}
     
    101103}
    102104
     105/** Execute user interface.
     106 *
     107 * This function returns once the application starts the termination
     108 * process by calling ui_quit(@a ui).
     109 *
     110 * @param ui User interface
     111 */
     112void ui_run(ui_t *ui)
     113{
     114        while (!ui->quit)
     115                fibril_usleep(100000);
     116}
     117
     118/** Terminate user interface.
     119 *
     120 * Calling this function causes the user interface to terminate
     121 * (i.e. exit from ui_run()). This would be typically called from
     122 * an event handler.
     123 *
     124 * @param ui User interface
     125 */
     126void ui_quit(ui_t *ui)
     127{
     128        ui->quit = true;
     129}
     130
    103131/** @}
    104132 */
Note: See TracChangeset for help on using the changeset viewer.