Update of /cvsroot/virtuawin In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28636 Modified Files: Defines.h DiskRoutines.h Makefile SetupDialog.c VirtuaWin.c VirtuaWin.h win32v6.mak Removed Files: ListStructures.h Log Message: Moved the main typedefs into defines.h so modules can get a definition of them from the SDK. Change MenuItem to vwMenuItem to remove any potential conflict. --- ListStructures.h DELETED --- Index: VirtuaWin.h =================================================================== RCS file: /cvsroot/virtuawin/VirtuaWin.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- VirtuaWin.h 7 Jun 2007 19:22:32 -0000 1.45 +++ VirtuaWin.h 8 Nov 2007 21:47:51 -0000 1.46 @@ -32,14 +32,23 @@ #include "Defines.h" // externally accessible variables -extern HWND hWnd; // The handle to VirtuaWin -extern int screenLeft; // the screen dimensions, from VirtuaWin.h +extern HWND hWnd; // The handle to VirtuaWin +extern int screenLeft; // the screen dimensions, from VirtuaWin.h extern int screenRight; extern int screenTop; extern int screenBottom; -extern int curDisabledMod; // how many disabled modules we have -extern int knockMode; // mouse edge kncking mode +extern int curDisabledMod; // how many disabled modules we have +extern int knockMode; // mouse edge kncking mode + +extern windowType winList[vwWINDOW_MAX]; // list for holding windows +extern moduleType moduleList[MAXMODULES]; // list that holds modules +extern disModules disabledModules[MAXMODULES*2]; // list with disabled modules + +extern vwWindowMatch *userList; // list for holding user added applications +extern vwWindowMatch *stickyList; // list with saved sticky windows +extern vwWindowMatch *trickyList; // list with saved tricky windows +extern vwWindowMatch *assignedList; // list with all windows that have a predefined desktop // logging defines & macros extern int vwLogFlag ; Index: win32v6.mak =================================================================== RCS file: /cvsroot/virtuawin/win32v6.mak,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- win32v6.mak 8 May 2007 22:07:36 -0000 1.8 +++ win32v6.mak 8 Nov 2007 21:47:51 -0000 1.9 @@ -38,7 +38,7 @@ SRC = VirtuaWin.c DiskRoutines.c SetupDialog.c ModuleRoutines.c regex.c HEADERS = VirtuaWin.h SetupDialog.h Resource.h regex.h ModuleRoutines.h Messages.h \ - ListStructures.h DiskRoutines.h Defines.h ConfigParameters.h + DiskRoutines.h Defines.h ConfigParameters.h COFFS = VirtuaWin.coff OBJRES = VirtuaWin.res Index: Makefile =================================================================== RCS file: /cvsroot/virtuawin/Makefile,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Makefile 8 May 2007 22:07:35 -0000 1.18 +++ Makefile 8 Nov 2007 21:47:51 -0000 1.19 @@ -60,7 +60,7 @@ SRC = VirtuaWin.c DiskRoutines.c SetupDialog.c ModuleRoutines.c regex.c HEADERS = VirtuaWin.h SetupDialog.h Resource.h regex.h ModuleRoutines.h Messages.h \ - ListStructures.h DiskRoutines.h Defines.h ConfigParameters.h + DiskRoutines.h Defines.h ConfigParameters.h COFFS = VirtuaWin.coff OBJRES = VirtuaWin.res LIBS = -lshell32 -luser32 -lgdi32 -lcomctl32 Index: VirtuaWin.c =================================================================== RCS file: /cvsroot/virtuawin/VirtuaWin.c,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- VirtuaWin.c 27 Sep 2007 22:17:46 -0000 1.118 +++ VirtuaWin.c 8 Nov 2007 21:47:51 -0000 1.119 @@ -69,12 +69,20 @@ int taskbarEdge; int desktopWorkArea[2][4] ; -UINT RM_Shellhook; +windowType winList[vwWINDOW_MAX]; // list for holding windows +moduleType moduleList[MAXMODULES]; // list that holds modules +disModules disabledModules[MAXMODULES*2]; // list with disabled modules -BOOL keysRegistred = FALSE; // if the switch keys are registrered -BOOL hotKeysRegistred = FALSE; // if the switch hot keys are registrered -BOOL cyclingKeysRegistered = FALSE; // if the cycling keys are registrered -BOOL menuHotKeyRegistered = FALSE; // if the menu hotkey is registered +vwWindowMatch *userList; // list for holding user added applications +vwWindowMatch *stickyList; // list with saved sticky windows +vwWindowMatch *trickyList; // list with saved tricky windows +vwWindowMatch *assignedList; // list with all windows that have a predefined desktop + +UINT RM_Shellhook; +BOOL keysRegistred = FALSE; // if the switch keys are registrered +BOOL hotKeysRegistred = FALSE; // if the switch hot keys are registrered +BOOL cyclingKeysRegistered = FALSE; // if the cycling keys are registrered +BOOL menuHotKeyRegistered = FALSE; // if the menu hotkey is registered ATOM vwLeft; ATOM vwRight; @@ -2338,9 +2346,9 @@ #define vwPMENU_COL_MASK 0xf00 static int -winListCreateItemList(MenuItem **items,int *numitems) +winListCreateItemList(vwMenuItem **items,int *numitems) { - MenuItem *item; + vwMenuItem *item; TCHAR fmt[16], *ss ; TCHAR title[vwWINDOWNAME_MAX+18]; TCHAR buff[MAX_PATH]; @@ -2384,7 +2392,7 @@ #else _stprintf(title,fmt,winList[c].Desk,buff,(int) winList[c].Handle); #endif - if(((item = malloc(sizeof(MenuItem))) == NULL) || + if(((item = malloc(sizeof(vwMenuItem))) == NULL) || ((item->name = _tcsdup(title)) == NULL)) { while(--i >= 0) @@ -2460,7 +2468,7 @@ } static HMENU -winListCreateMenu(int flags, int itemCount, MenuItem **items) +winListCreateMenu(int flags, int itemCount, vwMenuItem **items) { MENUITEMINFO minfo ; HMENU hMenu; @@ -3106,11 +3114,11 @@ { HDC testdc; HFONT menufont,oldfont; - MenuItem* item; + vwMenuItem* item; SIZE size; TCHAR *measuretext; - item = (MenuItem*) mitem->itemData; + item = (vwMenuItem*) mitem->itemData; measuretext = (item != NULL) ? item->name : _T("D") ; @@ -3138,7 +3146,7 @@ static void renderMenuItem(DRAWITEMSTRUCT* ditem) { - MenuItem* item; + vwMenuItem* item; HFONT menufont,oldfont; HICON icon; UINT oldalign; @@ -3147,7 +3155,7 @@ SIZE size; int backgroundcolor,textcolor, ll; - item = (MenuItem *) ditem->itemData; + item = (vwMenuItem *) ditem->itemData; if((item != NULL) && (ditem->itemState & ODS_SELECTED)) { @@ -3202,8 +3210,8 @@ HWND hwnd ; int scDir=1, flags, retItem, id, ii ; - // storage for list of MenuItem structs - MenuItem *items[vwWINDOW_MAX] ; + // storage for list of vwMenuItem structs + vwMenuItem *items[vwWINDOW_MAX] ; int itemCount; if((flags = winListCreateItemList(items,&itemCount)) == 0) @@ -3276,7 +3284,7 @@ } } - // delete MenuItem list + // delete vwMenuItem list for (ii=0 ; ii<itemCount ; ii++) { free(items[ii]->name); Index: Defines.h =================================================================== RCS file: /cvsroot/virtuawin/Defines.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Defines.h 19 Sep 2007 22:17:28 -0000 1.30 +++ Defines.h 8 Nov 2007 21:47:51 -0000 1.31 @@ -24,6 +24,8 @@ #ifndef _DEFINES_H_ #define _DEFINES_H +#include <windows.h> + // application name and version defines #define vwVIRTUAWIN_NAME _T("VirtuaWin") #define vwVIRTUAWIN_EMAIL _T("Vir...@ho...") @@ -43,4 +45,57 @@ #define VW_SYSTRAY (WM_USER + 1) // Sent to us by the systray #define VW_MOUSEWARP (WM_USER + 9) // Mouse thread message +#define vwTRICKY_POSITION 1 +#define vwTRICKY_WINDOW 2 + +#define vwVISIBLE_NO 0 +#define vwVISIBLE_YES 1 +#define vwVISIBLE_TEMP 2 +#define vwVISIBLE_YESTEMP 3 + +#define vwWTFLAGS_NO_TASKBAR_BUT 0x01 +#define vwWTFLAGS_RM_TASKBAR_BUT 0x02 + +typedef struct { // Holds the windows in the list + HWND Handle; + HWND Owner; + long Style; + long ExStyle; + unsigned long ZOrder[vwDESKTOP_SIZE] ; + unsigned short Desk; + unsigned short menuId ; + unsigned char Sticky; + unsigned char Tricky; + unsigned char Visible; + unsigned char State; + unsigned char Flags; +} windowType; + +// Holds data for modules +typedef struct { + HWND Handle; + BOOL Disabled; + TCHAR description[vwMODULENAME_MAX+1]; +} moduleType; + +// Holds disabled modules +typedef struct { + TCHAR moduleName[vwMODULENAME_MAX+1]; +} disModules; + +typedef struct { + TCHAR *name; + HICON icon; + unsigned short id; + unsigned short desk; + unsigned char sticky; +} vwMenuItem ; + +typedef struct vwWindowMatch { + struct vwWindowMatch *next; + TCHAR *match; + unsigned short desk; + unsigned char type; +} vwWindowMatch ; + #endif Index: SetupDialog.c =================================================================== RCS file: /cvsroot/virtuawin/SetupDialog.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- SetupDialog.c 18 Oct 2007 23:30:27 -0000 1.59 +++ SetupDialog.c 8 Nov 2007 21:47:51 -0000 1.60 @@ -29,7 +29,6 @@ #include "VirtuaWin.h" #include "SetupDialog.h" #include "Resource.h" -#include "ListStructures.h" #include "Messages.h" #include "DiskRoutines.h" #include "ModuleRoutines.h" Index: DiskRoutines.h =================================================================== RCS file: /cvsroot/virtuawin/DiskRoutines.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- DiskRoutines.h 3 Jul 2007 22:33:13 -0000 1.20 +++ DiskRoutines.h 8 Nov 2007 21:47:51 -0000 1.21 @@ -21,12 +21,11 @@ // USA. // -#include <windows.h> -#include "ListStructures.h" - #ifndef _DISKROUTINES_H_ #define _DISKROUTINES_H_ +#include <windows.h> + typedef enum { vwMODULES, vwHELP, vwCONFIG, vwLIST, vwTRICKY, vwSTICKY, vwDISABLED, vwWINDOWS_STATE, vwFILE_COUNT } eFileNames; extern TCHAR *VirtuaWinPath ; |