Posted: Wed Dec 01, 2004 1:11 pm

http://www.purebasic.com
https://www.purebasic.fr/english/
Oh yeah! Thx Fred! Man, PB is just getting better and better!It's planned to add support for GTK framework for Windows as it's done for Linux and MacOS. It will be of course optional, and not the default tooltik. It will allow 1:1 port trough all plateforms. The compiler subsystem system is already implemented in the linux compiler, as the next linux version will support GTK1.2 and GTK2 trough a compiler switch (easy, easy...), so it's only a matter of time to have the same on Windows.
Code: Select all
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="title" translatable="yes">GTK Test</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="decorated">True</property>
<property name="skip_taskbar_hint">False</property>
<property name="skip_pager_hint">False</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">MessageRequester</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
</widget>
</child>
</widget>
</glade-interface>
Code: Select all
#GTK_WINDOW_TOPLEVEL = 0
Procedure hello(widget, wdata)
MessageRequester ("MessageRequester","clicked",0)
EndProcedure
If OpenLibrary(10,"libgtk-win32-2.0-0.dll") And OpenLibrary(11,"libglade-2.0-0.dll") And OpenLibrary(12,"libgobject-2.0-0.dll")
CallFunction(10,"gtk_init",0,0)
CallFunction(11,"glade_init")
xml=CallFunction(11,"glade_xml_new","GTKTest.glade",0)
*window1=CallFunction(11,"glade_xml_get_widget",xml,@"window1")
*button1=CallFunction(11,"glade_xml_get_widget",xml,@"button1")
CallFunction(12,"g_signal_connect_data",*button1,@"clicked",@hello(),0,0,0)
CallFunction(10,"gtk_widget_show_all",*window1)
CallFunction(10,"gtk_main")
EndIf
No, please not, the OpenGL examples look horrible.Num3 wrote:I've asked for this API a long time ago, Windows, Unux, Mac, PalmOs....
http://www.wxwindows.org/