flat assembler
Message board for the users of flat assembler.
Index
> Linux > GUI programming |
Author |
|
binary108 03 Apr 2004, 19:30
How can i write code for x-server?
How to link my program with gui libraries? And how to create seample window? Thanks |
|||
03 Apr 2004, 19:30 |
|
The dead 04 Apr 2004, 11:20
i think you need gcc to do that
|
|||
04 Apr 2004, 11:20 |
|
Tomasz Grysztar 04 Apr 2004, 16:22
Since the examples section of this website is still not done, please look at the archive of old site: http://fasm.sourceforge.net/archive/oldsite/ - in the examples section there is package of GTK programming examples by bazik.
|
|||
04 Apr 2004, 16:22 |
|
binary108 04 Apr 2004, 20:06
Thanks!
|
|||
04 Apr 2004, 20:06 |
|
Shakain 08 May 2004, 23:42
Hi. I am new to the group. I am totally ignorant of Linux. But I like to be able to programm in it so its time to start removing some of that ignorance. I downloaded FASM. My project is to program GUI applications, using XFree. Or XLib, whatever its name is. Thats is program GUI at the lowest possible level. Remember I know NADA of linux. I just got logged in so to say.
1) Is linux protected from hardware like Widnows? Does it have a GDI kind of interface ? Or is it possible to draw directly to the screen ? I guess so since it has OGL stuff ? 2) Whats the minimum I need to know. How can I say output a pixel or a line ? I be very happy with good links. Thank you. _________________ Hi guys |
|||
08 May 2004, 23:42 |
|
scientica 09 May 2004, 16:27
1) GDI, well, if you consider GTK (and such) and GDI layer, yes.
2) I'm a afraid quite a bit, unless you're just looking for an example app to cut 'n' paste. I'm currently trying to learn much of linux programming (in general and (f)asm), for the moment I think the easiest way is to learn the programming way in C (or C++, as they are the biggest languages, and in which you fins the most documentatio/examples) for linux then port it to fasm the lowser level I think would be speaking with the X server directly, not sure how to do that, but it sure must be possible -- how would any gfx work if so wasn't the case? |
|||
09 May 2004, 16:27 |
|
pelaillo 10 May 2004, 02:28
Shakain,
I suggest to stick either to GTK or QT because low level programming of X is an amazing challenge. |
|||
10 May 2004, 02:28 |
|
crc 10 May 2004, 09:14
Shakain,
Hi. I am new to the group. I am totally ignorant of Linux. But I like to be able to programm in it so its time to start removing some of that ignorance. I downloaded FASM. My project is to program GUI applications, using XFree. Or XLib, whatever its name is. Thats is program GUI at the lowest possible level. Remember I know NADA of linux. I just got logged in so to say. 1) Is linux protected from hardware like Widnows? Does it have a GDI kind of interface ? Or is it possible to draw directly to the screen ? I guess so since it has OGL stuff ? Linux doesn't allow easy access to the hardware. To do any real GUI programming, you'll need to use xlib, or Gtk, or Qt, or some of the simpler solutions like SVGALIB and libSDL. Using the last two, I have some examples in RetroForth 6.25.2 (http://download.retroforth.org/retroforth-6.25.2.tar.gz). The two graphical versions are written in NASM, but it shouldn't be too difficult to port them over to FASM. 2) Whats the minimum I need to know. How can I say output a pixel or a line ? As mentioned by others, quite a bit. It really comes down to the libraries you choose to link with. If you just want to draw things on the screen, you can't beat SVGALIB. It's small, and easy to work with. It does have the disadvantage of not always playing nicely with X11 though. libSDL is a slightly more complex option, but it's also manageable. I really should make a lightweight graphics library for SVGALIB/libSDL and FASM for those wanting to do basic graphical programming under Linux. Maybe I'll give it a try later this month. |
|||
10 May 2004, 09:14 |
|
Todd 25 May 2004, 23:18
If you really want to get into low-level graphics programming in X, than I'd suggest reading this tutorial. It explains fairly well how an X server works, how to use it, and it gives the command to link to the X libraries with GCC and some tutorials in C code. Although, I think you would have more luck learning GTK, and I think there's even some Fasm GTK tutorials around here somewhere.
As for drawing directly to the screen, I would recommend SDL. It's really not too hard to learn and it provides an interface for OpenGL too. (Edit): By the way, I put together a little demo in SDL that might be helpful to you. It's commented, but it should be easy enough to understand. It's just a black screen with a red square bouncing around, but it shows how to do several other things as well. Click Here to Download (8.0k) |
|||
25 May 2004, 23:18 |
|
fasm9 17 Jun 2004, 13:11
IMHO, x11/x* is not fit for FASM. it's not FASM-style. And Linux is not ready for fasm.
Linux at GUI needs 10 years. gnome? what is gnome? kde? what is kde? xfce/X.org? what is the...? -- Debian:~#sr freshmeat opengui Last edited by fasm9 on 16 Jul 2004, 10:57; edited 1 time in total |
|||
17 Jun 2004, 13:11 |
|
crc 17 Jun 2004, 21:03
X11 is a pain to program for in any language. If you need to run programs under X11, either use a toolkit (GTK is probably the easiest of the well-known toolkits) or SDL. Even then, the API's used are geared towards C/C++, not assembly. One of these days, I'll release the graphics library I've been working on (SDL and SVGALIB backends).
There is little to no code in the Linux (and *nix) or Windows worlds that is really fasm-style. Almost everything is geared towards C/C++. It's a shame that we have to go through bloated C/C++ libraries/dll's to do work well with most of today's OSes. Quote: linux at GUI needs 10 years. Linux + GUO does not need 10 years. They need to rethink their approach and start fresh. I'm sick of emulating Windows/MacOS in the look and feel. I'm sick of big, bloated libraries. I'm sick of all the bloatware. For those times when a GUI is needed, just make it as small and simple as possible. Hopefully some of the promising hobby OSes don't fall into this trap. |
|||
17 Jun 2004, 21:03 |
|
Sasha 20 Jul 2012, 22:23
crc wrote: Hopefully some of the promising hobby OSes don't fall into this trap. MenuetOS ? |
|||
20 Jul 2012, 22:23 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.