File: ScreenArguments.h

package info (click to toggle)
psychtoolbox-3 3.0.19.14.dfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 86,796 kB
  • sloc: ansic: 176,245; cpp: 20,103; objc: 5,393; sh: 2,753; python: 1,397; php: 384; makefile: 193; java: 113
file content (85 lines) | stat: -rw-r--r-- 3,363 bytes parent folder | download | duplicates (5)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
  PsychToolbox2/Source/Common/ScreenArguments.h		
  
  AUTHORS:
  Allen.Ingling@nyu.edu		awi 
  
  PLATFORMS: All
  
  PROJECTS:
  11/27/02	awi		Screen on MacOS9
   

  HISTORY:
  11/27/02  awi			Wrote it.  
  
  DESCRIPTION:
  
  - WindowBank contains functions for storing records of open 
  onscreen and offscreen windows.
  
  - We don't use real window pointers when we return a window pointer to the scripting 
  environment.  Instead, we return an index which the PsychToolbox maps to a window
  pointer. Since the mapping is always from the index passed from the scripting environment,
  we can implement this with array lookup. 
  
  The window pointer or screen number is frequently passed as a single number, and by using
  our own indices we make things MUCH easier for ourselves when disambiguating the meaning of a 
  windowPointerOrScreenNumber value, because the value itself is a direct and unambiguouis 
  reference.  
    
  
  T0 DO: 
  This file should look really good to outside functions 
  calling in before any effort is made to improve it internally. 
  
  Maybe abbreviate Screen Number "Scrumber" along with Window Index "Windex".  
    	  

*/

//begin include once 
#ifndef PSYCH_IS_INCLUDED_ScreenArguments
#define PSYCH_IS_INCLUDED_ScreenArguments



#include "Screen.h"


//constants.  

//constants which specifiy the argument positions used if the constant kPsychUseDefaultArgPosition (defined in ScriptingGlue.h) is passed.  
#define kPsychDefaultNumdexArgPosition 		1   
#define kPsychDefaultColorArgPosition		2
#define kPsychDefaultRectArgPosition		3
#define kPsychDefaultDepthArgPosition		4  



// query, put and get windows and screen specifiers by specifying argument position
psych_bool			PsychAllocInWindowRecordArg(int position, psych_bool required, PsychWindowRecordType **winRec);
psych_bool 		PsychAllocInScreenRecordArg(int position, psych_bool reqired, PsychScreenRecordType **screenRecord);
psych_bool 		PsychCopyInWindowIndexArg(int position, psych_bool required, PsychWindowIndexType *windowIndex);
psych_bool 		PsychCopyInScreenNumberArg(int position, psych_bool required, int *screenNumber);
psych_bool			PsychCopyInScreenNumberOrUnaffiliatedArg(int position, psych_bool required, int *screenNumber);
psych_bool 		PsychIsWindowIndexArg(int position);
psych_bool 		PsychIsScreenNumberArg(int position);
psych_bool			PsychIsScreenNumberOrUnaffiliatedArg(int position);
psych_bool			PsychIsUnaffiliatedScreenNumberArg(int position);


// put and get color and rect and depth specifiers directly from arguments
psych_bool 		PsychCopyInColorArg(int position, psych_bool required, PsychColorType *color);
psych_bool 		PsychCopyOutColorArg(int position, psych_bool required, PsychColorType *color, PsychWindowRecordType *windowRecord);
psych_bool 		PsychCopyInRectArg(int position, psych_bool required, PsychRectType rect);
psych_bool 		PsychCopyOutRectArg(int position, psych_bool required, PsychRectType rect);
psych_bool 		PsychAllocOutRectArg(int position, psych_bool required, const double **rect);
psych_bool 		PsychCopyInSingleDepthArg(int position, psych_bool required, PsychDepthType *depth);
psych_bool			PsychCopyInDepthValueArg(int position, psych_bool required, int *depth);
psych_bool 		PsychCopyOutDepthArg(int position, psych_bool required, PsychDepthType *depths);


//end include once
#endif