void gdb_readnow_warning(void) { if ((THIS_GCC_VERSION >= GCC(3,4,0)) && (THIS_GCC_VERSION < GCC(4,0,0)) && !(pc->flags & READNOW)) { fprintf(stderr, "WARNING: Because this kernel was compiled with gcc version %d.%d.%d, certain\n" " commands or command options may fail unless crash is invoked with\n" " the \"--readnow\" command line option.\n\n", kt->gcc_version[0], kt->gcc_version[1], kt->gcc_version[2]); } }
static void matecomponent_canvas_component_init (GObject *object) { Gcc *gcc = GCC (object); gcc->priv = g_new0 (MateComponentCanvasComponentPrivate, 1); }
static void impl_MateComponent_Canvas_Component_draw (PortableServer_Servant servant, const MateComponent_Canvas_State *state, const CORBA_char *drawable_id, CORBA_short x, CORBA_short y, CORBA_short width, CORBA_short height, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); GdkPixmap *pix; gdk_flush (); pix = gdk_pixmap_foreign_new_for_display (gtk_widget_get_display (GTK_WIDGET (item->canvas)), matecomponent_control_x11_from_window_id (drawable_id)); if (pix == NULL){ g_warning ("Invalid window id passed='%s'", drawable_id); return; } restore_state (item, state); ICLASS (item)->draw (item, pix, x, y, width, height); my_gdk_pixmap_foreign_release (pix); gdk_flush (); }
static void impl_MateComponent_Canvas_Component_unmap (PortableServer_Servant servant, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); ICLASS (item)->unmap (item); }
static void gcc_finalize (GObject *object) { Gcc *gcc = GCC (object); MateCanvasItem *item = MATECOMPONENT_CANVAS_COMPONENT (object)->priv->item; gtk_object_destroy (GTK_OBJECT (item->canvas)); g_free (gcc->priv); gcc_parent_class->finalize (object); }
static void set_bounds_later(EmitLater *data) { CORBA_Environment ev; CORBA_exception_init (&ev); g_signal_emit(GCC(data->arg1), gcc_signals [SET_BOUNDS], 0, (const MateComponent_Canvas_DRect *) data->arg2, &ev); g_free(data); CORBA_exception_free(&ev); }
static void impl_MateComponent_Canvas_Component_unrealize (PortableServer_Servant servant, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); ICLASS (item)->unrealize (item); if (item->canvas->layout.bin_window) { g_object_unref (item->canvas->layout.bin_window); item->canvas->layout.bin_window = NULL; } }
static void impl_MateComponent_Canvas_Component_render (PortableServer_Servant servant, MateComponent_Canvas_Buf *buf, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); MateCanvasBuf canvas_buf; if (!(buf->flags & MateComponent_Canvas_IS_BUF)) { buf->rgb_buf._length = buf->row_stride * (buf->rect.y1 - buf->rect.y0); buf->rgb_buf._maximum = buf->rgb_buf._length; buf->rgb_buf._buffer = CORBA_sequence_CORBA_octet_allocbuf ( buf->rgb_buf._length); CORBA_sequence_set_release (&buf->rgb_buf, TRUE); if (buf->rgb_buf._buffer == NULL) { CORBA_exception_set_system ( ev, ex_CORBA_NO_MEMORY, CORBA_COMPLETED_NO); return; } } canvas_buf.buf = buf->rgb_buf._buffer; canvas_buf.buf_rowstride = buf->row_stride; canvas_buf.rect.x0 = buf->rect.x0; canvas_buf.rect.x1 = buf->rect.x1; canvas_buf.rect.y0 = buf->rect.y0; canvas_buf.rect.y1 = buf->rect.y1; canvas_buf.bg_color = buf->bg_color; if (buf->flags & MateComponent_Canvas_IS_BG) canvas_buf.is_bg = 1; else canvas_buf.is_bg = 0; if (buf->flags & MateComponent_Canvas_IS_BUF) canvas_buf.is_buf = 1; else canvas_buf.is_buf = 0; ICLASS (item)->render (item, &canvas_buf); /* return */ buf->flags = (canvas_buf.is_bg ? MateComponent_Canvas_IS_BG : 0) | (canvas_buf.is_buf ? MateComponent_Canvas_IS_BUF : 0); }
static void impl_MateComponent_Canvas_Component_bounds (PortableServer_Servant servant, const MateComponent_Canvas_State *state, CORBA_double *x1, CORBA_double *x2, CORBA_double *y1, CORBA_double *y2, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); restore_state (item, state); ICLASS (item)->bounds (item, x1, y1, x2, y2); }
/* * Receives events from the container end, decodes it into a synthetic * GdkEvent and forwards this to the CanvasItem */ static CORBA_boolean impl_MateComponent_Canvas_Component_event (PortableServer_Servant servant, const MateComponent_Canvas_State *state, const MateComponent_Gdk_Event *mate_event, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); GdkEvent *gdk_event = gdk_event_new(GDK_NOTHING); CORBA_boolean retval = FALSE; EmitLater *data; restore_state (item, state); gdk_event->any.window = item->canvas->layout.bin_window; g_object_ref(gdk_event->any.window); MateComponent_Gdk_Event_to_GdkEvent (mate_event, gdk_event); /* * Problem: When dealing with multiple canvas component's within the * same process it is possible to get to this point when one of the * pseudo-canvas's is inside its idle loop. This is normally not a * problem unless an event from one component can trigger a request for * an update on another component. * * Solution: If any component is in do_update, set up an idle_handler * and send the event later. If the event is sent later, the client will * get a false return value. Normally this value is used to determine * whether or not to propagate the event up the canvas group tree. */ if (!do_update_flag) { retval = handle_event(GTK_WIDGET(item->canvas), gdk_event); gdk_event_free(gdk_event); } else { data = g_new0(EmitLater, 1); data->arg1 = (gpointer)item->canvas; data->arg2 = (gpointer)gdk_event; /* has a higher priority then do_update*/ g_idle_add_full(GDK_PRIORITY_REDRAW-10, (GSourceFunc)handle_event_later, data, NULL); } return retval; }
static void impl_MateComponent_Canvas_Component_setBounds (PortableServer_Servant servant, const MateComponent_Canvas_DRect *bbox, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); EmitLater *data; if (!do_update_flag) { g_signal_emit (gcc, gcc_signals [SET_BOUNDS], 0, bbox, &ev); } else { data = g_new0(EmitLater, 1); data->arg1 = (gpointer)gcc; data->arg2 = (gpointer)bbox; g_idle_add_full(GDK_PRIORITY_REDRAW-10, (GSourceFunc)set_bounds_later, data, NULL); } }
static void impl_MateComponent_Canvas_Component_setCanvasSize (PortableServer_Servant servant, CORBA_short x, CORBA_short y, CORBA_short width, CORBA_short height, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); GtkAllocation alloc; alloc.x = x; alloc.y = y; alloc.width = width; alloc.height = height; gtk_widget_size_allocate (GTK_WIDGET (item->canvas), &alloc); }
static void impl_MateComponent_Canvas_Component_realize (PortableServer_Servant servant, const CORBA_char *window, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); GdkWindow *gdk_window = gdk_window_foreign_new_for_display (gtk_widget_get_display (GTK_WIDGET (item->canvas)), matecomponent_control_x11_from_window_id (window)); if (gdk_window == NULL) { g_warning ("Invalid window id passed='%s'", window); return; } item->canvas->layout.bin_window = gdk_window; ICLASS (item)->realize (item); }
bool CudaCompiler::checkNVCCPresence() { qDebug()<<" checking nvcc presence"; ByteArray result ; StringList args; args << "--version"; NVCC_Ready = ( runProcess(&nvcc, &NVCC, &args, &result) ==NVCC_OK); qDebug() << result; result=""; String GCC("gcc"); Process gcc; runProcess(&gcc, &GCC, &args, &result); qDebug() << result; return NVCC_Ready; }
static CORBA_boolean impl_MateComponent_Canvas_Component_contains (PortableServer_Servant servant, CORBA_double x, CORBA_double y, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); MateCanvasItem *new_item; int cx, cy; CORBA_boolean ret; mate_canvas_w2c (item->canvas, x, y, &cx, &cy); if (getenv ("CC_DEBUG")) printf ("Point %g %g: ", x, y); ret = ICLASS (item)->point (item, x, y, cx, cy, &new_item) == 0.0 && new_item != NULL; if (getenv ("CC_DEBUG")) printf ("=> %s\n", ret ? "yes" : "no"); return ret; }
static MateComponent_Canvas_ArtUTA * impl_MateComponent_Canvas_Component_update (PortableServer_Servant servant, const MateComponent_Canvas_State *state, const MateComponent_Canvas_affine aff, const MateComponent_Canvas_SVP *clip_path, CORBA_long flags, CORBA_double *x1, CORBA_double *y1, CORBA_double *x2, CORBA_double *y2, CORBA_Environment *ev) { Gcc *gcc = GCC (matecomponent_object_from_servant (servant)); MateCanvasItem *item = MATE_CANVAS_ITEM (gcc->priv->item); double affine [6]; int i; ArtSVP *svp = NULL; MateComponent_Canvas_ArtUTA *cuta; MateCanvasItemClass *gci_class = g_type_class_ref ( mate_canvas_item_get_type ()); restore_state (item, state); for (i = 0; i < 6; i++) affine [i] = aff [i]; if (clip_path->_length > 0) { svp = art_alloc (sizeof (ArtSVP) + (clip_path->_length * sizeof (ArtSVPSeg))); if (svp == NULL) goto fail; svp->n_segs = clip_path->_length; for (i = 0; svp->n_segs; i++) { gboolean ok; ok = CORBA_SVP_Segment_to_SVPSeg (&clip_path->_buffer [i], &svp->segs [i]); if (!ok) { int j; for (j = 0; j < i; j++) { free_seg (&svp->segs [j]); art_free (svp); goto fail; } } } } invoke_update (item, (double *)aff, svp, flags); if (svp){ for (i = 0; i < svp->n_segs; i++) free_seg (&svp->segs [i]); art_free (svp); } fail: if (getenv ("CC_DEBUG")) printf ("%g %g %g %g\n", item->x1, item->x2, item->y1, item->y2); *x1 = item->x1; *x2 = item->x2; *y1 = item->y1; *y2 = item->y2; cuta = CORBA_UTA (item->canvas->redraw_area); if (cuta == NULL) { CORBA_exception_set_system (ev, ex_CORBA_NO_MEMORY, CORBA_COMPLETED_NO); return NULL; } /* * Now, mark our canvas as fully up to date */ /* Clears flags for root item. */ (* gci_class->update) (item->canvas->root, affine, svp, flags); if (item->canvas->redraw_area) { art_uta_free (item->canvas->redraw_area); item->canvas->redraw_area = NULL; } item->canvas->need_redraw = FALSE; return cuta; }