~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to Lib/sandbox/xplt/src/play/mac/playm.h

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * playm.h
3
 
 * Mac OS X-private portability layer declarations
4
 
 *
5
 
 * Copyright (c) 1999.  See accompanying LEGAL file for details.
6
 
 */
7
 
 
8
 
#include "play.h"
9
 
#include <Cocoa/Cocoa.h>
10
 
 
11
 
/* ------------------------------------------------------------------------ */
12
 
 
13
 
@interface View: NSView
14
 
{ int mousebutton; // Mouse button state
15
 
  p_win* pw;
16
 
}
17
 
- (void)expose:(id)dummy;
18
 
@end
19
 
 
20
 
/* ------------------------------------------------------------------------ */
21
 
 
22
 
 
23
 
struct p_scr {
24
 
  int width, height, depth;
25
 
  int x0, y0;                  /* usable area may not start at (0,0) */
26
 
 
27
 
  float sys_colors[15][4];
28
 
  CGColorSpaceRef colorspace;
29
 
 
30
 
  ATSFontMetrics metric; /* Standard gui font */
31
 
  CGFontRef font;        /* Standard gui font */
32
 
  ATSFontMetrics metrics[5][4]; /* Font cache */
33
 
  CGFontRef fonts[5][4];        /* Font cache */
34
 
  CGContextRef scratch;
35
 
  /* scratch space for drawing strings to determine their width */
36
 
 
37
 
  View* lockedView; /* Currently locked view */
38
 
 
39
 
  NSCursor* cursors[P_NONE]; /* Will be loaded as needed */
40
 
};
41
 
 
42
 
struct p_win {
43
 
  void *ctx;
44
 
  p_scr *s;
45
 
 
46
 
  NSWindow* w;
47
 
  View* view;
48
 
  CGContextRef cr;
49
 
 
50
 
  p_win *parent;
51
 
  /* DC keeps three separate colors, only set when actually used */
52
 
  float pixels[256][4];
53
 
  int n_pixels;
54
 
  float components[4];
55
 
  /* (r,g,b,alpha) components of the color to be used */
56
 
  unsigned long color;
57
 
  /* identifier of the color currently loaded in components */
58
 
 
59
 
  int width; /* line width */
60
 
  int dash;  /* dashed line style */
61
 
  int squarelinestyle; /* Square/round caps and miter/round joining */
62
 
 
63
 
  CGFontRef fontref;      /* Currently loaded font */
64
 
  int fontid;
65
 
  int orient;      /* font orientation */
66
 
 
67
 
  unsigned long bg;          /* for p_clear */
68
 
};