[1769693] | 1 | /*
|
---|
[211fd68] | 2 | * Copyright (c) 2024 Jiri Svoboda
|
---|
[1769693] | 3 | * All rights reserved.
|
---|
| 4 | *
|
---|
| 5 | * Redistribution and use in source and binary forms, with or without
|
---|
| 6 | * modification, are permitted provided that the following conditions
|
---|
| 7 | * are met:
|
---|
| 8 | *
|
---|
| 9 | * - Redistributions of source code must retain the above copyright
|
---|
| 10 | * notice, this list of conditions and the following disclaimer.
|
---|
| 11 | * - Redistributions in binary form must reproduce the above copyright
|
---|
| 12 | * notice, this list of conditions and the following disclaimer in the
|
---|
| 13 | * documentation and/or other materials provided with the distribution.
|
---|
| 14 | * - The name of the author may not be used to endorse or promote products
|
---|
| 15 | * derived from this software without specific prior written permission.
|
---|
| 16 | *
|
---|
| 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
---|
| 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
---|
| 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
---|
| 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
---|
| 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
---|
| 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
---|
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
---|
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
---|
| 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
| 27 | */
|
---|
| 28 |
|
---|
| 29 | /** @addtogroup libui
|
---|
| 30 | * @{
|
---|
| 31 | */
|
---|
| 32 | /**
|
---|
| 33 | * @file Window decoration
|
---|
| 34 | */
|
---|
| 35 |
|
---|
| 36 | #ifndef _UI_WDECOR_H
|
---|
| 37 | #define _UI_WDECOR_H
|
---|
| 38 |
|
---|
| 39 | #include <errno.h>
|
---|
| 40 | #include <gfx/coord.h>
|
---|
[1af103e] | 41 | #include <io/kbd_event.h>
|
---|
[1769693] | 42 | #include <io/pos_event.h>
|
---|
| 43 | #include <stdbool.h>
|
---|
[252d03c] | 44 | #include <types/ui/event.h>
|
---|
[3583ffb] | 45 | #include <types/ui/resource.h>
|
---|
[211fd68] | 46 | #include <types/ui/ui.h>
|
---|
[1769693] | 47 | #include <types/ui/wdecor.h>
|
---|
| 48 |
|
---|
[3583ffb] | 49 | extern errno_t ui_wdecor_create(ui_resource_t *, const char *,
|
---|
[2d879f7] | 50 | ui_wdecor_style_t, ui_wdecor_t **);
|
---|
[1769693] | 51 | extern void ui_wdecor_destroy(ui_wdecor_t *);
|
---|
| 52 | extern void ui_wdecor_set_cb(ui_wdecor_t *, ui_wdecor_cb_t *, void *);
|
---|
| 53 | extern void ui_wdecor_set_rect(ui_wdecor_t *, gfx_rect_t *);
|
---|
| 54 | extern void ui_wdecor_set_active(ui_wdecor_t *, bool);
|
---|
[35cffea] | 55 | extern void ui_wdecor_set_maximized(ui_wdecor_t *, bool);
|
---|
[b48e680f] | 56 | extern errno_t ui_wdecor_set_caption(ui_wdecor_t *, const char *);
|
---|
[ed1a948] | 57 | extern void ui_wdecor_sysmenu_hdl_set_active(ui_wdecor_t *, bool);
|
---|
[1769693] | 58 | extern errno_t ui_wdecor_paint(ui_wdecor_t *);
|
---|
[1af103e] | 59 | extern ui_evclaim_t ui_wdecor_kbd_event(ui_wdecor_t *, kbd_event_t *);
|
---|
[252d03c] | 60 | extern ui_evclaim_t ui_wdecor_pos_event(ui_wdecor_t *, pos_event_t *);
|
---|
[211fd68] | 61 | extern void ui_wdecor_rect_from_app(ui_t *, ui_wdecor_style_t, gfx_rect_t *,
|
---|
[266ec54] | 62 | gfx_rect_t *);
|
---|
[25f26600] | 63 | extern void ui_wdecor_app_from_rect(ui_wdecor_style_t, gfx_rect_t *,
|
---|
| 64 | gfx_rect_t *);
|
---|
[1769693] | 65 |
|
---|
| 66 | #endif
|
---|
| 67 |
|
---|
| 68 | /** @}
|
---|
| 69 | */
|
---|