Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 12-Apr-2013 17:14:52

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Library GTK+

Hi,

GTK+ is a popular toolkit for creating graphical user interfaces. I had decided to integrate its power in Scol for several reasons.
I think that it is a good choice. But, i had stopped its development some months ago.

I restart it this last week from the beginning.
At this time, in Scol :

- 2D bitmaps :
All formats supported by GTK+ (by default : bmp, jpeg, png, tiff, gif, and more (~ 20)) and several animated formats (apng, mpng, gif, ani, ...) : load, transform, save.

- 2D vectors :
I had some trys (create, save , load from file (svg, ...), PDF support)

- 3D rendering :
few (hard) trys !

- Widgets :
Window (several types), conversion from a gtk object (ObjGtkWidget) to a ObjWin object (compatibility with 2d graphics API by example)
Buttons (empty, toggle, radio, linked, etc)
Images
Notebooks
From external builder

- Others
GTK loop,
some callbacks
get some informations (screen, monitors, system, versions, etc)

Offline

#2 12-Apr-2013 22:01:29

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: Library GTK+

Great ^^

Is there a way to make a compatible API to completely replace the lib2DOS plugin ?
This could be just the lib2DOS scol binds and ObjBitmap compatibility.
So for the linux port actual scol applications could work.

Offline

#3 13-Apr-2013 00:49:49

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Library GTK+

Hi,

arkeon wrote:

Is there a way to make a compatible API to completely replace the lib2DOS plugin ?

Lib2dOS contains a lot of non-2d functions. hmm
Next, draw an interface with the current 2d api is very very very different comparatively at GTK+. For example, GTK performs an automatic layout management : except the top level widget on the screen (such as a main window), it needn't set the position and the size, and the resize is automatic too, of course.
However, it is possible to build an interface giving a position and a size : this is not recommended and contrary to the logic of GTK but possible.
So, i already write two functions to convert a GTK+ window object to a traditional window object (ObjWin) to include any current OS 2d object (ObjText, ObjBox, etc or an ObjContainer), independantly to lib OS 2d. But this is unstable yet and partial.

At this time, i don't know if it is a good idea to " rewrite " all OS 2d api in GTK+. I understand that would be better for you (all compatibility inside ! smile )

arkeon wrote:

This could be just the lib2DOS scol binds and ObjBitmap compatibility.

I have not looked at the compatibility between the ObjBitmap structure and the GTK+ bitmap structure.
GTK+ doesn't differentiate the formats or if there is (or not) an alpha channel, etc (in contrast with ObjBitmap / AlphaBitmap in lib OS 2d). À voir !

arkeon wrote:

So for the linux port actual scol applications could work.

See the first point above.
With an application based on 2d graphic api (ObjContainer), this could be ok. For example, the SCS worked on Linux and the old GTK 1.2 (with few minors bugs).
If you think openspace3d (yes you are thinking it !), this could be a bit more complicated. But i've a lot of code to do before to try it.

Offline

#4 13-Apr-2013 01:08:54

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Library GTK+

I closed all sub project of GTK+.

I will make another library if any for that :

- system, files utilities, strings, utf-8, etc from GLib
- internationalisation, from Pango
- and other things ...

Note : GLib, Pango, Cairo, ... are included in GTK+ package, so no more dependencies.

Offline

#5 12-Jun-2013 16:37:04

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Library GTK+

Hello,

The library is always "work in progress".
The source code is now oriented object.
The Scol API is oriented object (this is new in Scol), so there are new usages for coding with it smile
I'll write tutorials on the wiki as soon as possible.

Offline

#6 12-Jun-2013 16:38:33

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: Library GTK+

Hmm "The Scol API is oriented object" ^^
Did you change something in the VM ?
or is it a trick ?

Offline

#7 12-Jun-2013 16:54:14

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Library GTK+

No, all is the library and the GTK+ dependencie.
A part of trick, because in C, there is not a native oriented object programming. But the finale source is oo.
For the Scol developers, objects are in sub-classes : all functions which are in the parent classes are available too. This is transparent.

For example :
Objects > Widgets > Containers > Windows
The C source code is oo. And, in Scol, a window object can use all functions in Objects, Widgets, Containers and Windows apis. This should be easier.

The compatibility with the cuurent lib 2d os is partial (cf my posts above)

EDIT : ok, there is no change for the Scol programming.

Offline

#8 29-Oct-2013 14:19:23

iri
Admin. / Scol language & Scol apps developer
From: France
Registered: 22-Feb-2009
Posts: 2,024
Website

Re: Library GTK+

Yeah !

After several years of waiting, the GTK+ team supports officially the 3.x branch for MS Windows (3.6.4) :
https://twitter.com/GTKtoolkit/status/3 … 3670181888
Thank too Mister Tarniko, a french developer. smile

I can finally leave the old 2.24.10 to support GTK in Scol and offer a new 2D engine.

Offline

#9 29-Oct-2013 20:28:12

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,162
Website

Re: Library GTK+

go go go ! smile

Offline

Board footer

Powered by FluxBB