static void gtk_pizza_map (GtkWidget *widget) { GtkPizza *pizza; GtkPizzaChild *child; GList *children; g_return_if_fail (widget != NULL); g_return_if_fail (GTK_IS_PIZZA (widget)); GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); pizza = GTK_PIZZA (widget); children = pizza->children; while (children) { child = children->data; children = children->next; if ( GTK_WIDGET_VISIBLE (child->widget) && !GTK_WIDGET_MAPPED (child->widget) && !GTK_WIDGET_IS_OFFSCREEN (child->widget)) { gtk_widget_map (child->widget); } } gdk_window_show (widget->window); gdk_window_show (pizza->bin_window); }
static void ViewOvBoxRealize(GtkWidget *widget) // IN { ViewOvBox *that; ViewOvBoxPrivate *priv; GdkWindowAttr attributes; gint mask; GtkAllocation allocation; GdkWindow *window; gtk_widget_set_realized (widget, TRUE); that = VIEW_OV_BOX(widget); priv = that->priv; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual(widget); attributes.event_mask = gtk_widget_get_events(widget) | GDK_EXPOSURE_MASK; mask = GDK_WA_VISUAL | GDK_WA_X | GDK_WA_Y; gtk_widget_get_allocation(widget, &allocation); attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, mask); gtk_widget_set_window(widget, window); gdk_window_set_user_data(window, that); #if !GTK_CHECK_VERSION(3, 0, 0) gtk_widget_set_style(widget, gtk_style_attach(gtk_widget_get_style(widget), window)); #endif /* * The order in which we create the children X window matters: the child * created last is stacked on top. --hpreg */ ViewOvBoxGetUnderGeometry(that, &attributes.x, &attributes.y, &attributes.width, &attributes.height); priv->underWin = gdk_window_new(window, &attributes, mask); gdk_window_set_user_data(priv->underWin, that); if (priv->under) { gtk_widget_set_parent_window(priv->under, priv->underWin); } gdk_window_show(priv->underWin); ViewOvBoxGetOverGeometry(that, &attributes.x, &attributes.y, &attributes.width, &attributes.height); priv->overWin = gdk_window_new(window, &attributes, mask); gdk_window_set_user_data(priv->overWin, that); if (priv->over) { gtk_widget_set_parent_window(priv->over, priv->overWin); } gdk_window_show(priv->overWin); ViewOvBoxSetBackground(that); }
static void gth_empty_list_map (GtkWidget *widget) { GthEmptyList *self = (GthEmptyList*) widget; GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); gdk_window_show (self->priv->bin_window); gdk_window_show (widget->window); }
void tray_icon_added (NaTrayManager *manager, Window child, GtkWidget* container) { GdkWindow* wrapper = create_wrapper(gtk_widget_get_window(container), child); if (wrapper == NULL) return; GdkWindow* icon = get_icon_window(wrapper); g_assert(icon != NULL); gdk_window_reparent(wrapper, gtk_widget_get_window(container), 0, gdk_screen_height() - DOCK_HEIGHT); //add this mask so, gdk can handle GDK_SELECTION_CLEAR event to destroy this gdkwindow. gdk_window_set_events(icon, GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_VISIBILITY_NOTIFY_MASK); gdk_window_add_filter(icon, (GdkFilterFunc)monitor_icon_event, wrapper); gdk_window_set_composited(wrapper, TRUE); gdk_window_show(wrapper); char *re_class = NULL; get_wmclass(icon, &re_class, NULL); if (g_strcmp0(re_class, DEEPIN_TRAY_ICON) == 0) { _deepin_tray = wrapper; _deepin_tray_width = CLAMP_WIDTH(gdk_window_get_width(icon)); _update_deepin_try_position(); } else if (g_strcmp0(re_class, FCITX_TRAY_ICON) == 0) { _fcitx_tray = wrapper; _fcitx_tray_width = CLAMP_WIDTH(gdk_window_get_width(icon)); _update_fcitx_try_position(); } else { int width = gdk_window_get_width(icon) * 1.0 / gdk_window_get_height(icon) * DEFAULT_HEIGHT; gdk_window_resize(icon, width, DEFAULT_HEIGHT); g_hash_table_insert(_icons, wrapper, GINT_TO_POINTER(CLAMP_WIDTH(width))); } g_free(re_class); _update_notify_area_width(); }
void S9xXVDisplayDriver::create_window (int width, int height) { GdkWindowAttr window_attr; memset (&window_attr, 0, sizeof (GdkWindowAttr)); window_attr.event_mask = GDK_EXPOSURE_MASK | GDK_STRUCTURE_MASK; window_attr.width = width; window_attr.height = height; window_attr.x = 0; window_attr.y = 0; window_attr.wclass = GDK_INPUT_OUTPUT; window_attr.window_type = GDK_WINDOW_CHILD; window_attr.visual = gdk_x11_screen_lookup_visual (gtk_widget_get_screen (drawing_area), vi->visualid); gdk_window = gdk_window_new (gtk_widget_get_window (drawing_area), &window_attr, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL); gdk_window_set_user_data (gdk_window, (gpointer) drawing_area); gdk_window_show (gdk_window); xwindow = GDK_COMPAT_WINDOW_XID (gdk_window); output_window_width = width; output_window_height = height; }
/* [ show_about ] * Creates the about dialog */ void show_about (GtkWidget *widget, gpointer data) { GdkPixbuf *pixbuf; static GtkWidget *dialog = NULL; /* Don't create more than one about box */ if (dialog != NULL) { g_assert (GTK_WIDGET_REALIZED (dialog)); gdk_window_show (dialog->window); gdk_window_raise (dialog->window); } else { const gchar *authors[] = { "Tomas Junnonen <*****@*****.**> - Main Developer, Maintainer", "Paul Drain <*****@*****.**> - Developer", NULL}; pixbuf = gdk_pixbuf_new_from_inline (-1, pengo, FALSE, NULL); dialog = gnome_about_new ( "Fortified", VERSION, "(C) 2000-2005 Tomas Junnonen", _("An all-in-one Linux firewall utility for GNOME.\n"), authors, NULL, NULL, pixbuf); g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog); g_object_unref (G_OBJECT(pixbuf)); gtk_widget_show (dialog); } }
static void prefs_clicked(GtkWidget* button, gpointer data) { GtkWidget* prefs_dialog; GtkWidget* main_window = data; GConfClient* client; prefs_dialog = g_object_get_data(main_window, "prefs"); if (prefs_dialog == NULL) { client = g_object_get_data(main_window, "client"); prefs_dialog = create_prefs_dialog(main_window, client); g_object_set_data(G_OBJECT(main_window), "prefs", prefs_dialog); g_signal_connect(prefs_dialog, "destroy", G_CALLBACK(prefs_dialog_destroyed), main_window); gtk_widget_show_all(prefs_dialog); } else if (GTK_WIDGET_REALIZED(prefs_dialog)) { gdk_window_show(prefs_dialog->window); gdk_window_raise(prefs_dialog->window); } }
GdkWindow* create_wrapper(GdkWindow* parent, Window tray_icon) { gdk_flush(); GdkWindow* icon = gdk_x11_window_foreign_new_for_display(gdk_display_get_default(), tray_icon); if (icon == NULL) return NULL; GdkVisual* visual = gdk_window_get_visual(icon); GdkWindow* wrapper = NULL; if (gdk_visual_get_depth(visual) == 24) { GdkWindowAttr attributes; attributes.width = DEFAULT_HEIGHT; attributes.height = DEFAULT_HEIGHT; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.event_mask = GDK_ALL_EVENTS_MASK; attributes.visual = visual; wrapper = gdk_window_new(parent, &attributes, GDK_WA_VISUAL); //TODO: there should set color correspond by dock background color /*GdkColor color = {1, 0, 0, 1};*/ /*gdk_window_set_background_rgba(wrapper, &color);*/ XReparentWindow(gdk_x11_get_default_xdisplay(), tray_icon, GDK_WINDOW_XID(wrapper), 0, 0); gdk_window_show(icon); g_object_set_data(G_OBJECT(wrapper), "wrapper_child", icon); g_object_set_data(G_OBJECT(icon), "wrapper_parent", wrapper); } else { wrapper = icon; } return wrapper; }
static void gstyle_color_widget_realize (GtkWidget *widget) { GtkAllocation allocation; GdkWindow *window; GdkWindowAttr attributes = {0}; g_assert (GTK_IS_WIDGET (widget)); gtk_widget_get_allocation (widget, &allocation); gtk_widget_set_realized (widget, TRUE); attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.event_mask = gtk_widget_get_events (widget) | GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK; window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL); gtk_widget_set_window (widget, g_object_ref (window)); gtk_widget_register_window (widget, window); gdk_window_show (window); }
void gsd_locate_pointer (GdkScreen *screen) { if (!data) data = gsd_locate_pointer_data_new (screen); gsd_timeline_pause (data->timeline); gsd_timeline_rewind (data->timeline); /* Create again the window if it is not for the current screen */ if (gdk_screen_get_number (screen) != gdk_screen_get_number (gdk_drawable_get_screen (data->window))) { gdk_window_set_user_data (data->window, NULL); gdk_window_destroy (data->window); create_window (data, screen); } data->progress = 0.; g_signal_connect (data->widget, "composited-changed", G_CALLBACK (composited_changed), data); move_locate_pointer_window (data, screen); composited_changed (data->widget, data); gdk_window_show (data->window); gsd_timeline_start (data->timeline); }
static void gtk_revealer_real_realize (GtkWidget *widget) { GtkRevealer *revealer = GTK_REVEALER (widget); GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer); GtkAllocation allocation; GdkWindowAttr attributes = { 0 }; GdkWindowAttributesType attributes_mask; GtkAllocation child_allocation; GtkWidget *child; GtkStyleContext *context; GtkRevealerTransitionType transition; gtk_widget_set_realized (widget, TRUE); gtk_widget_get_allocation (widget, &allocation); attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; attributes.window_type = GDK_WINDOW_CHILD; attributes.wclass = GDK_INPUT_OUTPUT; attributes.visual = gtk_widget_get_visual (widget); attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; attributes_mask = (GDK_WA_X | GDK_WA_Y) | GDK_WA_VISUAL; priv->view_window = gdk_window_new (gtk_widget_get_parent_window ((GtkWidget*) revealer), &attributes, attributes_mask); gtk_widget_set_window (widget, priv->view_window); gtk_widget_register_window (widget, priv->view_window); gtk_revealer_get_child_allocation (revealer, &allocation, &child_allocation); attributes.x = 0; attributes.y = 0; attributes.width = child_allocation.width; attributes.height = child_allocation.height; transition = effective_transition (revealer); if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN) attributes.y = allocation.height - child_allocation.height; else if (transition == GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT) attributes.x = allocation.width - child_allocation.width; priv->bin_window = gdk_window_new (priv->view_window, &attributes, attributes_mask); gtk_widget_register_window (widget, priv->bin_window); child = gtk_bin_get_child (GTK_BIN (revealer)); if (child != NULL) gtk_widget_set_parent_window (child, priv->bin_window); context = gtk_widget_get_style_context (widget); gtk_style_context_set_background (context, priv->view_window); gtk_style_context_set_background (context, priv->bin_window); gdk_window_show (priv->bin_window); }
/** * gtk_tool_item_set_use_drag_window: * @tool_item: a #GtkToolItem * @use_drag_window: Whether @tool_item has a drag window. * * Sets whether @tool_item has a drag window. When %TRUE the * toolitem can be used as a drag source through gtk_drag_source_set(). * When @tool_item has a drag window it will intercept all events, * even those that would otherwise be sent to a child of @tool_item. * * Since: 2.4 **/ void gtk_tool_item_set_use_drag_window (GtkToolItem *toolitem, gboolean use_drag_window) { g_return_if_fail (GTK_IS_TOOL_ITEM (toolitem)); use_drag_window = use_drag_window != FALSE; if (toolitem->priv->use_drag_window != use_drag_window) { toolitem->priv->use_drag_window = use_drag_window; if (use_drag_window) { if (!toolitem->priv->drag_window && gtk_widget_get_realized (GTK_WIDGET (toolitem))) { create_drag_window(toolitem); if (gtk_widget_get_mapped (GTK_WIDGET (toolitem))) gdk_window_show (toolitem->priv->drag_window); } } else { destroy_drag_window (toolitem); } } }
/** gul_gui_window_present: * @window: A #GtkWindow * @user_time: Time of the event that caused the window to * want to raise * * Like gtk_window_present, but doesn't have * http://bugzilla.gnome.org/show_bug.cgi?id=166379 **/ void gul_gui_window_present (GtkWindow *window, guint32 user_time) { GtkWidget *widget; g_return_if_fail (GTK_IS_WINDOW (window)); widget = GTK_WIDGET (window); if (gtk_widget_get_visual (widget)) { g_assert (widget->window != NULL); if (user_time == 0) { user_time = gtk_get_current_event_time (); } gdk_window_show (widget->window); /* note that gdk_window_focus() will also move the window to * the current desktop, for WM spec compliant window managers. */ gdk_window_focus (widget->window, user_time); } else { gtk_widget_show (widget); } }
void inkblot_about_dialog ( GtkWidget *widget, gpointer data ) { GdkPixbuf *pixbuf; static GtkWidget *dialog = NULL; /* Don't create more than one about box */ if (dialog != NULL) { g_assert (GTK_WIDGET_REALIZED (dialog)); gdk_window_show (dialog->window); gdk_window_raise (dialog->window); } else { const gchar *authors[]={"Mike Newman <*****@*****.**>", "Thierry Merle <*****@*****.**>", NULL}; pixbuf = gdk_pixbuf_new_from_file (PACKAGE_DATA_DIR "/inkblot/pixmaps/printer_multi_48.png", NULL); dialog = gnome_about_new ( "Inkblot", VERSION, "© 2004-2007 Mike Newman", _("Reports on your printer ink levels.\n"), authors, NULL, NULL, pixbuf); g_signal_connect (G_OBJECT (dialog), "destroy", G_CALLBACK (gtk_widget_destroyed), &dialog); g_object_unref (G_OBJECT(pixbuf)); gtk_widget_show (dialog); } }
static void rc_ui_scrollable_label_realize(GtkWidget *widget) { RCUiScrollableLabel *label; GdkWindowAttr attributes; GtkAllocation allocation; GdkWindow *window, *parent; gint attr_mask; GtkStyleContext *context; g_return_if_fail(widget!=NULL); g_return_if_fail(RC_UI_IS_SCROLLABLE_LABEL(widget)); label = RC_UI_SCROLLABLE_LABEL(widget); gtk_widget_set_realized(widget, TRUE); gtk_widget_get_allocation(widget, &allocation); attributes.x = allocation.x; attributes.y = allocation.y; attributes.width = allocation.width; attributes.height = allocation.height; attributes.wclass = GDK_INPUT_OUTPUT; attributes.window_type = GDK_WINDOW_CHILD; attributes.event_mask = gtk_widget_get_events(widget); attributes.event_mask |= (GDK_EXPOSURE_MASK); attributes.visual = gtk_widget_get_visual(widget); attr_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL; gtk_widget_set_has_window(widget, TRUE); parent = gtk_widget_get_parent_window(widget); window = gdk_window_new(parent, &attributes, attr_mask); gtk_widget_set_window(widget, window); gdk_window_set_user_data(window, label); gdk_window_set_background_pattern(window, NULL); context = gtk_widget_get_style_context(widget); gtk_style_context_set_background(context, window); gdk_window_show(window); }
gint about(GtkWidget *window, gpointer data) { static GtkWidget *dialog = NULL; const char *authors[] = { "David Trowbridge", "Dan Kuester", "Jeff Myers", NULL }; const char *other[] = { "These people helped with random", "things (not documentation). So,", "special thanks goes out to", "m0nkey_b0y, Gerbil, Quinn Buchanan", "Steve Houston, and others", NULL }; if(dialog) { gdk_window_show(dialog->window); gdk_window_raise(dialog->window); return TRUE; } dialog = gnome_about_new("bzedit", "2.1", "(c) 2002 David Trowbridge", "\"panic while you still can\"", authors, other, NULL, NULL); // TODO: set parent (necessary?) gtk_signal_connect(GTK_OBJECT(dialog), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); gtk_widget_show(dialog); return TRUE; }
static void awt_gtk_panel_map (GtkWidget *widget) { AWTGtkPanel *panel; GtkWidget *child; GList *children; g_return_if_fail (widget != NULL); GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); panel = AWT_GTK_PANEL (widget); children = panel->children; while (children) { child = children->data; children = children->next; if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child)) gtk_widget_map (child); } gdk_window_show (widget->window); }
void moz_container_map (GtkWidget *widget) { MozContainer *container; GList *tmp_list; GtkWidget *tmp_child; g_return_if_fail (IS_MOZ_CONTAINER(widget)); container = MOZ_CONTAINER (widget); gtk_widget_set_mapped(widget, TRUE); tmp_list = container->children; while (tmp_list) { tmp_child = ((MozContainerChild *)tmp_list->data)->widget; if (gtk_widget_get_visible(tmp_child)) { if (!gtk_widget_get_mapped(tmp_child)) gtk_widget_map(tmp_child); } tmp_list = tmp_list->next; } gdk_window_show (gtk_widget_get_window(widget)); }
void xmms_fullscreen_leave(GtkWidget * win) { fullscreen_window_t *fwin; FULL_LOCK(); fwin = getwindow(win); if (fwin->is_full && fwin->display->is_full) { /* Release our grabs */ gdk_pointer_ungrab(GDK_CURRENT_TIME); gdk_keyboard_ungrab(GDK_CURRENT_TIME); /* Let the WM manage this window again */ gdk_window_hide(fwin->window->window); gdk_window_set_override_redirect(fwin->window->window, FALSE); gdk_window_show(fwin->window->window); /* Restore size/position */ gdk_window_move_resize(fwin->window->window, fwin->ox, fwin->oy, fwin->owidth, fwin->oheight); XF86VidModeSwitchToMode(fwin->display->display, DefaultScreen(fwin->display->display), fwin->display->origmode); fwin->display->is_full = FALSE; } fwin->is_full = FALSE; FULL_UNLOCK(); }
static void gtk_icon_entry_map (GtkWidget *widget) { GtkIconEntryPrivate *priv; GdkCursor *cursor; if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_MAPPED (widget)) { int i; GTK_WIDGET_CLASS (parent_class)->map (widget); priv = GTK_ICON_ENTRY_GET_PRIVATE (widget); for (i = 0; i < MAX_ICONS; i++) { if (priv->icons[i].pixbuf != NULL) gdk_window_show (priv->icons[i].window); if (priv->icons[i].custom_cursor == TRUE && !priv->icons[i].insensitive) { cursor = gdk_cursor_new_for_display (gtk_widget_get_display (widget), priv->icons[i].cursor_type); gdk_window_set_cursor (priv->icons[i].window, cursor); gdk_cursor_unref (cursor); } } GTK_WIDGET_CLASS (parent_class)->map (widget); } }
void bring_to_top(GtkWidget *win){ #ifdef __WIN32__ HWND hWnd; int nTargetID, nForegroundID; BOOL res; hWnd = GDK_WINDOW_HWND (win->window); /* From http://techtips.belution.com/ja/vc/0012/ */ nForegroundID = GetWindowThreadProcessId(GetForegroundWindow(), NULL); nTargetID = GetWindowThreadProcessId(hWnd, NULL ); AttachThreadInput(nTargetID, nForegroundID, TRUE ); // SPI_GETFOREGROUNDLOCKTIMEOUT will be undefined. Why ? /* SystemParametersInfo( SPI_GETFOREGROUNDLOCKTIMEOUT,0,&sp_time,0); SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT,0,(LPVOID)0,0); SetForegroundWindow(hWnd); SystemParametersInfo( SPI_SETFOREGROUNDLOCKTIMEOUT,0,sp_time,0); */ res = SetForegroundWindow(hWnd); AttachThreadInput(nTargetID, nForegroundID, FALSE); if(!res){ SetFocus(hWnd); } #else gdk_window_show(GTK_WIDGET(win)->window); gdk_window_focus(GTK_WIDGET(win)->window, gtk_get_current_event_time()); #endif }
/* Called when the widget is realized. This usually happens when you call * gtk_widget_show() on the widget. */ static void lcd_realize (GtkWidget *widget) { Lcd *lcd; GdkWindowAttr attributes; gint attr_mask; g_return_if_fail (widget != NULL); g_return_if_fail (IS_LCD (widget)); /* Set the GTK_REALIZED flag so it is marked as realized. */ GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); lcd = LCD (widget); /* Create a new GtkWindowAttr object that will hold info about the GdkWindow. */ 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); attributes.event_mask |= (GDK_EXPOSURE_MASK); attributes.visual = gtk_widget_get_visual (widget); attributes.colormap = gtk_widget_get_colormap (widget); /* Create a new GdkWindow for the widget. */ attr_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; widget->window = gdk_window_new (widget->parent->window, &attributes, attr_mask); gdk_window_set_user_data (widget->window, lcd); /* Attach a style to the GdkWindow and draw a background color. */ widget->style = gtk_style_attach (widget->style, widget->window); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); gdk_window_show (widget->window); }
/* Handle a redraw of necessary items, for instance when a Gtk style change is signaled. */ void table_redraw(void) { ggz_debug(DBG_TABLE, "Redrawing table. "); if (table_ready) { int p; /* Complete (zip) any animation in process */ animation_stop(TRUE); /* I really don't know why these are necessary... */ gtk_widget_grab_focus(dlg_main); table_style = gtk_widget_get_style(table); /* Redraw everything to the buffer */ table_clear_table(FALSE); draw_card_areas(FALSE); table_display_all_hands(FALSE); table_show_cards(FALSE); for (p = 0; p < ggzcards.num_players; p++) table_show_player_box(p, FALSE); /* Then draw the whole buffer to the window */ table_show_table(0, 0, get_table_width(), get_table_height()); /* There has GOT to be a better way to force the redraw! */ gdk_window_hide(table_drawing_area->window); gdk_window_show(table_drawing_area->window); } else { /* not if (table_ready) */ if (table_buf) draw_splash_screen(); } }
/* from GtkMenu sources */ static GdkWindow *menu_grab_transfer_window_get (MenuStart *menu) { GdkWindow *window = g_object_get_data (G_OBJECT (menu), "gtk-menu-transfer-window"); if (!window) { GdkWindowAttr attributes; gint attributes_mask; attributes.x = -100; attributes.y = -100; attributes.width = 10; attributes.height = 10; attributes.window_type = GDK_WINDOW_TEMP; attributes.wclass = GDK_INPUT_ONLY; attributes.override_redirect = TRUE; attributes.event_mask = 0; attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_NOREDIR; window = gdk_window_new (gtk_widget_get_root_window (GTK_WIDGET (menu)), &attributes, attributes_mask); gdk_window_set_user_data (window, menu); gdk_window_show (window); g_object_set_data (G_OBJECT (menu), "gtk-menu-transfer-window", window); } return window; }
static void panel_icon_grid_map(GtkWidget *widget) { PanelIconGrid *ig = PANEL_ICON_GRID(widget); if (ig->event_window != NULL) gdk_window_show(ig->event_window); GTK_WIDGET_CLASS(panel_icon_grid_parent_class)->map(widget); }
void ShowErrorWindow(void) { if ( errdata.gw==NULL ) return; gdk_window_show(errdata.gw->window); if ( errdata.showing ) gtk_widget_queue_draw(errdata.v); errdata.showing = true; }
static void map(GtkWidget* widget) { parent_class->map(widget); wxPizza* pizza = WX_PIZZA(widget); if (pizza->m_backing_window) gdk_window_show(pizza->m_backing_window); }
static void gdl_dock_tablabel_map (GtkWidget *widget) { GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget); GTK_WIDGET_CLASS (gdl_dock_tablabel_parent_class)->map (widget); gdk_window_show (tablabel->event_window); }
static void gdl_dock_tablabel_map (GtkWidget *widget) { GdlDockTablabel *tablabel = GDL_DOCK_TABLABEL (widget); GDL_CALL_PARENT (GTK_WIDGET_CLASS, map, (widget)); gdk_window_show (tablabel->event_window); }
void eplay_load_image() { if (im) { gdk_imlib_kill_image(im); im = NULL; } if(!p[image_idx]) { im = gdk_imlib_load_image(image_names[image_idx]); } if (first) { w = org_w = im->rgb_width; h = org_h = im->rgb_height; win_x = (screen_x - w) / 2; win_y = (screen_y - h) / 2; attr.window_type = GDK_WINDOW_TEMP; attr.wclass = GDK_INPUT_OUTPUT; attr.event_mask = GDK_ALL_EVENTS_MASK; attr.x = attr.y = 0; attr.width = screen_x; attr.height = screen_y; parent = NULL; win = gdk_window_new(parent, &attr, ATTRIBUTES_MASK); gdk_window_show(win); gc = gdk_gc_new(win); first = 0; gdk_window_set_background(win, &color_bg); gdk_keyboard_grab(win, FALSE, CurrentTime); gdk_pointer_grab(win, FALSE, event_mask, NULL, cursor, CurrentTime); gdk_window_set_hints(win, win_x, win_y, w, h, w, h, GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE | GDK_HINT_POS); } /* gdk_imlib_free_pixmap(p[image_idx]); */ /* killing old pixmap */ if(!p[image_idx]) { gdk_imlib_render(im, w, h); /* Imlib render ... */ p[image_idx] = gdk_imlib_move_image(im); /* creating new */ } gdk_draw_pixmap(win, gc, p[image_idx], 0, 0, win_x, win_y, w, h); gdk_window_show(win); /* display image */ }