winefile.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Copyright 2000, 2003, 2004, 2005 Martin Fuchs
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Lesser General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2.1 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General Public
  15. * License along with this library; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  17. */
  18. #include <windows.h>
  19. #include <commdlg.h>
  20. #include <locale.h>
  21. #include <time.h>
  22. #include <shlwapi.h>
  23. #include <shellapi.h> /* for ShellExecuteW() */
  24. #include <shlobj.h>
  25. #define BUFFER_LEN 1024
  26. enum IMAGE {
  27. IMG_NONE=-1, IMG_FILE=0, IMG_DOCUMENT, IMG_EXECUTABLE,
  28. IMG_FOLDER, IMG_OPEN_FOLDER, IMG_FOLDER_PLUS,IMG_OPEN_PLUS, IMG_OPEN_MINUS,
  29. IMG_FOLDER_UP, IMG_FOLDER_CUR
  30. };
  31. #define IMAGE_WIDTH 16
  32. #define IMAGE_HEIGHT 13
  33. #define SPLIT_WIDTH 5
  34. #define TREE_LINE_DX 3
  35. #define IDW_STATUSBAR 0x100
  36. #define IDW_TOOLBAR 0x101
  37. #define IDW_DRIVEBAR 0x102
  38. #define IDW_FIRST_CHILD 0xC000 /*0x200*/
  39. #define IDW_TREE_LEFT 3
  40. #define IDW_TREE_RIGHT 6
  41. #define IDW_HEADER_LEFT 2
  42. #define IDW_HEADER_RIGHT 5
  43. #define WM_DISPATCH_COMMAND 0xBF80
  44. #define COLOR_COMPRESSED RGB(0,0,255)
  45. #define COLOR_SELECTION RGB(0,0,128)
  46. #define COLOR_SPLITBAR LTGRAY_BRUSH
  47. #define FRM_CALC_CLIENT 0xBF83
  48. #define Frame_CalcFrameClient(hwnd, prt) (SendMessageW(hwnd, FRM_CALC_CLIENT, 0, (LPARAM)(PRECT)prt))
  49. typedef struct
  50. {
  51. int start_x;
  52. int start_y;
  53. int width;
  54. int height;
  55. } windowOptions;
  56. typedef struct
  57. {
  58. HANDLE hInstance;
  59. HACCEL haccel;
  60. ATOM hframeClass;
  61. HWND hMainWnd;
  62. HMENU hMenuFrame;
  63. HMENU hWindowsMenu;
  64. HMENU hLanguageMenu;
  65. HMENU hMenuView;
  66. HMENU hMenuOptions;
  67. HWND hmdiclient;
  68. HWND hstatusbar;
  69. HWND htoolbar;
  70. HWND hdrivebar;
  71. HFONT hfont;
  72. WCHAR num_sep;
  73. SIZE spaceSize;
  74. HIMAGELIST himl;
  75. WCHAR drives[BUFFER_LEN];
  76. BOOL prescan_node; /*TODO*/
  77. BOOL saveSettings;
  78. IShellFolder* iDesktop;
  79. IMalloc* iMalloc;
  80. UINT cfStrFName;
  81. } WINEFILE_GLOBALS;
  82. extern WINEFILE_GLOBALS Globals;