flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > [IDEA] GUI library for FASM |
Author |
|
OzzY 29 Sep 2006, 00:28
What about creating a GUI library for FASM to wrap Win32API on Windows and GTK on Linux?
My goal is to create a "portable" (you program with the same library on both OS), *very* easy to use, small and fast library to make asm GUI programming a joy. Later we could include vid's FASMLIB ( http://board.flatassembler.net/topic.php?t=4696 ) and also add sockets, file IO and make a complete library, but also keeping it modular so it's assembled/linked only the necessary code. If anyone is interessed we could start talking about the design principles. |
|||
29 Sep 2006, 00:28 |
|
vid 29 Sep 2006, 04:40
i think this is a little too big piece of cake...
|
|||
29 Sep 2006, 04:40 |
|
vbVeryBeginner 03 Oct 2006, 07:04
hi ozzy,
i was thinking about some win32 framework several days ago, and i did some sketch code on it, and just saw your thread, thought you might be interested with the code or etc.
|
|||||||||||
03 Oct 2006, 07:04 |
|
vid 03 Oct 2006, 10:15
vb: how about error handling?
have you been working with X/GTK/KDE already? |
|||
03 Oct 2006, 10:15 |
|
Lsinclar 07 Oct 2006, 08:04
After some hesitations, I decided to post a reply, this is a tremendous subject. It has never been done before, because it is not easy.
You mean the same code produces 2 different things, according to its platform? Interesting. First goal is to get a blank window. Then establish a list of basic controls, their methods and properties. Get someone responsible for the GTK part, plus another guy for the Win32 part. They will work separately but following the same specifications. A single man can't be an expert in both technologies. I suggest we start doing it in C, then convert working parts into assembly. To make it enjoyable, we should get as portable code, for a blank window: Code: #include <ourlib.h> int main() { ourWindow *h = Create_Window("title",0,0,200,100,TRUE,NULL); Window_Show(h); Set_Event(h, "quit", exit_loop); main_loop(); return 0; } GUI programming a joy? Hmm well let's say it's for scientists ... The code of the lib, on Linux: Code: GtkWidget *Create_Window(Title, Left, Top, Width, Height, isCentered, *parent) { GtkWidget *t = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (t), Title); gtk_window_set_default_size(GTK_WINDOW(fenetre), Width, Height); if (isCentered) gtk_window_set_position (GTK_WINDOW (t), GTK_WIN_POS_CENTER); else gtk_window_move (GTK_WINDOW(fen), Left, Top); if (parent) return t; } void Window_Show(GtkWidget *f) { gtk_widget_show (f); } void Set_Event() { g_signal_connect(G_OBJECT(t),"destroy",G_CALLBACK(gtk_main_quit),NULL); } Someone can produce code to make a Win32 window easily, according to the above specification... Please someone DO IT. The "main_loop()" is the equivalent of their "di$patch_message()". Globally this is what vbVB did: if you're in let's establish the common interface. No doubt macros and preprocessor defines could help a probable performance drop: GTK is already a wrapper for X. Wrappers of wrappers tend to waste time. Then it comes to controls. To add a simple button let's just add: Code: Button *B = new_Button(h, 20,50, B_Click); //setParent(b, h); //setLeftTop_Position(20,50); User has to write the callback to handle the click: Code: void B_Click() { print("clic"); } Detractors will show up quickly, they can talk. If we can get this working let me tell you this: Java won't stay long around. Ozzy, please contact me in private so that things are being done. The very best ultimate objective would be to generate this code using a WYSIWYG. There it would be enjoyable and noob-friendly, more than Visual Basic. In this case, no matter how complex is the code, since the user won't see it except the callback he has to fill. I'll think about implementing it into my IDE for Fasm, written in GTK as you guessed. Addictive topic. |
|||
07 Oct 2006, 08:04 |
|
arafel 07 Oct 2006, 08:30
Lsinclar wrote: It has never been done before, because it is not easy. Actually it has been done a number of times already. e.g. wxWidgets, ZooLib, ... (although if you meant done in Assembly language, then I guess not) |
|||
07 Oct 2006, 08:30 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.