flat assembler
Message board for the users of flat assembler.

Index > Linux > converter

Author
Thread Post new topic Reply to topic
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks 10 Apr 2005, 21:12
Hi

This is one little tool for converting GTK C syntax interfaces you make with GLADE
to FASM syntax interfaces. This is only 0.1 version so not all widgets can be
converted OK. I have plan to add a lot of stuff to this tool so be patient.
Program works OK with next widgets:

BASIC WIDGETS:
--------------
- Window, Menubar, Toolbar, Handle Box, Horizontal Box, Vertical Box, Label, Text Entry,
Text View, Button, Toggle Button, Check Button, Radio Button, Statusbar, Option Menu,
Spin Button, Tree View, Horizontal Separator, Vertical Separator, Drawing Area, Table,
Fixed Positions, Horizontal Button Box (HBB), Vertical Button Box (VBB),
Horizontal Panes, Vertical Panes, Frame, Combo Box, Scrolled Window, Viewport

GTK+ ADDITIONAL WIDGETS:
--------------------------
- Event Box, Progress Bar, Arrow, Curve, Alignment, Horizontal Ruler, Vertical Ruler

I have some problems with HBB and VBB (if i remember well Smile ) and all other widgets will be
added too in next versions of program. Maybe i could add something similar to GLADE source, maybe
i could do better search the internet, maybe... but this was something that i needed so i make this
program. Send me all problems and similar to this post or to email.
I name functions that have arguments argcall. If you want to change this you will have to edit file data.inc
(i changed macro ccall to argcall from bazik tutorials. File cdecl.inc)
Program was tested with GTK v2.2.3 and GLADE v2.0.0. All changes and addings will be for this versions (i think).

PROBLEMS:
---------
- you have to manually delete all duplicate externs
- you have to manually add e.g. main window with all widgets to main asm proc that looks like this (bazik examples):
proc main, argc, argv
enter
lea eax, [argc]
lea ebx, [argv]
argcall gtk_init, eax, ebx
...
CONVERTED CODE
return


TO DO:
------
- make complete GUI app where C interface will be converted and then you can change code directly on screen
- add all widgets
- split source to e.g. data.inc for variables, extrn.inc for externs, etc. of course how user will set options
for this
- set file name for all this files and their paths and for output file (now this file is named interface.asm)

I can't remember anything else (it's too late and i am tired and i have too much beers in my stomach Smile ).
I will post if i remember something Very Happy

Please don't be rude and don't flood and spam me if something is not working well Very Happy and please be patient for new features Smile

Well thanks for your atention

stanks


Description:
Download
Filename: converter.zip
Filesize: 16.83 KB
Downloaded: 812 Time(s)

Post 10 Apr 2005, 21:12
View user's profile Send private message ICQ Number Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks 10 Apr 2005, 21:30
I forget to tell you that algorithm is messed up and i didn't do any speed or size optimizations on it. Simple 'brute force' Very Happy

stanks
Post 10 Apr 2005, 21:30
View user's profile Send private message ICQ Number Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks 19 Apr 2005, 07:49
Some fixes are over. I will upload here later today....i hope.

stanks
Post 19 Apr 2005, 07:49
View user's profile Send private message ICQ Number Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks 08 May 2005, 11:18
Some delay, but here is v0.2. Bugs fixed and i added some options. Not all widgets converted ok.
And please say at least that this sucks Smile and that you don't need it.

stanks


Description:
Download
Filename: converter.zip
Filesize: 24.08 KB
Downloaded: 826 Time(s)

Post 08 May 2005, 11:18
View user's profile Send private message ICQ Number Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 08 May 2005, 17:08
I played with it a bit and I have some remarks:

1.) In makefile when you create the executable for release then you could use the -s compiler (linker) switch (it's the same as you would use the 'strip' program). This removes all symbols from your program making it much shorter.
2.) You use explicit coordinates for the widgets. It's a bad routine (it's not the faulty MS API it's gtk+ with much better layout manager! Try to understand it). When e.g. I use another theme or just another font set then I might get terrible look and feel (buttons with label and icon, words with characters cut at the end etc.). If I meet a dialog box without the ability of resizing then I already know that its developer(s) knew not too much about correct layout programming. Simply saying let the widgets stretch themselves as they just want to.
3.) I pretended to be a dumb user and gave in the file converter.asm instead of any *.c file. The program froze.
I'm eagerly waiting for the next release Wink.


Description:
Filesize: 17.05 KB
Viewed: 8146 Time(s)

conv.png


Post 08 May 2005, 17:08
View user's profile Send private message Reply with quote
stanks



Joined: 01 Dec 2003
Posts: 36
Location: Croatia
stanks 08 May 2005, 18:37
Thanks for reply

I know this problem with my program when you change theme. I will fix this soon.
Now you can enter only C file, and if you enter any other file with different extension, program will message you.

stanks
Post 08 May 2005, 18:37
View user's profile Send private message ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.