Created
January 1, 2012 19:47
-
-
Save veosotano/1548157 to your computer and use it in GitHub Desktop.
vp's proposed architecture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After putting some effort into porting i came up with a thought maybe the current architecture is not that good for cross platform and cross target working. before i spend two hundred lines on explaining why i think so, i better use the time to write down my idea: | |
so we need two new classes | |
class AXR { | |
AXR::AXR(list<string> xml, cairo_t* cr); | |
void set_cr(cairo_t* cr); | |
void render(); //utilizing AXRRender | |
void dispatchEvent(void* event); //not sure which struct here | |
.... | |
}; | |
and | |
virtual class AXRWrapper {} | |
with derived | |
class WindowsWrapper : public AXRWrapper { //standalone | |
WindowsWrapper(){ | |
//create window | |
//get drawing context | |
//setup event loop | |
//query file | |
//load it | |
new AXR(filebuffer, drawingcontext); | |
} | |
... | |
} | |
and (!) | |
class ChromeWrapper : public AXRWrapper { //plugin | |
ChromeWrapper(){ | |
//get transfered http data brom browser | |
//get drawing context of page (even via canvas tag as fallback, everything possible) | |
//event listener and stuff | |
new AXR(serverrespond, browsercanvas); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment