• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GTK_WIDGET_UNSET_FLAGS函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GTK_WIDGET_UNSET_FLAGS函数的典型用法代码示例。如果您正苦于以下问题:C++ GTK_WIDGET_UNSET_FLAGS函数的具体用法?C++ GTK_WIDGET_UNSET_FLAGS怎么用?C++ GTK_WIDGET_UNSET_FLAGS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GTK_WIDGET_UNSET_FLAGS函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: _ddisplay_setup_scrollbars

static void
_ddisplay_setup_scrollbars (DDisplay *ddisp, GtkWidget *table, int width, int height)
{
  /*  The adjustment datums  */
  ddisp->hsbdata = GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, width, 1, (width-1)/4, width-1));
  ddisp->vsbdata = GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, height, 1, (height-1)/4, height-1));

  ddisp->hsb = gtk_hscrollbar_new (ddisp->hsbdata);
#if GTK_CHECK_VERSION(2,18,0)
  gtk_widget_set_can_focus (ddisp->hsb, FALSE);
#else
  GTK_WIDGET_UNSET_FLAGS (ddisp->hsb, GTK_CAN_FOCUS);
#endif
  ddisp->vsb = gtk_vscrollbar_new (ddisp->vsbdata);
#if GTK_CHECK_VERSION(2,18,0)
  gtk_widget_set_can_focus (ddisp->vsb, FALSE);
#else
  GTK_WIDGET_UNSET_FLAGS (ddisp->vsb, GTK_CAN_FOCUS);
#endif

  /*  set up the scrollbar observers  */
  g_signal_connect (G_OBJECT (ddisp->hsbdata), "value_changed",
		    G_CALLBACK(ddisplay_hsb_update), ddisp);
  g_signal_connect (G_OBJECT (ddisp->vsbdata), "value_changed",
		    G_CALLBACK(ddisplay_vsb_update), ddisp);

  /* harder to change position in the table, but we did not do it for years ;) */
  gtk_table_attach (GTK_TABLE (table), ddisp->hsb, 0, 2, 2, 3,
                    GTK_EXPAND | GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
  gtk_table_attach (GTK_TABLE (table), ddisp->vsb, 2, 3, 0, 2,
                    GTK_FILL, GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);

  gtk_widget_show (ddisp->hsb);
  gtk_widget_show (ddisp->vsb);
}
开发者ID:jbohren-forks,项目名称:dia,代码行数:35,代码来源:interface.c


示例2: Dw_gtk_viewport_init

/*
 * Standard Gtk+ function
 */
static void Dw_gtk_viewport_init (GtkDwViewport *viewport)
{
   DBG_OBJ_CREATE (viewport, "GtkDwViewport");

   GTK_WIDGET_UNSET_FLAGS (viewport, GTK_NO_WINDOW);
   GTK_WIDGET_UNSET_FLAGS (viewport, GTK_CAN_FOCUS);

   /* Without this, gtk_layout_{draw|expose} will clear the window.
      Look at gtklayout.c */
   GTK_WIDGET_SET_FLAGS (viewport, GTK_APP_PAINTABLE);

   viewport->back_pixmap = NULL;
   viewport->child = NULL;
   viewport->last_entered = NULL;
   viewport->draw_resize_idle_id = 0;
   viewport->anchor = NULL;
   viewport->anchor_idle_id = 0;
   viewport->findtext_state = a_Findtext_state_new ();
   viewport->selection = a_Selection_new ();
   viewport->anchors_table = g_hash_table_new (g_str_hash, g_str_equal);
   viewport->draw_areas = NULL;
   viewport->num_draw_areas = 0;
   viewport->num_draw_areas_max = 4;

   DBG_OBJ_ASSOC (viewport->findtext_state, viewport);
   DBG_OBJ_ASSOC (viewport->selection, viewport);
}
开发者ID:dimkr,项目名称:dillo,代码行数:30,代码来源:dw_gtk_viewport.c


示例3: wxT

bool wxPopupWindow::Create( wxWindow *parent, int style )
{
    m_needParent = false;

    if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
        !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
    {
        wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
        return false;
    }

    // Unlike windows, top level windows are created hidden by default.
    m_isShown = false;

    // All dialogs should really have this style
    m_windowStyle |= wxTAB_TRAVERSAL;

    m_insertCallback = (wxInsertChildFunction) wxInsertChildInDialog;

    m_widget = gtk_window_new( GTK_WINDOW_POPUP );

    if ((m_parent) && (GTK_IS_WINDOW(m_parent->m_widget)))
        gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) );

    GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );

    gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
        GTK_SIGNAL_FUNC(gtk_dialog_delete_callback), (gpointer)this );

    m_wxwindow = gtk_pizza_new();
    gtk_widget_show( m_wxwindow );
    GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );

    gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );

    if (m_parent) m_parent->AddChild( this );

    PostCreation();

    /*  we cannot set MWM hints  before the widget has
        been realized, so we do this directly after realization */
    gtk_signal_connect( GTK_OBJECT(m_widget), "realize",
                        GTK_SIGNAL_FUNC(gtk_dialog_realized_callback), (gpointer) this );

    // disable native tab traversal
    gtk_signal_connect( GTK_OBJECT(m_widget), "focus",
        GTK_SIGNAL_FUNC(gtk_dialog_focus_callback), (gpointer)this );

    gtk_signal_connect (GTK_OBJECT(m_widget), "button_press_event",
        GTK_SIGNAL_FUNC(gtk_popup_button_press), (gpointer)this );

    return true;
}
开发者ID:3v1n0,项目名称:wxWidgets,代码行数:53,代码来源:popupwin.cpp


示例4: gdl_dock_item_grip_instance_init

static void
gdl_dock_item_grip_instance_init (GdlDockItemGrip *grip)
{
    GtkWidget *image;

    GTK_WIDGET_SET_FLAGS (grip, GTK_NO_WINDOW);
    
    grip->_priv = g_new0 (GdlDockItemGripPrivate, 1);
    grip->_priv->icon_pixbuf_valid = FALSE;
    grip->_priv->icon_pixbuf = NULL;
    grip->_priv->title_layout = NULL;

    gtk_widget_push_composite_child ();
    grip->_priv->close_button = gtk_button_new ();
    gtk_widget_pop_composite_child ();
    
    GTK_WIDGET_UNSET_FLAGS (grip->_priv->close_button, GTK_CAN_FOCUS);
    gtk_widget_set_parent (grip->_priv->close_button, GTK_WIDGET (grip));
    gtk_button_set_relief (GTK_BUTTON (grip->_priv->close_button), GTK_RELIEF_NONE);
    gtk_widget_show (grip->_priv->close_button);

    image = gtk_image_new_from_stock (GDL_STOCK_CLOSE, GTK_ICON_SIZE_MENU);
    gtk_container_add (GTK_CONTAINER (grip->_priv->close_button), image);
    gtk_widget_show (image);

    g_signal_connect (G_OBJECT (grip->_priv->close_button), "clicked",
                      G_CALLBACK (gdl_dock_item_grip_close_clicked), grip);

    gtk_widget_push_composite_child ();
    grip->_priv->iconify_button = gtk_button_new ();
    gtk_widget_pop_composite_child ();
    
    GTK_WIDGET_UNSET_FLAGS (grip->_priv->iconify_button, GTK_CAN_FOCUS);
    gtk_widget_set_parent (grip->_priv->iconify_button, GTK_WIDGET (grip));
    gtk_button_set_relief (GTK_BUTTON (grip->_priv->iconify_button), GTK_RELIEF_NONE);
    gtk_widget_show (grip->_priv->iconify_button);

    image = gtk_image_new_from_stock (GDL_STOCK_MENU_RIGHT, GTK_ICON_SIZE_MENU);
    gtk_container_add (GTK_CONTAINER (grip->_priv->iconify_button), image);
    gtk_widget_show (image);

    g_signal_connect (G_OBJECT (grip->_priv->iconify_button), "clicked",
                      G_CALLBACK (gdl_dock_item_grip_iconify_clicked), grip);

    grip->_priv->tooltips = gtk_tooltips_new ();
    g_object_ref (grip->_priv->tooltips);
    gtk_object_sink (GTK_OBJECT (grip->_priv->tooltips));
    gtk_tooltips_set_tip (grip->_priv->tooltips, grip->_priv->iconify_button,
                          _("Iconify"), _("Iconify this dock"));
    gtk_tooltips_set_tip (grip->_priv->tooltips, grip->_priv->close_button,
                          _("Close"), _("Close this dock"));
}
开发者ID:step21,项目名称:inkscape-osx-packaging-native,代码行数:52,代码来源:gdl-dock-item-grip.c


示例5: sp_button_init

static void
sp_button_init (SPButton *button)
{
	button->action = NULL;
	button->doubleclick_action = NULL;
	button->tooltips = NULL;

	gtk_container_set_border_width (GTK_CONTAINER (button), 0);

	GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (button), GTK_CAN_FOCUS);
	GTK_WIDGET_UNSET_FLAGS (GTK_WIDGET (button), GTK_CAN_DEFAULT);

	g_signal_connect_after (G_OBJECT (button), "clicked", G_CALLBACK (sp_button_perform_action), NULL);
	g_signal_connect_after (G_OBJECT (button), "event", G_CALLBACK (sp_button_process_event), NULL);
}
开发者ID:wdmchaft,项目名称:DoonSketch,代码行数:15,代码来源:button.cpp


示例6: canvas_focus_out_event

static gint
canvas_focus_out_event (GtkWidget *widget,
                        GdkEventFocus *event)
{
	GnomeCanvas *canvas;
	ECanvas *ecanvas;
	GdkEvent full_event = { 0 };

	canvas = GNOME_CANVAS (widget);
	ecanvas = E_CANVAS (widget);

	/* XXX Can't access flags directly anymore, but is it really needed?
	 *     If so, could we call gtk_widget_send_focus_change() instead? */
#if 0
	GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
#endif

	gtk_im_context_focus_out (ecanvas->im_context);

	if (canvas->focused_item) {
		full_event.type = event->type;
		full_event.focus_change = *event;
		return canvas_emit_event (canvas, &full_event);
	} else {
		return FALSE;
	}
}
开发者ID:UIKit0,项目名称:evolution,代码行数:27,代码来源:e-canvas.c


示例7: mate_druid_unmap

static void
mate_druid_unmap (GtkWidget *widget)
{
	MateDruid *druid;

	g_return_if_fail (widget != NULL);
	g_return_if_fail (MATE_IS_DRUID (widget));

	druid = MATE_DRUID (widget);
	GTK_WIDGET_UNSET_FLAGS (druid, GTK_MAPPED);
#if 0
	gtk_widget_unmap (druid->back);
	if (druid->_priv->show_finish)
		gtk_widget_unmap (druid->finish);
	else
		gtk_widget_unmap (druid->next);
	gtk_widget_unmap (druid->cancel);
	if (druid->_priv->show_help)
		gtk_widget_unmap (druid->help);
#endif
	gtk_widget_unmap (druid->_priv->bbox);
	if (druid->_priv->current &&
	    GTK_WIDGET_VISIBLE (druid->_priv->current) &&
	    GTK_WIDGET_MAPPED (druid->_priv->current))
		gtk_widget_unmap (GTK_WIDGET (druid->_priv->current));
}
开发者ID:fatman2021,项目名称:libmateui,代码行数:26,代码来源:mate-druid.c


示例8: gtk_combo_new

static GtkWidget *toolbar_add_zoom(GtkWidget *box)	// Add zoom combo box
{
	int i;
	static char *txt[] = { "10%", "20%", "25%", "33%", "50%", "100%",
		"200%", "300%", "400%", "800%", "1200%", "1600%", "2000%", NULL };
	GtkWidget *combo, *combo_entry;
	GList *combo_list = NULL;


	combo = gtk_combo_new();
	gtk_combo_set_value_in_list (GTK_COMBO (combo), FALSE, FALSE);
	gtk_widget_show (combo);
	combo_entry = GTK_COMBO (combo)->entry;
	GTK_WIDGET_UNSET_FLAGS (combo_entry, GTK_CAN_FOCUS);
	gtk_widget_set_usize(GTK_COMBO(combo)->button, 18, -1);


#if GTK_MAJOR_VERSION == 1
	gtk_widget_set_usize(combo, 75, -1);
#else /* #if GTK_MAJOR_VERSION == 2 */
	gtk_entry_set_width_chars(GTK_ENTRY(combo_entry), 6);
#endif

	gtk_entry_set_editable( GTK_ENTRY(combo_entry), FALSE );

	for ( i=0; txt[i]; i++ ) combo_list = g_list_append( combo_list, txt[i] );

	gtk_combo_set_popdown_strings( GTK_COMBO(combo), combo_list );
	g_list_free( combo_list );
	gtk_entry_set_text( GTK_ENTRY(combo_entry), "100%" );

	pack(box, combo);

	return (combo);
}
开发者ID:henryprecheur,项目名称:mtPaint,代码行数:35,代码来源:toolbar.c


示例9: gtk_ev_unrealize

/* Zru¹ení GDK/X oken widgetu */
static void gtk_ev_unrealize(GtkWidget *widget)
{
    GtkEv *ev;

    g_return_if_fail(GTK_IS_EV(widget));

    ev = GTK_EV(widget);

    /* Schovat okna */
    if(GTK_WIDGET_MAPPED(widget))
        gtk_widget_unmap(widget);

    GTK_WIDGET_UNSET_FLAGS(widget, GTK_MAPPED);

    /* Zru¹it vnitøní okno (GtkEv.ev_win) */
    if(ev->ev_win) {
        gdk_window_set_user_data(ev->ev_win, NULL);
        gdk_window_destroy(ev->ev_win);
        ev->ev_win = NULL;
    }

    /* Zru¹it hlavní okno widgetu (GtkEv.window), zru¹it pøíznak realizace */
    if(GTK_WIDGET_CLASS(parent_class))
       GTK_WIDGET_CLASS(parent_class)->unrealize(widget);
}
开发者ID:tomby42,项目名称:prg-xws,代码行数:26,代码来源:gtkev.c


示例10: send_focus_change

/* Cut and paste from gtkwindow.c */
static void
send_focus_change (GtkWidget *widget,
                   gboolean   in)
{
        GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);

#if !GTK_CHECK_VERSION (2,21,0)
        g_object_ref (widget);

        if (in)
                GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
        else
                GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
#endif

        fevent->focus_change.type = GDK_FOCUS_CHANGE;
        fevent->focus_change.window = g_object_ref (gtk_widget_get_window (widget));
        fevent->focus_change.in = in;
#if !GTK_CHECK_VERSION (2,21,0)
        gtk_widget_event (widget, fevent);

        g_object_notify (G_OBJECT (widget), "has-focus");

        g_object_unref (widget);
#else
	gtk_widget_send_focus_change (widget, fevent);
#endif

        gdk_event_free (fevent);
}
开发者ID:tuxdna,项目名称:anjuta,代码行数:31,代码来源:data_view.c


示例11: gtk_widget_set_can_focus

void gtk_widget_set_can_focus(GtkWidget* wid, gboolean can)
{
    if(can)
        GTK_WIDGET_SET_FLAGS(wid, GTK_CAN_FOCUS);
    else
        GTK_WIDGET_UNSET_FLAGS(wid, GTK_CAN_FOCUS);
}
开发者ID:beto1014,项目名称:eve-browser,代码行数:7,代码来源:main.c


示例12: _exo_gtk_widget_send_focus_change

void
_exo_gtk_widget_send_focus_change (GtkWidget *widget,
                                   gboolean   in)
{
  GdkEvent *fevent;

  g_object_ref (G_OBJECT (widget));

 if (in)
    GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
  else
    GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);

  fevent = gdk_event_new (GDK_FOCUS_CHANGE);
  fevent->focus_change.type = GDK_FOCUS_CHANGE;
  fevent->focus_change.window = g_object_ref (widget->window);
  fevent->focus_change.in = in;

  gtk_widget_event (widget, fevent);

  g_object_notify (G_OBJECT (widget), "has-focus");

  g_object_unref (G_OBJECT (widget));
  gdk_event_free (fevent);
}
开发者ID:afilmore,项目名称:lxmanager,代码行数:25,代码来源:exo-private.c


示例13: panel_menu_button_set_dnd_enabled

void
panel_menu_button_set_dnd_enabled (PanelMenuButton *button,
				   gboolean         dnd_enabled)
{
	g_return_if_fail (PANEL_IS_MENU_BUTTON (button));

	dnd_enabled = dnd_enabled != FALSE;

	if (button->priv->dnd_enabled == dnd_enabled)
		return;

	if (dnd_enabled) {
		static GtkTargetEntry dnd_targets [] = {
			{ "application/x-panel-applet-internal", 0, 0 }
		};
		char *icon;

		GTK_WIDGET_UNSET_FLAGS (button, GTK_NO_WINDOW);
		gtk_drag_source_set (GTK_WIDGET (button), GDK_BUTTON1_MASK,
				     dnd_targets, 1,
				     GDK_ACTION_COPY | GDK_ACTION_MOVE);

		icon = panel_menu_button_get_icon (button);
		if (icon != NULL) {
			gtk_drag_source_set_icon_name (GTK_WIDGET (button),
						       icon);
			g_free (icon);
		}

		GTK_WIDGET_SET_FLAGS (button, GTK_NO_WINDOW);
	} else
		gtk_drag_source_unset (GTK_WIDGET (button));
}
开发者ID:guadalinex-archive,项目名称:guadalinex-v4,代码行数:33,代码来源:panel-menu-button.c


示例14: zbar_gtk_unrealize

static void zbar_gtk_unrealize (GtkWidget *widget)
{
    if(GTK_WIDGET_MAPPED(widget))
        gtk_widget_unmap(widget);

    ZBarGtk *self = ZBAR_GTK(widget);
    if(!self->_private)
        return;
    ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private);

    if(zbar->video_enabled) {
        zbar->video_enabled = FALSE;
        GValue *msg = zbar_gtk_new_value(G_TYPE_INT);
        g_value_set_int(msg, 0);
        g_async_queue_push(zbar->queue, msg);
    }

    zbar_window_attach(zbar->window, NULL, 0);

    GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);

    gdk_window_set_user_data(widget->window, NULL);
    gdk_window_destroy(widget->window);
    widget->window = NULL;
}
开发者ID:FachschaftMathPhys,项目名称:gnt-eval,代码行数:25,代码来源:zbargtk.c


示例15: zbar_gtk_realize

static void zbar_gtk_realize (GtkWidget *widget)
{
    ZBarGtk *self = ZBAR_GTK(widget);
    if(!self->_private)
        return;
    ZBarGtkPrivate *zbar = ZBAR_GTK_PRIVATE(self->_private);

    GTK_WIDGET_UNSET_FLAGS(widget, GTK_DOUBLE_BUFFERED);
    GTK_WIDGET_SET_FLAGS(widget, GTK_REALIZED);

    GdkWindowAttr attributes;
    attributes.x = widget->allocation.x;
    attributes.y = widget->allocation.y;
    attributes.width = widget->allocation.width;
    attributes.height = widget->allocation.height;
    attributes.wclass = GDK_INPUT_OUTPUT;
    attributes.window_type = GDK_WINDOW_CHILD;
    attributes.event_mask = (gtk_widget_get_events(widget) |
                             GDK_EXPOSURE_MASK);

    widget->window = gdk_window_new(gtk_widget_get_parent_window(widget),
                                    &attributes,
                                    GDK_WA_X | GDK_WA_Y);
    gdk_window_set_user_data(widget->window, widget);
    gdk_window_set_back_pixmap(widget->window, NULL, TRUE);

    /* attach zbar_window to underlying X window */
    if(zbar_window_attach(zbar->window,
                           gdk_x11_drawable_get_xdisplay(widget->window),
                           gdk_x11_drawable_get_xid(widget->window)))
        zbar_window_error_spew(zbar->window, 0);
}
开发者ID:FachschaftMathPhys,项目名称:gnt-eval,代码行数:32,代码来源:zbargtk.c


示例16: image_view_instance_init

/* Object initialization function for the image view */
static void
image_view_instance_init (ImageView *view)
{
	ImageViewPrivate *priv;

	priv = g_new0 (ImageViewPrivate, 1);
	view->priv = priv;

	GTK_WIDGET_UNSET_FLAGS (view, GTK_NO_WINDOW);
	GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS);

	priv->pixbuf = NULL;
	priv->zoomx = priv->zoomy = 1.0;
	priv->hadj = NULL;
	priv->vadj = NULL;
	priv->uta = NULL;

	/* Defaults for rendering */
	priv->interp_type = GDK_INTERP_BILINEAR;
	priv->check_type = CHECK_TYPE_MIDTONE;
	priv->check_size = CHECK_SIZE_LARGE;
	priv->dither = GDK_RGB_DITHER_MAX;

	/* We don't want to be double-buffered as we are SuperSmart(tm) */
	gtk_widget_set_double_buffered (GTK_WIDGET (view), FALSE);
}
开发者ID:emtees,项目名称:old-code,代码行数:27,代码来源:image-view.c


示例17: gtk_pizza_init

static void
gtk_pizza_init (GtkPizza *pizza)
{
    GTK_WIDGET_UNSET_FLAGS (pizza, GTK_NO_WINDOW);

    pizza->shadow_type = GTK_MYSHADOW_NONE;

    pizza->children = NULL;

    pizza->width = 20;
    pizza->height = 20;

    pizza->bin_window = NULL;

    pizza->xoffset = 0;
    pizza->yoffset = 0;

    pizza->configure_serial = 0;
    pizza->scroll_x = 0;
    pizza->scroll_y = 0;
    pizza->visibility = GDK_VISIBILITY_PARTIAL;

    pizza->clear_on_draw = TRUE;
    pizza->use_filter = TRUE;
    pizza->external_expose = FALSE;
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:26,代码来源:win_gtk.c


示例18: awt_gtk_panel_init

static void
awt_gtk_panel_init (AWTGtkPanel *panel)
{
	GTK_WIDGET_UNSET_FLAGS (panel, GTK_NO_WINDOW);

	panel->children = NULL;
}
开发者ID:AllBinary,项目名称:phoneme-components-cdc,代码行数:7,代码来源:GPanelPeer.c


示例19: vga_unrealize

/* The window is being destroyed. */
static void
vga_unrealize(GtkWidget *widget)
{
	VGAText * vga;

#ifdef VGA_DEBUG
	fprintf(stderr, "vga_unrealize()\n");
#endif

	g_return_if_fail(widget != NULL);
	g_return_if_fail(VGA_IS_TEXT(widget));
	vga = VGA_TEXT(widget);

	if (GTK_WIDGET_MAPPED(widget))
	{
		gtk_widget_unmap(widget);
	}

	/* Remove the GDK Window */
	if (widget->window != NULL)
	{
		gdk_window_destroy(widget->window);
		widget->window = NULL;
	}
	
	/* Mark that we no longer have a GDK window */
	GTK_WIDGET_UNSET_FLAGS(widget, GTK_REALIZED);
}
开发者ID:nacase,项目名称:libvgaterm-staging,代码行数:29,代码来源:vgatext.c


示例20: tile_expose

tile_expose (GtkWidget * widget, GdkEventExpose * event)
#endif
{
	/* FIXME: there ought to be a better way to prevent the focus from being rendered. */

	gboolean has_focus;
	gboolean retval;

	if ((has_focus = gtk_widget_has_focus (widget)))
#if GTK_CHECK_VERSION (3, 0, 0)
		gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_FOCUSED);
#else
		GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
#endif

#if GTK_CHECK_VERSION (3, 0, 0)
	retval = (*GTK_WIDGET_CLASS (tile_parent_class)->draw) (widget, cr);
#else
	retval = (*GTK_WIDGET_CLASS (tile_parent_class)->expose_event) (widget, event);
#endif

	if (has_focus)
#if GTK_CHECK_VERSION (3, 0, 0)
		gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_FOCUSED, TRUE);
#else
		GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
#endif

	return retval;
}
开发者ID:City-busz,项目名称:mate-control-center,代码行数:30,代码来源:tile.c



注:本文中的GTK_WIDGET_UNSET_FLAGS函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GTK_WINDOW函数代码示例发布时间:2022-05-30
下一篇:
C++ GTK_WIDGET_STATE函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap