Skip to content

Commit

Permalink
batch commit 28/06/2012 - 19:22:29.99
Browse files Browse the repository at this point in the history
  • Loading branch information
skn3 committed Jun 28, 2012
1 parent 45adca0 commit e05e8d9
Show file tree
Hide file tree
Showing 11 changed files with 1,824 additions and 1,678 deletions.
Binary file modified .bmx/systemex.bmx.debug.win32.x86.o
Binary file not shown.
2,985 changes: 1,529 additions & 1,456 deletions .bmx/systemex.bmx.debug.win32.x86.s

Large diffs are not rendered by default.

Binary file modified .bmx/systemex.bmx.release.win32.x86.o
Binary file not shown.
467 changes: 248 additions & 219 deletions .bmx/systemex.bmx.release.win32.x86.s

Large diffs are not rendered by default.

28 changes: 27 additions & 1 deletion systemex.bmx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ about:
End Rem
Module skn3.systemex

ModuleInfo "History: 1.01"
ModuleInfo "History: Added GetMousePosition() function"
ModuleInfo "History: 1.00"
ModuleInfo "History: Initial Release To Public"

Expand Down Expand Up @@ -175,7 +177,8 @@ End Extern
Extern "win32"
Function skn3_getAsyncKeyState:Int(character:Int) = "GetAsyncKeyState@4"
Function skn3_getVersionEx(versioninfo:Byte Ptr) = "GetVersionExW@4"
Function skn3_getTempPath(length:Int,buffer:Byte Ptr) = "GetTempPathW@8"
Function skn3_getTempPath(Length:Int,buffer:Byte Ptr) = "GetTempPathW@8"
Function skn3_getCursorPos(point:Byte ptr) = "GetCursorPos@4"
EndExtern

?MacOs
Expand Down Expand Up @@ -336,6 +339,7 @@ Extern
Function skn3_requestFile:String(text:String,exts:String,save:Int,multiple:Int,file:String,dir:String)
Function skn3_getOsVersionInfo(major:Int Ptr,minor:Int Ptr,bugFix:Int Ptr)
Function skn3_getTemporaryDirectory:String()
Function skn3_getMousePosition:Int[]()
End Extern
?

Expand Down Expand Up @@ -718,4 +722,26 @@ End Rem
Function KeepSystemAlive()
' --- shortcut for keeping the system alive ---
If Driver Driver.Poll()
End Function

Rem
bbdoc: Get the mouse position. <b>[Win Mac]</b>
about:
<b>Supported Platforms</b>
<ul>
<li>Windows</li>
<li>Mac</li>
</ul>
<b>Info</b>
<p>Get the mouse position by using the OS directly.</p>
End Rem
Function GetMousePosition:Int[]()
' --- get mouse position from os ---
?Win32
Local point:Int[2]
skn3_getCursorPos(point)
Return point
?MacOs
Return skn3_getMousePosition()
?
End Function
Binary file modified systemex.debug.win32.x86.a
Binary file not shown.
6 changes: 5 additions & 1 deletion systemex.debug.win32.x86.i
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ModuleInfo "History: 1.01"
ModuleInfo "History: Added GetMousePosition() function"
ModuleInfo "History: 1.00"
ModuleInfo "History: Initial Release To Public"
import brl.blitz
Expand All @@ -11,10 +13,12 @@ WINDOWS_7%=5
skn3_requestFile$(text$,exts$,defext%,save%,multiple%,file$,dir$)="skn3_requestFile"
skn3_getAsyncKeyState%(character%)S="GetAsyncKeyState@4"
skn3_getVersionEx%(versioninfo@*)S="GetVersionExW@4"
skn3_getTempPath%(length%,buffer@*)S="GetTempPathW@8"
skn3_getTempPath%(Length%,buffer@*)S="GetTempPathW@8"
skn3_getCursorPos%(point@*)S="GetCursorPos@4"
RequestFiles$&[](text$,exts$,save%,multiple%,path$)="skn3_systemex_RequestFiles"
TranslateKey%(Code%)="skn3_systemex_TranslateKey"
IsKeyDown%(Code%)="skn3_systemex_IsKeyDown"
GetOsVersion%()="skn3_systemex_GetOsVersion"
GetTempDirectory$(resetCache%=0)="skn3_systemex_GetTempDirectory"
KeepSystemAlive%()="skn3_systemex_KeepSystemAlive"
GetMousePosition%&[]()="skn3_systemex_GetMousePosition"
1 change: 1 addition & 0 deletions systemex.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ void skn3_getOsVersionInfo(unsigned *major, unsigned *minor, unsigned *bugFix);
int skn3_isKeyDown(CGKeyCode code);
BBString *skn3_requestFile( BBString *title,BBString *exts,int save,int multiple,BBString *file,BBString *dir);
BBString *skn3_getTemporaryDirectory();
BBArray * skn3_getMousePosition();

#endif
9 changes: 9 additions & 0 deletions systemex.mac.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,13 @@ int skn3_isKeyDown(CGKeyCode code) {
NSString *tempDir = NSTemporaryDirectory();
if (tempDir == nil) { tempDir = @"/tmp"; }
return stringFromNSString(tempDir);
}

BBArray * skn3_getMousePosition() {
BBArray *result = bbArrayNew1D("i",2);
int *p = (int*)BBARRAYDATA(result,1);
NSPoint mouseLoc;
mouseLoc = [NSEvent mouseLocation];
p[0] = mouseLoc.x;
p[1] = mouseLoc.y;
}
Binary file modified systemex.release.win32.x86.a
Binary file not shown.
6 changes: 5 additions & 1 deletion systemex.release.win32.x86.i
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ModuleInfo "History: 1.01"
ModuleInfo "History: Added GetMousePosition() function"
ModuleInfo "History: 1.00"
ModuleInfo "History: Initial Release To Public"
import brl.blitz
Expand All @@ -11,10 +13,12 @@ WINDOWS_7%=5
skn3_requestFile$(text$,exts$,defext%,save%,multiple%,file$,dir$)="skn3_requestFile"
skn3_getAsyncKeyState%(character%)S="GetAsyncKeyState@4"
skn3_getVersionEx%(versioninfo@*)S="GetVersionExW@4"
skn3_getTempPath%(length%,buffer@*)S="GetTempPathW@8"
skn3_getTempPath%(Length%,buffer@*)S="GetTempPathW@8"
skn3_getCursorPos%(point@*)S="GetCursorPos@4"
RequestFiles$&[](text$,exts$,save%,multiple%,path$)="skn3_systemex_RequestFiles"
TranslateKey%(Code%)="skn3_systemex_TranslateKey"
IsKeyDown%(Code%)="skn3_systemex_IsKeyDown"
GetOsVersion%()="skn3_systemex_GetOsVersion"
GetTempDirectory$(resetCache%=0)="skn3_systemex_GetTempDirectory"
KeepSystemAlive%()="skn3_systemex_KeepSystemAlive"
GetMousePosition%&[]()="skn3_systemex_GetMousePosition"

0 comments on commit e05e8d9

Please sign in to comment.