Changeset 7e38970d in mainline for uspace/lib/ui/include/types/ui/wdecor.h
- Timestamp:
- 2020-12-07T00:08:37Z (4 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 25f26600
- Parents:
- 7a873f0 (diff), 8596474 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ui/include/types/ui/wdecor.h
r7a873f0 r7e38970d 1 1 /* 2 * Copyright (c) 2011 Martin Decky 3 * Copyright (c) 2012 Petr Koupy 2 * Copyright (c) 2020 Jiri Svoboda 4 3 * All rights reserved. 5 4 * … … 28 27 */ 29 28 30 /** @addtogroup draw29 /** @addtogroup libui 31 30 * @{ 32 31 */ 33 32 /** 34 * @file 33 * @file Window decoration 35 34 */ 36 35 37 #ifndef DRAW_SURFACE_H_38 #define DRAW_SURFACE_H_36 #ifndef _UI_TYPES_WDECOR_H 37 #define _UI_TYPES_WDECOR_H 39 38 40 #include < stdbool.h>41 #include < io/pixelmap.h>39 #include <gfx/coord.h> 40 #include <types/ui/cursor.h> 42 41 43 struct surface;44 typedef struct surface surface_t;42 struct ui_wdecor; 43 typedef struct ui_wdecor ui_wdecor_t; 45 44 46 typedef sysarg_t surface_coord_t; 45 /** Window decoration style */ 46 typedef enum { 47 /** No style bits */ 48 ui_wds_none = 0x0, 49 /** Window has a frame */ 50 ui_wds_frame = 0x1, 51 /** Window has a title bar */ 52 ui_wds_titlebar = 0x2, 53 /** Window has a close button */ 54 ui_wds_close_btn = 0x4, 55 /** Window is resizable */ 56 ui_wds_resizable = 0x8, 57 /** Window is decorated (default decoration) */ 58 ui_wds_decorated = ui_wds_frame | ui_wds_titlebar | ui_wds_close_btn 59 } ui_wdecor_style_t; 47 60 61 /** Window resize type */ 48 62 typedef enum { 49 SURFACE_FLAG_NONE = 0, 50 SURFACE_FLAG_SHARED = 1 51 } surface_flags_t; 63 ui_wr_none = 0, 52 64 53 extern surface_t *surface_create(surface_coord_t, surface_coord_t, pixel_t *, surface_flags_t); 54 extern void surface_destroy(surface_t *); 65 ui_wr_top = 0x1, 66 ui_wr_left = 0x2, 67 ui_wr_bottom = 0x4, 68 ui_wr_right = 0x8, 55 69 56 extern bool surface_is_shared(surface_t *); 57 extern pixel_t *surface_direct_access(surface_t *); 58 extern pixelmap_t *surface_pixmap_access(surface_t *); 59 extern void surface_get_resolution(surface_t *, surface_coord_t *, surface_coord_t *); 60 extern void surface_get_damaged_region(surface_t *, surface_coord_t *, surface_coord_t *, 61 surface_coord_t *, surface_coord_t *); 62 extern void surface_add_damaged_region(surface_t *, surface_coord_t, surface_coord_t, 63 surface_coord_t, surface_coord_t); 64 extern void surface_reset_damaged_region(surface_t *); 70 ui_wr_top_left = ui_wr_top | ui_wr_left, 71 ui_wr_bottom_left = ui_wr_bottom | ui_wr_left, 72 ui_wr_bottom_right = ui_wr_bottom | ui_wr_right, 73 ui_wr_top_right = ui_wr_top | ui_wr_right 74 } ui_wdecor_rsztype_t; 65 75 66 extern void surface_put_pixel(surface_t *, surface_coord_t, surface_coord_t, pixel_t); 67 extern pixel_t surface_get_pixel(surface_t *, surface_coord_t, surface_coord_t); 76 /** Window decoration callbacks */ 77 typedef struct ui_wdecor_cb { 78 void (*close)(ui_wdecor_t *, void *); 79 void (*move)(ui_wdecor_t *, void *, gfx_coord2_t *); 80 void (*resize)(ui_wdecor_t *, void *, ui_wdecor_rsztype_t, 81 gfx_coord2_t *); 82 void (*set_cursor)(ui_wdecor_t *, void *, ui_stock_cursor_t); 83 } ui_wdecor_cb_t; 68 84 69 85 #endif
Note:
See TracChangeset
for help on using the changeset viewer.