File: fwidget_flags.h

package info (click to toggle)
finalcut 0.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,832 kB
  • sloc: cpp: 90,264; makefile: 546; sh: 412
file content (93 lines) | stat: -rw-r--r-- 2,965 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/***********************************************************************
* fwidget_flags.h - Struct to store widget properties in flags (⚑)     *
*                                                                      *
* This file is part of the FINAL CUT widget toolkit                    *
*                                                                      *
* Copyright 2022 Markus Gans                                           *
*                                                                      *
* FINAL CUT is free software; you can redistribute it and/or modify    *
* it under the terms of the GNU Lesser General Public License as       *
* published by the Free Software Foundation; either version 3 of       *
* the License, or (at your option) any later version.                  *
*                                                                      *
* FINAL CUT is distributed in the hope that it will be useful, but     *
* WITHOUT ANY WARRANTY; without even the implied warranty of           *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
* GNU Lesser General Public License for more details.                  *
*                                                                      *
* You should have received a copy of the GNU Lesser General Public     *
* License along with this program.  If not, see                        *
* <http://www.gnu.org/licenses/>.                                      *
***********************************************************************/


#ifndef FWIDGET_FLAGS_H
#define FWIDGET_FLAGS_H

#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
  #error "Only <final/final.h> can be included directly."
#endif


namespace finalcut
{

struct FWidgetFeature
{
  uInt16 active         : 1;
  uInt16 scrollable     : 1;
  uInt16 resizeable     : 1;
  uInt16 minimizable    : 1;
  uInt16 flat           : 1;
  uInt16 no_border      : 1;
  uInt16 no_underline   : 1;
  uInt16 ignore_padding : 1;
  uInt16                : 8;  // padding bits
};

struct FWidgetVisibility
{
  uInt16 visible        : 1;
  uInt16 hidden         : 1;
  uInt16 shown          : 1;
  uInt16 modal          : 1;
  uInt16 always_on_top  : 1;
  uInt16 visible_cursor : 1;
  uInt16                : 10;  // padding bits
};

struct FWidgetFocus
{
  uInt16 focus       : 1;
  uInt16 focusable   : 1;
  uInt16             : 14;  // padding bits
};

struct FWidgetShadow
{
  uInt16 shadow       : 1;
  uInt16 trans_shadow : 1;
  uInt16              : 14;  // padding bits
};

struct FWidgetType
{
  uInt16 window_widget : 1;
  uInt16 dialog_widget : 1;
  uInt16 menu_widget   : 1;
  uInt16               : 13;  // padding bits
};

// Main struct, which contains all the data
struct FWidgetFlags
{
  FWidgetFeature     feature;
  FWidgetVisibility  visibility;
  FWidgetFocus       focus;
  FWidgetShadow      shadow;
  FWidgetType        type;
};

}  // namespace finalcut

#endif  // FWIDGET_FLAGS_H