mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
move winefile into subsys/system
svn path=/trunk/; revision=10861
This commit is contained in:
parent
e3c3fe8e95
commit
384543f280
32 changed files with 170 additions and 1755 deletions
|
@ -262,7 +262,7 @@ std::string EncodeXMLString(LPCTSTR s)
|
|||
return get_utf8(buffer, o-buffer);
|
||||
}
|
||||
|
||||
String DecodeXMLString(LPCTSTR s)
|
||||
XS_String DecodeXMLString(LPCTSTR s)
|
||||
{
|
||||
LPTSTR buffer = (LPTSTR)alloca(sizeof(TCHAR)*_tcslen(s));
|
||||
LPTSTR o = buffer;
|
||||
|
@ -283,7 +283,7 @@ String DecodeXMLString(LPCTSTR s)
|
|||
} else
|
||||
*o++ = *p;
|
||||
|
||||
return String(buffer, o-buffer);
|
||||
return XS_String(buffer, o-buffer);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef _XMLSTORAGE_H
|
||||
|
||||
#include "expat.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
@ -68,11 +70,15 @@
|
|||
namespace XMLStorage {
|
||||
|
||||
|
||||
#ifndef _STRING_DEFINED
|
||||
#ifdef _STRING_DEFINED
|
||||
|
||||
#define XS_String String
|
||||
|
||||
#else
|
||||
|
||||
/// string class for TCHAR strings
|
||||
|
||||
struct String
|
||||
struct XS_String
|
||||
#ifdef UNICODE
|
||||
: public std::wstring
|
||||
#else
|
||||
|
@ -85,30 +91,30 @@ struct String
|
|||
typedef std::string super;
|
||||
#endif
|
||||
|
||||
String() {}
|
||||
String(LPCTSTR s) {if (s) super::assign(s);}
|
||||
String(LPCTSTR s, int l) : super(s, l) {}
|
||||
String(const super& other) : super(other) {}
|
||||
String(const String& other) : super(other) {}
|
||||
XS_String() {}
|
||||
XS_String(LPCTSTR s) {if (s) super::assign(s);}
|
||||
XS_String(LPCTSTR s, int l) : super(s, l) {}
|
||||
XS_String(const super& other) : super(other) {}
|
||||
XS_String(const XS_String& other) : super(other) {}
|
||||
|
||||
#ifdef UNICODE
|
||||
String(LPCSTR s) {assign(s);}
|
||||
String(LPCSTR s, int l) {assign(s, l);}
|
||||
String(const std::string& other) {assign(other.c_str());}
|
||||
String& operator=(LPCSTR s) {assign(s); return *this;}
|
||||
XS_String(LPCSTR s) {assign(s);}
|
||||
XS_String(LPCSTR s, int l) {assign(s, l);}
|
||||
XS_String(const std::string& other) {assign(other.c_str());}
|
||||
XS_String& operator=(LPCSTR s) {assign(s); return *this;}
|
||||
void assign(LPCSTR s) {if (s) {int bl=strlen(s); LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, bl, b, bl));} else erase();}
|
||||
void assign(LPCSTR s, int l) {if (s) {int bl=l; LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); super::assign(b, MultiByteToWideChar(CP_ACP, 0, s, l, b, bl));} else erase();}
|
||||
#else
|
||||
String(LPCWSTR s) {assign(s);}
|
||||
String(LPCWSTR s, int l) {assign(s, l);}
|
||||
String(const std::wstring& other) {assign(other.c_str());}
|
||||
String& operator=(LPCWSTR s) {assign(s); return *this;}
|
||||
XS_String(LPCWSTR s) {assign(s);}
|
||||
XS_String(LPCWSTR s, int l) {assign(s, l);}
|
||||
XS_String(const std::wstring& other) {assign(other.c_str());}
|
||||
XS_String& operator=(LPCWSTR s) {assign(s); return *this;}
|
||||
void assign(LPCWSTR s) {if (s) {int bl=wcslen(s); LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, bl, b, bl, 0, 0));} else erase();}
|
||||
void assign(LPCWSTR s, int l) {int bl=l; if (s) {LPSTR b=(LPSTR)alloca(bl); super::assign(b, WideCharToMultiByte(CP_ACP, 0, s, l, b, bl, 0, 0));} else erase();}
|
||||
#endif
|
||||
|
||||
String& operator=(LPCTSTR s) {if (s) super::assign(s); else erase(); return *this;}
|
||||
String& operator=(const super& s) {super::assign(s); return *this;}
|
||||
XS_String& operator=(LPCTSTR s) {if (s) super::assign(s); else erase(); return *this;}
|
||||
XS_String& operator=(const super& s) {super::assign(s); return *this;}
|
||||
void assign(LPCTSTR s) {super::assign(s);}
|
||||
void assign(LPCTSTR s, int l) {super::assign(s, l);}
|
||||
|
||||
|
@ -120,7 +126,7 @@ struct String
|
|||
operator std::wstring() const {int bl=length(); LPWSTR b=(LPWSTR)alloca(sizeof(WCHAR)*bl); return std::wstring(b, MultiByteToWideChar(CP_ACP, 0, c_str(), bl, b, bl));}
|
||||
#endif
|
||||
|
||||
String& printf(LPCTSTR fmt, ...)
|
||||
XS_String& printf(LPCTSTR fmt, ...)
|
||||
{
|
||||
va_list l;
|
||||
TCHAR b[BUFFER_LEN];
|
||||
|
@ -132,7 +138,7 @@ struct String
|
|||
return *this;
|
||||
}
|
||||
|
||||
String& vprintf(LPCTSTR fmt, va_list l)
|
||||
XS_String& vprintf(LPCTSTR fmt, va_list l)
|
||||
{
|
||||
TCHAR b[BUFFER_LEN];
|
||||
|
||||
|
@ -141,7 +147,7 @@ struct String
|
|||
return *this;
|
||||
}
|
||||
|
||||
String& appendf(LPCTSTR fmt, ...)
|
||||
XS_String& appendf(LPCTSTR fmt, ...)
|
||||
{
|
||||
va_list l;
|
||||
TCHAR b[BUFFER_LEN];
|
||||
|
@ -153,7 +159,7 @@ struct String
|
|||
return *this;
|
||||
}
|
||||
|
||||
String& vappendf(LPCTSTR fmt, va_list l)
|
||||
XS_String& vappendf(LPCTSTR fmt, va_list l)
|
||||
{
|
||||
TCHAR b[BUFFER_LEN];
|
||||
|
||||
|
@ -166,7 +172,7 @@ struct String
|
|||
#endif
|
||||
|
||||
|
||||
inline void assign_utf8(String& s, const char* str)
|
||||
inline void assign_utf8(XS_String& s, const char* str)
|
||||
{
|
||||
int lutf8 = strlen(str);
|
||||
|
||||
|
@ -200,13 +206,13 @@ inline std::string get_utf8(LPCTSTR s, int l)
|
|||
return std::string(buffer, l);
|
||||
}
|
||||
|
||||
inline std::string get_utf8(const String& s)
|
||||
inline std::string get_utf8(const XS_String& s)
|
||||
{
|
||||
return get_utf8(s.c_str(), s.length());
|
||||
}
|
||||
|
||||
extern std::string EncodeXMLString(LPCTSTR s);
|
||||
extern String DecodeXMLString(LPCTSTR s);
|
||||
extern XS_String DecodeXMLString(LPCTSTR s);
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
@ -279,11 +285,11 @@ protected:
|
|||
|
||||
#ifdef XML_UNICODE // Are XML_Char strings UTF-16 encoded?
|
||||
|
||||
typedef String String_from_XML_Char;
|
||||
typedef XS_String String_from_XML_Char;
|
||||
|
||||
#else
|
||||
|
||||
struct String_from_XML_Char : public String
|
||||
struct String_from_XML_Char : public XS_String
|
||||
{
|
||||
String_from_XML_Char(const XML_Char* str)
|
||||
{
|
||||
|
@ -297,7 +303,7 @@ struct String_from_XML_Char : public String
|
|||
#ifdef UNICODE
|
||||
|
||||
// optimization for faster UNICODE/ASCII string comparison without temporary A/U conversion
|
||||
inline bool operator==(const String& s1, const char* s2)
|
||||
inline bool operator==(const XS_String& s1, const char* s2)
|
||||
{
|
||||
LPCWSTR p = s1;
|
||||
const unsigned char* q = (const unsigned char*)s2;
|
||||
|
@ -313,13 +319,13 @@ inline bool operator==(const String& s1, const char* s2)
|
|||
|
||||
|
||||
/// in memory representation of an XML node
|
||||
struct XMLNode : public String
|
||||
struct XMLNode : public XS_String
|
||||
{
|
||||
#ifdef UNICODE
|
||||
// optimized read access without temporary A/U conversion when using ASCII attribute names
|
||||
struct AttributeMap : public std::map<String, String>
|
||||
struct AttributeMap : public std::map<XS_String, XS_String>
|
||||
{
|
||||
typedef std::map<String, String> super;
|
||||
typedef std::map<XS_String, XS_String> super;
|
||||
|
||||
const_iterator find(const char* x) const
|
||||
{
|
||||
|
@ -341,7 +347,7 @@ struct XMLNode : public String
|
|||
}
|
||||
};
|
||||
#else
|
||||
typedef std::map<String, String> AttributeMap;
|
||||
typedef std::map<XS_String, XS_String> AttributeMap;
|
||||
#endif
|
||||
|
||||
struct Children : public std::list<XMLNode*>
|
||||
|
@ -371,13 +377,13 @@ struct XMLNode : public String
|
|||
friend struct const_XMLPos;
|
||||
friend struct XMLReaderBase;
|
||||
|
||||
XMLNode(const String& name)
|
||||
: String(name)
|
||||
XMLNode(const XS_String& name)
|
||||
: XS_String(name)
|
||||
{
|
||||
}
|
||||
|
||||
XMLNode(const String& name, const std::string& leading)
|
||||
: String(name),
|
||||
XMLNode(const XS_String& name, const std::string& leading)
|
||||
: XS_String(name),
|
||||
_leading(leading)
|
||||
{
|
||||
}
|
||||
|
@ -411,7 +417,7 @@ struct XMLNode : public String
|
|||
_attributes.clear();
|
||||
_children.clear();
|
||||
|
||||
String::erase();
|
||||
XS_String::erase();
|
||||
}
|
||||
|
||||
XMLNode& operator=(const XMLNode& other)
|
||||
|
@ -435,19 +441,19 @@ struct XMLNode : public String
|
|||
}
|
||||
|
||||
/// write access to an attribute
|
||||
void put(const String& attr_name, const String& value)
|
||||
void put(const XS_String& attr_name, const XS_String& value)
|
||||
{
|
||||
_attributes[attr_name] = value;
|
||||
}
|
||||
|
||||
/// C++ write access to an attribute
|
||||
String& operator[](const String& attr_name)
|
||||
XS_String& operator[](const XS_String& attr_name)
|
||||
{
|
||||
return _attributes[attr_name];
|
||||
}
|
||||
|
||||
/// read only access to an attribute
|
||||
template<typename T> String get(const T& attr_name) const
|
||||
template<typename T> XS_String get(const T& attr_name) const
|
||||
{
|
||||
AttributeMap::const_iterator found = _attributes.find(attr_name);
|
||||
|
||||
|
@ -458,7 +464,7 @@ struct XMLNode : public String
|
|||
}
|
||||
|
||||
/// convenient value access in children node
|
||||
String subvalue(const String& name, const String& attr_name) const
|
||||
XS_String subvalue(const XS_String& name, const XS_String& attr_name) const
|
||||
{
|
||||
const XMLNode* node = find_first(name);
|
||||
|
||||
|
@ -469,7 +475,7 @@ struct XMLNode : public String
|
|||
}
|
||||
|
||||
/// convenient storage of distinct values in children node
|
||||
String& subvalue(const String& name, const String& attr_name)
|
||||
XS_String& subvalue(const XS_String& name, const XS_String& attr_name)
|
||||
{
|
||||
XMLNode* node = find_first(name);
|
||||
|
||||
|
@ -483,7 +489,7 @@ struct XMLNode : public String
|
|||
|
||||
#ifdef UNICODE
|
||||
/// convenient value access in children node
|
||||
String subvalue(const char* name, const char* attr_name) const
|
||||
XS_String subvalue(const char* name, const char* attr_name) const
|
||||
{
|
||||
const XMLNode* node = find_first(name);
|
||||
|
||||
|
@ -494,7 +500,7 @@ struct XMLNode : public String
|
|||
}
|
||||
|
||||
/// convenient storage of distinct values in children node
|
||||
String& subvalue(const char* name, const String& attr_name)
|
||||
XS_String& subvalue(const char* name, const XS_String& attr_name)
|
||||
{
|
||||
XMLNode* node = find_first(name);
|
||||
|
||||
|
@ -517,16 +523,16 @@ struct XMLNode : public String
|
|||
return _children;
|
||||
}
|
||||
|
||||
String get_content() const
|
||||
XS_String get_content() const
|
||||
{
|
||||
String ret;
|
||||
XS_String ret;
|
||||
|
||||
assign_utf8(ret, _content.c_str());
|
||||
|
||||
return DecodeXMLString(ret);
|
||||
}
|
||||
|
||||
void set_content(const String& s)
|
||||
void set_content(const XS_String& s)
|
||||
{
|
||||
_content.assign(EncodeXMLString(s));
|
||||
}
|
||||
|
@ -573,7 +579,7 @@ protected:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
XMLNode* find_first(const String& name) const
|
||||
XMLNode* find_first(const XS_String& name) const
|
||||
{
|
||||
for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it)
|
||||
if (**it == name)
|
||||
|
@ -582,7 +588,7 @@ protected:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
XMLNode* find_first(const String& name, const String& attr_name, const String& attr_value) const
|
||||
XMLNode* find_first(const XS_String& name, const XS_String& attr_name, const XS_String& attr_value) const
|
||||
{
|
||||
for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) {
|
||||
const XMLNode& node = **it;
|
||||
|
@ -627,13 +633,13 @@ protected:
|
|||
/// iterator access to children nodes with name filtering
|
||||
struct XMLChildrenFilter
|
||||
{
|
||||
XMLChildrenFilter(XMLNode::Children& children, const String& name)
|
||||
XMLChildrenFilter(XMLNode::Children& children, const XS_String& name)
|
||||
: _begin(children.begin(), children.end(), name),
|
||||
_end(children.end(), children.end(), name)
|
||||
{
|
||||
}
|
||||
|
||||
XMLChildrenFilter(XMLNode* node, const String& name)
|
||||
XMLChildrenFilter(XMLNode* node, const XS_String& name)
|
||||
: _begin(node->get_children().begin(), node->get_children().end(), name),
|
||||
_end(node->get_children().end(), node->get_children().end(), name)
|
||||
{
|
||||
|
@ -643,7 +649,7 @@ struct XMLChildrenFilter
|
|||
{
|
||||
typedef XMLNode::Children::iterator BaseIterator;
|
||||
|
||||
iterator(BaseIterator begin, BaseIterator end, const String& filter_name)
|
||||
iterator(BaseIterator begin, BaseIterator end, const XS_String& filter_name)
|
||||
: _cur(begin),
|
||||
_end(end),
|
||||
_filter_name(filter_name)
|
||||
|
@ -697,7 +703,7 @@ struct XMLChildrenFilter
|
|||
protected:
|
||||
BaseIterator _cur;
|
||||
BaseIterator _end;
|
||||
String _filter_name;
|
||||
XS_String _filter_name;
|
||||
|
||||
void search_next()
|
||||
{
|
||||
|
@ -725,13 +731,13 @@ protected:
|
|||
/// read only iterator access to children nodes with name filtering
|
||||
struct const_XMLChildrenFilter
|
||||
{
|
||||
const_XMLChildrenFilter(const XMLNode::Children& children, const String& name)
|
||||
const_XMLChildrenFilter(const XMLNode::Children& children, const XS_String& name)
|
||||
: _begin(children.begin(), children.end(), name),
|
||||
_end(children.end(), children.end(), name)
|
||||
{
|
||||
}
|
||||
|
||||
const_XMLChildrenFilter(const XMLNode* node, const String& name)
|
||||
const_XMLChildrenFilter(const XMLNode* node, const XS_String& name)
|
||||
: _begin(node->get_children().begin(), node->get_children().end(), name),
|
||||
_end(node->get_children().end(), node->get_children().end(), name)
|
||||
{
|
||||
|
@ -741,7 +747,7 @@ struct const_XMLChildrenFilter
|
|||
{
|
||||
typedef XMLNode::Children::const_iterator BaseIterator;
|
||||
|
||||
const_iterator(BaseIterator begin, BaseIterator end, const String& filter_name)
|
||||
const_iterator(BaseIterator begin, BaseIterator end, const XS_String& filter_name)
|
||||
: _cur(begin),
|
||||
_end(end),
|
||||
_filter_name(filter_name)
|
||||
|
@ -790,7 +796,7 @@ struct const_XMLChildrenFilter
|
|||
protected:
|
||||
BaseIterator _cur;
|
||||
BaseIterator _end;
|
||||
String _filter_name;
|
||||
XS_String _filter_name;
|
||||
|
||||
void search_next()
|
||||
{
|
||||
|
@ -830,28 +836,28 @@ struct XMLPos
|
|||
{ // don't copy _stack
|
||||
}
|
||||
|
||||
XMLPos(XMLNode* node, const String& name)
|
||||
XMLPos(XMLNode* node, const XS_String& name)
|
||||
: _root(node),
|
||||
_cur(node)
|
||||
{
|
||||
smart_create(name);
|
||||
}
|
||||
|
||||
XMLPos(XMLNode* node, const String& name, const String& attr_name, const String& attr_value)
|
||||
XMLPos(XMLNode* node, const XS_String& name, const XS_String& attr_name, const XS_String& attr_value)
|
||||
: _root(node),
|
||||
_cur(node)
|
||||
{
|
||||
smart_create(name, attr_name, attr_value);
|
||||
}
|
||||
|
||||
XMLPos(const XMLPos& other, const String& name)
|
||||
XMLPos(const XMLPos& other, const XS_String& name)
|
||||
: _root(other._root),
|
||||
_cur(other._cur)
|
||||
{
|
||||
smart_create(name);
|
||||
}
|
||||
|
||||
XMLPos(const XMLPos& other, const String& name, const String& attr_name, const String& attr_value)
|
||||
XMLPos(const XMLPos& other, const XS_String& name, const XS_String& attr_name, const XS_String& attr_value)
|
||||
: _root(other._root),
|
||||
_cur(other._cur)
|
||||
{
|
||||
|
@ -880,19 +886,19 @@ struct XMLPos
|
|||
XMLNode& operator*() {return *_cur;}
|
||||
|
||||
/// attribute access
|
||||
String get(const String& attr_name) const
|
||||
XS_String get(const XS_String& attr_name) const
|
||||
{
|
||||
return _cur->get(attr_name);
|
||||
}
|
||||
|
||||
void put(const String& attr_name, const String& value)
|
||||
void put(const XS_String& attr_name, const XS_String& value)
|
||||
{
|
||||
_cur->put(attr_name, value);
|
||||
}
|
||||
|
||||
/// C++ attribute access
|
||||
template<typename T> String get(const T& attr_name) const {return (*_cur)[attr_name];}
|
||||
String& operator[](const String& attr_name) {return (*_cur)[attr_name];}
|
||||
template<typename T> XS_String get(const T& attr_name) const {return (*_cur)[attr_name];}
|
||||
XS_String& operator[](const XS_String& attr_name) {return (*_cur)[attr_name];}
|
||||
|
||||
/// insert children when building tree
|
||||
void add_down(XMLNode* child)
|
||||
|
@ -925,7 +931,7 @@ struct XMLPos
|
|||
}
|
||||
|
||||
/// search for child and go down
|
||||
bool go_down(const String& name)
|
||||
bool go_down(const XS_String& name)
|
||||
{
|
||||
XMLNode* node = _cur->find_first(name);
|
||||
|
||||
|
@ -940,13 +946,13 @@ struct XMLPos
|
|||
bool go(const char* path);
|
||||
|
||||
/// create node and move to it
|
||||
void create(const String& name)
|
||||
void create(const XS_String& name)
|
||||
{
|
||||
add_down(new XMLNode(name));
|
||||
}
|
||||
|
||||
/// create node if not already existing and move to it
|
||||
void smart_create(const String& name)
|
||||
void smart_create(const XS_String& name)
|
||||
{
|
||||
XMLNode* node = _cur->find_first(name);
|
||||
|
||||
|
@ -957,7 +963,7 @@ struct XMLPos
|
|||
}
|
||||
|
||||
/// search matching child node identified by key name and an attribute value
|
||||
void smart_create(const String& name, const String& attr_name, const String& attr_value)
|
||||
void smart_create(const XS_String& name, const XS_String& attr_name, const XS_String& attr_value)
|
||||
{
|
||||
XMLNode* node = _cur->find_first(name, attr_name, attr_value);
|
||||
|
||||
|
@ -1016,8 +1022,8 @@ struct XMLPos
|
|||
}
|
||||
#endif
|
||||
|
||||
String& str() {return *_cur;}
|
||||
const String& str() const {return *_cur;}
|
||||
XS_String& str() {return *_cur;}
|
||||
const XS_String& str() const {return *_cur;}
|
||||
|
||||
protected:
|
||||
XMLNode* _root;
|
||||
|
@ -1062,13 +1068,13 @@ struct const_XMLPos
|
|||
const XMLNode& operator*() const {return *_cur;}
|
||||
|
||||
/// attribute access
|
||||
String get(const String& attr_name) const
|
||||
XS_String get(const XS_String& attr_name) const
|
||||
{
|
||||
return _cur->get(attr_name);
|
||||
}
|
||||
|
||||
/// C++ attribute access
|
||||
template<typename T> String get(const T& attr_name) const {return _cur->get(attr_name);}
|
||||
template<typename T> XS_String get(const T& attr_name) const {return _cur->get(attr_name);}
|
||||
|
||||
/// go back to previous position
|
||||
bool back()
|
||||
|
@ -1094,7 +1100,7 @@ struct const_XMLPos
|
|||
}
|
||||
|
||||
/// search for child and go down
|
||||
bool go_down(const String& name)
|
||||
bool go_down(const XS_String& name)
|
||||
{
|
||||
XMLNode* node = _cur->find_first(name);
|
||||
|
||||
|
@ -1122,7 +1128,7 @@ struct const_XMLPos
|
|||
}
|
||||
#endif
|
||||
|
||||
const String& str() const {return *_cur;}
|
||||
const XS_String& str() const {return *_cur;}
|
||||
|
||||
protected:
|
||||
const XMLNode* _root;
|
||||
|
@ -1140,7 +1146,7 @@ protected:
|
|||
|
||||
struct XMLBool
|
||||
{
|
||||
XMLBool(bool value)
|
||||
XMLBool(bool value=false)
|
||||
: _value(value)
|
||||
{
|
||||
}
|
||||
|
@ -1153,9 +1159,9 @@ struct XMLBool
|
|||
_value = def;
|
||||
}
|
||||
|
||||
XMLBool(const XMLNode* node, const String& attr_name, bool def=false)
|
||||
XMLBool(const XMLNode* node, const XS_String& attr_name, bool def=false)
|
||||
{
|
||||
const String& value = node->get(attr_name);
|
||||
const XS_String& value = node->get(attr_name);
|
||||
|
||||
if (!value.empty())
|
||||
_value = !_tcsicmp(value, TEXT("true"));
|
||||
|
@ -1187,7 +1193,7 @@ private:
|
|||
|
||||
struct XMLBoolRef
|
||||
{
|
||||
XMLBoolRef(XMLNode* node, const String& attr_name, bool def=false)
|
||||
XMLBoolRef(XMLNode* node, const XS_String& attr_name, bool def=false)
|
||||
: _ref((*node)[attr_name])
|
||||
{
|
||||
if (_ref.empty())
|
||||
|
@ -1222,7 +1228,7 @@ struct XMLBoolRef
|
|||
}
|
||||
|
||||
protected:
|
||||
String& _ref;
|
||||
XS_String& _ref;
|
||||
};
|
||||
|
||||
|
||||
|
@ -1241,9 +1247,9 @@ struct XMLInt
|
|||
_value = def;
|
||||
}
|
||||
|
||||
XMLInt(const XMLNode* node, const String& attr_name, int def=0)
|
||||
XMLInt(const XMLNode* node, const XS_String& attr_name, int def=0)
|
||||
{
|
||||
const String& value = node->get(attr_name);
|
||||
const XS_String& value = node->get(attr_name);
|
||||
|
||||
if (!value.empty())
|
||||
_value = _ttoi(value);
|
||||
|
@ -1256,7 +1262,7 @@ struct XMLInt
|
|||
return _value;
|
||||
}
|
||||
|
||||
operator String() const
|
||||
operator XS_String() const
|
||||
{
|
||||
TCHAR buffer[32];
|
||||
_stprintf(buffer, TEXT("%d"), _value);
|
||||
|
@ -1272,7 +1278,7 @@ private:
|
|||
|
||||
struct XMLIntRef
|
||||
{
|
||||
XMLIntRef(XMLNode* node, const String& attr_name, int def=0)
|
||||
XMLIntRef(XMLNode* node, const XS_String& attr_name, int def=0)
|
||||
: _ref((*node)[attr_name])
|
||||
{
|
||||
if (_ref.empty())
|
||||
|
@ -1300,13 +1306,13 @@ struct XMLIntRef
|
|||
}
|
||||
|
||||
protected:
|
||||
String& _ref;
|
||||
XS_String& _ref;
|
||||
};
|
||||
|
||||
|
||||
struct XMLString
|
||||
{
|
||||
XMLString(const String& value)
|
||||
XMLString(const XS_String& value)
|
||||
: _value(value)
|
||||
{
|
||||
}
|
||||
|
@ -1319,9 +1325,9 @@ struct XMLString
|
|||
_value = def;
|
||||
}
|
||||
|
||||
XMLString(const XMLNode* node, const String& attr_name, LPCTSTR def=TEXT(""))
|
||||
XMLString(const XMLNode* node, const XS_String& attr_name, LPCTSTR def=TEXT(""))
|
||||
{
|
||||
const String& value = node->get(attr_name);
|
||||
const XS_String& value = node->get(attr_name);
|
||||
|
||||
if (!value.empty())
|
||||
_value = value;
|
||||
|
@ -1329,18 +1335,18 @@ struct XMLString
|
|||
_value = def;
|
||||
}
|
||||
|
||||
operator const String&() const
|
||||
operator const XS_String&() const
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
const String& c_str() const
|
||||
const XS_String& c_str() const
|
||||
{
|
||||
return _value;
|
||||
}
|
||||
|
||||
protected:
|
||||
String _value;
|
||||
XS_String _value;
|
||||
|
||||
private:
|
||||
void operator=(const XMLString&); // disallow assignment operations
|
||||
|
@ -1348,46 +1354,46 @@ private:
|
|||
|
||||
struct XMStringRef
|
||||
{
|
||||
XMStringRef(XMLNode* node, const String& attr_name, LPCTSTR def=TEXT(""))
|
||||
XMStringRef(XMLNode* node, const XS_String& attr_name, LPCTSTR def=TEXT(""))
|
||||
: _ref((*node)[attr_name])
|
||||
{
|
||||
if (_ref.empty())
|
||||
assign(def);
|
||||
}
|
||||
|
||||
XMStringRef(XMLNode* node, const String& node_name, const String& attr_name, LPCTSTR def=TEXT(""))
|
||||
XMStringRef(XMLNode* node, const XS_String& node_name, const XS_String& attr_name, LPCTSTR def=TEXT(""))
|
||||
: _ref(node->subvalue(node_name, attr_name))
|
||||
{
|
||||
if (_ref.empty())
|
||||
assign(def);
|
||||
}
|
||||
|
||||
XMStringRef& operator=(const String& value)
|
||||
XMStringRef& operator=(const XS_String& value)
|
||||
{
|
||||
assign(value);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
operator const String&() const
|
||||
operator const XS_String&() const
|
||||
{
|
||||
return _ref;
|
||||
}
|
||||
|
||||
void assign(const String& value)
|
||||
void assign(const XS_String& value)
|
||||
{
|
||||
_ref.assign(value);
|
||||
}
|
||||
|
||||
protected:
|
||||
String& _ref;
|
||||
XS_String& _ref;
|
||||
};
|
||||
|
||||
|
||||
template<typename T>
|
||||
inline void read_option(T& var, const_XMLPos& cfg, LPCTSTR key)
|
||||
{
|
||||
const String& val = cfg.get(key);
|
||||
const XS_String& val = cfg.get(key);
|
||||
|
||||
if (!val.empty())
|
||||
var = val;
|
||||
|
@ -1396,7 +1402,7 @@ template<typename T>
|
|||
template<>
|
||||
inline void read_option(int& var, const_XMLPos& cfg, LPCTSTR key)
|
||||
{
|
||||
const String& val = cfg.get(key);
|
||||
const XS_String& val = cfg.get(key);
|
||||
|
||||
if (!val.empty())
|
||||
var = _ttoi(val);
|
||||
|
@ -1538,7 +1544,7 @@ struct XMLDoc : public XMLNode
|
|||
tifstream in(path);
|
||||
XMLReader reader(this, in);
|
||||
|
||||
return read(reader, String(path));
|
||||
return read(reader, XS_String(path));
|
||||
}
|
||||
|
||||
bool read(XMLReaderBase& reader)
|
||||
|
@ -1622,3 +1628,6 @@ struct XMLMessage : public XMLDoc
|
|||
|
||||
|
||||
} // namespace XMLStorage
|
||||
|
||||
#define _XMLSTORAGE_H
|
||||
#endif // _XMLSTORAGE_H
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
*.coff
|
||||
*.exe
|
||||
*.d
|
||||
*.o
|
||||
*.sym
|
||||
*.map
|
||||
Debug
|
||||
Release
|
||||
UDebug
|
||||
URelease
|
||||
winefileDebug
|
||||
winefileRelease
|
||||
winefileUDebug
|
||||
winefileURelease
|
||||
*.ncb
|
||||
*.opt
|
||||
*.aps
|
||||
*.ncb
|
||||
*.plg
|
|
@ -1,226 +0,0 @@
|
|||
/*
|
||||
Desktop creation example
|
||||
|
||||
Silver Blade (silverblade_uk@hotmail.com)
|
||||
5th July 2003
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "externals.h"
|
||||
|
||||
// Unicode support
|
||||
#ifdef UNICODE
|
||||
#define _UNICODE
|
||||
#endif
|
||||
#include <tchar.h>
|
||||
|
||||
|
||||
/* GetShellWindow is already present in the header files
|
||||
static HWND (WINAPI*GetShellWindow)(); */
|
||||
static BOOL (WINAPI*SetShellWindow)(HWND);
|
||||
|
||||
|
||||
BOOL IsAnyDesktopRunning()
|
||||
{
|
||||
/* POINT pt;*/
|
||||
HINSTANCE shell32 = GetModuleHandle(TEXT("user32"));
|
||||
|
||||
SetShellWindow = (BOOL(WINAPI*)(HWND)) GetProcAddress(shell32, "SetShellWindow");
|
||||
|
||||
/* GetShellWindow is already present in the header files
|
||||
GetShellWindow = (HWND(WINAPI*)()) GetProcAddress(shell32, "GetShellWindow");
|
||||
|
||||
if (GetShellWindow) */
|
||||
return GetShellWindow() != 0;
|
||||
/*
|
||||
pt.x = 0;
|
||||
pt.y = 0;
|
||||
|
||||
return WindowFromPoint(pt) != GetDesktopWindow(); */
|
||||
}
|
||||
|
||||
|
||||
LRESULT CALLBACK DeskWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch(uMsg)
|
||||
{
|
||||
case WM_CLOSE :
|
||||
{
|
||||
// Over-ride close. We need to close desktop some other way.
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_PAINT :
|
||||
{
|
||||
// We'd want to draw the desktop wallpaper here. Need to
|
||||
// maintain a copy of the wallpaper in an off-screen DC and then
|
||||
// bitblt (or stretchblt?) it to the screen appropriately. For
|
||||
// now, though, we'll just draw some text.
|
||||
|
||||
PAINTSTRUCT ps;
|
||||
HDC DesktopDC = BeginPaint(hwnd, &ps);
|
||||
|
||||
TCHAR Text [] = TEXT("ReactOS 0.1.2 Desktop Example\nby Silver Blade");
|
||||
|
||||
int Width, Height;
|
||||
|
||||
Width = GetSystemMetrics(SM_CXSCREEN);
|
||||
Height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
// This next part could be improved by working out how much
|
||||
// space the text actually needs...
|
||||
|
||||
{
|
||||
RECT r;
|
||||
r.left = Width - 260;
|
||||
r.top = Height - 80;
|
||||
r.right = r.left + 250;
|
||||
r.bottom = r.top + 40;
|
||||
|
||||
SetTextColor(DesktopDC, 0x00ffffff);
|
||||
SetBkMode(DesktopDC, TRANSPARENT);
|
||||
DrawText(DesktopDC, Text, -1, &r, DT_RIGHT);
|
||||
}
|
||||
|
||||
EndPaint(hwnd, &ps);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_LBUTTONDBLCLK:
|
||||
explorer_show_frame(hwnd, SW_SHOWNORMAL);
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
if (SetShellWindow)
|
||||
SetShellWindow(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
const TCHAR DesktopClassName[] = TEXT("DesktopWindow");
|
||||
|
||||
|
||||
HWND create_desktop_window(HINSTANCE hInstance)
|
||||
{
|
||||
WNDCLASSEX wc;
|
||||
HWND hwndDesktop;
|
||||
int Width, Height;
|
||||
|
||||
wc.cbSize = sizeof(WNDCLASSEX);
|
||||
wc.style = CS_DBLCLKS;
|
||||
wc.lpfnWndProc = &DeskWndProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = hInstance;
|
||||
wc.hIcon = LoadIcon(0, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor(0, IDC_ARROW);
|
||||
wc.hbrBackground= (HBRUSH) GetStockObject(BLACK_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName= DesktopClassName;
|
||||
wc.hIconSm = NULL;
|
||||
|
||||
if (!RegisterClassEx(&wc))
|
||||
return 0;
|
||||
|
||||
Width = GetSystemMetrics(SM_CXSCREEN);
|
||||
Height = GetSystemMetrics(SM_CYSCREEN);
|
||||
|
||||
hwndDesktop = CreateWindowEx(0, DesktopClassName, TEXT("Desktop"),
|
||||
WS_VISIBLE | WS_POPUP | WS_CLIPCHILDREN,
|
||||
0, 0, Width, Height,
|
||||
NULL, NULL, hInstance, NULL);
|
||||
|
||||
if (SetShellWindow)
|
||||
SetShellWindow(hwndDesktop);
|
||||
|
||||
return hwndDesktop;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _CONSOLE
|
||||
int main(int argc, char *argv[])
|
||||
#else
|
||||
int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nShowCmd)
|
||||
#endif
|
||||
{
|
||||
int ret;
|
||||
HWND hwndDesktop = 0;
|
||||
|
||||
#ifdef _CONSOLE
|
||||
STARTUPINFO startupinfo;
|
||||
int nShowCmd = SW_SHOWNORMAL;
|
||||
|
||||
HINSTANCE hInstance = GetModuleHandle(NULL);
|
||||
#endif
|
||||
|
||||
// create desktop window and task bar only, if there is no other shell and we are
|
||||
// the first explorer instance (just in case SetShellWindow() is not supported by the OS)
|
||||
BOOL startup_desktop = !IsAnyDesktopRunning() && !find_window_class(DesktopClassName);
|
||||
|
||||
#ifdef _CONSOLE
|
||||
if (argc>1 && !strcmp(argv[1],"-desktop"))
|
||||
#else
|
||||
if (!lstrcmp(lpCmdLine,TEXT("-desktop")))
|
||||
#endif
|
||||
startup_desktop = TRUE;
|
||||
|
||||
if (startup_desktop)
|
||||
{
|
||||
HWND hwndExplorerBar;
|
||||
|
||||
hwndDesktop = create_desktop_window(hInstance);
|
||||
|
||||
if (!hwndDesktop)
|
||||
{
|
||||
fprintf(stderr,"FATAL: Desktop window could not be initialized properly - Exiting.\n");
|
||||
return 1; // error
|
||||
}
|
||||
|
||||
#ifdef _CONSOLE
|
||||
// call winefile startup routine
|
||||
GetStartupInfo(&startupinfo);
|
||||
|
||||
if (startupinfo.dwFlags & STARTF_USESHOWWINDOW)
|
||||
nShowCmd = startupinfo.wShowWindow;
|
||||
#endif
|
||||
|
||||
// Initializing the Explorer Bar
|
||||
if (!(hwndExplorerBar=InitializeExplorerBar(hInstance)))
|
||||
{
|
||||
fprintf(stderr,"FATAL: Explorer bar could not be initialized properly ! Exiting !\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Load plugins
|
||||
if (!LoadAvailablePlugIns(hwndExplorerBar))
|
||||
{
|
||||
fprintf(stderr,"WARNING: No plugin for desktop bar could be loaded.\n");
|
||||
}
|
||||
|
||||
#ifndef _DEBUG //MF: disabled for debugging
|
||||
#ifdef _CONSOLE
|
||||
startup(argc, argv); // invoke the startup groups
|
||||
#else
|
||||
{
|
||||
char* argv[] = {""};
|
||||
startup(1, argv);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
ret = explorer_main(hInstance, hwndDesktop, nShowCmd);
|
||||
|
||||
ReleaseAvailablePlugIns();
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
6
|
||||
Calculator
|
||||
calc.exe
|
||||
Excel
|
||||
excel.exe
|
||||
Word
|
||||
winword.exe
|
||||
Explorer
|
||||
explorer.exe
|
||||
cmd Prompt
|
||||
cmd.exe
|
||||
File Manager
|
||||
winefile.exe
|
|
@ -1,52 +0,0 @@
|
|||
#
|
||||
# ReactOS winfile explorer
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
|
||||
PATH_TO_TOP = ../../../..
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = windows
|
||||
|
||||
TARGET_NAME = explorer
|
||||
|
||||
TARGET_CFLAGS = -fexceptions -O2 -DNDEBUG -DWIN32 -D_ROS_ -W -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||
|
||||
TARGET_RCFLAGS = -DNDEBUG -DWIN32 -D_ROS_ -D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501
|
||||
|
||||
ifdef UNICODE
|
||||
TARGET_CFLAGS += -DUNICODE
|
||||
TARGET_CPPFLAGS += -DUNICODE
|
||||
MK_DEFENTRY := _wWinMain@16
|
||||
endif
|
||||
|
||||
VPATH += ../utility
|
||||
VPATH += ../shell
|
||||
VPATH += plugins
|
||||
|
||||
TARGET_GCCLIBS = comctl32 ole32 uuid
|
||||
|
||||
TARGET_SDKLIBS = \
|
||||
kernel32.a \
|
||||
user32.a \
|
||||
gdi32.a \
|
||||
advapi32.a \
|
||||
version.a
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
desktop.o \
|
||||
ex_bar.o \
|
||||
ex_clock.o \
|
||||
ex_menu.o \
|
||||
ex_shutdwn.o \
|
||||
license.o \
|
||||
startup.o \
|
||||
winefile.o
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
|
@ -1,418 +0,0 @@
|
|||
// Explorer Panel (PlugIn based)
|
||||
//
|
||||
// Alexander Ciobanu
|
||||
// alex@prodidactica.md
|
||||
//
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ex_bar.h"
|
||||
|
||||
HFONT tf;
|
||||
|
||||
#ifdef _PLUGINS
|
||||
HINSTANCE PlugInsHI[4]; // PlugIns table
|
||||
#else
|
||||
struct PluginCalls* PlugInsCallTable[4]; // PlugIn Call table
|
||||
#endif
|
||||
|
||||
int PlugNumber = -1; // Number of loaded plugins
|
||||
|
||||
LRESULT WINAPI ExplorerBarProc(HWND, UINT, WPARAM, LPARAM);
|
||||
|
||||
|
||||
//#define TASKBAR_AT_TOP
|
||||
#define TASKBAR_HEIGHT 30
|
||||
|
||||
|
||||
// Loads a configuration style given by PInt
|
||||
// FIXME : Load all these values from registry !
|
||||
//
|
||||
DWORD LoadProperty(int PInt)
|
||||
{
|
||||
switch(PInt)
|
||||
{
|
||||
case 1: // WS_EX_Style for creating the bar
|
||||
return WS_EX_PALETTEWINDOW;
|
||||
break;
|
||||
case 2: // WS_Style for creating the bar
|
||||
return WS_POPUP | WS_THICKFRAME | WS_CLIPCHILDREN | WS_VISIBLE;
|
||||
break;
|
||||
case 3: // Start X for the panel
|
||||
return -2; // hide border
|
||||
break;
|
||||
case 4: // Start Y for the panel
|
||||
#ifdef TASKBAR_AT_TOP
|
||||
return -2;
|
||||
#else
|
||||
return GetSystemMetrics(SM_CYSCREEN)-TASKBAR_HEIGHT;
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
return GetSystemMetrics(SM_CXSCREEN)+4; // XLen for the panel
|
||||
break;
|
||||
case 6:
|
||||
return TASKBAR_HEIGHT+2; // YLen for the panel
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Initialize and create the Explorer Panel
|
||||
HWND InitializeExplorerBar(HINSTANCE hInstance)
|
||||
{
|
||||
HWND ExplorerBar;
|
||||
WNDCLASS ExplorerBarClass;
|
||||
|
||||
ExplorerBarClass.lpszClassName = TEXT("Shell_TrayWnd"); // ExplorerBar classname
|
||||
ExplorerBarClass.lpfnWndProc = ExplorerBarProc; // Default Explorer Callback Procedure
|
||||
ExplorerBarClass.style = 0; // Styles
|
||||
ExplorerBarClass.hInstance = hInstance; // Instance
|
||||
ExplorerBarClass.hIcon = LoadIcon(0, IDI_APPLICATION); // Configurable ????
|
||||
ExplorerBarClass.hCursor = LoadCursor(0, IDC_ARROW);
|
||||
ExplorerBarClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); // BackGround
|
||||
ExplorerBarClass.lpszMenuName = NULL; // No Menu needed for the bar
|
||||
ExplorerBarClass.cbClsExtra = 0;
|
||||
ExplorerBarClass.cbWndExtra = 0;
|
||||
|
||||
if (!RegisterClass(&ExplorerBarClass))
|
||||
{
|
||||
fprintf(stderr, "Could not register Explorer Bar. Last error was 0x%X\n",GetLastError());
|
||||
return 0;
|
||||
}
|
||||
|
||||
ExplorerBar = CreateWindowEx(LoadProperty(1), TEXT("Shell_TrayWnd"),
|
||||
TEXT("ReactOS Explorer Bar"), LoadProperty(2), LoadProperty(3), LoadProperty(4),
|
||||
LoadProperty(5), LoadProperty(6), 0, 0, hInstance, 0);
|
||||
if (!ExplorerBar)
|
||||
{
|
||||
fprintf(stderr, "Cold not create Explorer Bar. Last error 0x%X\n",GetLastError());
|
||||
return 0;
|
||||
}
|
||||
|
||||
tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
|
||||
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
|
||||
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
|
||||
|
||||
ShowWindow(ExplorerBar, SW_SHOW); // Show the bar
|
||||
|
||||
return ExplorerBar;
|
||||
}
|
||||
|
||||
|
||||
// **************************************************************************************
|
||||
// * GENERAL PLUGIN CONTROL ROUTINES *
|
||||
// **************************************************************************************
|
||||
|
||||
|
||||
// Reload a plug-in's configuration
|
||||
//
|
||||
static int ReloadPlugInConfiguration(int ID)
|
||||
{
|
||||
#ifdef _PLUGINS
|
||||
PReloadConfig PP = (PReloadConfig)GetProcAddress(PlugInsHI[ID],/*"_"*/"ReloadPlugInConfiguration");
|
||||
|
||||
if (!PP)
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d, of Instance %0x ReloadPlugInConfig Failed\n",ID,PlugInsHI[ID]);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PReloadConfig PP = PlugInsCallTable[ID]->ReloadPlugInConfiguration;
|
||||
#endif
|
||||
|
||||
return PP();
|
||||
}
|
||||
|
||||
int QuitPlugIn(int ID)
|
||||
{
|
||||
#ifdef _PLUGINS
|
||||
PQuitPlugIn PP = (PQuitPlugIn)GetProcAddress(PlugInsHI[ID],/*"_"*/"QuitPlugIn");
|
||||
|
||||
if (!PP)
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d, of Instance %0x QuitPlugIn Failed\n",ID,PlugInsHI[ID]);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PQuitPlugIn PP = PlugInsCallTable[ID]->QuitPlugIn;
|
||||
#endif
|
||||
|
||||
PP();
|
||||
|
||||
// FreeLibrary(PlugInsHI[ID]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int CallBackPlugIn(int ID, HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
#ifdef _PLUGINS
|
||||
PPlugInCallBack PP = (PPlugInCallBack)GetProcAddress(PlugInsHI[ID],/*"_"*/"PlugInMessageProc");
|
||||
if (!PP)
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d, of Instance %0x CallBackPlugIn Failed\n",ID,PlugInsHI[ID]);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PPlugInCallBack PP = PlugInsCallTable[ID]->PlugInMessageProc;
|
||||
#endif
|
||||
|
||||
return PP(PlgnHandle,Msg,wParam,lParam);
|
||||
}
|
||||
|
||||
int PostExplorerInfo(int ID, HWND ExplHandle)
|
||||
{
|
||||
EXBARINFO Info;
|
||||
RECT rect;
|
||||
|
||||
#ifdef _PLUGINS
|
||||
PExplorerInfo PP = (PExplorerInfo)GetProcAddress(PlugInsHI[ID],/*"_"*/"ExplorerInfo");
|
||||
|
||||
if (!PP)
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d, of Instance %0x PostExplorerInfo Failed\n",ID,PlugInsHI[ID]);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PExplorerInfo PP = PlugInsCallTable[ID]->ExplorerInfo;
|
||||
#endif
|
||||
|
||||
GetWindowRect(ExplHandle,&rect);
|
||||
Info.x=rect.left;
|
||||
Info.dx=rect.right-rect.left;
|
||||
|
||||
Info.y=rect.top;
|
||||
Info.dy=rect.bottom-rect.top;
|
||||
|
||||
return PP(&Info);
|
||||
}
|
||||
|
||||
|
||||
int InitializePlugIn(int ID, HWND ExplHandle)
|
||||
{
|
||||
#ifdef _PLUGINS
|
||||
PInitializePlugIn PP = (PInitializePlugIn)GetProcAddress(PlugInsHI[ID],/*"_"*/"InitializePlugIn");
|
||||
if (!PP)
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d, of Instance %0x InitializePlugIn Failed\n",ID,PlugInsHI[ID]);
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PInitializePlugIn PP = PlugInsCallTable[ID]->InitializePlugIn;
|
||||
#endif
|
||||
|
||||
return PP(ExplHandle);
|
||||
}
|
||||
|
||||
|
||||
int InitPlugin(int ID, HWND ExplWnd)
|
||||
{
|
||||
if (!PostExplorerInfo(ID, ExplWnd))
|
||||
{
|
||||
fprintf(stderr, "PLUGIN %d : WARNING : Haven't received Explorer information !\n");
|
||||
}
|
||||
|
||||
if (!InitializePlugIn(ID, ExplWnd))
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d : WARNING : Could not be initialized !\n",ID);
|
||||
}
|
||||
|
||||
if (!ReloadPlugInConfiguration(ID))
|
||||
{
|
||||
fprintf(stderr,"PLUGIN %d : WARNING : Could not load configuration !\n",ID);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _PLUGINS
|
||||
int LoadLocalPlugIn(char* fname, HWND ExplWnd)
|
||||
{
|
||||
PlugNumber++;
|
||||
PlugInsHI[PlugNumber]=LoadLibraryA(fname);
|
||||
if (!(PlugInsHI[PlugNumber])) return 0; // Could not load plugin
|
||||
|
||||
InitPlugin(PlugNumber);
|
||||
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Load All Available plugins
|
||||
// FIXME : Plugins MUST be listed in Registry ! not in file
|
||||
// For now, it only loads the buit-in plugin
|
||||
//
|
||||
int LoadAvailablePlugIns(HWND ExplWnd)
|
||||
{
|
||||
#ifdef _PLUGINS
|
||||
|
||||
FILE* Conf; // Configuration File;
|
||||
char line[80]; // Blah Blah Blah
|
||||
int i;
|
||||
int x;
|
||||
int k;
|
||||
|
||||
if (!(Conf=fopen("ex_bar.ini","r"))) // Error !
|
||||
{
|
||||
fprintf(stderr,"DefaultPlugin : No PLUGIN configuration file found !\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fgets(line,80,Conf); // Read how many entries are in the file
|
||||
k = atoi(line); // atoi it ! We get how many plugIns do we have
|
||||
|
||||
|
||||
for (i=0;i<k;i++)
|
||||
{ // Read stuff :)
|
||||
fgets(line,80,Conf);
|
||||
for (x=0;line[x];x++) if (line[x]<14){line[x]=0;break;}
|
||||
|
||||
if (!LoadLocalPlugIn(line,ExplWnd)) PlugNumber--;
|
||||
}
|
||||
fclose(Conf);
|
||||
|
||||
#else
|
||||
|
||||
// static initialisation of plugins
|
||||
|
||||
PlugInsCallTable[++PlugNumber] = &plugincalls_Menu;
|
||||
InitPlugin(PlugNumber, ExplWnd);
|
||||
|
||||
PlugInsCallTable[++PlugNumber] = &plugincalls_Shutdown;
|
||||
InitPlugin(PlugNumber, ExplWnd);
|
||||
|
||||
PlugInsCallTable[++PlugNumber] = &plugincalls_Clock;
|
||||
InitPlugin(PlugNumber, ExplWnd);
|
||||
|
||||
#endif
|
||||
|
||||
return PlugNumber+1; // Just one plugin loaded for now !
|
||||
}
|
||||
|
||||
// Release all available plugins
|
||||
// FIXME : MUST really quit all plugins
|
||||
//
|
||||
int ReleaseAvailablePlugIns()
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<PlugNumber+1;i++)
|
||||
QuitPlugIn(i);
|
||||
return i;
|
||||
}
|
||||
|
||||
// Pass messages to all available plugins
|
||||
// FIXME : MUST pass messages to all available plugins NOT just Default one
|
||||
|
||||
int CallBackPlugIns(HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int i;
|
||||
for (i=0;i<PlugNumber+1;i++)
|
||||
CallBackPlugIn(i, PlgnHandle, Msg, wParam, lParam);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// **************************************************************************************
|
||||
// **************************************************************************************
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------- PlugIns control Functions !
|
||||
|
||||
|
||||
/*
|
||||
int WINAPI WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpszCmdLine,
|
||||
int nCmdShow)
|
||||
{
|
||||
MSG msg;
|
||||
HWND ExplHnd;
|
||||
|
||||
// Initializing the Explorer Bar !
|
||||
//
|
||||
|
||||
if (!(ExplHnd=InitializeExplorerBar(hInstance)))
|
||||
{
|
||||
fprintf(stderr,"FATAL : Explorer bar could not be initialized properly ! Exiting !\n");
|
||||
return 1;
|
||||
}
|
||||
// Load plugins !
|
||||
if (!LoadAvailablePlugIns(ExplHnd))
|
||||
{
|
||||
fprintf(stderr,"FATAL : No plugin could be loaded ! Exiting !\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
while(GetMessage(&msg, 0, 0, 0))
|
||||
{
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
}
|
||||
|
||||
DeleteObject(tf);
|
||||
ReleaseAvailablePlugIns();
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
LRESULT CALLBACK ExplorerBarProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hDC;
|
||||
|
||||
switch(msg) {
|
||||
case WM_PAINT:
|
||||
hDC = BeginPaint(hWnd, &ps);
|
||||
SelectObject(hDC, tf);
|
||||
EndPaint(hWnd, &ps);
|
||||
CallBackPlugIns(hWnd,msg,wParam,lParam);
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
// Over-ride close. We close desktop with shutdown button
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
case WM_NCHITTEST: {
|
||||
LRESULT res = DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
if (res>=HTSIZEFIRST && res<=HTSIZELAST) {
|
||||
#ifdef TASKBAR_AT_TOP
|
||||
if (res == HTBOTTOM) // enable vertical resizing at the lower border
|
||||
#else
|
||||
if (res == HTTOP) // enable vertical resizing at the upper border
|
||||
#endif
|
||||
return res;
|
||||
else
|
||||
return HTCLIENT; // disable any other resizing
|
||||
}
|
||||
return res;}
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
if ((wParam&0xFFF0) == SC_SIZE) {
|
||||
#ifdef TASKBAR_AT_TOP
|
||||
if (wParam == SC_SIZE+6)// enable vertical resizing at the lower border
|
||||
#else
|
||||
if (wParam == SC_SIZE+3)// enable vertical resizing at the upper border
|
||||
#endif
|
||||
goto def;
|
||||
else
|
||||
return 0; // disable any other resizing
|
||||
}
|
||||
goto def;
|
||||
|
||||
default: def:
|
||||
CallBackPlugIns(hWnd, msg, wParam, lParam);
|
||||
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
//
|
||||
// Explorer Shutdown PlugIn
|
||||
//
|
||||
// Alexander Ciobanu
|
||||
// alex@prodidactica.md
|
||||
//
|
||||
|
||||
/*
|
||||
This file Contains structures and other stuff needed to develop plugins for
|
||||
Explorer Bar
|
||||
*/
|
||||
typedef struct _EXBAR_INFO {
|
||||
int x;
|
||||
int y;
|
||||
int dx;
|
||||
int dy;
|
||||
} EXBARINFO, *PEXBARINFO;
|
||||
|
||||
|
||||
typedef int (*PInitializePlugIn)(HWND ExplorerHandle);
|
||||
typedef int (*PQuitPlugIn)();
|
||||
typedef char*(*PPlugInInfo)(int InfoNmbr);
|
||||
typedef int (*PPlugInCallBack)(HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam);
|
||||
typedef int (*PReloadConfig)();
|
||||
typedef int (*PExplorerInfo)(EXBARINFO* info);
|
||||
|
||||
struct PluginCalls {
|
||||
PInitializePlugIn InitializePlugIn;
|
||||
PQuitPlugIn QuitPlugIn;
|
||||
PReloadConfig ReloadPlugInConfiguration;
|
||||
PPlugInInfo PlugInInfo;
|
||||
PExplorerInfo ExplorerInfo;
|
||||
PPlugInCallBack PlugInMessageProc;
|
||||
};
|
||||
|
||||
|
||||
#ifndef _PLUGINS
|
||||
extern struct PluginCalls plugincalls_Menu;
|
||||
extern struct PluginCalls plugincalls_Shutdown;
|
||||
extern struct PluginCalls plugincalls_Clock;
|
||||
#endif
|
|
@ -1,143 +0,0 @@
|
|||
//
|
||||
// Explorer Clock Plugin
|
||||
//
|
||||
// Alexander Ciobanu
|
||||
// alex@prodidactica.md
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "ex_bar.h"
|
||||
|
||||
HWND Static;
|
||||
HWND Wnd;
|
||||
char locstr[20];
|
||||
|
||||
int ex_x1;
|
||||
int ex_y1;
|
||||
int ex_dx;
|
||||
int ex_dy;
|
||||
|
||||
// Initialize the plugin
|
||||
//
|
||||
static int InitializePlugIn(HWND ExplorerHandle)
|
||||
{
|
||||
SYSTEMTIME systime;
|
||||
TCHAR TimeStr[20];
|
||||
|
||||
fprintf(stderr,"EX_CLOCK : INITIALIZE PLUGIN call\n");
|
||||
|
||||
SetTimer(ExplorerHandle,500,1000,NULL);
|
||||
GetLocalTime(&systime);
|
||||
wsprintf(TimeStr,TEXT("%02d:%02d"),systime.wHour,systime.wMinute);
|
||||
|
||||
Static = CreateWindow(
|
||||
TEXT("STATIC"),TimeStr,WS_VISIBLE | WS_CHILD | SS_CENTER | SS_SUNKEN,
|
||||
ex_dx+ex_x1-100, 4, 50, ex_dy-14, ExplorerHandle, NULL,
|
||||
(HINSTANCE) GetWindowLong(ExplorerHandle, GWL_HINSTANCE),NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get Information about the plugin
|
||||
//
|
||||
char* PlugInInfo(int InfoNmbr)
|
||||
{
|
||||
static char Info[256];
|
||||
|
||||
fprintf(stderr,"EX_CLOCK : INFORMATION PLUGIN call\n");
|
||||
|
||||
switch(InfoNmbr)
|
||||
{
|
||||
case 0: // PlugIn Name
|
||||
strcpy(Info,"ReactOSClock");
|
||||
break;
|
||||
|
||||
case 1: // Version
|
||||
strcpy(Info,"0.1");
|
||||
break;
|
||||
|
||||
case 2: // Vendor name
|
||||
strcpy(Info,"ReactOS team");
|
||||
break;
|
||||
|
||||
default: // Default : Error
|
||||
strcpy(Info,"-");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return Info;
|
||||
}
|
||||
|
||||
// Reload plugin's configuration
|
||||
//
|
||||
static int ReloadPlugInConfiguration()
|
||||
{
|
||||
fprintf(stderr,"EX_CLOCK : RELOAD PLUGIN COFIGURATION call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Quit plugin
|
||||
//
|
||||
static int QuitPlugIn()
|
||||
{
|
||||
fprintf(stderr,"EX_CLOCK : QUIT PLUGIN call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Callback procedure for plugin
|
||||
//
|
||||
static int PlugInMessageProc(HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static int blink = 0;
|
||||
|
||||
SYSTEMTIME systime;
|
||||
TCHAR TimeStr[20];
|
||||
|
||||
// The plugin must decide whatever the handle passed is created by it !
|
||||
// Sorry for bad english :-)
|
||||
//
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_TIMER:
|
||||
GetLocalTime(&systime);
|
||||
wsprintf(TimeStr, TEXT("%02d%c%02d"), systime.wHour, blink?':':' ', systime.wMinute);
|
||||
blink ^= 1;
|
||||
SendMessage(Static,WM_SETTEXT,0,(LPARAM)TimeStr);
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ExplorerInfo(EXBARINFO* info)
|
||||
{
|
||||
fprintf(stderr,"EX_CLOCK : EXPLORER INFO PLUGIN call\n");
|
||||
ex_x1=info->x;
|
||||
ex_y1=info->y;
|
||||
ex_dx=info->dx;
|
||||
ex_dy=info->dy;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _PLUGIN
|
||||
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
fprintf(stderr,"EX_CLOCK PlugIn loaded succesefully\n");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct PluginCalls plugincalls_Clock = {
|
||||
InitializePlugIn,
|
||||
QuitPlugIn,
|
||||
ReloadPlugInConfiguration,
|
||||
PlugInInfo,
|
||||
ExplorerInfo,
|
||||
PlugInMessageProc
|
||||
};
|
||||
|
|
@ -1,201 +0,0 @@
|
|||
//
|
||||
// Explorer Start Menu PlugIn (Example)
|
||||
//
|
||||
// Alexander Ciobanu
|
||||
// alex@prodidactica.md
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ex_bar.h"
|
||||
|
||||
HWND epl_AppButtons[10];
|
||||
char epl_line[10][80];
|
||||
int epl_Buttons;
|
||||
|
||||
int ex_x1;
|
||||
int ex_y1;
|
||||
int ex_dx;
|
||||
int ex_dy;
|
||||
|
||||
// Initialize the plugin
|
||||
//
|
||||
static int InitializePlugIn(HWND ExplorerHandle)
|
||||
{
|
||||
FILE* Conf; // Configuration File;
|
||||
char line[80]; // Blah Blah Blah
|
||||
char ttl[80]; // Title of the button
|
||||
int i;
|
||||
int x;
|
||||
|
||||
HINSTANCE hinst = (HINSTANCE) GetWindowLong(ExplorerHandle, GWL_HINSTANCE);
|
||||
|
||||
fprintf(stderr,"EX_MENU : INITIALIZE PLUGIN call\n");
|
||||
|
||||
CreateWindow(TEXT("BUTTON"), TEXT("Start"), WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,
|
||||
2, 2, 50, ex_dy-10, ExplorerHandle, NULL, hinst, 0);
|
||||
|
||||
if (!(Conf=fopen("explorer.lst","r"))) // Error !
|
||||
{
|
||||
fprintf(stderr,"DefaultPlugin : No configuration file found !\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
fgets(line,80,Conf); // Read how many entries are in the file
|
||||
epl_Buttons=atoi(line); // atoi it !
|
||||
|
||||
for (i=0;i<epl_Buttons;i++)
|
||||
{
|
||||
fgets(ttl,80,Conf); // Read stuff :)
|
||||
fgets(line,80,Conf);
|
||||
|
||||
for (x=0;ttl[x];x++) if (ttl[x]<14){ttl[x]=0;break;}
|
||||
for (x=0;line[x];x++) if (line[x]<14){line[x]=0;break;}
|
||||
|
||||
// FIXME : Got to get rid of #13,#10 at the end of the lines !!!!!!!!!!!!!!!!!!!
|
||||
|
||||
strcpy(epl_line[i],line);
|
||||
|
||||
epl_AppButtons[i] = CreateWindow(
|
||||
TEXT("BUTTON"),ttl/*@@*/, WS_VISIBLE|WS_CHILD|BS_PUSHBUTTON,
|
||||
60+(i*102)+2, 2, 100, ex_dy-10, ExplorerHandle, NULL, hinst, 0);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get Information about the plugin
|
||||
//
|
||||
static char* PlugInInfo(int InfoNmbr)
|
||||
{
|
||||
static char Info[256];
|
||||
|
||||
fprintf(stderr,"EX_MENU : INFORMATION PLUGIN call\n");
|
||||
|
||||
switch(InfoNmbr)
|
||||
{
|
||||
case 0: // PlugIn Name
|
||||
strcpy(Info,"ApplicationLauncher");
|
||||
break;
|
||||
|
||||
case 1: // Version
|
||||
strcpy(Info,"0.1");
|
||||
break;
|
||||
|
||||
case 2: // Vendor name
|
||||
strcpy(Info,"ReactOS team");
|
||||
break;
|
||||
|
||||
default: // Default : Error
|
||||
strcpy(Info,"-");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return Info;
|
||||
}
|
||||
|
||||
// Reload plugin's configuration
|
||||
//
|
||||
static int ReloadPlugInConfiguration()
|
||||
{
|
||||
fprintf(stderr,"EX_MENU : RELOAD PLUGIN COFIGURATION call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Quit plugin
|
||||
//
|
||||
static int QuitPlugIn()
|
||||
{
|
||||
fprintf(stderr,"EX_MENU : QUIT PLUGIN call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// display a windows error message
|
||||
static void display_error(HWND hwnd, DWORD error)
|
||||
{
|
||||
PTSTR msg;
|
||||
|
||||
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, error, MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT), (PTSTR)&msg, 0, NULL))
|
||||
MessageBox(hwnd, msg, TEXT("ROS Explorer"), MB_OK);
|
||||
else
|
||||
MessageBox(hwnd, TEXT("Error"), TEXT("ROS Explorer"), MB_OK);
|
||||
|
||||
LocalFree(msg);
|
||||
}
|
||||
|
||||
// launch a program or document file
|
||||
static BOOL launch_file(HWND hwnd, LPSTR cmd, UINT nCmdShow)
|
||||
{
|
||||
HINSTANCE hinst = ShellExecuteA(hwnd, NULL/*operation*/, cmd, NULL/*parameters*/, NULL/*dir*/, nCmdShow);
|
||||
|
||||
if ((int)hinst <= 32) {
|
||||
display_error(hwnd, GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
// Callback procedure for plugin
|
||||
//
|
||||
static int PlugInMessageProc(HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
int i;
|
||||
|
||||
// The plugin must decide whatever the handle passed is created by it !
|
||||
// Sorry for bad english :-)
|
||||
//
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
for (i=0;i<epl_Buttons;i++)
|
||||
{
|
||||
if ((HWND)lParam==epl_AppButtons[i])
|
||||
{
|
||||
printf("Pressed Button Line : %s\n",epl_line[i]);
|
||||
launch_file(PlgnHandle, epl_line[i], SW_SHOWNORMAL);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Callback function to get ExplorerBar's information
|
||||
//
|
||||
static int ExplorerInfo(EXBARINFO* info)
|
||||
{
|
||||
fprintf(stderr,"EX_MENU : EXPLORER INFO PLUGIN call\n");
|
||||
ex_x1=info->x;
|
||||
ex_y1=info->y;
|
||||
ex_dx=info->dx;
|
||||
ex_dy=info->dy;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _PLUGIN
|
||||
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
fprintf(stderr,"EX_MENU PlugIn loaded succesefully\n");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct PluginCalls plugincalls_Menu = {
|
||||
InitializePlugIn,
|
||||
QuitPlugIn,
|
||||
ReloadPlugInConfiguration,
|
||||
PlugInInfo,
|
||||
ExplorerInfo,
|
||||
PlugInMessageProc
|
||||
};
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
//
|
||||
// Explorer Shutdown PlugIn
|
||||
//
|
||||
// Alexander Ciobanu
|
||||
// alex@prodidactica.md
|
||||
//
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "ex_bar.h"
|
||||
|
||||
HWND ShwButton;
|
||||
HWND Wnd;
|
||||
|
||||
int ex_x1;
|
||||
int ex_y1;
|
||||
int ex_dx;
|
||||
int ex_dy;
|
||||
|
||||
// Initialize the plugin
|
||||
//
|
||||
static int InitializePlugIn(HWND ExplorerHandle)
|
||||
{
|
||||
fprintf(stderr,"EX_SHUTDWN : INITIALIZE PLUGIN call\n");
|
||||
|
||||
ShwButton = CreateWindow(
|
||||
TEXT("BUTTON"),TEXT("+"),WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON,
|
||||
ex_dx+ex_x1-33, 4, 25, ex_dy-14, ExplorerHandle, NULL,
|
||||
(HINSTANCE) GetWindowLong(ExplorerHandle, GWL_HINSTANCE),NULL);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get Information about the plugin
|
||||
//
|
||||
static char* PlugInInfo(int InfoNmbr)
|
||||
{
|
||||
static char Info[256];
|
||||
|
||||
fprintf(stderr,"EX_SHUTDWN : INFORMATION PLUGIN call\n");
|
||||
|
||||
switch(InfoNmbr)
|
||||
{
|
||||
case 0: // PlugIn Name
|
||||
strcpy(Info,"ReactOSShutdown");
|
||||
break;
|
||||
|
||||
case 1: // Version
|
||||
strcpy(Info,"0.1");
|
||||
break;
|
||||
|
||||
case 2: // Vendor name
|
||||
strcpy(Info,"ReactOS team");
|
||||
break;
|
||||
|
||||
default: // Default : Error
|
||||
strcpy(Info,"-");
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return Info;
|
||||
}
|
||||
|
||||
// Reload plugin's configuration
|
||||
//
|
||||
static int ReloadPlugInConfiguration()
|
||||
{
|
||||
fprintf(stderr,"EX_SHUTDWN : RELOAD PLUGIN COFIGURATION call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Quit plugin
|
||||
//
|
||||
static int QuitPlugIn()
|
||||
{
|
||||
fprintf(stderr,"EX_SHUTDWN : QUIT PLUGIN call\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Callback procedure for plugin
|
||||
//
|
||||
static int PlugInMessageProc(HWND PlgnHandle, UINT Msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
||||
// The plugin must decide whatever the handle passed is created by it !
|
||||
// Sorry for bad english :-)
|
||||
//
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
if ((HWND)lParam==ShwButton)
|
||||
{
|
||||
printf("Pressed ShutDown Button : \n");
|
||||
DestroyWindow(PlgnHandle);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ExplorerInfo(EXBARINFO* info)
|
||||
{
|
||||
fprintf(stderr,"EX_SHUTDWN : EXPLORER INFO PLUGIN call\n");
|
||||
ex_x1=info->x;
|
||||
ex_y1=info->y;
|
||||
ex_dx=info->dx;
|
||||
ex_dy=info->dy;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef _PLUGIN
|
||||
BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved)
|
||||
{
|
||||
fprintf(stderr,"EX_SHUTDWN PlugIn loaded succesefully\n");
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
struct PluginCalls plugincalls_Shutdown = {
|
||||
InitializePlugIn,
|
||||
QuitPlugIn,
|
||||
ReloadPlugInConfiguration,
|
||||
PlugInInfo,
|
||||
ExplorerInfo,
|
||||
PlugInMessageProc
|
||||
};
|
||||
|
|
@ -1,343 +0,0 @@
|
|||
# Microsoft Developer Studio Project File - Name="wine_explore" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=wine_explore - Win32 Unicode Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "wine_explore.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "wine_explore.mak" CFG="wine_explore - Win32 Unicode Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "wine_explore - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "wine_explore - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "wine_explore - Win32 Debug Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "wine_explore - Win32 Unicode Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "wine_explore - Win32 Unicode Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.cmd
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "wine_explore - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_ROS_" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x407 /i ".." /d "NDEBUG" /d "_WINEFILE_"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_ROS_" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||
# ADD RSC /l 0x407 /i ".." /d "_DEBUG" /d "_WINEFILE_"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "wineExplorer___Win32_Debug_Release"
|
||||
# PROP BASE Intermediate_Dir "wineExplorer___Win32_Debug_Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "DRelease"
|
||||
# PROP Intermediate_Dir "DRelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_ROS_" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /Zi /O2 /D "NDEBUG" /D "WIN32" /D "_ROS_" /FR /YX /FD /c
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x407 /i ".." /d "NDEBUG" /d "_WINEFILE_"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "wineExplorer___Win32_Unicode_Release"
|
||||
# PROP BASE Intermediate_Dir "wineExplorer___Win32_Unicode_Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "."
|
||||
# PROP Intermediate_Dir "URelease"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /YX /FD /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x407 /d "NDEBUG"
|
||||
# ADD RSC /l 0x407 /i ".." /d "NDEBUG" /d "_WINEFILE_"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /machine:I386
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "wineExplorer___Win32_Unicode_Debug"
|
||||
# PROP BASE Intermediate_Dir "wineExplorer___Win32_Unicode_Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "UDebug"
|
||||
# PROP Intermediate_Dir "UDebug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /FR /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "UNICODE" /D "_ROS_" /FR /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x407 /d "_DEBUG"
|
||||
# ADD RSC /l 0x407 /i ".." /d "_DEBUG" /d "_WINEFILE_"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "wine_explore - Win32 Release"
|
||||
# Name "wine_explore - Win32 Debug"
|
||||
# Name "wine_explore - Win32 Debug Release"
|
||||
# Name "wine_explore - Win32 Unicode Release"
|
||||
# Name "wine_explore - Win32 Unicode Debug"
|
||||
# Begin Group "resources"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\de.rc
|
||||
|
||||
!IF "$(CFG)" == "wine_explore - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Release"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Debug"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\drivebar.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\en.rc
|
||||
|
||||
!IF "$(CFG)" == "wine_explore - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Release"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Debug"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\images.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.rc
|
||||
|
||||
!IF "$(CFG)" == "wine_explore - Win32 Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Debug Release"
|
||||
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Release"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ELSEIF "$(CFG)" == "wine_explore - Win32 Unicode Debug"
|
||||
|
||||
# PROP BASE Exclude_From_Build 1
|
||||
# PROP Exclude_From_Build 1
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\toolbar.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\winefile.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\winefile.rc
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "plugins"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\plugins\ex_bar.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\plugins\ex_bar.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\plugins\ex_clock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\plugins\ex_menu.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\plugins\ex_shutdwn.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\desktop.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\explorer.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\externals.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\makefile
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\shell\startup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\utility\utility.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\winefile.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\winefile.h
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
|
@ -1,41 +0,0 @@
|
|||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "make_explorer"=.\make_winefile.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "wine_explore"=.\wine_explore.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
41
reactos/subsys/system/winefile/Makefile
Normal file
41
reactos/subsys/system/winefile/Makefile
Normal file
|
@ -0,0 +1,41 @@
|
|||
#
|
||||
# ReactOS winefile
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NAME = winefile
|
||||
TARGET_TYPE = program
|
||||
TARGET_APPTYPE = windows
|
||||
TARGET_INSTALLDIR := .
|
||||
|
||||
TARGET_CFLAGS := \
|
||||
-D__USE_W32API -DWIN32 -D_ROS_ \
|
||||
-D_WIN32_IE=0x0501 -D_WIN32_WINNT=0x0501 \
|
||||
-DUNICODE -Wall
|
||||
|
||||
TARGET_CPPFLAGS := $(TARGET_CFLAGS)
|
||||
|
||||
TARGET_RCFLAGS := -D__USE_W32API -DNDEBUG -DWIN32 -D_ROS_ -D__WINDRES__ -DUNICODE
|
||||
|
||||
TARGET_SDKLIBS = \
|
||||
kernel32.a \
|
||||
user32.a \
|
||||
gdi32.a \
|
||||
comctl32.a \
|
||||
ole32.a \
|
||||
oleaut32.a
|
||||
|
||||
TARGET_GCCLIBS := uuid
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
license.o \
|
||||
winefile.o
|
||||
|
||||
DEP_OBJECTS := $(TARGET_OBJECTS)
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
include $(TOOLS_PATH)/depend.mk
|
BIN
reactos/subsys/system/winefile/drivebar.bmp
Normal file
BIN
reactos/subsys/system/winefile/drivebar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 742 B |
BIN
reactos/subsys/system/winefile/images.bmp
Normal file
BIN
reactos/subsys/system/winefile/images.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -30,7 +30,7 @@ IDA_WINEFILE ACCELERATORS DISCARDABLE
|
|||
|
||||
IDI_WINEFILE ICON DISCARDABLE
|
||||
#ifdef _WIN32
|
||||
"../res/winefile.ico"
|
||||
"winefile.ico"
|
||||
#else
|
||||
{
|
||||
'00 00 01 00 01 00 20 20 10 00 00 00 00 00 E8 02'
|
||||
|
@ -86,7 +86,7 @@ IDI_WINEFILE ICON DISCARDABLE
|
|||
|
||||
IDB_TOOLBAR BITMAP DISCARDABLE
|
||||
#ifdef _WIN32
|
||||
"../res/toolbar.bmp"
|
||||
"toolbar.bmp"
|
||||
#else
|
||||
{
|
||||
'42 4D BE 03 00 00 00 00 00 00 76 00 00 00 28 00'
|
||||
|
@ -154,7 +154,7 @@ IDB_TOOLBAR BITMAP DISCARDABLE
|
|||
|
||||
IDB_DRIVEBAR BITMAP DISCARDABLE
|
||||
#ifdef _WIN32
|
||||
"../res/drivebar.bmp"
|
||||
"drivebar.bmp"
|
||||
#else
|
||||
{
|
||||
'42 4D E6 02 00 00 00 00 00 00 76 00 00 00 28 00'
|
||||
|
@ -209,7 +209,7 @@ IDB_DRIVEBAR BITMAP DISCARDABLE
|
|||
|
||||
IDB_IMAGES BITMAP DISCARDABLE
|
||||
#ifdef _WIN32
|
||||
"../res/images.bmp"
|
||||
"images.bmp"
|
||||
#else
|
||||
{
|
||||
'42 4D 86 04 00 00 00 00 00 00 76 00 00 00 28 00'
|
BIN
reactos/subsys/system/winefile/toolbar.bmp
Normal file
BIN
reactos/subsys/system/winefile/toolbar.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
|
@ -2510,7 +2510,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
|||
}
|
||||
|
||||
if (calcWidthCol == -1) {
|
||||
focusRect.left = img_pos -2;
|
||||
focusRect.left = img_pos - 2;
|
||||
|
||||
#ifdef _NO_EXTENSIONS
|
||||
if (pane->treePane && entry) {
|
||||
|
@ -3721,12 +3721,12 @@ void explorer_show_frame(HWND hwndParent, int cmdshow)
|
|||
|
||||
ShowWindow(Globals.hMainWnd, cmdshow);
|
||||
|
||||
#if defined(_SHELL_FOLDERS) && !defined(__WINE__)
|
||||
// Shell Namespace as default:
|
||||
child = alloc_child_window(path, get_path_pidl(path,Globals.hMainWnd), Globals.hMainWnd);
|
||||
#else
|
||||
//#if defined(_SHELL_FOLDERS) && !defined(__WINE__)
|
||||
// // Shell Namespace as default:
|
||||
// child = alloc_child_window(path, get_path_pidl(path,Globals.hMainWnd), Globals.hMainWnd);
|
||||
//#else
|
||||
child = alloc_child_window(path, NULL, Globals.hMainWnd);
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
child->pos.showCmd = SW_SHOWMAXIMIZED;
|
||||
child->pos.rcNormalPosition.left = 0;
|
||||
|
@ -3819,8 +3819,6 @@ int explorer_main(HINSTANCE hinstance, HWND hwndParent, int cmdshow)
|
|||
}
|
||||
|
||||
|
||||
#ifndef _ROS_
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hinstance,
|
||||
HINSTANCE previnstance,
|
||||
LPSTR cmdline,
|
||||
|
@ -3835,5 +3833,3 @@ int APIENTRY WinMain(HINSTANCE hinstance,
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -27,7 +27,7 @@ CFG=winefile - Win32 Unicode Debug
|
|||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.cmd
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
|
@ -53,7 +53,7 @@ RSC=rc.exe
|
|||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
|
@ -79,7 +79,7 @@ LINK32=link.cmd
|
|||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
|
@ -106,7 +106,7 @@ LINK32=link.cmd
|
|||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
|
@ -133,7 +133,7 @@ LINK32=link.cmd
|
|||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.cmd
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 user32.lib gdi32.lib advapi32.lib comctl32.lib shell32.lib comdlg32.lib ole32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
|
@ -155,7 +155,7 @@ SOURCE=.\de.rc
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\drivebar.bmp
|
||||
SOURCE=.\drivebar.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -164,7 +164,7 @@ SOURCE=.\en.rc
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\images.bmp
|
||||
SOURCE=.\images.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -177,11 +177,11 @@ SOURCE=.\resource.rc
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\toolbar.bmp
|
||||
SOURCE=.\toolbar.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\res\winefile.ico
|
||||
SOURCE=.\winefile.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
@ -41,9 +41,7 @@
|
|||
#include <tchar.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h> /* for alloca() */
|
||||
#endif
|
||||
|
||||
#ifndef _NO_EXTENSIONS
|
||||
#define _SHELL_FOLDERS
|
BIN
reactos/subsys/system/winefile/winefile.ico
Normal file
BIN
reactos/subsys/system/winefile/winefile.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
Loading…
Reference in a new issue