PureBasic Recycle Library
Posted: Sun Jul 31, 2011 10:26 pm
This project aims at providing PureBasic programmers with a library of source code in which they may find useful for developing a range of projects with.
Specification
The source code included must adhere to the following standard:
Anyone is permitted to use this source code library in their own projects of any license. No credit is required, but is highly appreciated.
Library Contents
This library can be found - Here -.
A quick run down of the current functions (Some may not be available until the next revision release.)
Specification
The source code included must adhere to the following standard:
- All source code must be Cross-Platform compatible. Any use of OS-Specific code is prohibited UNLESS alternatives for Windows, Linux and Mac are present, and do not effect the usability of the code.
- All source code must be cleanly-written, containing comments where required.
- All source code must contain a copyright block as a header providing the particular piece of source codes title, description, revision number, author, and any applicable notes. This block must not be altered/removed.
- Any source code derived from third-party works must be clearly identified as a derivative, and the original author must be fully credited.
- Any source code adapted from third-party works must be clearly identified as an adaptation, and the original author must be fully credited.
- Any adjustments to the library must be clearly labelled.
- Any third-party dependencies (i.e. Shared Libraries) must be included in compiled form for each of the operating systems and processor architectures.
- Requiring the use of third-party source code libraries is not prohibited, but highly discouraged.
- Source code must be explicitly written.
- Libraries requiring global variables should have the variables stored within a structure, and a global object of that structure being defined. Naming convention: Structure: '_(prefix)_GlobalData'. Object: '_prefix_Global'.
- Any memory allocations must be safe, and stored within a list, or table. A single function call must exist to free all memory within the library.
Anyone is permitted to use this source code library in their own projects of any license. No credit is required, but is highly appreciated.
Library Contents
- String Macros Library - Library for parsing strings for macros, and replacing the macros with the relevant values.
- Trigger Zone Library - Library for defining 2D zones, and checking if a specified point is inside a zone.
- Advanced Window Event Handling - Library enabling programmer to poll window events, process custom events, and redirect events to event handlers.
- Image Batch Library - Library for creating and storing batches of images in a single object. Used for the Animated components.
- Animated Image Gadget* - Library that can create an animated image gadget, with various loop modes.
- Color Swatch Gadget* - Library that can create a colour-swatch gadget that can display a colour, and allow the end-user to change the colour.
- Maths Library - Library containing a plethora of routines for solving mathematical problems.
- Color Library - Library containing prefabricated colour constants, as well as functions for converting between colour models, and applying filters.
- Cipher Library - Library for encrypting/decrypting strings and memory allocations with single functions. Supporting multiple algorithms.
- Guimauve's Complex Number routines (Included as part of the Math Library)
- PureBasic Source Code Parser - Parse PureBasic source code files, and query all elements such as Procedures, Macros etc.
This library can be found - Here -.
A quick run down of the current functions (Some may not be available until the next revision release.)
- Types [list]
- Point2D
- Point3D
- Area2D
- Area3D
- bool (Derived from Ascii (.a))
- ptr (Derived from Integer (.i))
- hsl (Included in Colour Library)
- cmy (Included in Colour Library)
- AnimGadget(Gadget, X, Y, Width, Height, *ImageBatch, [Mode])
- AnimGadget_Play(Gadget)
- AnimGadget_SetCycleFreq(Gadget, CycleDelay)
- AnimGadget_Loop(Gadget, [State])
- AnimGadget_LoopMode(Gadget, Mode)
- AnimGadget_GetFrame(Gadget)
- AnimGadget_FrameCount(Gadget)
- AnimGadget_IsPlaying(Gadget)
- AnimGadget_IsLooping(Gadget)
- CIP_EncryptString(String, Key, [Algorithm])
- CIP_DecryptString(String, Key, [Algorithm])
- CIP_EncryptMemory(*Memory, MemSize, Key, [Algorithm])
- CIP_DecryptMemory(*Memory, MemSize, Key, [Algorithm])
- Color_RGB2HSL(Color, *Output.hsl)
- Color_RGB2CMY(Color, *Output.cmy)
- Color_CMY(Cyan, Magenta, Yellow, [Alpha])
- Color_HSL(Hue, Sat, Light, [Alpha])
- Color_Hue(Color)
- Color_Saturation(Color)
- Color_Lightness(Color)
- Color_Cyan(Color)
- Color_Yellow(Color)
- Color_Magenta(Color)
- Color_Gray(Color)
- Color_Grayscale(Color)
- Color_GrayscaleA(Color)
- Color_Sepia(Color)
- Color_SepiaA(Color)
- Color_InvertColor(Color)
- Color_InvertColorA(Color)
- Color_BrightenColor(Color, Amount)
- Color_BrightenColorA(Color, Amount)
- Color_MixColor(ColorA, ColorB, Slide)
- Color_MixColorA(ColorA, ColorB, Slide)
- ImageBatch_Create())
- ImageBatch_CreateFromStrip(Image, FrameWidth))
- ImageBatch_IsValid(*ImageBatch))
- ImageBatch_Free(*ImageBatch))
- ImageBatch_FreeAll())
- ImageBatch_AddImage(*ImageBatch, Image))
- ImageBatch_CountImages(*ImageBatch))
- ImageBatch_GetImage(*ImageBatch, Index))
- ImageBatch_Check(*Imagebatch))
- Math_Min(ValueA, ValueB)
- Math_Max(ValueA, ValueB)
- Math_Min3(ValueA, ValueB, ValueC)
- Math_Max3(ValueA, ValueB, ValueC)
- Math_MinF(ValueA, ValueB)
- Math_MaxF(ValueA, ValueB)
- Math_MinF3(ValueA, ValueB, ValueC)
- Math_MaxF3(ValueA, ValueB, ValueC)
- Math_ClampValue(Value, Min, Max)
- Math_ClampValueF(Value, Min, Max)
- Math_Bool(Value)
- Math_StepValue(ValueA, ValueB, Slide)
- Math_StepValueF(ValueA, ValueB, Slide)
- Math_Inc(Variable, [Amount])
- Math_Dec(Variable, [Amount])
- Math_IsEven(Number)
- Math_IsOdd(Number)
- Math_Percentage(Value, Maximum)
- Math_LowerQuart(Value)
- Math_UpperQuart(Value)
- Math_SinH(Angle)
- Math_CosH(Angle)
- Math_GetComplexX(Complex)
- Math_GetComplexY(Complex)
- Math_SetComplexX(Complex, X)
- Math_SetComplexY(Complex, Y)
- Math_UpdateComplex(Complex, X, Y)
- Math_ResetComplex(Complex)
- Math_CopyComplex(ComplexA, ComplexB)
- Math_CompareComplex(ComplexA, ComplexB)
- Math_SwapComplex(ComplexA, ComplexB)
- Math_PlusComplex(ComplexR, ComplexA, ComplexB)
- Math_MinuxComplex(ComplexR, ComplexA, ComplexB)
- Math_ProductByScalarComplex(ComplexR, ComplexA, Scalar)
- Math_DivideByScalarComplex(ComplexR, ComplexA, Scalar)
- Math_ZeroComplex(Complex)
- Math_DebugComplex(Complex)
- Math_ProductComplex(ComplexR, ComplexA, ComplexB)
- Math_SquareComplex(ComplexR, ComplexA, ComplexB)
- Math_SumSquareComplex(Complex)
- Math_MagnitudeComplex(Complex)
- Math_SinusComplex(Complex)
- Math_CosinusComplex(Complex)
- Math_SinusHyperbolicComplex(Complex)
- Math_CosinusHyperbolicComplex(ComplexR, ComplexA)
- Math_LnComplex(ComplexR, ComplexA)
- Math_DivideComplex(ComplexR, ComplexA, ComplexB)
- Math_TangentComplex(ComplexR, Complex)
- Math_TangentHyperbolicCompliex(ComplexR, Complex)
- Math_ExponentialComplex(ComplexR, Complex)
- SCM_IsKeyLegal(Key)
- SCM_FormatKey(Key)
- SCM_AddMacro(Name, Value)
- SCM_GetMacro(Name)
- SCM_Parse(String)
- SCM_RemoveMacro(Name)
- SCM_RemoveAll()
- SCM_RemoveGroup(Name)
- SwatchGadget(X, Y, Width, Height, [DefaultColor], [EnableRequester])
- SwatchGadget_GetColor(Gadget)
- SwatchGadget_SetColor(Gadget, Color)
- TRZ_CreateZone(Left, Top, Right, Bottom)
- TRZ_PointInZone(X, Y, *Zone)
- TRZ_GetZone(X, Y)
- TRZ_RemoveAll()
- WEH_WindowEvent([Wait], [Timeout])
- WEH_PostWindowEvent(EventType, [EventWindow])
- WEH_PostGadgetEvent(EventGadget, [EventType])
- WEH_PostMenuEvent(EventMenu, EventType)
- WEH_PostTimerEvent(EventTimer)
- WEH_EventGadget()
- WEH_EventMenu()
- WEH_EventTimer()
- WEH_EventType()
- WEH_EventWindow()
- WEH_RemoveEventHandler(*Function)
- WEH_AddEventHandler(*Function)
- Ability to override PureBasic native event functions. View file for info.