Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/io/window.h

    rbc4bf97 r2c7fdaa  
    4343#include <io/pos_event.h>
    4444
     45typedef enum {
     46        WINDOW_MAIN = 1,
     47        WINDOW_DECORATED = 2,
     48        WINDOW_RESIZEABLE = 4
     49} window_flags_t;
     50
     51typedef enum {
     52        GF_EMPTY = 0,
     53        GF_MOVE_X = 1,
     54        GF_MOVE_Y = 2,
     55        GF_RESIZE_X = 4,
     56        GF_RESIZE_Y = 8,
     57        GF_SCALE_X = 16,
     58        GF_SCALE_Y = 32
     59} window_grab_flags_t;
     60
     61typedef enum {
     62        WINDOW_PLACEMENT_ANY = 0,
     63        WINDOW_PLACEMENT_CENTER_X = 1,
     64        WINDOW_PLACEMENT_CENTER_Y = 2,
     65        WINDOW_PLACEMENT_CENTER =
     66            WINDOW_PLACEMENT_CENTER_X | WINDOW_PLACEMENT_CENTER_Y,
     67        WINDOW_PLACEMENT_LEFT = 4,
     68        WINDOW_PLACEMENT_RIGHT = 8,
     69        WINDOW_PLACEMENT_TOP = 16,
     70        WINDOW_PLACEMENT_BOTTOM = 32,
     71        WINDOW_PLACEMENT_ABSOLUTE_X = 64,
     72        WINDOW_PLACEMENT_ABSOLUTE_Y = 128,
     73        WINDOW_PLACEMENT_ABSOLUTE =
     74            WINDOW_PLACEMENT_ABSOLUTE_X | WINDOW_PLACEMENT_ABSOLUTE_Y
     75} window_placement_flags_t;
     76
    4577typedef struct {
    4678        sysarg_t object;
    4779        sysarg_t slot;
    4880        sysarg_t argument;
    49 } sig_event_t;
     81} signal_event_t;
    5082
    5183typedef struct {
     84        sysarg_t offset_x;
     85        sysarg_t offset_y;
    5286        sysarg_t width;
    5387        sysarg_t height;
    54 } rsz_event_t;
     88        window_placement_flags_t placement_flags;
     89} resize_event_t;
    5590
    5691typedef enum {
     
    69104        kbd_event_t kbd;
    70105        pos_event_t pos;
    71         sig_event_t sig;
    72         rsz_event_t rsz;
     106        signal_event_t signal;
     107        resize_event_t resize;
    73108} window_event_data_t;
    74109
     
    79114} window_event_t;
    80115
    81 typedef enum {
    82         GF_EMPTY = 0,
    83         GF_MOVE_X = 1,
    84         GF_MOVE_Y = 2,
    85         GF_RESIZE_X = 4,
    86         GF_RESIZE_Y = 8,
    87         GF_SCALE_X = 16,
    88         GF_SCALE_Y = 32
    89 } window_grab_flags_t;
    90 
    91 extern int win_register(async_sess_t *, service_id_t *, service_id_t *, sysarg_t, sysarg_t);
     116extern int win_register(async_sess_t *, window_flags_t, service_id_t *,
     117    service_id_t *);
    92118
    93119extern int win_get_event(async_sess_t *, window_event_t *);
     
    95121extern int win_damage(async_sess_t *, sysarg_t, sysarg_t, sysarg_t, sysarg_t);
    96122extern int win_grab(async_sess_t *, sysarg_t, sysarg_t);
    97 extern int win_resize(async_sess_t *, sysarg_t, sysarg_t, void *);
     123extern int win_resize(async_sess_t *, sysarg_t, sysarg_t, sysarg_t, sysarg_t,
     124    window_placement_flags_t, void *);
    98125extern int win_close(async_sess_t *);
    99126extern int win_close_request(async_sess_t *);
Note: See TracChangeset for help on using the changeset viewer.