gtk+ and gtkmm for wince?
Hi, I was looking on the web for a port to wince (of both, gtk+ and gtkmm). Couldn't find anything relevant, hopefully i did not look at the rigth places and someone can show me the light. What i want to do is to be able to cross-compile from linux into wince, using the pocketpc-* tools (gcc and so on). Is it possible?? Thanks a lot in advance, Cesc ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Howto make GtkRadiobutton text flicker (was: Re: I have a problem with GtkRadioButton)
yeajchao wrote: However, the need for some applications to use fixed colours like green, yellow and red to indicate things like error-free results, warnings, error messages or critical choices / operations is recognized. That's why you can rather easily change colours and appearances of texts on screen. See the following URL for an overview of how to change text appearances of markup-enabled widgets even easier than tweaking themes: First,thank you very much for your advice As you say, I want to use the radio button as a alarm, Usually,alarm's color is red My application controls some peripheral instrument, when my application detected some one broken down the alarm will be flicker with red color I am a beginer of gtk, also beginer of program,so I have no other idea toresolve the problem Will you be so kind as to give some advice ? First: you really should forget about manually recolouring the knobs of radiobuttons, checkboxes and other controls. Recolouring just texts is sufficient for this purpose and can be accomplished almost easily. To make text(s) in dialogs flicker there are about four steps to be taken. I assume you have your standard GtkRadiobutton* (the one to be recoloured) within reach. In this example I will call it rb_flicker: 1. learn about Pango's simple markup to apply custom colours (and other styles) to labels. See: http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html 2. obtain the GtkLabel that is (usually) associated with a GtkRadiobutton. The simpliest way to get it is about this: label_flicker = gtk_bin_get_child (GTK_BIN (rb_flicker)); See: http://developer.gnome.org/doc/API/2.0/gtk/GtkBin.html#gtk-bin-get-child 3. use gtk_label_set_markup() to change the appearance of the label once, something like this: gtk_label_set_markup (label_flicker, span foreground=\red\This is critical/span); See: http://developer.gnome.org/doc/API/2.0/gtk/GtkLabel.html#gtk-label-set-markup 4. to actually achieve a flicker effect (periodically changing appearance) you manually have to change the markup text of the label periodically. There are no automatic means to achieve any sort of animation in GTK+. Use one of gtk_timeout_add() or g_timeout_add() to register a simple function which periodically switches between two (or more) states of the label, like 1. span foreground=\red\This is critical/span and 2. This is critical. This switches between red and default colour of the text. Upon registration, this simple markup changer function should receive the GtkLabel of the GtkRadiobutton as its data, like this: gtk_timeout_add (500, func_flicker, label_flicker); See: http://developer.gnome.org/doc/API/2.0/gtk/gtk-General.html#gtk-timeout-add http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#g-timeout-add Notes: Step 2, as described here, assumes you are using a simple radiobutton, that is, a GtkRadiobutton with exactly one GtkLabel attached to it. GTK+ also supports more complex radiobuttons which have containers and multiple children, i.e. images, attached to them, instead of just a simple GtkLabel. In that case locating the GtkLabel would require some more efforts. Step 4: it is up to you to take care to stop the periodically called timeout function. For instance, when the dialog that contains the flickering radiobutton gets destroyed, the flicker function MUST NOT continue to try changing the appearance of the radiobutton's label any more. Removal of your timeout fucntion does not happen automatically! After all I'd like to repeat: you shouldn't play with the appearance of GTK+ widgets in a custom, non-themable way unless absolutely required! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
new GTK+ 2.8.11 runtime for windows and package for Dev-C++
Hi, You can now find now GTK+ 2.8.11 runtime for Windows and package for Dev-C++, on http://gtk.alkia.org You can also find to GTKBudget 2.0 (GPL), a budget managing and forecasting tool, now supporting English. Translators are welcomed for other languages, system is using xml file to display labels in the interface. Regards, Benoît Carpentier aka GTKool http://gtk.alkia.org ___ Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international. Téléchargez sur http://fr.messenger.yahoo.com ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
multi-threaded apps with GTK
I am now making good progress, thanks to the advice I got in this forum. Many thanks to all those who chipped in, even though I got emotional from my frustrations. I complained 1-2 weeks ago that GTK does not work out of the box for multi-threaded apps, and asked, why not? A complex and poorly documented burden is placed on the programmer using GTK, IMO. One of the answers I got was that the overhead of locking shared resorces should not be borne by apps that do not need this. I responded that locking takes nanoseconds (as long as the resource is not already locked from another thread). Someone asked me if I knew what I was talking about. Today I took the time to write a benchmark. I am not sure this is the right benchmark for this issue, but here are the results. Benchmark: 1-9 threads all do the following: while (elapsed_time 5 seconds) lock a mutex with pthread_mutex_lock() increment a counter unlock the mutex with pthread_mutex_unlock() All threads contend for the same mutex. Only one at a time will be able to increment the counter. The counter reveals how fast the lock/unlock and thread switching is happening. Results using Linux kernel 2.6.15 uniprocessor: 27 million per second, shared among the 1-9 threads running. e.g. 1 thread iterates 27 million per second, 9 contending threads average about 3 million each. Using the same kernel, SMP version, and an AMD64X2 CPU (dual core), the performance is strange. 1 thread gets the same 27 million, but multiple threads cause the total to sink to 7 million. Evidently Linux has a problem with SMP, or with AMD. 7 million per second is not exactly slow. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Sockets with GTK 2.8.9 on WIN32
On 2/10/06, Gabriele Greco [EMAIL PROTECTED] wrote: I've a problem on an application on WIN32 with GTK 2.8.x that works flawlessly with GTK 2.6.x (always on win32) or GTK 2.8.x (on unix). It seems that with 2.8.9 (the installer version got from gimp-win home) the sockets are handled as non blocking also if you don't specify this. It's a wanted behaviour? Specifically I often receive 0 if I call recv() in my gdk_input_add( GDK_INPUT_READ ) call, this happens on GTK 2.6 and early only when the connection is closed by the remote peer. With GTK 2.8, and only on WIN32, I often receive 0 from recv and an error code of WSAEWOULDBLOCK. This is a problem since my code often rely on the fact socket calls are blocking... That is one of the changes that were made in Glib 2.8.x. All of the win32 GIOChannel stuff was changed such that it'll leave your sockets in non-blocking mode. See this bug report for more information: http://bugzilla.gnome.org/show_bug.cgi?id=147392 Basically, if you want your socket to be non-blocking, you have to make it so in the input function every time it is triggered. I thought that I had seen this in the documentation somewhere, but apparently not. -D ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How To Draw a window without an option to Maximize it
Hi How to Draw a Window without an option to Maximize it ? Regards ! Amitesh ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How To Draw a window without an option to Maximize it
Hi to all i have found the solution *** gtk_window_set_resizable (GTK_WINDOW(window),FALSE); gtk_widget_show (window); i have also tried to do the same using gdk_window_set_decorations (); but its not working !! :( Any solutions ! here is the Code * static int j=GDK_DECOR_MAXIMIZE; j=!j; gtk_widget_realize (window); gdk_window_set_decorations(window-window,j); gtk_widget_show(window); * /*Gdkwindow.h*/ typedef enum { GDK_DECOR_ALL = 1 0, GDK_DECOR_BORDER = 1 1, GDK_DECOR_RESIZEH = 1 2, GDK_DECOR_TITLE = 1 3, GDK_DECOR_MENU= 1 4, GDK_DECOR_MINIMIZE= 1 5, GDK_DECOR_MAXIMIZE= 1 6 } GdkWMDecoration; On 2/11/06, Amitesh Singh [EMAIL PROTECTED] wrote: Hi How to Draw a Window without an option to Maximize it ? Regards ! Amitesh -- Cheers !! AMITESH ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: How To Draw a window without an option to Maximize it
There was error in the code ; it should be .. + static unsigned int j= MAXIMIZE; + j=~j; but still its not working !! :-p I want to disable MAXIMIZE option of Window via gdk_window_set_decorations() ,, although gtk_window_set_resizable (GTK_WINDOW(window),FALSE); does that ! Thanks Amitesh www.amitesh.info ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Gtk and C++
Hi list, I need to use objects in my new project so I must change my usual tools for GTK. I'd normally used gtk with glade and MSVC6 to compile. I found gtkmm, glade--, gideon, etc but I can't assemble a good package for my work. Can any body tell me which is the best option? Thank you Jorge Monsalvo ___ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del mundo http://correo.yahoo.com.ar ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list