source: mainline/uspace/lib/ui/include/types/ui/wdecor.h@ 266ec54

lfn serial ticket/834-toolchain-update topic/msim-upgrade topic/simplify-dev-export
Last change on this file since 266ec54 was 266ec54, checked in by Jiri Svoboda <jiri@…>, 5 years ago

Viewer fullsreen mode

Fullscreen window placement is more of a stopgap. Proper
solution would probably be via maximizing the window.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1/*
2 * Copyright (c) 2020 Jiri Svoboda
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_TYPES_WDECOR_H
37#define _UI_TYPES_WDECOR_H
38
39#include <gfx/coord.h>
40#include <types/ui/cursor.h>
41
42struct ui_wdecor;
43typedef struct ui_wdecor ui_wdecor_t;
44
45/** Window decoration style */
46typedef 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;
60
61/** Window resize type */
62typedef enum {
63 ui_wr_none = 0,
64
65 ui_wr_top = 0x1,
66 ui_wr_left = 0x2,
67 ui_wr_bottom = 0x4,
68 ui_wr_right = 0x8,
69
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;
75
76/** Window decoration callbacks */
77typedef 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;
84
85#endif
86
87/** @}
88 */
Note: See TracBrowser for help on using the repository browser.