flat assembler
Message board for the users of flat assembler.
Index
> Linux > stru C to FASM |
Author |
|
scientica 01 Nov 2003, 01:31
(unless I'm misstaken "whatever_datatype *name" is a pointer, thus a dword, on x86-32 at least). I assume GtkDialog is a structure defined somewhere (don't have access to the gtk includes now).
Here is a likley translation: Code: struc GtkFileSelection ; note: stripped the leading _ ;< private > parent_instance GtkDialog ;< public > dir_list dd ? file_list dd ? selection_entry dd ? selection_text dd ? main_vbox dd ? ok_button dd ? cancel_button dd ? help_button dd ? history_pulldown dd ? history_menu dd ? history_list dd ? fileop_dialog dd ? fileop_entry dd ? fileop_file dd ? cmpl_state dd ? ; I think (=not sure) gpointer is a normal pointe fileop_c_dir dd ? fileop_del_file dd ? fileop_ren_file dd ? button_area dd ? action_area dd ? ;< private > selected_names dd ? last_selected dd ? struct GtkFileSelection ; strippd it here too _________________ ... a professor saying: "use this proprietary software to learn computer science" is the same as English professor handing you a copy of Shakespeare and saying: "use this book to learn Shakespeare without opening the book itself. - Bradley Kuhn |
|||
01 Nov 2003, 01:31 |
|
devilsclaw 01 Nov 2003, 02:29
thanks i will try that out... i have a feeling your right...
|
|||
01 Nov 2003, 02:29 |
|
stanks 27 Oct 2004, 19:04
Hi there
I know that this is one year later but i install linux one month ago. I also started with bazik's tutorials and they are great, but there is one big and important problem. There is no example about opening and saving files. With or without a dialog. I still have battle with this. GtkWidget is structure too. And in it more structures...GtkStyle, GtkRequisition, GtkAllocation and GdkWindow. GtkStyle has more structures GdkColor, GdkGC and GdkPixmap. I have a question....how to respond on button click in 'common' open dialog under GTK+? How to get value of next example: Code: struc x { a dd ? b dd ? } struc y { now here i have one element (named abx) that will hold value of one element from structure x how to do this? } Or live example: C code: dialog_vbox1 = GTK_DIALOG (dialog1)->vbox; How to translate this to asm? Thanks in advance stanks |
|||
27 Oct 2004, 19:04 |
|
gorshing 28 Oct 2004, 12:33
Have you looked at bazik's examples to see if he has answered your question?
http://flatassembler.net/examples/gtk-examples.tar.gz _________________ gorshing |
|||
28 Oct 2004, 12:33 |
|
stanks 28 Oct 2004, 15:10
Hi gorshing
Yes i did, but as i stated in my previous post there is nothing about opening and saving files and similar. But today i learn most important thing....don't complicate simple stuff. I will post here example later this day. stanks |
|||
28 Oct 2004, 15:10 |
|
stanks 28 Oct 2004, 18:53
Hi
Here it is...my file selection: Code: section '.data' writeable szBuffer rb 128 section '.bss' writeable filesel dd ? proc open_file response_open dd ? enter ; new file selection argcall gtk_file_selection_new, szOpenDialogTitle mov [filesel], eax ; DON'T FORGET TO SHOW THE WIDGET!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! argcall gtk_widget_show, [filesel] argcall gtk_dialog_run, [filesel] mov [response_open], eax cmp [response_open], GTK_RESPONSE_OK jne end_dlg ; get file from dialog argcall gtk_file_selection_get_filename, [filesel] lea eax, [eax] mov esi, eax mov edi, szBuffer push edi mov ecx, 32 rep movsd pop edi getname_end: argcall g_print, szBuffer end_dlg: argcall gtk_widget_destroy, [filesel] return I will examine more and will post here what i will find. stanks |
|||
28 Oct 2004, 18:53 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.