set_draw_func ((area, context, width, height) => { context.set_source_surface (surface, 0, 0); context.paint (); }); drawing_area.resize.connect_after ((widget, width, height) => { if (surface != null) { surface = null; } var next_surface = (widget.get_native ()).get_...
作为示例,以这里找到的文档的简单GtkDrawingArea示例为例。在本例中,g_signal_connect用于将draw信号连...
area = Gtk.DrawingArea.new() area.set_draw_func(self.on_draw) We create theGtk.DrawingAreaand set the drawing function withset_draw_func. def on_draw(self, da, ctx, w, h): ... The second parameter ofon_drawis the drawing area, the third is the drawing context. The context is ...
作为示例,以这里找到的文档的简单GtkDrawingArea示例为例。在本例中,g_signal_connect用于将draw信号连...
* gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area), * draw_function, * NULL, NULL); * * } * ]| * * The draw function is normally called when a drawing area first comes * onscreen, or when it’s covered by another window and then uncovered. ...
- gtk_drawing_area_set_draw_func replaces the ::draw signal* New examples in gtk4-demo: - Gestures - Fishbowl* GtkInspector now has a frame recorder which shows detailed information about the widget to render node conversion* Hi-DPI is now supported with the Windows backend*...
示例2: gtk_drawing_area_new ▲点赞 5▼ voidColorOptionView::_createItem() {constZLColor &color = ((ZLColorOptionEntry*)myOption)->color(); myDrawingArea = gtk_drawing_area_new(); gtk_widget_set_size_request(GTK_WIDGET(myDrawingArea),60,20);// myWidget = gtk_button_new();// gt...
(); /* set a minimum size */ gtk_widget_set_size_request (drawing_area, 100, 100); gtk_frame_set_child (GTK_FRAME (frame), drawing_area); gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area), draw_cb, NULL, NULL); g_signal_connect_after (drawing_area, "resize", ...
drawing_area.set_size_request (300,300); drawing_area.set_double_buffered (false); this.context = glXCreateContext (xdisplay, xvinfo,null,true); drawing_area.configure_event.connect (on_configure_event); drawing_area.expose_event.connect (on_expose_event); ...
gtk_window_set_default_size (GTK_WINDOW (applet->ap_popup),0,0); gtk_window_set_decorated (GTK_WINDOW (applet->ap_popup), FALSE); applet->ap_store = gtk_list_store_new (1, wireless_ap_get_type()); gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (applet->ap_store),0, ...