#include "Transparency.h"Include dependency graph for Transparency.c:

Go to the source code of this file.
Defines | |
| #define | WS_EX_LAYERED 0x00080000 |
| #define | LWA_COLORKEY 0x00000001 |
| #define | LWA_ALPHA 0x00000002 |
Functions | |
| LPTW | GetTextWinScilab (void) |
| BOOL | IsEnableTransparencyMode (void) |
| BOOL | ActivateTransparencyMode (HWND hWnd) |
| BOOL | DisableTransparencyMode (HWND hWnd) |
| void | ScilabFxFadeOut (void) |
| int | GetCurrentAlphaLevel (void) |
| void | SetCurrentAlphaLevel (HWND hWnd, int Alpha) |
| BOOL | IncreaseAlphaLevel (void) |
| BOOL | DecreaseAlphaLevel (void) |
Variables | |
| static int | CurrentAlphaLevel = 255 |
| static BOOL | TransparencyON = FALSE |
| #define LWA_ALPHA 0x00000002 |
| #define LWA_COLORKEY 0x00000001 |
Definition at line 12 of file Transparency.c.
| #define WS_EX_LAYERED 0x00080000 |
Definition at line 8 of file Transparency.c.
| BOOL ActivateTransparencyMode | ( | HWND | hWnd | ) |
Definition at line 29 of file Transparency.c.
References FALSE, TransparencyON, and TRUE.
Referenced by ON_WND_TEXT_WM_KEY().
00030 { 00031 BOOL bOK=FALSE; 00032 TransparencyON=TRUE; 00033 bOK=TRUE; 00034 00035 return bOK; 00036 }
Here is the caller graph for this function:

| BOOL DecreaseAlphaLevel | ( | void | ) |
Definition at line 101 of file Transparency.c.
References Alpha, FALSE, GetCurrentAlphaLevel(), GetTextWinScilab(), tagTW::hWndParent, tagTW::hWndText, and SetCurrentAlphaLevel().
Referenced by ON_WND_TEXT_WM_KEY().
00102 { 00103 BOOL bOK=FALSE; 00104 LPTW lptw=GetTextWinScilab(); 00105 int Alpha=GetCurrentAlphaLevel(); 00106 00107 if (Alpha<0) Alpha=0; 00108 else 00109 { 00110 SetCurrentAlphaLevel(lptw->hWndParent ,Alpha--); 00111 SetCurrentAlphaLevel(lptw->hWndText ,Alpha--); 00112 } 00113 return bOK; 00114 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL DisableTransparencyMode | ( | HWND | hWnd | ) |
Definition at line 38 of file Transparency.c.
References CurrentAlphaLevel, FALSE, TransparencyON, and TRUE.
Referenced by IncreaseAlphaLevel().
00039 { 00040 BOOL bOK=FALSE; 00041 00042 SetWindowLong(hWnd, GWL_EXSTYLE,CS_HREDRAW | CS_VREDRAW); 00043 CurrentAlphaLevel=255; 00044 TransparencyON=FALSE; 00045 bOK=TRUE; 00046 00047 return bOK; 00048 }
Here is the caller graph for this function:

| int GetCurrentAlphaLevel | ( | void | ) |
Definition at line 61 of file Transparency.c.
References CurrentAlphaLevel.
Referenced by DecreaseAlphaLevel(), IncreaseAlphaLevel(), and ScilabFxFadeOut().
00062 { 00063 return CurrentAlphaLevel; 00064 }
Here is the caller graph for this function:

| LPTW GetTextWinScilab | ( | void | ) |
| BOOL IncreaseAlphaLevel | ( | void | ) |
Definition at line 75 of file Transparency.c.
References Alpha, DisableTransparencyMode(), FALSE, GetCurrentAlphaLevel(), GetTextWinScilab(), tagTW::hWndParent, tagTW::hWndText, NULL, SetCurrentAlphaLevel(), and TRUE.
Referenced by ON_WND_TEXT_WM_KEY().
00076 { 00077 BOOL bOK=FALSE; 00078 LPTW lptw=GetTextWinScilab(); 00079 int Alpha=GetCurrentAlphaLevel(); 00080 00081 if (Alpha==255) 00082 { 00083 DisableTransparencyMode(lptw->hWndParent); 00084 DisableTransparencyMode(lptw->hWndText); 00085 DragAcceptFiles (lptw->hWndParent, TRUE); 00086 InvalidateRect(lptw->hWndParent,NULL,TRUE); 00087 InvalidateRect(lptw->hWndText,NULL,TRUE); 00088 } 00089 else 00090 { 00091 if (Alpha<255) 00092 { 00093 SetCurrentAlphaLevel(lptw->hWndParent ,Alpha++); 00094 SetCurrentAlphaLevel(lptw->hWndText ,Alpha++); 00095 if (Alpha>255) Alpha=255; 00096 } 00097 } 00098 return bOK; 00099 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL IsEnableTransparencyMode | ( | void | ) |
Definition at line 24 of file Transparency.c.
References TransparencyON.
Referenced by ExitWindow(), and ON_WND_TEXT_WM_KEY().
00025 { 00026 return TransparencyON; 00027 }
Here is the caller graph for this function:

| void ScilabFxFadeOut | ( | void | ) |
Definition at line 50 of file Transparency.c.
References GetCurrentAlphaLevel(), GetTextWinScilab(), tagTW::hWndParent, tagTW::hWndText, i, and SetCurrentAlphaLevel().
Referenced by ExitWindow().
00051 { 00052 LPTW lptw=GetTextWinScilab(); 00053 int i=0; 00054 for (i=GetCurrentAlphaLevel();i>=0;i=i-16) 00055 { 00056 SetCurrentAlphaLevel(lptw->hWndParent ,i); 00057 SetCurrentAlphaLevel(lptw->hWndText ,i); 00058 } 00059 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void SetCurrentAlphaLevel | ( | HWND | hWnd, | |
| int | Alpha | |||
| ) |
Definition at line 66 of file Transparency.c.
References COLORREF, CurrentAlphaLevel, LWA_ALPHA, and NULL.
Referenced by DecreaseAlphaLevel(), IncreaseAlphaLevel(), and ScilabFxFadeOut().
00067 { 00068 if ( (Alpha>=0) && (Alpha<=255) ) 00069 { 00070 SetLayeredWindowAttributes(hWnd, (COLORREF)NULL,CurrentAlphaLevel, LWA_ALPHA); 00071 } 00072 CurrentAlphaLevel=Alpha; 00073 }
Here is the caller graph for this function:

int CurrentAlphaLevel = 255 [static] |
Definition at line 19 of file Transparency.c.
Referenced by DisableTransparencyMode(), GetCurrentAlphaLevel(), and SetCurrentAlphaLevel().
BOOL TransparencyON = FALSE [static] |
Definition at line 20 of file Transparency.c.
Referenced by ActivateTransparencyMode(), DisableTransparencyMode(), and IsEnableTransparencyMode().
1.5.1