summaryrefslogtreecommitdiff
path: root/alf/alfpriv.h
blob: aa0b39d20e9e5f6288789a89aa5adcd65b70b5c3 (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
#pragma once

#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"
#include "alflayout.h"

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

extern TCHAR *_alf_comboClass;
extern TCHAR *_alf_panelClass;
extern TCHAR *_alf_spacerClass;

int
ALF_CentipointsToPxPriv(ALFWindowPriv *priv, int cptValue);

void
ALF_UpdateFontsPriv(HWND hwnd, ALFWindowPriv *priv);

void
ALF_ApplyFontsPriv(HWND win, ALFWindowPriv *priv);

BOOL
ALF_PreTranslateMessagePriv(HWND win, ALFWindowPriv *priv, MSG *message);

void
ALF_RegisterComboClass(void);

void
ALF_RegisterPanelClass(void);

void
ALF_RegisterSpacerClass(void);

void
ALF_BuildUniqueName(TCHAR *buf, const TCHAR *prefix, ULONG_PTR uniquifier);

BOOL
ALF_ShouldMessageBubble(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);