diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:25:17 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-10-02 19:25:17 +0200 |
commit | c2ca7be5a751879159f3cb591a64bb9568b79762 (patch) | |
tree | 04e38d4f4a2aad4d789bda0a65b7abb80a3439a2 /spectro/dispwin.h | |
parent | 45c152c326d87478fbf41714b4b8e2f7b57a282b (diff) | |
parent | 3db384424bd7398ffbb7a355cab8f15f3add009f (diff) |
Updated version 1.9.1+repack from 'upstream/1.9.1+repack'
with Debian dir 98a996367aa69ae41accf9c6d369f600bc94de80
Diffstat (limited to 'spectro/dispwin.h')
-rw-r--r-- | spectro/dispwin.h | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/spectro/dispwin.h b/spectro/dispwin.h index b5e14ce..47fd256 100644 --- a/spectro/dispwin.h +++ b/spectro/dispwin.h @@ -73,11 +73,11 @@ WINSHLWAPI LPWSTR WINAPI PathFindFileNameW(LPCWSTR); #endif /* NT */ -#ifdef __APPLE__ /* Assume OS X Cocoa */ +#ifdef UNIX_APPLE /* Assume OS X Cocoa */ #include <Carbon/Carbon.h> /* To declare CGDirectDisplayID */ -#endif /* __APPLE__ */ +#endif /* UNIX_APPLE */ #if defined(UNIX_X11) #include <X11/Xlib.h> @@ -114,9 +114,9 @@ typedef struct { char monid[128]; /* Monitor ID */ int prim; /* NZ if primary display monitor */ #endif /* NT */ -#ifdef __APPLE__ +#ifdef UNIX_APPLE CGDirectDisplayID ddid; -#endif /* __APPLE__ */ +#endif /* UNIX_APPLE */ #if defined(UNIX_X11) int screen; /* Screen to select */ int uscreen; /* Underlying screen */ @@ -158,9 +158,17 @@ struct _ramdac { /* Should have separate frame buffer depth + representation to account */ /* for floating point frame buffers, even though this isn't currently used. */ - int pdepth; /* Frame buffer depth into RAMDAC, usually 8 */ - int nent; /* Number of entries, = 2^pdepth */ - double *v[3]; /* 2^pdepth entries for RGB, values 0.0 - 1.0 */ + int fdepth; /* Frame buffer depth, typically 8, could be more. */ + int rdepth; /* Expected ramdac index depth. May be different to fdepth */ + /* if there is another level of mapping between the frame buffer */ + /* and ramdac, i.e. X11 DirectorColor Colormap. */ + + int ndepth; /* Actual ramdac depth, typically = rdepth */ + int nent; /* Number of entries, = 2^ndepth, typically = 2^rdepth, */ + /* but may be different for some video cards. */ + /* Will be 0 if ramdac is not accessible */ + + double *v[3]; /* nent entries for RGB, values 0.0 - 1.0 */ /* Clone ourselves */ struct _ramdac *(*clone)(struct _ramdac *p); @@ -255,12 +263,12 @@ struct _dispwin { #endif /* NT */ -#ifdef __APPLE__ +#ifdef UNIX_APPLE CGDirectDisplayID ddid; void *osx_cntx; /* OSX specific info */ int btf; /* Flag, nz if window has been brought to the front once */ int winclose; /* Flag, set to nz if window was closed */ -#endif /* __APPLE__ */ +#endif /* UNIX_APPLE */ #if defined(UNIX_X11) Display *mydisplay; @@ -271,6 +279,9 @@ struct _dispwin { unsigned char *edid; /* 128 or 256 bytes of monitor EDID, NULL if none */ int edid_len; /* 128 or 256 */ + int shift[3]; /* Bit shift to create RGB value from components */ + int *rmap[3]; /* Map of fdepth to rdepth values */ + #if RANDR_MAJOR == 1 && RANDR_MINOR >= 2 /* Xrandr stuff - output is connected 1:1 to a display */ RRCrtc crtc; /* Associated crtc */ @@ -308,10 +319,21 @@ struct _dispwin { volatile int cberror; /* NZ if error detected in a callback routine */ int ddebug; /* >0 to print debug to stderr */ + int warned; /* Warning message has been issued */ + /* public: */ - int pdepth; /* Frame buffer plane depth of display */ - int edepth; /* Notional ramdac entry size in bits. (Bits actually used may be less) */ - /* This is used to scale out_tvenc appropriately */ + int fdepth; /* Frame buffer depth, typically 8, could be more */ + int rdepth; /* Expected ramdac index depth. May be different to fdepth */ + /* if there is another level of mapping between the frame buffer */ + /* and ramdac, i.e. X11 DirectorColor Colormap. */ + + int ndepth; /* Actual ramdac depth, typically = rdepth */ + int nent; /* Number of entries, = s^ndepth, typically = 2^rdepth, */ + /* but may be different for some video cards. */ + /* Will be 0 if ramdac is not accessible */ + + int edepth; /* Notional frame buffer/ramdac entry size in bits. (Bits actually used */ + /* may be less). This is just used to scale out_tvenc appropriately. */ /* Get RAMDAC values. ->del() when finished. */ /* Return NULL if not possible */ |