problem about gtk3-Collection of common programming errors


  • sepp2k
    c gtk gtk3
    I’m new to GTK+ and I get a segmentation fault error when I try to compile my program. I’ve isolated the cause of the error down to the followin

  • orschiro
    gcc gtk gtk3
    I found out that Color Selector from the GTK+ Code Demos is a quite nice color chooser. Thus, I would like to use it as a standalone application without having to run gtk-demos every time.I tried to compile the example code which is:#include static GtkWidget *window = NULL; static GtkWidget *da; static GdkColor color; static GtkWidget *frame;/* Expose callback for the drawing area*/ static gboolean expose_event_callback (GtkWidget *widget, GdkEventExpose *event, gpointer data) {GdkWindow *window = gtk_widget_get_window (widget);if (window){GtkStyle *style;cairo_t *cr;style = gtk_widget_get_style (widget);cr = gdk_cairo_create (window);gdk_cairo_set_source_color (cr, &style->bg[GTK_STATE_NORMAL]);gdk_cairo_rectangle (cr, &event->area);cairo_fill (cr);cairo_destroy (cr);}return TRUE; }static void change_color_callback (GtkWidget *button,gpointer data) {GtkWidget *dialog;GtkColorSelection *colorsel;gint response;dialog = gtk_color_selection_dialog_new (“Changing color”);gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (window));colorsel = GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (GTK_COLOR_SELECTION_DIALOG (dialog)));gtk_color_selection_set_previous_color (colorsel, &color);gtk_color_selection_set_current_color (colorsel, &color);gtk_color_selection_s

  • paullj1
    c++ gtk gtk+ gtkmm gtk3
    I need to embed a very simple browser ( can parse HTML, and JS Ext ) in a Gtk Widget hopefully in gtkmm. I looked into gtkmozembed, but the c++ wrapper is very out dated, so I tried to just write it in C, but I’m already committed to Gtk+ 3.0, and gtkmozembed doesn’t work with Gtk+ 3.0. Is there a way to just extend Gtk::Widget and put a gecko parser in it? Can’t really find any gecko documentation, I keep getting redirected to gtkmozembed.Any ideas/suggestions would be greatly appreciated.Edit: @Mark After I tried using Webkitgtk, I get the following output and the application crashes.** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocui_gtk:16360): DEBUG: NP_Initialize succeeded ** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocui_gtk:16360): DEBUG: NP_Initialize succeeded ** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocui_gtk:16360): DEBUG: NP_Initialize succeeded ** (ttocui_gtk:16360): DEBUG: NP_Initialize ** (ttocu

Originally posted 2013-11-09 20:52:52.