summaryrefslogtreecommitdiff
path: root/alf/alfpriv.h
blob: 14c529af1e5f8cf659acebe2d1246e76d6f00f12 (plain)
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
#include "alf.h"

#include <windows.h>
#include <commctrl.h>
#include <windowsx.h>
#include <stdio.h>
#include <stddef.h>

#ifdef _MSC_VER
// MSVC6 for scoping hack
#   define for if(0){}else for
#endif

#include "alflist.h"
#include "alfcompat.h"

typedef struct {
    ALFListHeader list;
    HWND hwnd;
    UINT x;
    UINT y;
    UINT cptWidth;
    UINT cptHeight;
    UINT cptMarginTop;
    UINT cptMarginRight;
    UINT cptMarginBottom;
    UINT cptMarginLeft;
    DWORD flags;
} ALFWidgetPriv;

typedef struct {
    int minWidth;
    int allocatedWidth;
    int allocatedPosition;
    int expand : 1;
} ALFRowOrColumn;

typedef struct {
    ALFRowOrColumn *columns;
    ALFRowOrColumn *rows;
    int             nColumns;
    int             nRows;
    int             totalMinWidth;
    int             totalMinHeight;
    int             occupiedColumnCount;
    int             occupiedRowCount;
} ALFLayout;

typedef struct {
    ALFAPP              app;
    ALFWindowVTable    *vtbl;
    void               *closure;
    ALFWindowFonts      fonts;
    ALFListHeader       widgets;
    int                 modalResult;
    ALFLayout           layout;
    WORD                defid;
    HWND                hwndFocus;
} ALFWindowPriv;

struct ALFAppPriv {
    HINSTANCE           hInstance;
    ALFCompatFunctions *compatFn;
};

ALFCompatFunctions *
ALF_CreateCompatFuncTable(void);