Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r46 - branches/0.6: . Core

genelib
Discussion topic

Back to topic list

svn commit: r46 - branches/0.6: . Core

Author lotec
Full name Jan Bogaerts
Date 2006-09-17 07:28:44 PDT
Message Author: LoTeC
Date: 2006-09-17 07:28:44-0700
New Revision: 46

Added:
   branches/0.6/Core/
   branches/0.6/Core/Core.gen
   branches/0.6/Core/GeneCore.gen
   branches/0.6/System_​Component.gen
   branches/0.6/System_​Xml_Serialisation.ge​n
   branches/0.6/WWinMM.gen
Modified:
   branches/0.6/WindowsCommon.gen

Log:
initial files for 0.6 (lots to change)

Added: branches/0.6/Core/Core.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/Core/Core.gen?view=​auto&rev=46
====================​====================​====================​==================
--- (empty file)
+++ branches/0.6/Core/Core.gen 2006-09-17 07:28:44-0700
@@ -0,0 +1,136 @@
+//copyright LoTeC (Jan Bogaerts) 2003-2005
+
+//This unit is part of the Gene standarad library
+
+//This program is free software; you can redistribute it and/or modify
+//it under the terms of the Lesser GNU General Public License as published by
+//the Free Software Foundation; either version 2.1 of the License, or
+//(at your option) any later version.
+
+//This program is distributed in the hope that it will be useful,
+//but WITHOUT ANY WARRANTY; without even the implied warranty of
+//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//Lesser GNU General Public License for more details.
+
+//You should have received a copy of the Lesser GNU General Public License
+//along with this program; if not, write to the Free Software
+//Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+global
+
+//for unicode, this is defined here, so that it is known in all units before any includes, also the project unit
+//#Unicode: bool = false
+
+
+namespace mscorlib('mscorlib') extern('System');
+
+space sObject extern('Object') =
+ constructor Create extern('.ctor')
+ destructor Destroy
+;
+
+space sArray extern('Array') =
+;
+
+space sByte extern('Byte') =
+;
+
+space sChar extern('Char') =
+;
+
+space sDecimal extern('Decimal') =
+;
+
+space sDouble extern('Double') =
+;
+
+space sEnum extern('Enum') =
+;
+
+space sInt16 extern ('Int16') =
+;
+
+space sInt32 extern ('Int32') =
+;
+
+space sInt64 extern ('Int64') =
+;
+
+space sIntPtr extern ('IntPtr') =
+;
+
+space sSingle extern('Single') =
+;
+
+space sUint16 extern ('Int16') =
+;
+
+space sUint32 extern ('Int32') =
+;
+
+space sUint64 extern ('Int64') =
+;
+
+space sUintPtr extern ('IntPtr') =
+;
+
+space sValueType extern('ValueType') =
+;
+
+space smulticastdelegate extern('MulticastDelegate')=
+ constructor create(aOwner: sObject, aExp: native) extern('ctor')
+;
+
+space sAttribute extern('Attribute') =
+;
+
+
+
+space sString; //forward declare
+
+space sCommonCursor(sCurso​r<sObject, sObject>) =
+;
+
+struct sStringCursor =
+ var Data: int
+ operator '^' GetData(aStore: sString&): tchar inline
+;
+
+space sString extern('string') =
+ //internally defined for gene (all inline)
+ cursor sStringCursor
+ exp Get_Count: int inline
+ Set_Count(aNew: int) inline
+ Get_Last: sStringCursor inline
+ Set_Last(aNew: sStringCursor&) inline
+ Get_First: sStringCursor inline
+ Set_First(aNew: sStringCursor&) inline
+ prop _first: sStringCursor read Get_First write Set_First
+ _last: sStringCursor read Get_Last write Set_Last
+ Count: int read Get_Count write Set_Count
+
+ //externally defined
+ exp Get_Chars(aIndex: int): tchar extern('Get_Chars')
+
+;
+
+exp sStringCursor.GetData(aStore: sString&): tchar
+=
+// return(aStore.Get_Chars(Data))
+;
+
+
+
+//-----------------​--------------------​--------------------​--------------------​--------------------​--------------------​-----
+namespace push Text extern('Text');
+
+space StringBuilder extern('StringBuilder')
+=
+;
+
+namespace pop Collections extern('Collections');
+namespace push Generic extern('Generic');
+
+space sList<T> extern('Generic') =
+;
\ No newline at end of file

Added: branches/0.6/Core/GeneCore.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/Core/GeneCore.gen?v​iew=auto&rev=46
====================​====================​====================​==================
--- (empty file)
+++ branches/0.6/Core/GeneCore.gen 2006-09-17 07:28:44-0700
@@ -0,0 +1,17 @@
+namespace GeneSystem('GeneCorLib');
+
+global //we want all to be known globally
+
+//the base space for libs
+struct __sBaseLib =
+ var Handle: pointer
+;
+
+
+space sCursor<S, E> = //the base space for all cursors
+ var Owner: S
+ Value: E //E is the typed cursor object which can be a space or a struct
+;
+
+space sMessageException(sException) extern('MessageException') =
+;
\ No newline at end of file

Added: branches/0.6/System_​Component.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/System_Component.ge​n?view=auto&rev=​46
====================​====================​====================​==================
--- (empty file)
+++ branches/0.6/System_​Component.gen 2006-09-17 07:28:44-0700
@@ -0,0 +1,8 @@
+//CopyRight Jan Bogaerts 2006
+
+namespace System('System', '2:0:0:0', 'B7 7A 5C 56 19 34 E0 89 ') extern('System');
+
+namespace push ComponentModel extern('ComponentModel');
+
+space sBindingList<T> extern('BindingList')=
+;
\ No newline at end of file

Added: branches/0.6/System_​Xml_Serialisation.ge​n
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/System_Xml_Serialis​ation.gen?view=auto​&rev=46
====================​====================​====================​==================
--- (empty file)
+++ branches/0.6/System_​Xml_Serialisation.ge​n 2006-09-17 07:28:44-0700
@@ -0,0 +1,8 @@
+namespace System('System', '2:0:0:0', 'B7 7A 5C 56 19 34 E0 89 ') extern('System');
+
+namespace push Xml extern('Xml');
+namespace push Serialization extern('Serialization');
+
+space sXmlIncludeAttribute​(sAttribute) extern('XmlIncludeAttribute') =
+ constructor Create(atype: typeId) extern('.ctor')
+;

Added: branches/0.6/WWinMM.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/WWinMM.gen?view=aut​o&rev=46
====================​====================​====================​==================
--- (empty file)
+++ branches/0.6/WWinMM.gen 2006-09-17 07:28:44-0700
@@ -0,0 +1,166 @@
+//CopyRight Jan Bogaerts 2006
+
+namespace WINAPI;
+
+pragma unicode off;
+const MAXPNAMELEN = 32; //max product name length (including NULL)
+
+//midi structs
+struct MIDIINCAPS =
+ var wMid: word
+ wPid: word
+ vDriverVersion: dword
+ szPname: stringbuilder
+ dwSupport: dword
+;
+
+struct MIDIOUTCAPS =
+ var wMid: word
+ wPid: word
+ vDriverVersion: dword
+ szPname: tchar@MAXPNAMELEN
+ wTechnology: word
+ wVoices: word
+ wNotes: word
+ wChannelMask: word
+ dwSupport: dword
+;
+
+struct MIDIHDR =
+ var lpData: stringbuilder //pointer to locked data block
+ dwBufferLength: dword // length of data in data block
+ dwBytesRecorded: dword // used for input only
+ dwUser: dword // for client's use
+ dwFlags: dword // assorted flags (see defines)
+ lpNext: pointer // reserved for driver
+ reserved: dword // reserved for driver
+ dwOffset: dword // Callback offset into buffer
+ dwReserved1: dword // Reserved for MMSYSTEM
+ dwReserved2: dword // Reserved for MMSYSTEM
+ dwReserved3: dword // Reserved for MMSYSTEM
+ dwReserved4: dword // Reserved for MMSYSTEM
+ dwReserved5: dword // Reserved for MMSYSTEM
+ dwReserved6: dword // Reserved for MMSYSTEM
+ dwReserved7: dword // Reserved for MMSYSTEM
+ dwReserved8: dword // Reserved for MMSYSTEM
+;
+
+delegate dMidiOutProc(aHandle: THandle, aMsg: dword, aInstance: dword, aParam1: dword, aParam2: dword);
+delegate dMidiInProc(aHandle: THandle, aMsg: dword, aInstance: dword, aParam1: dword, aParam2: dword);
+
+
+//Timer structs
+
+struct TIMECAPS =
+ var wPeriodMin: dword
+ wPeriodMax: dword
+;
+
+delegate dTimeProc(aId: dword, aMsg: dword, aInstance: dword, aReserved1: dword, areserved2: dword);
+
+
+//-----------------​--------------------​--------------------​--------------------​------------------
+lib lWinMM =
+//midi exps
+ exp midiInClose(aHandle: tHandle): dword stdcall extern('midiInClose')
+ midiOutClose(aHandle: tHandle): dword stdcall extern('midiOutClose')
+ midiInGetDevCaps(aDeviceId: dword&, aCaps: MidiInCaps&, aSize: dword): dword stdcall extern('midiInGetDevCapsW')
+ midiOutGetDevCaps(aDeviceId: dword&, aCaps: MidiOutCaps&, aSize: dword): dword stdcall extern('midiOutGetDevCapsW')
+ midiInGetErrorText(aErrorNr: dword, aText: Stringbuilder, aLength: dword): dword stdcall extern('midiInGetErrorTextW')
+ midiOutGetErrorText(aErrorNr: dword, aText: Stringbuilder, aLength: dword): dword stdcall extern('midiOutGetErrorTextW')
+ midiInGetNumDevs: dword stdcall extern('midiInGetNumDevs')
+ midiOutGetNumDevs: dword stdcall extern('midiOutGetNumDevs')
+ midiInMessage(aDevice: THandle, aMsg: dword, aVal1: dword, aVal2: dword): dword stdcall extern('midiInMessage')
+ midiOutMessage(aDevice: THandle, aMsg: dword, aVal1: dword, aVal2: dword): dword stdcall extern('midiOutMessage')
+ midiOutLongMsg(aDeive: THandle, aHeader: MIDIHDR&, cbmh: dword): dword stdcall extern('midiOutLongMsg')
+ midiInOpen(aHandle: THandle&, aDeviceId: dword, acallBack: dMidiOutProc, aInstance: dword, aFlags: dword): dword stdcall extern('midiInOpen')
+ midiOutOpen(aHandle: THandle&, aDeviceId: dword, acallBack: dMidiInProc, aInstance: dword, aFlags: dword): dword stdcall extern('midiOutOpen')
+ midiInPrepareHeader(aHandle: THandle, aHeader: MidiHdr&, aSize: dword): dword stdcall extern('midiInPrepareHeader')
+ midiOutPrepareHeader(aHandle: THandle, aHeader: MidiHdr&, aSize: dword): dword stdcall extern('midiOutPrepareHeader')
+ midiInUnprepareHeader(aHandle: THandle, aHeader: MidiHdr&, aSize: dword): dword stdcall extern('midiInUnprepareHeader')
+ midiOutUnprepareHeader(aHandle: THandle, aHeader: MidiHdr&, aSize: dword): dword stdcall extern('midiOutUnpre​pareHeader')
+//Timer exps
+ exp timeBeginPeriod(aPeriod: dword): dword stdcall extern('timeBeginPeriod')
+ timeEndPeriod(aPeriod: dword): dword stdcall extern('timeEndPeriod')
+ timeGetDevCaps(aCaps: TIMECAPS&, aSize: dword): dword stdcall extern('timeGetDevCaps')
+ timeGetTime: dword stdcall extern('timeGetTime')
+ timeKillEvent(aID: dword): dword stdcall extern('timeKillEvent')
+ timeSetEvent(aDelay: dword, aResolution: dword, aTimeCallback: dTimeProc, aUser: dword, aEventType: dword): dword stdcall extern('timeSetEvent')
+
+;
+var WinMM: lWinMM;
+
+
+
+const
+// general error return values
+ MMSYSERR_BASE = 0
+ WAVERR_BASE = 32
+ MIDIERR_BASE = 64
+ TIMERR_BASE = 96
+ JOYERR_BASE = 160
+ MCIERR_BASE = 256
+ MIXERR_BASE = 1024
+ MCI_STRING_OFFSET = 512
+ MCI_VD_OFFSET = 1024
+ MCI_CD_OFFSET = 1088
+ MCI_WAVE_OFFSET = 1152
+ MCI_SEQ_OFFSET = 1216
+ MMSYSERR_NOERROR = 0
+ MMSYSERR_ERROR = (MMSYSERR_BASE + 1)
+ MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2)
+ MMSYSERR_NOTENABLED = (MMSYSERR_BASE + 3)
+ MMSYSERR_ALLOCATED = (MMSYSERR_BASE + 4)
+ MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5)
+ MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6)
+ MMSYSERR_NOMEM = (MMSYSERR_BASE + 7)
+ MMSYSERR_NOTSUPPORTED = (MMSYSERR_BASE + 8)
+ MMSYSERR_BADERRNUM = (MMSYSERR_BASE + 9)
+ MMSYSERR_INVALFLAG = (MMSYSERR_BASE + 10)
+ MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11)
+ MMSYSERR_HANDLEBUSY = (MMSYSERR_BASE + 12)
+ MMSYSERR_INVALIDALIAS = (MMSYSERR_BASE + 13)
+ MMSYSERR_BADDB = (MMSYSERR_BASE + 14)
+ MMSYSERR_KEYNOTFOUND = (MMSYSERR_BASE + 15)
+ MMSYSERR_READERROR = (MMSYSERR_BASE + 16)
+ MMSYSERR_WRITEERROR = (MMSYSERR_BASE + 17)
+ MMSYSERR_DELETEERROR = (MMSYSERR_BASE + 18)
+ MMSYSERR_VALNOTFOUND = (MMSYSERR_BASE + 19)
+ MMSYSERR_NODRIVERCB = (MMSYSERR_BASE + 20)
+ MMSYSERR_MOREDATA = (MMSYSERR_BASE + 21)
+ MMSYSERR_LASTERROR = (MMSYSERR_BASE + 21)
+;
+
+const
+// MIDI error return values
+ MIDIERR_UNPREPARED = (MIDIERR_BASE + 0) // header not prepared
+ MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1) // still something playing
+ MIDIERR_NOMAP = (MIDIERR_BASE + 2) // no configured instruments
+ MIDIERR_NOTREADY = (MIDIERR_BASE + 3) // hardware is still busy
+ MIDIERR_NODEVICE = (MIDIERR_BASE + 4) // port no longer connected
+ MIDIERR_INVALIDSETUP = (MIDIERR_BASE + 5) // invalid MIF
+ MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6) // operation unsupported w/ open mode
+ MIDIERR_DONT_CONTINUE = (MIDIERR_BASE + 7) // thru device 'eating' a message
+ MIDIERR_LASTERROR = (MIDIERR_BASE + 7) // last error in range
+;
+
+const
+// flags for wTechnology field of MIDIOUTCAPS structure
+ MOD_MIDIPORT = 1
+ MOD_SYNTH = 2
+ MOD_SQSYNTH = 3
+ MOD_FMSYNTH = 4
+ MOD_MAPPER = 5
+ MOD_WAVETABLE = 6
+ MOD_SWSYNTH = 7
+;
+
+const
+ TIME_CALLBACK_FUNCTION = 0x0000 // callback is function
+ TIMERR_NOERROR = 0 // no error
+ TIME_ONESHOT = 0x0000 // program timer for single event
+ TIME_PERIODIC = 0x0001 // program for continuous periodic event
+;
+
+
+

Modified: branches/0.6/WindowsCommon.gen
Url: http://genelib.tigri​s.org/source/browse/​genelib/branches/0.6​/WindowsCommon.gen?v​iew=diff&rev=46​&p1=branches/0.6/​WindowsCommon.gen​&p2=branches/0.6/Wi​ndowsCommon.gen&​r1=45&r2=46
====================​====================​====================​==================
--- branches/0.6/WindowsCommon.gen (original)
+++ branches/0.6/WindowsCommon.gen 2006-09-17 07:28:44-0700
@@ -16,6 +16,7 @@
 //along with this program; if not, write to the Free Software
 //Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
+namespace WINAPI;
 
 rename THandle = pointer;
 rename HWND = THandle;
@@ -54,7 +55,7 @@
 rename COLORREF = dword;
 const INVALID_HANDLE_VALUE = -1;
 
-//rename LPARAM = dword;
+rename LPARAM = dword;
 
 //a struct that contains all the global macros

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r46 - branches/0.6: . Core lotec Jan Bogaerts 2006-09-17 07:28:44 PDT
Messages per page: