~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to src/colors.h

  • Committer: Bazaar Package Importer
  • Author(s): John Dong
  • Date: 2008-02-25 15:47:12 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080225154712-qvr11ekcea4c9ry8
Tags: 1.1.6-0.1ubuntu1
* Merge from debian-multimedia (LP: #120003), Ubuntu Changes:
 - For ffmpeg-related build-deps, remove cvs from package names.
 - Standards-Version 3.7.3
 - Maintainer Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * \file colors.h
 
3
 */
 
4
 
1
5
/*
2
 
 * colors.h
3
 
 *
4
6
 * Copyright (C) 1997 Rasca Gmelch, Berlin
5
7
 *
6
8
 * This program is free software; you can redistribute it and/or modify
10
12
 *
11
13
 * This program is distributed in the hope that it will be useful,
12
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
16
 * GNU General Public License for more details.
15
17
 *
16
18
 * You should have received a copy of the GNU General Public License
18
20
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
21
 */
20
22
 
21
 
typedef struct {
22
 
        unsigned long red_shift;
23
 
        unsigned long green_shift;
24
 
        unsigned long blue_shift;
25
 
        unsigned long alpha_shift;
26
 
 
27
 
        unsigned long max_val;
28
 
        unsigned long bit_depth;
29
 
 
30
 
        unsigned long red_max_val;
31
 
        unsigned long green_max_val;
32
 
        unsigned long blue_max_val;
33
 
        unsigned long alpha_max_val;
34
 
 
35
 
        unsigned long red_bit_depth;
36
 
        unsigned long green_bit_depth;
37
 
        unsigned long blue_bit_depth;
38
 
        unsigned long alpha_bit_depth;
39
 
 
40
 
        unsigned long alpha_mask;
 
23
#ifndef __COLORS_H__
 
24
#define __COLORS_H__
 
25
 
 
26
/**
 
27
 * \brief struct to contain various color properties, like masks, depths,
 
28
 *      shifts etc.
 
29
 */
 
30
typedef struct
 
31
{
 
32
    unsigned long red_shift;
 
33
    unsigned long green_shift;
 
34
    unsigned long blue_shift;
 
35
    unsigned long alpha_shift;
 
36
 
 
37
    unsigned long max_val;
 
38
    unsigned long bit_depth;
 
39
 
 
40
    unsigned long red_max_val;
 
41
    unsigned long green_max_val;
 
42
    unsigned long blue_max_val;
 
43
    unsigned long alpha_max_val;
 
44
 
 
45
    unsigned long red_bit_depth;
 
46
    unsigned long green_bit_depth;
 
47
    unsigned long blue_bit_depth;
 
48
    unsigned long alpha_bit_depth;
 
49
 
 
50
    u_int32_t alpha_mask;
41
51
} ColorInfo;
42
52
 
43
 
void GetColorInfo (XImage *image, ColorInfo *return_struct);
44
 
int GetColors (Display *dpy, XWindowAttributes *winfo, XColor **colors);
 
53
ColorInfo *xvc_get_color_info (XImage * image);
 
54
int xvc_get_colors (Display * dpy, XWindowAttributes * winfo, XColor ** colors);
45
55
 
 
56
#endif     // __COLORS_H__