Commit graph

72 commits

Author SHA1 Message Date
Benoît Minisini
19ff910be8 [GB.SDL]
* BUG: Compute the framerate differently and more accurately.
* BUG: Framerate limitation is more accurate now.
* NEW: Window.Framerate property is a Float number now.
* NEW: Manage the WAIT instruction.
* NEW: The event loop can ignore input events, as requested by the WAIT
  instruction, when it is called with no argument.


git-svn-id: svn://localhost/gambas/trunk@3772 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-16 21:00:33 +00:00
Benoît Minisini
bf7bd78dda [EXAMPLES]
* BUG: Restore BeastScroll example.

[GB.SDL]
* BUG: Remove my mistake in the Draw.Image() method.


git-svn-id: svn://localhost/gambas/trunk@3747 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-11 13:08:59 +00:00
Benoît Minisini
15762e3fb2 [GB.IMAGE]
* NEW: Implement Image.PaintImage().

[GB.IMAGE.IO]
* NEW: Loaded image are returned in the preferred format, as specified by
  gb.qt4, gb.gtk or gb.sdl.

[GB.SDL]
* BUG: Do not define the foreground color before drawing an image. It seems
  useless, isn't it?
* BUG: Fix a case mistake in the "Deactivate" event.


git-svn-id: svn://localhost/gambas/trunk@3746 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-11 00:57:03 +00:00
Laurent Carlier
c529c78553 [GB.SDL]
* NEW: Use now defaut BGRA image format internally, should avoid conversion when
       using with a majority of gb.image.xxxx components.
* BUG: Add missing defaut Image format declaration.


git-svn-id: svn://localhost/gambas/trunk@3743 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-10 16:39:02 +00:00
Laurent Carlier
2d98406be1 [GB.SDL]
* BUG: Now Joysticks events are part of the Window class.
* BUG: Joysticks events are managed like keyboard events. They are only raised when the 
       Window got keyboard input focus.


git-svn-id: svn://localhost/gambas/trunk@3738 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-08 14:28:37 +00:00
Laurent Carlier
39ac3f88cd [GB.SDL]
* NEW: Add basic mouse wheel management.


git-svn-id: svn://localhost/gambas/trunk@3729 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-02 18:13:19 +00:00
Laurent Carlier
9e7b057eb9 [GB.SDL]
* NEW: Now Mouse class gives mouse buttons and modifiers.



git-svn-id: svn://localhost/gambas/trunk@3728 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-02 17:28:48 +00:00
Laurent Carlier
2309afa94d [GB.SDL]
* NEW: Remove Mouse.RelativeX/Y properties, add Mouse.StartX/Y properties (same as gb.qt4).


git-svn-id: svn://localhost/gambas/trunk@3725 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-02 16:24:51 +00:00
Laurent Carlier
a358c6cb6a rearrange code to get more robustness in case of gb.sdl and gb.opengl mixed instructions.
git-svn-id: svn://localhost/gambas/trunk@3724 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 21:59:03 +00:00
Laurent Carlier
e0df4c8c48 [GB.SDL]
* NEW: Add Joystick.Index property, which returns the joystick's index (similar than
       Joysticks class)
* BUG: Cleanup Joystick class interface (again).


git-svn-id: svn://localhost/gambas/trunk@3720 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 15:15:36 +00:00
Benoît Minisini
034caa916e [GB.SDL]
* BUG: The Window.Resizable property works correctly now.
* NEW: Windows are resizable by default like in gb.qt4 or gb.gtk.


git-svn-id: svn://localhost/gambas/trunk@3719 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 15:00:31 +00:00
Laurent Carlier
73ea41ecc0 [GB.SDL]
* BUG: Add missing Handle property in Window class.


git-svn-id: svn://localhost/gambas/trunk@3718 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 14:55:10 +00:00
Laurent Carlier
ed13c4a083 [GB.SDL]
* BUG: Remove Fixed and Resizable constants from Window class, Window.Border property is now renamed
       in Window.Resizable use a boolean like gb.qt4 component.


git-svn-id: svn://localhost/gambas/trunk@3717 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 14:47:30 +00:00
Laurent Carlier
875cda43bd [GB.SDL]
* NEW: Remove glu dependency and the related code.


git-svn-id: svn://localhost/gambas/trunk@3713 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-04-01 08:11:44 +00:00
Laurent Carlier
8cfda6d797 [GB.SDL]
* NEW: Now Joystick class can manage hats and balls.
* NEW: Joystick's device that raised the event is available with Joystick.Device property.


git-svn-id: svn://localhost/gambas/trunk@3707 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-30 12:28:54 +00:00
Laurent Carlier
eefaaa5b6d [GB.SDL]
* BUG: Joystick_ButtonPressed() events are correctly raised now.


git-svn-id: svn://localhost/gambas/trunk@3706 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-30 10:15:28 +00:00
Laurent Carlier
93b73bef83 [GB.SDL]
* NEW: Joysticks class, to enumerate destected joysticks.
* NEW: Joystick class, to get events and infos from a joystick.



git-svn-id: svn://localhost/gambas/trunk@3705 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-30 10:05:21 +00:00
Benoît Minisini
69324eec4a [INTERPRETER]
* NEW: New API to return the Gambas installation path.

[GB.SDL]
* BUG: Use the Gambas installation path to find the default font.


git-svn-id: svn://localhost/gambas/trunk@3684 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-24 02:15:32 +00:00
Laurent Carlier
d62dac9b02 [GB.SDL]
* BUG: Remove useless inclusion of SDL_image header


git-svn-id: svn://localhost/gambas/trunk@3668 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-20 15:07:49 +00:00
Laurent Carlier
8cadb771d9 [GB.SDL]
* BUG: Remove deprecated support for Xft library.

First steps for drawing on Image with OpenGL, but currently disabled because it's buggy and doesn't work.


git-svn-id: svn://localhost/gambas/trunk@3667 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-20 15:03:00 +00:00
Laurent Carlier
43e6daa13b [GB.SDL]
* BUG: Component doesn't need SDL_image library anymore.


git-svn-id: svn://localhost/gambas/trunk@3657 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2011-03-17 10:24:51 +00:00
Laurent Carlier
3821669aab [GB.SDL]
* BUG: Removed support for system font, as it'snt really stable and working well.
* NEW: Now Font class use a default TTF font, DejaVuSans.ttf



git-svn-id: svn://localhost/gambas/trunk@3340 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-11-30 20:02:42 +00:00
Benoît Minisini
bddbc3a62a [INTERPRETER]
* BUG: Fix a compilation warning on 32 bits systems.

[GB.SDL]
* BUG: Fix a function that was not returning any value.


git-svn-id: svn://localhost/gambas/trunk@3239 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-24 13:52:23 +00:00
Laurent Carlier
5fd4006167 [GB.SDL]
* BUG: Remove Font.Strikeout property as it's only available in SDL_tff>2.0.9


git-svn-id: svn://localhost/gambas/trunk@3226 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-16 12:26:09 +00:00
Benoît Minisini
1c75607652 [GB.SDL]
* BUG: Temporary fix to let gb.sdl compile with SDL_ttf < 2.0.10.


git-svn-id: svn://localhost/gambas/trunk@3224 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-16 10:51:44 +00:00
Laurent Carlier
496d61f955 [GB.SDL]
* NEW: Add Font.Bold, Font.Italic, Font.Underline and Font.Strikeout properties.



git-svn-id: svn://localhost/gambas/trunk@3219 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-15 12:39:31 +00:00
Laurent Carlier
bf26131baa [GB.SDL]
* BUG: Fix a typo that result in a segfault, optimize code a little bit.


git-svn-id: svn://localhost/gambas/trunk@3209 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-13 09:28:24 +00:00
Laurent Carlier
2af3c28de8 [GB.SDL]
* NEW: System fonts are now displayed with SDL_ttf library.


git-svn-id: svn://localhost/gambas/trunk@3208 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-09-12 18:36:22 +00:00
Benoît Minisini
3054690743 [CONFIGURATION]
* NEW: Print a summary of warning messages after each component 
  compilation.

[INTERPRETER]
* BUG: StrPtr() with a length argument now works correctly.
* NEW: Support for callbacks: when converting a function to a Pointer, an 
  internal closure is created with the libffi library. The pointer then can 
  be sent to any extern function as function pointer argument.
* BUG: Opening memory stream should work in all cases now.


git-svn-id: svn://localhost/gambas/trunk@3038 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-07-14 01:50:18 +00:00
Benoît Minisini
6059d4dcb7 [GB.IMAGE]
* NEW: New API for marking an image as modified, and for synchronizing it 
  before reading it, when the temporary image owner needs it.


git-svn-id: svn://localhost/gambas/trunk@3016 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-19 12:38:28 +00:00
Laurent Carlier
3db06386b0 [GB.SDL]
* BUG: More work on system fonts, now system is correctly displayed.


git-svn-id: svn://localhost/gambas/trunk@3014 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-18 15:45:25 +00:00
Laurent Carlier
102dd5720b [GB.SDL]
* NEW: Remove libsdl_image dependency, now Image class relies completly on the 
  gb.image.io component to load images.

Less dependencies is always better.


git-svn-id: svn://localhost/gambas/trunk@3011 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-16 13:05:35 +00:00
Laurent Carlier
0b2beb5985 [GB.IMAGE]
* NEW: Add locking/unlocking internal api hooks, allowing Image class to be sure image is synced/locked
  to get correct access to image datas, and tag if image is altered.


git-svn-id: svn://localhost/gambas/trunk@3010 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-16 12:48:11 +00:00
Laurent Carlier
b87e25b5ba [GB.SDL]
* BUG: Remove buggy code, now interlacing line and image drawing work.


git-svn-id: svn://localhost/gambas/trunk@2994 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-05 20:39:57 +00:00
Laurent Carlier
3e92aaf056 [GB.SDL]
* NEW: New methods Font.Width() and Font.Height(), to retreive respectivly
       widht and height of text.

Now a default font (system font) is opened with New method,
but nothing is rendered yet.


git-svn-id: svn://localhost/gambas/trunk@2993 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-06-05 14:56:17 +00:00
Laurent Carlier
1334cfc928 [GB.SDL]
* BUG: Disable line smoothing, as there is problem with intel driver.

A line of width equal to 1.0 isn't displayed with smoothing enabled.



git-svn-id: svn://localhost/gambas/trunk@2985 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-30 16:23:52 +00:00
Laurent Carlier
bbddf37dca [GB.SDL]
* BUG: Fix Line/Points/... drawing with Image/Text drawing.



git-svn-id: svn://localhost/gambas/trunk@2983 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-30 12:55:15 +00:00
Laurent Carlier
cb2e6d7bd5 [GB.SDL]
* OPT: Code cleanup, use glew instead of internal functions.


git-svn-id: svn://localhost/gambas/trunk@2967 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-26 07:09:11 +00:00
Laurent Carlier
0bee2e02dd [GB.SDL]
* BUG: Properly free allocations.


git-svn-id: svn://localhost/gambas/trunk@2962 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-24 09:56:14 +00:00
Laurent Carlier
e4836e99d6 [GB.SDL]
* BUG: Do not forget to ref/unref the font.



git-svn-id: svn://localhost/gambas/trunk@2961 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-24 09:01:25 +00:00
Laurent Carlier
9510ec8d21 [GB.SDL]
* NEW: Loading font through Font.Load() method and displaying it
       with Draw.Text() method
* NEW: Draw.Rotate() and Draw.Scale() to respectivly rotate and scale
       images and fonts when displaying them.
* NEW: Draw.ForeColor() affect image displayed too.
* OPT: Some optimizations. 


git-svn-id: svn://localhost/gambas/trunk@2958 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-05-23 15:27:56 +00:00
Benoît Minisini
61997e8921 [DEVELOPMENT ENVIRONMENT]
* NEW: Use the new mascot to draw project directory icon.

[EXAMPLES]
* NEW: Some little changes in the Painting example.

[INTERPRETER]
* NEW: The component GB_INIT function now returns an integer that gives an 
  unloading order. The higher the returned number, the later the component 
  is unloaded. If GB_INIT returns -1, then the component shared library 
  will not be unloaded.
* NEW: Update GB_INIT functions in all components.

[GB.DRAW]
* BUG: Paint.Image() optional translation arguments are not inverted 
  anymore.

[GB.QT4]
* BUG: If Paint.LineWidth is zero, then nothing is stroked, as in gb.gtk.
* BUG: TabStrip is now correctly arranged when it has only one tab.


git-svn-id: svn://localhost/gambas/trunk@2605 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2010-01-10 13:40:48 +00:00
Laurent Carlier
9c40bbac3f [CONFIGURATION]
* BUG: Add --install glag to autoreconf, that fix creation of config files,
  also add build-dist script to create a lighter tar.bz2 archive of the
  repository.



git-svn-id: svn://localhost/gambas/trunk@2519 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-12-26 21:30:35 +00:00
Laurent Carlier
a05c17d9cc [GB.SDL]
* BUG: Remove running SDL events in a separate thread, as it give instability.


git-svn-id: svn://localhost/gambas/trunk@2512 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-12-24 12:36:05 +00:00
Laurent Carlier
aaeaf5e5bc [GB.SDL]
* NEW: Add dependency to libglew, needed for gb.opengl component.

libglew : http://glew.sourceforge.net/



git-svn-id: svn://localhost/gambas/trunk@2507 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-12-24 09:23:24 +00:00
Laurent Carlier
91f3527a2c [GB.SDL]
* BUG: Fix potential problem in storage with the window title.



git-svn-id: svn://localhost/gambas/trunk@2382 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-10-04 14:11:41 +00:00
Laurent Carlier
32e50b7436 [GB.SDL]
* BUG: Fix Window.Fill() method, filled color was wrong.


git-svn-id: svn://localhost/gambas/trunk@2291 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-31 15:15:56 +00:00
Laurent Carlier
cbdd7035e1 [GB.SDL]
* New: Add dependency to gb.image.io, so images can be saved through Image.Save() method.


git-svn-id: svn://localhost/gambas/trunk@2290 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-31 14:45:50 +00:00
Benoît Minisini
2b6b5ff417 [GB.SDL]
* BUG: Remove the Image.Resize method that cannot work. Let use the resize
  method from the gb.image component.


git-svn-id: svn://localhost/gambas/trunk@2272 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-25 23:34:19 +00:00
Laurent Carlier
13234bbff7 [GB.SDL]
* NEW: remove color management from gb.sdl component, as now it follow gb.image component color sheme.

It save some memory bytes, and do less code to maintain.


git-svn-id: svn://localhost/gambas/trunk@2250 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2009-08-19 16:15:43 +00:00