Search found 2096 matches

by caseih
Mar 25, 2007 0:05
Forum: General
Topic: Is this possible?
Replies: 6
Views: 2492

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: 1078

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: 7038

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: 13732

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 p...
by caseih
Feb 28, 2007 5:52
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 13732

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: 13732

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,"drawingarea1"), "con...
by caseih
Feb 28, 2007 5:12
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 13732

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: 13732

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 implem...
by caseih
Feb 27, 2007 20:05
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 13732

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-...
by caseih
Feb 27, 2007 3:02
Forum: Linux
Topic: GTK GUI Development
Replies: 8
Views: 5263

I just posted a glade example in this forum. It doesn't expose much of glade, but it should be enough to get you going. See my post on integrating GfxLib with Gtk.

http://www.freebasic.net/forum/viewtopic.php?t=7611
by caseih
Feb 27, 2007 2:57
Forum: Linux
Topic: Integrating GfxLib with Gtk
Replies: 14
Views: 13732

Integrating GfxLib with Gtk

forum admins, feel free to move this post to another forum if it's more appropriate there. This is a linux-based thing (should work on win32 with gtk though), but whatever. I've written a quick and dirty demonstration, a la the win32 demo in the language reference, on painting the ScreenPtr to a Gtk...