~ubuntu-branches/ubuntu/trusty/proll/trusty

« back to all changes in this revision

Viewing changes to .pc/001_qemu.patch/src/rconsole.h

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover
  • Date: 2011-06-08 04:35:59 UTC
  • Revision ID: james.westby@ubuntu.com-20110608043559-8ln88b583x0uqcox
Tags: 18-5
* Switch to debhelper compatibility level 7.
* Use dh_prep instead of “dh_clean -k”.
* Use $(filter ...) instead of $(findstring ...) to extract space separated
  options from DEB_BUILD_OPTIONS in debian/rules.
* Switch to source format “3.0 (quilt)”:
  - Remove quilt from Build-Depends.
  - Remove quilt.make include from debian/rules.
  - Remove patch and unpatch targets from debian/rules.
  - Remove now unneeded debian/README.source.
* Now using Standards-Version 3.9.2 (no changes needed).
* Remove leading ‘./’ from lintian overrides.
* Rename build target to build-indep, install to install-indep, and add
  an empty build-arch target.
* Use dpkg-buildflags to set CPPFLAGS, CFLAGS and LDFLAGS.
* Disable Sparc V9 specific unbuildable code.
* Add ${misc:Depends} to Depends field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * drivers/char/sparc/rconsole.h
 
3
 */
 
4
#ifndef _SPARC_RCONSOLE_H
 
5
#define _SPARC_RCONSOLE_H
 
6
 
 
7
typedef unsigned RC_color;        /* For arguments */
 
8
 
 
9
/*
 
10
 * Font
 
11
 * Our fonts are laid out effectively for the main purpose (virtual consoles).
 
12
 * Niceties are cut off.
 
13
 */
 
14
 
 
15
#define RF_MAXWIDTH  16
 
16
typedef unsigned short Rf_scan;        /*  __w16 to be used */
 
17
 
 
18
struct rfont {
 
19
  Rf_scan *body_;
 
20
  int nchars_;                 /* 128 for ASCII ...  65536 for Unicode   */
 
21
  int width_;                  /* [Pixels]. Maximum size is 16.          */
 
22
  int height_;                 /* [Pixels == scan lines].                */
 
23
};
 
24
 
 
25
void font_cons_1(struct rfont *p, const char *name);  /* for debugging */
 
26
void font_cons_7(struct rfont *p);
 
27
/* Fonts are permanent so we do not need a destructor yet. */
 
28
 
 
29
/*
 
30
 * Abstraction of a hardware or a software raster.
 
31
 *
 
32
 * Inversion on color displays is of two kinds: "display" and "color".
 
33
 * Color inversion is an operation on a pixel value. [Note1: The operation
 
34
 * must be mirroring: op(op(x)) == x. Example: op(x){return x^(-1)} ]
 
35
 * Color inversion belongs to class raster. Display inversion is a
 
36
 * swapping of foreground and background colors of an image. It belongs
 
37
 * to class screen in our case. [Note2: It's one of the rare cases when OO
 
38
 * model can be useful. ] In present we do not need a color inversion
 
39
 * and it is omitted from the class raster.
 
40
 */
 
41
struct raster {
 
42
  int depth_, width_, height_;  /* [planes], [pixels], [pixels]      */
 
43
  void *base_;                  /* Address of the first line.        */
 
44
  int loff_;                    /* Offset of the raster on the line [pixels] */
 
45
  int lsize_;                   /* Line size [pixels]                */
 
46
 
 
47
  unsigned *outp_;              /* __w32; output pointer.            */
 
48
  long ol_;                     /* __w32; output buffer. In theory   */
 
49
                                /* belongs to raster1 ... raster24.  */
 
50
  int sx_;                      /* output index */
 
51
 
 
52
  /* void (*invert_)(struct raster *, int, int, int, int); */
 
53
  void (*clear_)(  struct raster *, int y, int x, int h, int w, RC_color);
 
54
  void (*yscroll_)(struct raster *, int y, int x, int h, int w, int dy);
 
55
  void (*xscroll_)(struct raster *, int y, int x, int h, int w, int dx);
 
56
  void (*render_)( struct raster *, int y, int x, const char*, int len,
 
57
    RC_color bg, RC_color fg, const struct rfont *);
 
58
};
 
59
 
 
60
#define raster_qdepth(r)   ((r)->depth_)
 
61
#define raster_qwidth(r)   ((r)->width_)
 
62
#define raster_qheight(r)  ((r)->height_)
 
63
#define raster_qbase(r)    ((r)->base_)
 
64
void raster1_cons_a(struct raster *, int h, int w, char *base);
 
65
void raster8_cons_a(struct raster *, int h, int w, char *base);
 
66
void raster_cons_2(struct raster *, const struct raster *parent,
 
67
    int y, int x, int h, int w);
 
68
void raster24_cons(struct raster *, int h, int w);
 
69
void raster_dest(struct raster *);
 
70
void raster8_render(struct raster *, int y, int x, const char*, int len,
 
71
    RC_color bg, RC_color fg, const struct rfont *);
 
72
void raster1_render(struct raster *, int y, int x, const char*, int len,
 
73
    RC_color bg, RC_color fg, const struct rfont *);
 
74
void raster1_clear(struct raster *, int, int, int, int, RC_color);
 
75
void raster8_clear(struct raster *, int, int, int, int, RC_color);
 
76
void raster1_yscroll(struct raster *, int, int, int, int, int);
 
77
void raster8_yscroll(struct raster *, int, int, int, int, int);
 
78
void raster8_xscroll(struct raster *, int, int, int, int, int);
 
79
 
 
80
 
 
81
#endif /* _SPARC_RCONSOLE_H */