Search found 1322 matches

by caseih
Nov 05, 2008 4:47
Forum: General
Topic: Using TK GUI in FB?
Replies: 6
Views: 1655

If you want to go much lighter weight than turbo vision and have some semblence of a text gui, maybe ncurses is the way to go. As for guis in general, I think tk is probably not the best. If you're serious, then wx or gtk are the way to go. They aren't that difficult to use either. The GTK bindings ...
by caseih
Feb 11, 2008 2:41
Forum: General
Topic: Converting from PowerBasic
Replies: 60
Views: 17179

All of these stories about run-ins with PB Inc are quite interesting. And they mirror my own experiences. In my opinion FB certainly is up to the task in every respect. I can't speak for windows programs, but I recently ported a dozen or so of my old high school pbdos programs to FB/Linux. Was kind ...
by caseih
Apr 04, 2007 3:17
Forum: Hardware Interfaces / Communication
Topic: A question regarding sockets
Replies: 4
Views: 2858

Re: A question regarding sockets

Hello How can I configure a tcp socket so that, when sending data through it, the program should not wait until all the data is received by the other end? Thank you Either threaded loops that wait on the socket or asynchronous I/O are the recommended techniques. In Linux, for example, I could use t...
by caseih
Apr 04, 2007 3:07
Forum: General
Topic: Discarting return value from a string function?
Replies: 13
Views: 2829

i think fb needs returning variables by reference.. that'd solve it all :P This is the path to madness. And memory leaks. Basically the only way to return something by reference from a function is to allocate it on the heap and then expect that the caller will free it. Many standard C library funct...
by caseih
Mar 27, 2007 3:24
Forum: Projects
Topic: FreeBASIC Standard C++ Library port (fbstd)
Replies: 18
Views: 6330

Ahh very good. The STL algorithms are done quite well and, finally after all these years, don't have a lot of memory leaks in them anymore.

You are correct about generics. Indeed a useful feature to add to the language at some point down the road.
by caseih
Mar 26, 2007 3:39
Forum: Projects
Topic: FreeBASIC Standard C++ Library port (fbstd)
Replies: 18
Views: 6330

This project is a wrapper around the libstdc++ stl implementation, and not a port, correct?

Will FB someday support generics?
by caseih
Mar 25, 2007 0:05
Forum: General
Topic: Is this possible?
Replies: 6
Views: 2055

Sure it's possible. This is called, inter-process communication. There are many different methods available to you, depending on your OS and platform. Three examples are sockets, pipes, and shared-memory. On Windows, your first bet will likely be what Windows calls named pipes. One process will open...
by caseih
Mar 24, 2007 23:48
Forum: General
Topic: Cross-compiling
Replies: 0
Views: 881

Cross-compiling

Currently I have GCC compilers (with linkers and runtime headers and library stubs) built on my x86 linux machine to target Win32, MacOS X, and LinuxPPC, thanks to GCC's wonderful cross-compiling abilities. Having the ability to build a FB cross compiler might be a useful thing also. For the uniniti...
by caseih
Mar 05, 2007 4:06
Forum: Beginners
Topic: Is Freebasic a stable language ?
Replies: 14
Views: 5279

Doing GUIs in any language with win32 is awful. FB, fortunately, can utilize gui libraries that make it nice. I hope that when object-oriented extensions are finalized that the nice wxWidgets library can be utilized from FB. In the meantime, GTK does have a learning curve, but overall it's a great G...
by caseih
Feb 28, 2007 16:32
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

I'm really good about posting code with "some assembly required" aren't I? :) Yes the function pointer should be wrapped in the G_CALLBACK casting macro. It's okay that it expects a cdecl with no parameters. That's because each signal has a different signature, or number of parameters to pass to a c...
by caseih
Feb 28, 2007 5:52
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

For linux, the proper byte copying code from the expose handler is:

Code: Select all

   for x=0 to h*w-1
      *d=*(c+2)
      c = c + 1
      d = d + 1
      *d=*c
      c = c + 1
      d = d + 1
      *d=*(c-2)
      c = c + 1
      d = d + 1
      c = c + 1
   next
by caseih
Feb 28, 2007 5:46
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

First add #include "gtk/glib.bi" Then you'll have to replace the xml autoconnect lines with: g_signal_connect(glade_xml_get_widget(xml,"window"), "delete-event", @on_window_delete_event,NULL) g_signal_connect(glade_xml_get_widget(xml,"drawin...
by caseih
Feb 28, 2007 5:12
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

EDIT: Fixed the expose handler. Apparently the bytes were in RGBA order I added a hack to adjust the bytes so GTK is happy. It proves this works anyway. Button2 and button3 now do things like drawing random stuff. Note that since ScreenPtr is painted manually, or when the window is exposed, you can'...
by caseih
Feb 27, 2007 20:09
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

Very nice! Got it working after a few tweaks: 1. The forum [ code ] tags have changed SYSTEM into System and name= to Name in the Glade XML file. 2. In two places in the source, you refer to "drawingarea", but the widget is named "drawingarea1". 3. You haven't written the implementation of on_butto...
by caseih
Feb 27, 2007 20:05
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 9948

it doesn't appear to work on windows(2k), i get this dumped out to a console: (thing.exe:792): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion `GTK_IS_WIDGET (widget)' failed (thing.exe:792): libglade-WARNING **: could not find signal handler 'on_button2_clicked'. (thing.exe:792): libglade-...

Go to advanced search