summaryrefslogtreecommitdiffstats
path: root/qemu/ui/sdl_zoom.h
blob: 74955bc944faaa2c1c9799db0e798acb96209691 (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
/*
 * SDL_zoom - surface scaling
 * 
 * Copyright (c) 2009 Citrix Systems, Inc.
 *
 * Derived from: SDL_rotozoom,  LGPL (c) A. Schiffler from the SDL_gfx library.
 * Modifications by Stefano Stabellini.
 *
 * This work is licensed under the terms of the GNU GPL version 2.
 * See the COPYING file in the top-level directory.
 *
 */

#ifndef SDL_zoom_h
#define SDL_zoom_h

#include <SDL.h>

#define SMOOTHING_OFF		0
#define SMOOTHING_ON		1

int sdl_zoom_blit(SDL_Surface *src_sfc, SDL_Surface *dst_sfc,
                  int smooth, SDL_Rect *src_rect);

#endif /* SDL_zoom_h */
an>('pods') def pod_url(parsed_args): return url_parse.path_join(pods_url(), parsed_args.name) class PodGet(command.Lister): "Handle get request for pods" def get_parser(self, prog_name): parser = super(PodGet, self).get_parser(prog_name) parser.add_argument('-name', default='', help='Search pods using name') return parser def take_action(self, parsed_args): pods = http_client.get(self.filter_by_name(pods_url(), parsed_args)) print pods class PodGetOne(command.ShowOne): "Handle get request for pod by name" def get_parser(self, prog_name): parser = super(PodGetOne, self).get_parser(prog_name) parser.add_argument('-name', default='', help='Find pod using name', required=True) return parser def take_action(self, parsed_args): pods = http_client.get(pod_url(parsed_args)) print pods class PodCreate(command.Command): "Handle post request for pods" def get_parser(self, prog_name): parser = super(PodCreate, self).get_parser(prog_name) parser.add_argument('pod', type=json.loads, help='Pod create request format :\n' '\'{"role": "", "name": "", "details": "", ' '"mode": ""}\',\n role should be either ' '"community-ci" or "production-ci", and ' 'mode should be either "metal" or "virtual.') return parser @identity.authenticate def take_action(self, parsed_args): response = http_client.post(pods_url(), parsed_args.pod) if response.status_code == 200: print "Pod has been successfully created!" else: print response.text class PodDelete(command.Command): "Handle delete request for pods" def get_parser(self, prog_name): parser = super(PodDelete, self).get_parser(prog_name) parser.add_argument('-name', type=str, required=True, help='Delete pods using name') return parser @identity.authenticate def take_action(self, parsed_args): print http_client.delete(pod_url(parsed_args))