Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Sonovo2014 #2838

Closed
wants to merge 11 commits into from
Commits on Oct 25, 2013
  1. yty
  2. yty
  3. yty

    add customWinProc.

    yty authored
Commits on Oct 26, 2013
  1. yty

    Merge pull request #5 from openframeworks/master

    yty authored
    update openframeworks
  2. yty
  3. yty

    Merge pull request #6 from yty/master

    yty authored
    update master to sonovo-master
Commits on Feb 7, 2014
  1. yty

    Merge pull request #16 from openframeworks/master

    yty authored
    update openframeworks
Commits on Feb 10, 2014
  1. yty

    Merge pull request #21 from openframeworks/master

    yty authored
    update openframeworks
Commits on Feb 12, 2014
  1. yty

    Merge pull request #23 from openframeworks/master

    yty authored
    update openframeworks
Commits on Feb 22, 2014
  1. yty

    Merge pull request #25 from openframeworks/master

    yty authored
    update openframeworks
Commits on Mar 10, 2014
  1. yty

    Merge pull request #27 from openframeworks/master

    yty authored
    update openframeworks
This page is out of date. Refresh to see the latest.
4 libs/openFrameworks/app/ofAppGlutWindow.cpp
View
@@ -45,7 +45,7 @@ static ofOrientation orientation;
static ofBaseApp * ofAppPtr;
#ifdef TARGET_WIN32
-
+void (*customWinProc)(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam) = NULL;
//------------------------------------------------
// this is to fix a bug with glut that doesn't properly close the app
@@ -136,7 +136,7 @@ static LRESULT CALLBACK winProc(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lPara
//we catch close and destroy messages
//and send them to OF
-
+ if(customWinProc != NULL) customWinProc(hwnd, Msg,wParam,lParam);
switch(Msg){
case WM_CLOSE:
1  libs/openFrameworks/app/ofAppRunner.h
View
@@ -86,4 +86,5 @@ void ofSetVerticalSync(bool bSync);
#if defined(TARGET_WIN32)
HGLRC ofGetWGLContext();
HWND ofGetWin32Window();
+ extern void (*customWinProc)(HWND hwnd, UINT Msg, WPARAM wParam, LPARAM lParam);
#endif
10 libs/openFrameworks/communication/ofSerial.cpp
View
@@ -280,15 +280,15 @@ void ofSerial::close(){
//----------------------------------------------------------------
bool ofSerial::setup(){
- return setup(0,9600); // the first one, at 9600 is a good choice...
+ return setup(0,9600,'N',8,1); // the first one, at 9600 is a good choice...
}
//----------------------------------------------------------------
-bool ofSerial::setup(int deviceNumber, int baud){
+bool ofSerial::setup(int deviceNumber, int baud, char parity,int dataBits,int stopBits){
buildDeviceList();
if( deviceNumber < (int)devices.size() ){
- return setup(devices[deviceNumber].devicePath, baud);
+ return setup(devices[deviceNumber].devicePath, baud, parity, dataBits, stopBits);
}else{
ofLogError("ofSerial") << "couldn't find device " << deviceNumber << ", only " << devices.size() << " devices found";
return false;
@@ -297,7 +297,7 @@ bool ofSerial::setup(int deviceNumber, int baud){
}
//----------------------------------------------------------------
-bool ofSerial::setup(string portName, int baud){
+bool ofSerial::setup(string portName, int baud, char parity,int dataBits,int stopBits){
bInited = false;
@@ -416,7 +416,7 @@ bool ofSerial::setup(string portName, int baud){
cfgSize=sizeof(cfg);
GetCommConfig(hComm,&cfg,&cfgSize);
int bps = baud;
- sprintf(buf,"baud=%d parity=N data=8 stop=1",bps);
+ sprintf(buf,"baud=%d parity=%c data=%d stop=%d",bps,parity,dataBits,stopBits);
#if (_MSC_VER) // microsoft visual studio
// msvc doesn't like BuildCommDCB,
6 libs/openFrameworks/communication/ofSerial.h
View
@@ -38,9 +38,9 @@ class ofSerial {
vector <ofSerialDeviceInfo> getDeviceList();
void close();
- bool setup(); // use default port, baud (0,9600)
- bool setup(string portName, int baudrate);
- bool setup(int deviceNumber, int baudrate);
+ bool setup(); // use default port, baud (0,9600,'N',8,1)
+ bool setup(string portName, int baudrate, char parity = 'N',int dataBits = 8, int stopBits = 1);
+ bool setup(int deviceNumber, int baudrate, char parity = 'N',int dataBits = 8, int stopBits = 1);
int readBytes(unsigned char * buffer, int length);
12 libs/openFrameworks/utils/ofXml.cpp
View
@@ -166,6 +166,18 @@ string ofXml::toString() const
return tmp;
}
+void ofXml::addInstruction(const string& target,const string& data){
+
+ Poco::XML::ProcessingInstruction *docPI = getPocoDocument()->createProcessingInstruction(target,data);
+ getPocoDocument()->appendChild((Poco::XML::Node*)docPI);
+}
+
+void ofXml::addComment( const string& str){
+
+ Poco::XML::Comment* pe = getPocoDocument()->createComment(str);
+ document->appendChild((Poco::XML::Node*)pe);
+}
+
void ofXml::addXml( ofXml& xml, bool copyAll ) {
Poco::XML::Node *n = 0;
2  libs/openFrameworks/utils/ofXml.h
View
@@ -39,6 +39,8 @@ class ofXml: public ofBaseFileSerializer {
bool load(const string & path);
bool save(const string & path);
+ void addInstruction(const string& target,const string& data);
+ void addComment( const string& str);
bool addChild( const string& path );
void addXml( ofXml& xml, bool copyAll = false);
2  libs/quicktime/include/Processes.h
View
@@ -192,7 +192,7 @@ EXTERN_API( OSErr )
GetNextProcess (ProcessSerialNumber * PSN) THREEWORDINLINE(0x3F3C, 0x0038, 0xA88F);
EXTERN_API( OSErr )
-GetProcessInformation (const ProcessSerialNumber * PSN,
+GetQTProcessInformation (const ProcessSerialNumber * PSN,
ProcessInfoRec * info) THREEWORDINLINE(0x3F3C, 0x003A, 0xA88F);
EXTERN_API( OSErr )
Something went wrong with that request. Please try again.