Changeset 2c7fdaa in mainline for uspace/lib


Ignore:
Timestamp:
2015-02-18T02:19:30Z (11 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e3375b, c0c38c7c
Parents:
d8bf1d8
Message:

resize only those windows that declare and support resizing capabilities
introduce generic window flags

Location:
uspace/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/window.c

    rd8bf1d8 r2c7fdaa  
    4040#include <stdio.h>
    4141
    42 int win_register(async_sess_t *sess, service_id_t *in, service_id_t *out)
     42int win_register(async_sess_t *sess, window_flags_t flags, service_id_t *in,
     43    service_id_t *out)
    4344{
    4445        async_exch_t *exch = async_exchange_begin(sess);
    45         int ret = async_req_0_2(exch, WINDOW_REGISTER, in, out);
     46        int ret = async_req_1_2(exch, WINDOW_REGISTER, flags, in, out);
    4647        async_exchange_end(exch);
    4748       
  • uspace/lib/c/include/io/window.h

    rd8bf1d8 r2c7fdaa  
    4242#include <io/kbd_event.h>
    4343#include <io/pos_event.h>
     44
     45typedef enum {
     46        WINDOW_MAIN = 1,
     47        WINDOW_DECORATED = 2,
     48        WINDOW_RESIZEABLE = 4
     49} window_flags_t;
    4450
    4551typedef enum {
     
    108114} window_event_t;
    109115
    110 extern int win_register(async_sess_t *, service_id_t *, service_id_t *);
     116extern int win_register(async_sess_t *, window_flags_t, service_id_t *,
     117    service_id_t *);
    111118
    112119extern int win_get_event(async_sess_t *, window_event_t *);
  • uspace/lib/gui/window.c

    rd8bf1d8 r2c7fdaa  
    591591}
    592592
    593 window_t *window_open(const char *winreg, bool is_main, bool is_decorated,
     593window_t *window_open(const char *winreg, window_flags_t flags,
    594594    const char *caption)
    595595{
     
    598598                return NULL;
    599599       
    600         win->is_main = is_main;
    601         win->is_decorated = is_decorated;
     600        win->is_main = flags & WINDOW_MAIN;
     601        win->is_decorated = flags & WINDOW_DECORATED;
    602602        win->is_focused = true;
    603603        prodcons_initialize(&win->events);
     
    632632        service_id_t in_dsid;
    633633        service_id_t out_dsid;
    634         rc = win_register(reg_sess, &in_dsid, &out_dsid);
     634        rc = win_register(reg_sess, flags, &in_dsid, &out_dsid);
    635635        async_hangup(reg_sess);
    636636        if (rc != EOK) {
  • uspace/lib/gui/window.h

    rd8bf1d8 r2c7fdaa  
    6565 * Allocate all resources for new window and register it in the compositor.
    6666 * If the window is declared as main, its closure causes termination of the
    67  * whole application. Note that opened window does not have any surface yet. */
    68 extern window_t *window_open(const char *, bool, bool, const char *);
     67 * whole application. Note that opened window does not have any surface yet.
     68 */
     69extern window_t *window_open(const char *, window_flags_t, const char *);
    6970
    7071/**
Note: See TracChangeset for help on using the changeset viewer.