codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#pragma once #include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<X11/Xlib.h> #include<string.h> typedef int PixType; #define MakePix(r,g,b) ( (r) << 16 | (g) << 8 | (b) ) #define BPP 24 typedef struct { Display*d; Window w; XImage*img; PixType*data; int W,H; int lx,ly; } Viewer; void ViewerInit(Viewer*vw, int _W,int _H); void ViewerEvent(Viewer*vw,int ev[4]); typedef struct { unsigned char*data; int W,H; } Image; void ViewerImageWrite(Viewer*vw,Image*im);
Private
[
?
]
Run code
Submit