3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the Revised BSD License.
6 This program is distributed in the hope that it will be useful,
7 but WITHOUT ANY WARRANTY; without even the implied warranty of
8 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 Revised BSD License for more details.
11 Copyright 2011-2013 Cool Dude 2k - http://idb.berlios.de/
12 Copyright 2011-2013 Game Maker 2k - http://intdb.sourceforge.net/
13 Copyright 2011-2013 Kazuki Przyborowski - https://github.com/KazukiPrzyborowski
15 $FileInfo: xv.py - Last Update: 04/01/2013 Ver. 1.0.0 - Author: cooldude2k $
17 import os
, sys
, pygame
;
19 pygame
.display
.init();
20 pyicon
=pygame
.image
.load("/mnt/utmp/upctest/old_icon.png");
21 pygame
.display
.set_icon(pyicon
);
23 ppmimg
=pygame
.image
.load(sys
.argv
[1]);
25 ppmimg
=pygame
.image
.load(sys
.argv
[3]);
26 width
, height
= ppmimg
.get_size();
27 screen
= pygame
.display
.set_mode((width
, height
));
29 pygame
.display
.set_caption("PyXV - "+str(os
.path
.basename(sys
.argv
[1])));
31 pygame
.display
.set_caption("PyXV - "+str(sys
.argv
[2]));
32 pygame
.display
.get_active();
33 pygame
.mouse
.set_visible(0);
35 screen
.blit(ppmimg
, (0, 0));
36 pygame
.display
.flip();
39 for event
in pygame
.event
.get():
40 if (event
.type == pygame
.QUIT
):
42 if (event
.type == pygame
.KEYDOWN
):
43 if (event
.key
== pygame
.K_t
) or (event
.key
== pygame
.K_w
):
44 pygame
.display
.toggle_fullscreen();
45 if (event
.key
== pygame
.K_i
) or (event
.key
== pygame
.K_m
):
46 pygame
.display
.iconify();
47 if (event
.key
== pygame
.K_ESCAPE
) or (event
.key
== pygame
.K_q
):
49 pygame
.display
.quit();