int main(int argc, char **argv) { int rot = 0; if ((argc >= 3) && (!strcmp(argv[1], "-rot"))) rot = atoi(argv[2]); evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("fb")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_FB *einfo; einfo = (Evas_Engine_Info_FB *) evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.virtual_terminal = 0; einfo->info.device_number = 0; einfo->info.refresh = 0; einfo->info.rotation = rot; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); orig_start_time = start_time = get_time(); for (;;) { loop(); evas_render(evas); } evas_shutdown(); return 0; }
int gfx_init(char *title, int win_w, int win_h, char *font_path) { e = evas_new(); evas_set_output_method(e, RENDER_METHOD_ALPHA_SOFTWARE); if ((d = XOpenDisplay(NULL)) == NULL) return 0; vis = evas_get_optimal_visual(e, d); cmap = evas_get_optimal_colormap(e, d); a_win_del = XInternAtom(d, "WM_DELETE_WINDOW", False); win = XCreateSimpleWindow(d, DefaultRootWindow(d), 0, 0, win_w, win_h, 0, 0, 0); XSelectInput(d, win, ButtonPressMask | ExposureMask); XSetWindowColormap(d, win, cmap); XSetWindowBorder(d, win, 0); XStoreName(d, win, title); XSync(d, False); XMapWindow(d, win); XSetWMProtocols(d, win, &a_win_del, 1); evas_set_output(e, d, win, vis, cmap); evas_set_output_size(e, win_w, win_h); evas_set_output_viewport(e, 0, 0, win_w, win_h); evas_font_add_path(e, font_path); return 1; }
EvasCanvas::EvasCanvas() :Trackable( "EvasCanvas" ) { AllocTag( this, "EvasCanvas" ); Dout( dc::notice, "EvasCanvas::EvasCanvas - creating new Evas" ); o = evas_new(); }
static Evas* create_canvas(int width, int height) { Evas *canvas; Evas_Engine_Info_Buffer *einfo; int method; void *pixels; method = evas_render_method_lookup("buffer"); if (unlikely(method <= 0)) { //fputs("ERROR: evas was not compiled with 'buffer' engine!\n", stderr); return NULL; } canvas = evas_new(); if (unlikely(canvas == NULL)) { //fputs("ERROR: could not instantiate new evas canvas.\n", stderr); return NULL; } evas_output_method_set(canvas, method); evas_output_size_set(canvas, width, height); evas_output_viewport_set(canvas, 0, 0, width, height); einfo = (Evas_Engine_Info_Buffer *)evas_engine_info_get(canvas); if (unlikely(einfo == NULL)) { //fputs("ERROR: could not get evas engine info!\n", stderr); evas_free(canvas); return NULL; } // ARGB32 is sizeof(int), that is 4 bytes, per pixel pixels = real_malloc(width * height * sizeof(int)); if (unlikely(pixels == NULL)) { //fputs("ERROR: could not allocate canvas pixels!\n", stderr); evas_free(canvas); return NULL; } einfo->info.depth_type = EVAS_ENGINE_BUFFER_DEPTH_ARGB32; einfo->info.dest_buffer = pixels; einfo->info.dest_buffer_row_bytes = width * sizeof(int); einfo->info.use_color_key = 0; einfo->info.alpha_threshold = 0; einfo->info.func.new_update_region = NULL; einfo->info.func.free_update_region = NULL; if (unlikely(evas_engine_info_set(canvas,(Evas_Engine_Info*)einfo) == EINA_FALSE)) { PRINTMSG("ERROR: could not set evas engine info!\n"); evas_free(canvas); return NULL; } return canvas; }
EvasCanvas::EvasCanvas( int width, int height ) :Trackable( "EvasCanvas" ) { AllocTag( this, "EvasCanvas" ); Dout( dc::notice, "EvasCanvas::EvasCanvas - creating new Evas" ); o = evas_new(); resize( width, height ); setViewport( 0, 0, width, height ); }
int main (int argc, char *argv[]) { #ifdef ENABLE_NLS bindtextdomain (PACKAGE, PACKAGE_LOCALE_DIR); textdomain (PACKAGE); #endif gtk_set_locale (); gtk_init (&argc, &argv); add_pixmap_directory (PACKAGE_DATA_DIR "/pixmaps"); add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); e = evas_new(); evas_set_output_method(e, RENDER_METHOD_ALPHA_SOFTWARE); { Visual *vis; Colormap cmap; vis = evas_get_optimal_visual(e, GDK_WINDOW_XDISPLAY(GDK_ROOT_PARENT())); gdk_vis = gdkx_visual_get(XVisualIDFromVisual(vis)); cmap = evas_get_optimal_colormap(e, GDK_WINDOW_XDISPLAY(GDK_ROOT_PARENT())); gdk_cmap = gdkx_colormap_get(cmap); /* workaround for bug in gdk - well oversight in api */ ((GdkColormapPrivate *)gdk_cmap)->visual = gdk_vis; } /* * The following code was added by Glade to create one of each component * (except popup menus), just so that you see something after building * the project. Delete any components that you don't want shown initially. */ mainwin = create_mainwin (); gtk_widget_show (mainwin); gtk_main (); return 0; }
EvasTestApp::EvasTestApp(QWidget *parent, const char *name, int wFlags) : QMainWindow(parent, name, wFlags) { setCaption(tr("Evas Qtopia Demo")); evas_target_widget = new EvasTargetWidget(this, "EvasTargetWidget"); evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_qtopia")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_Qtopia *einfo; einfo = (Evas_Engine_Info_Software_Qtopia *)evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.target = evas_target_widget; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); orig_start_time = start_time = get_time(); }
int main( int argc, char *argv[] ) { IDirectFB *dfb; IDirectFBDisplayLayer *layer; IDirectFBSurface *bgsurface; IDirectFBImageProvider *provider; IDirectFBWindow *window1; IDirectFBWindow *window2; IDirectFBSurface *window_surface1; IDirectFBSurface *window_surface2; IDirectFBEventBuffer *buffer; DFBDisplayLayerConfig layer_config; #if ((DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23)) DFBCardCapabilities caps; #else DFBGraphicsDeviceDescription caps; #endif IDirectFBWindow* upper; DFBWindowID id1; IDirectFBFont *font; int fontheight; int err; int quit = 0; DFBCHECK(DirectFBInit( &argc, &argv )); DFBCHECK(DirectFBCreate( &dfb )); #if ((DIRECTFB_MAJOR_VERSION == 0) && (DIRECTFB_MINOR_VERSION == 9) && (DIRECTFB_MICRO_VERSION < 23)) dfb->GetCardCapabilities( dfb, &caps ); #else dfb->GetDeviceDescription( dfb, &caps ); #endif dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (!((caps.blitting_flags & DSBLIT_BLEND_ALPHACHANNEL) && (caps.blitting_flags & DSBLIT_BLEND_COLORALPHA ))) { layer_config.flags = DLCONF_BUFFERMODE; layer_config.buffermode = DLBM_BACKSYSTEM; layer->SetConfiguration( layer, &layer_config ); } layer->GetConfiguration( layer, &layer_config ); layer->EnableCursor ( layer, 1 ); { DFBFontDescription desc; desc.flags = DFDESC_HEIGHT; desc.height = layer_config.width/50; DFBCHECK(dfb->CreateFont( dfb, PACKAGE_DATA_DIR"/grunge.ttf", &desc, &font )); font->GetHeight( font, &fontheight ); } { DFBSurfaceDescription desc; DFBCHECK(dfb->CreateImageProvider( dfb, PACKAGE_DATA_DIR"/bg.png", &provider )); desc.flags = DSDESC_WIDTH | DSDESC_HEIGHT; desc.width = layer_config.width; desc.height = layer_config.height; DFBCHECK(dfb->CreateSurface( dfb, &desc, &bgsurface ) ); provider->RenderTo( provider, bgsurface, NULL ); provider->Release( provider ); DFBCHECK(bgsurface->SetFont( bgsurface, font )); bgsurface->SetColor( bgsurface, 0xCF, 0xCF, 0xFF, 0xFF ); bgsurface->DrawString( bgsurface, "Move the mouse over a window to activate it.", -1, 10, 0, DSTF_LEFT | DSTF_TOP ); bgsurface->SetColor( bgsurface, 0xFF, 0xCF, 0xFF, 0xFF ); bgsurface->DrawString( bgsurface, "You can drag them around, too, if you want.", -1, 10 , 40, DSTF_LEFT | DSTF_TOP ); bgsurface->SetColor( bgsurface, 0xCF, 0xCF, 0xFF, 0xFF ); bgsurface->DrawString( bgsurface, "The one with funky stuff happening and things flying around is an evas.", -1, 10, 80, DSTF_LEFT | DSTF_TOP ); layer->SetBackgroundImage( layer, bgsurface ); layer->SetBackgroundMode( layer, DLBM_IMAGE ); } { DFBWindowDescription desc; desc.flags = ( DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS ); desc.posx = 20; desc.posy = 120; desc.width = 200; desc.height = 200; desc.caps = DWCAPS_ALPHACHANNEL; DFBCHECK( layer->CreateWindow( layer, &desc, &window2 ) ); window2->GetSurface( window2, &window_surface2 ); window2->SetOpacity( window2, 0xFF ); window2->CreateEventBuffer( window2, &buffer ); { window_surface2->SetColor( window_surface2, 0x00, 0x30, 0x10, 0xc0 ); window_surface2->DrawRectangle( window_surface2, 0, 0, desc.width, desc.height ); window_surface2->SetColor( window_surface2, 0x80, 0xa0, 0x00, 0x90 ); window_surface2->FillRectangle( window_surface2, 1, 1, desc.width-2, desc.height-2 ); DFBCHECK(window_surface2->SetFont(window_surface2, font )); window_surface2->SetColor( window_surface2, 0xCF, 0xFF, 0xCF, 0xFF ); window_surface2->DrawString( window_surface2, "Pants!", -1,10, fontheight + 5, DSTF_LEFT | DSTF_TOP ); } window_surface2->Flip( window_surface2, NULL, 0 ); } { DFBWindowDescription desc; desc.flags = ( DWDESC_POSX | DWDESC_POSY | DWDESC_WIDTH | DWDESC_HEIGHT | DWDESC_CAPS ); desc.posx = 200; desc.posy = 200; desc.width = 240; desc.height = 320; desc.caps = DWCAPS_ALPHACHANNEL; DFBCHECK(layer->CreateWindow( layer, &desc, &window1 ) ); window1->GetSurface( window1, &window_surface1 ); window_surface1->SetColor( window_surface1, 0xFF, 0x20, 0x20, 0x90 ); window_surface1->DrawRectangle( window_surface1, 0, 0, desc.width, desc.height ); window_surface1->Flip( window_surface1, NULL, 0 ); window1->SetOpacity( window1, 0xFF ); window1->GetID( window1, &id1 ); window1->AttachEventBuffer( window1, buffer ); } window1->RequestFocus( window1 ); window1->RaiseToTop( window1 ); upper = window1; { evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("directfb")); evas_output_size_set(evas, 240, 320); evas_output_viewport_set(evas, 0, 0, 240, 320); { Evas_Engine_Info_DirectFB *einfo; einfo = (Evas_Engine_Info_DirectFB *) evas_engine_info_get(evas); einfo->info.dfb = dfb; einfo->info.surface = window_surface1; einfo->info.flags = DSDRAW_BLEND; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); evas_render(evas); start_time = get_time(); } while (!quit) { static IDirectFBWindow* active = NULL; static int grabbed = 0; static int startx = 0; static int starty = 0; static int endx = 0; static int endy = 0; DFBWindowEvent evt; buffer->WaitForEventWithTimeout( buffer, 0, 10 ); while (buffer->GetEvent( buffer, DFB_EVENT(&evt) ) == DFB_OK) { IDirectFBWindow* window; if (evt.window_id == id1) window = window1; else window = window2; if (active) { switch (evt.type) { case DWET_BUTTONDOWN: if (!grabbed && evt.button == DIBI_LEFT) { grabbed = 1; layer->GetCursorPosition( layer, &startx, &starty ); window->GrabPointer( window ); } break; case DWET_BUTTONUP: switch (evt.button) { case DIBI_LEFT: if (grabbed) { window->UngrabPointer( window ); grabbed = 0; } break; case DIBI_MIDDLE: upper->LowerToBottom( upper ); upper = (upper == window1) ? window2 : window1; break; case DIBI_RIGHT: quit = DIKS_DOWN; break; default: break; } break; case DWET_KEYDOWN: if (grabbed) break; switch (evt.key_id) { case DIKI_RIGHT: active->Move (active, 1, 0); break; case DIKI_LEFT: active->Move (active, -1, 0); break; case DIKI_UP: active->Move (active, 0, -1); break; case DIKI_DOWN: active->Move (active, 0, 1); break; default: break; } break; case DWET_LOSTFOCUS: if (!grabbed) active = NULL; break; default: break; } } else if (evt.type == DWET_GOTFOCUS) active = window; switch (evt.type) { case DWET_MOTION: endx = evt.cx; endy = evt.cy; break; case DWET_KEYDOWN: switch (evt.key_symbol) { case DIKS_ESCAPE: case DIKS_SMALL_Q: case DIKS_CAPITAL_Q: case DIKS_BACK: case DIKS_STOP: quit = 1; break; default: break; } break; default: break; } } if (active) { if (grabbed) { active->Move( active, endx - startx, endy - starty); startx = endx; starty = endy; } active->SetOpacity( active, (sin( myclock()/300.0 ) * 85) + 170 ); } loop(); { Eina_List *updates; updates = evas_render_updates(evas); /* efficient update.. only flip the rectangle regions that changed! */ if (updates) { DFBRegion region; Eina_List *l; for (l = updates; l; l = l->next) { Evas_Rectangle *rect; rect = l->data; region.x1 = rect->x; region.y1 = rect->y; region.x2 = rect->x + rect->w - 1; region.y2 = rect->y + rect->h - 1; window_surface1->Flip(window_surface1, ®ion, DSFLIP_BLIT); } evas_render_updates_free(updates); } } } buffer->Release( buffer ); window_surface2->Release( window_surface2 ); window_surface1->Release( window_surface1 ); window2->Release( window2 ); window1->Release( window1 ); layer->Release( layer ); bgsurface->Release( bgsurface ); dfb->Release( dfb ); evas_shutdown(); return 0; }
/* external functions */ EAPI Ecore_Evas * ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent, int x, int y, int w, int h, Eina_Bool frame) { Ecore_Wl_Window *p = NULL; Evas_Engine_Info_Wayland_Egl *einfo; Ecore_Evas_Interface_Wayland *iface; Ecore_Evas_Engine_Wl_Data *wdata; Ecore_Evas *ee; int method = 0, count = 0; LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!(method = evas_render_method_lookup("wayland_egl"))) { ERR("Render method lookup failed for Wayland_Egl"); return NULL; } count = ecore_wl_init(disp_name); if (!count) { ERR("Failed to initialize Ecore_Wayland"); return NULL; } else if (count == 1) ecore_wl_display_iterate(); if (!(ee = calloc(1, sizeof(Ecore_Evas)))) { ERR("Failed to allocate Ecore_Evas"); goto ee_err; } if (!(wdata = calloc(1, sizeof(Ecore_Evas_Engine_Wl_Data)))) { ERR("Failed to allocate Ecore_Evas_Engine_Wl_Data"); free(ee); goto ee_err; } ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS); _ecore_evas_wl_common_init(); ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_wl_engine_func; ee->engine.data = wdata; iface = _ecore_evas_wl_interface_new(); ee->engine.ifaces = eina_list_append(ee->engine.ifaces, iface); ee->driver = "wayland_egl"; if (disp_name) ee->name = strdup(disp_name); if (w < 1) w = 1; if (h < 1) h = 1; ee->x = x; ee->y = y; ee->w = w; ee->h = h; ee->req.x = ee->x; ee->req.y = ee->y; ee->req.w = ee->w; ee->req.h = ee->h; ee->rotation = 0; ee->prop.max.w = 32767; ee->prop.max.h = 32767; ee->prop.layer = 4; ee->prop.request_pos = 0; ee->prop.sticky = 0; ee->prop.draw_frame = frame; ee->alpha = EINA_FALSE; ee->evas = evas_new(); evas_data_attach_set(ee->evas, ee); evas_output_method_set(ee->evas, method); evas_output_size_set(ee->evas, ee->w, ee->h); evas_output_viewport_set(ee->evas, 0, 0, ee->w, ee->h); /* FIXME: This needs to be set based on theme & scale */ if (ee->prop.draw_frame) evas_output_framespace_set(ee->evas, 4, 18, 8, 22); if (parent) p = ecore_wl_window_find(parent); /* FIXME: Get if parent is alpha, and set */ wdata->parent = p; wdata->win = ecore_wl_window_new(p, x, y, w, h, ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW); ee->prop.window = wdata->win->id; if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas))) { einfo->info.display = ecore_wl_display_get(); einfo->info.destination_alpha = ee->alpha; einfo->info.rotation = ee->rotation; einfo->info.depth = 32; if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo)) { ERR("Failed to set Evas Engine Info for '%s'", ee->driver); goto err; } } else { ERR("Failed to get Evas Engine Info for '%s'", ee->driver); goto err; } ecore_evas_callback_pre_free_set(ee, _ecore_evas_wl_common_pre_free); if (ee->prop.draw_frame) { wdata->frame = _ecore_evas_wl_common_frame_add(ee->evas); evas_object_is_frame_object_set(wdata->frame, EINA_TRUE); evas_object_move(wdata->frame, 0, 0); } _ecore_evas_register(ee); ecore_evas_input_event_register(ee); ecore_event_window_register(ee->prop.window, ee, ee->evas, (Ecore_Event_Mouse_Move_Cb)_ecore_evas_mouse_move_process, (Ecore_Event_Multi_Move_Cb)_ecore_evas_mouse_multi_move_process, (Ecore_Event_Multi_Down_Cb)_ecore_evas_mouse_multi_down_process, (Ecore_Event_Multi_Up_Cb)_ecore_evas_mouse_multi_up_process); return ee; err: ecore_evas_free(ee); _ecore_evas_wl_common_shutdown(); ee_err: ecore_wl_shutdown(); return NULL; }
int main(int argc, char **argv) { WNDCLASS wc; RECT rect; HINSTANCE hinstance; MSG msg; HWND window; LPDIRECTDRAW object; LPDIRECTDRAWSURFACE surface_primary; LPDIRECTDRAWSURFACE surface_back; int depth; int running; int pause_me = 0; hinstance = GetModuleHandle(0); wc.style = 0; wc.lpfnWndProc = MainWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = hinstance; wc.hIcon = LoadIcon (NULL, IDI_APPLICATION); wc.hCursor = LoadCursor (NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(1 + COLOR_BTNFACE); wc.lpszMenuName = NULL; wc.lpszClassName = "Evas_Software_DDraw_Test"; if(!RegisterClass(&wc)) return EXIT_FAILURE; rect.left = 0; rect.top = 0; rect.right = win_w; rect.bottom = win_h; AdjustWindowRect (&rect, WS_OVERLAPPEDWINDOW | WS_SIZEBOX, FALSE); window = CreateWindowEx(0, "Evas_Software_DDraw_Test", "Evas_Software_DDraw_Test", WS_OVERLAPPEDWINDOW | WS_SIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, hinstance, NULL); if (!window) return EXIT_FAILURE; if (!_directdraw_init(window, &object, &surface_primary, &surface_back, &depth, win_w, win_h)) return EXIT_FAILURE; ShowWindow(window, SW_SHOWDEFAULT); UpdateWindow(window); /* test evas_free.... :) */ evas_init(); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_ddraw")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_DDraw *einfo; einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.window = window; einfo->info.object = object; einfo->info.surface_primary = surface_primary; einfo->info.surface_back = surface_back; einfo->info.depth = depth; einfo->info.rotation = 0; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); printf("################ evas free\n"); setdown(); evas_free(evas); printf("evas freed. DONE\n"); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_ddraw")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_DDraw *einfo; einfo = (Evas_Engine_Info_Software_DDraw *) evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.window = window; einfo->info.object = object; einfo->info.surface_primary = surface_primary; einfo->info.surface_back = surface_back; einfo->info.depth = depth; einfo->info.rotation = 0; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); printf("################ evas free\n"); setdown(); evas_free(evas); printf("evas freed. DONE\n"); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_ddraw")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_DDraw *einfo; einfo = (Evas_Engine_Info_Software_DDraw *) evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.window = window; einfo->info.object = object; einfo->info.surface_primary = surface_primary; einfo->info.surface_back = surface_back; einfo->info.depth = depth; einfo->info.rotation = 0; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); printf("################ evas free\n"); setdown(); evas_free(evas); printf("evas freed. DONE\n"); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_ddraw")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_DDraw *einfo; einfo = (Evas_Engine_Info_Software_DDraw *) evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.window = window; einfo->info.object = object; einfo->info.surface_primary = surface_primary; einfo->info.surface_back = surface_back; einfo->info.depth = depth; einfo->info.rotation = 0; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); printf("################ evas free\n"); setdown(); evas_free(evas); printf("evas freed. DONE\n"); evas = evas_new(); evas_output_method_set(evas, evas_render_method_lookup("software_ddraw")); evas_output_size_set(evas, win_w, win_h); evas_output_viewport_set(evas, 0, 0, win_w, win_h); { Evas_Engine_Info_Software_DDraw *einfo; einfo = (Evas_Engine_Info_Software_DDraw *) evas_engine_info_get(evas); /* the following is specific to the engine */ einfo->info.window = window; einfo->info.object = object; einfo->info.surface_primary = surface_primary; einfo->info.surface_back = surface_back; einfo->info.depth = depth; einfo->info.rotation = 0; evas_engine_info_set(evas, (Evas_Engine_Info *) einfo); } setup(); orig_start_time = start_time = get_time(); running = 1; while (running) { while (PeekMessage (&msg, window, 0, 0, PM_NOREMOVE)) { int res; res = GetMessage (&msg, NULL, 0, 0); TranslateMessage (&msg); DispatchMessage (&msg); if (res == 0) running = 0; } if (!(pause_me == 1)) { loop(); evas_render(evas); } } exit: setdown(); evas_free(evas); if (surface_primary) IDirectDrawSurface7_Release (surface_primary); if (object) IDirectDraw7_Release (object); evas_shutdown(); return EXIT_SUCCESS; }