glade_habr compilation is success
This commit is contained in:
parent
24f307bf05
commit
4d32dd63ae
|
@ -11,9 +11,9 @@ GtkRadioButton *rbutRectangle, *rbutEllipse, *rbutTriangle;
|
|||
GtkDrawingArea *drawingarea;
|
||||
|
||||
// описание обработчиков сигналов
|
||||
extern "C" void topWindow_destroy_cb (GtkObject *object, gpointer user_data);
|
||||
extern "C" void topWindow_destroy_cb (GtkWidget *object, gpointer user_data);
|
||||
extern "C" gboolean drawingarea_draw_event_cb(GtkWidget *widget, GdkEventExpose *event, gpointer data);
|
||||
extern "C" void rbutton_toggled_cb (GtkObject *object);
|
||||
extern "C" void rbutton_toggled_cb (GtkWidget *object);
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ int main( int argc, char **argv )
|
|||
}
|
||||
|
||||
// закрытие приложения
|
||||
void topWindow_destroy_cb (GtkObject *object, gpointer user_data)
|
||||
void topWindow_destroy_cb (GtkWidget *object, gpointer user_data)
|
||||
{
|
||||
// завершаем главный цикл приложения
|
||||
gtk_main_quit();
|
||||
|
@ -67,8 +67,7 @@ gboolean drawingarea_draw_event_cb(GtkWidget *widget, GdkEventExpose *event, gpo
|
|||
{
|
||||
cairo_t *cr;
|
||||
|
||||
return TRUE;
|
||||
cr = gdk_cairo_create (widget->window);
|
||||
cr = gdk_cairo_create (gtk_widget_get_window (widget));
|
||||
cairo_set_line_width (cr, 7);
|
||||
cairo_set_source_rgb (cr, 0, 0, 0);
|
||||
|
||||
|
@ -111,7 +110,7 @@ gboolean drawingarea_draw_event_cb(GtkWidget *widget, GdkEventExpose *event, gpo
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
void rbutton_toggled_cb (GtkObject *object)
|
||||
void rbutton_toggled_cb (GtkWidget *object)
|
||||
{
|
||||
// перерисовка drawingarea
|
||||
gtk_widget_queue_draw (GTK_WIDGET(drawingarea));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CC=g++
|
||||
LDLIBS=`pkg-config --libs gtk+-3.0 gmodule-2.0`
|
||||
CFLAGS=-Wall -g `pkg-config --cflags gtk+-2.0 gmodule-2.0`
|
||||
CFLAGS=-Wall -g `pkg-config --cflags gtk+-3.0 gmodule-2.0`
|
||||
|
||||
Example1: Example1.o
|
||||
$(CC) $(LDLIBS) Example1.o -o Example1
|
||||
|
|
Loading…
Reference in New Issue