#ifndef DEFS_H #define DEFS_H #include #include /* common.c */ TCHAR *TszFromSz(const char *, int); /* main.c */ void UpdateLayout(); /* listview.c */ HWND LvCreate(HMENU, DWORD); int LvHeight(HWND, int); /* episodelistview.c */ HWND ElvCreate(); void ElvDoSort(void); LRESULT ElvHandleNotify(LPARAM); void ElvRedraw(void); void ElvSetTop(int); void ElvSelectFocus(void); void ElvSelectUnwatched(int); void ElvShowFocus(void); void ElvUpdate(void); void ElvUpdateItem(LPLVITEM); /* datalistview.c */ HWND DlvCreate(); void DlvShowEpisode(int); /* defs.h */ #define DLVSIKEY 0 #define DLVSIVALUE 1 #define ELVSIEPISODE 0 #define ELVSITITLE 1 #define ELVSIRATING 2 #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 T(a) PL_new_term_refs(a) #define A(s) PL_new_atom(s) #define PA(t,x) if (!PL_put_atom(t,x)) #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)) inline int Cmp(int a, int b) { if (a == b) return 0; if (a > b) return 1; return -1; } inline int Dpi(int i) { extern int IDPI; return MulDiv(i, IDPI, 96); } #endif