[go: up one dir, main page]

File: gunk.h

package info (click to toggle)
tile 0.8.2-2.1
  • links: PTS
  • area: main
  • in suites: lenny, squeeze
  • size: 3,152 kB
  • ctags: 3,093
  • sloc: ansic: 18,144; tcl: 4,607; makefile: 398; sh: 71
file content (44 lines) | stat: -rw-r--r-- 1,075 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
/*
 * gunk.h
 *
 * Portability gunk.
 *
 * Tk doesn't seem provide a consistent API across different 
 * platforms, at least not in the public interface.
 * This file is a dumping ground for any #ifdeffery needed
 * to get stuff to compile on multiple platforms.
 */


/*
 * ... Tk also doesn't provide a consistent set of #defines
 * to determine what platform we're on ...
 */

#if defined(__WIN32__)
#	define WIN_TK 1
#endif

#if !defined(WIN_TK) && !defined(MAC_TK) && !defined(MAC_OSX_TK)
#	define X11_TK 1
#endif

#if X11_TK
#define TkPutImage(colors, ncolors, display, pixels, gc, image, destx, desty, srcx, srcy, width, height) \
	XPutImage(display, pixels, gc, image, destx, desty, srcx, \
	srcy, width, height);
#endif

#if defined(WIN_TK) && defined(NO_PRIVATE_HEADERS)
#include <windows.h>
#include <tkPlatDecls.h>
/* From tkWinInt.h: */
typedef struct TkWinDCState {
    HPALETTE palette;
    int bkmode;
} TkWinDCState;

EXTERN HDC TkWinGetDrawableDC(Display *, Drawable, TkWinDCState*);
EXTERN HDC TkWinReleaseDrawableDC(Drawable, HDC, TkWinDCState*);
#endif