Skip to content

Commit

Permalink
Merge pull request #4 from underdoeg/master
Browse files Browse the repository at this point in the history
basic linux (gtk) version
  • Loading branch information
ofZach committed Aug 29, 2013
2 parents c5a996e + dbfceb5 commit aaf420b
Show file tree
Hide file tree
Showing 22 changed files with 1,819 additions and 2,383 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@
*.a

.DS_STORE

# linux specific
obj/
*~
2 changes: 2 additions & 0 deletions example/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include config.make
include $(OF_ROOT)/libs/openFrameworksCompiled/project/makefileCommon/Makefile.examples
1 change: 1 addition & 0 deletions example/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ofxNativeGui
53 changes: 53 additions & 0 deletions example/config.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# add custom variables to this file

# OF_ROOT allows to move projects outside apps/* just set this variable to the
# absoulte path to the OF root folder

OF_ROOT = ../../..


# USER_CFLAGS allows to pass custom flags to the compiler
# for example search paths like:
# USER_CFLAGS = -I src/objects

USER_CFLAGS = `pkg-config gtk+-3.0 --cflags`


# USER_LDFLAGS allows to pass custom flags to the linker
# for example libraries like:
# USER_LDFLAGS = libs/libawesomelib.a

USER_LDFLAGS =


EXCLUDE_FROM_SOURCE="bin,.xcodeproj,obj"

# change this to add different compiler optimizations to your project

USER_COMPILER_OPTIMIZATION = -march=native -mtune=native -Os


# android specific, in case you want to use different optimizations
USER_LIBS_ARM =
USER_LIBS_ARM7 =
USER_LIBS_NEON =

# android optimizations

ANDROID_COMPILER_OPTIMIZATION = -Os

NDK_PLATFORM = android-8

# uncomment this for custom application name (if the folder name is different than the application name)
#APPNAME = folderName

# uncomment this for custom package name, must be the same as the java package that contains OFActivity
#PKGNAME = cc.openframeworks.$(APPNAME)





# linux arm flags

LINUX_ARM7_COMPILER_OPTIMIZATIONS = -march=armv7-a -mtune=cortex-a8 -finline-functions -funroll-all-loops -O3 -funsafe-math-optimizations -mfpu=neon -ftree-vectorize -mfloat-abi=hard -mfpu=vfp
50 changes: 25 additions & 25 deletions example/src/testApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,95 +2,95 @@

//--------------------------------------------------------------
void testApp::setup(){
ofSetFrameRate(60);

comboVals.push_back("one");
comboVals.push_back("two");
comboVals.push_back("three");

sliderVal = 0;
comboVal = 0; //"no combo selected yet";
enteredText = "no entered text yet";
// --------------- setup the gui window

GUI.setup(ofRectangle(0,0,300,300), "my sample gui");

GUI.setEventInterface(this);

GUI.addComboBox("combo", ofRectangle(10, 50, 100, 30), comboVals, &comboVal);
GUI.addSlider("slider", ofRectangle(10, 90, 180, 20), -2, 2, 0, &sliderVal);
GUI.addTextEntry("textBox", "please enter text here", ofRectangle(10,120,180,100), &enteredText);
// doing this in the setup() means the window pops behind. I do it in update after 1 full frame, so it pops in front.

// doing this in the setup() means the window pops behind. I do it in update after 1 full frame, so it pops in front.
// GUI.Show();

}

//--------------------------------------------------------------
void testApp::update(){
GUI.update();
if (ofGetFrameNum() == 2) GUI.show();
}

//--------------------------------------------------------------
void testApp::draw(){


ofDrawBitmapStringHighlight(comboVals[comboVal] , ofPoint(400,30));
ofDrawBitmapStringHighlight(ofToString(sliderVal), ofPoint(400,60));
ofDrawBitmapStringHighlight(enteredText, ofPoint(400,90));


}

//--------------------------------------------------------------
void testApp::keyPressed(int key){


}

//--------------------------------------------------------------
void testApp::keyReleased(int key){


}

//--------------------------------------------------------------
void testApp::mouseMoved(int x, int y ){

}

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){

}

//--------------------------------------------------------------
void testApp::windowResized(int w, int h){

}

//--------------------------------------------------------------
void testApp::gotMessage(ofMessage msg){

}

//--------------------------------------------------------------
void testApp::dragEvent(ofDragInfo dragInfo){
void testApp::dragEvent(ofDragInfo dragInfo){

}

//--------------------------------------------------------------
void testApp::guiEvent(nativeWidget & widget){
cout << "gui event " << widget.name << endl;
}

61 changes: 0 additions & 61 deletions src/IVT/Cocoa/CocoaApplicationHandler.cpp

This file was deleted.

86 changes: 0 additions & 86 deletions src/IVT/Cocoa/CocoaImplementation.h

This file was deleted.

Loading

0 comments on commit aaf420b

Please sign in to comment.