aboutsummaryrefslogtreecommitdiff
path: root/c/defs.h
blob: db5af3aee155118be22d736a083780c8405000a8 (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
#ifndef DEFS_H
#define DEFS_H

/* common.c */
TCHAR *TSZFromSZ(const char *, int);
int Watched(int);

/* main.c */
void UpdateLayout(HWND);

/* listview.c */
HWND LvCreate(HWND, HMENU);

/* episodelistview.c */
HWND ElvCreate(HWND);
LRESULT ElvHandleNotify(LPARAM);
int ElvItemEpisode(int);
void ElvRedraw(void);
void ElvSelectRecent(void);
void ElvUpdate(void);
void ElvUpdateName(int, int);

/* datalistview.c */
HWND DlvCreate(HWND);
void DlvShowEpisode(int);

#define P(m,p,a,t) if (!PL_call_predicate(NULL, PL_Q_NORMAL, \
	PL_predicate(p,a,m), t))
#define Q(m,p,a,t) PL_open_query(NULL, PL_Q_NORMAL, PL_predicate(p,a,m), t)
#define Qn(q) PL_next_solution(q)
#define Qc(q) PL_cut_query(q)
#define F(f) f = PL_open_foreign_frame()
#define Fd(f) PL_discard_foreign_frame(f)
#define T(a) PL_new_term_refs(a)
#define PI(t,x) if (!PL_put_integer(t,x))
#define GI(t,x) if (!PL_get_integer(t,x))
#define GAC(t,x) if (!PL_get_atom_chars(t,x))

#endif