当前位置: 首页>>代码示例>>C++>>正文


C++ ecore_evas_get函数代码示例

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


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

示例1: esmart_resize_new

/*==========================================================================
 * The three external functions, new,  button set and type set
 *========================================================================*/
EAPI Evas_Object *
esmart_resize_new(Ecore_Evas * ee)
{
   Evas_Object *o = NULL;
   Evas_Object *result = NULL;
   Esmart_Resize *data = NULL;

   if (!ee)
     return NULL;
   if ((result = esmart_resize_object_new(ecore_evas_get(ee)))
	 && (data = (Esmart_Resize *) evas_object_smart_data_get(result)))
     {
	data->ee = ee;
	o = evas_object_rectangle_add(ecore_evas_get(ee));
	evas_object_color_set(o, 255, 255, 255, 0);
	evas_object_repeat_events_set(o, 1);
	evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN,
	      _mouse_down_cb, data);
	evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_UP,
	      _mouse_up_cb, data);
	evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_MOVE,
	      _mouse_move_cb, data);
	data->obj = o;
     }
   return result;
}
开发者ID:playya,项目名称:Enlightenment,代码行数:29,代码来源:esmart_resize.c

示例2: esmart_draggies_new

/*==========================================================================
 * The two external functions, new and button set
 *========================================================================*/
EAPI Evas_Object *
esmart_draggies_new (Ecore_Evas * ee)
{
  Evas_Object *o = NULL;
  Evas_Object *result = NULL;
  Esmart_Draggies *data = NULL;

  if (!ee)
    return (NULL);
  if ((result = esmart_dragable_object_new (ecore_evas_get (ee))))
    {
       if ((data = evas_object_smart_data_get (result)))
	 {
	    data->ee = ee;
	    o = evas_object_rectangle_add (ecore_evas_get (ee));
	    evas_object_color_set (o, 255, 255, 255, 0);
	    evas_object_repeat_events_set (o, 1);
	    evas_object_event_callback_add (o, EVAS_CALLBACK_MOUSE_DOWN,
		  _mouse_down_cb, data);
	    evas_object_event_callback_add (o, EVAS_CALLBACK_MOUSE_UP,
		  _mouse_up_cb, data);
	    evas_object_event_callback_add (o, EVAS_CALLBACK_MOUSE_MOVE,
		  _mouse_move_cb, data);
	    data->obj = o;

	    evas_object_smart_member_add(o, result);
	 }
    }
  return (result);
}
开发者ID:playya,项目名称:Enlightenment,代码行数:33,代码来源:esmart_draggies.c

示例3: cc_resize

/**
 * @param ee: The Ecore_Evas the event occurred on.
 * @brief: Ecore callback for the resising of the window.  This function
 *         resises the edje and esmart dragger according to the new
 *         window size.
 */
void
cc_resize(Ecore_Evas * ee)
{
	int             x, y, w, h;

	ecore_evas_geometry_get(ee, &x, &y, &w, &h);
	evas_object_resize(evas_object_name_find
			   (ecore_evas_get(ee), "edje"), w, h);
	evas_object_resize(evas_object_name_find(ecore_evas_get(ee), "dragger"),
			   w, h);
	return;
}
开发者ID:playya,项目名称:Enlightenment,代码行数:18,代码来源:controlcentre.c

示例4: elicit_band_new

Elicit_Band *
elicit_band_new(const char *theme_file)
{
  Elicit_Band *band;

  band = calloc(1, sizeof(Elicit_Band));

  //XXX allow other engines
  band->ee = ecore_evas_software_x11_new(0,0,0,0,10,10);
  ecore_evas_borderless_set(band->ee, 1);
  if (ecore_x_screen_is_composited(0))
    ecore_evas_alpha_set(band->ee, 1);
  else
    ecore_evas_shaped_set(band->ee, 1);

  band->obj = edje_object_add(ecore_evas_get(band->ee));

  //XXX theme file!
  if (!edje_object_file_set(band->obj, theme_file, "elicit.band"))
  {
    fprintf(stderr, "[Elicit] Error: Can't set band theme\n");
  }
  evas_object_move(band->obj, 0, 0);
  evas_object_show(band->obj);

  return band;
}
开发者ID:Elive,项目名称:elicit,代码行数:27,代码来源:band.c

示例5: defined

void EWK2UnitTestBase::SetUp()
{
    unsigned int width = environment->defaultWidth();
    unsigned int height = environment->defaultHeight();

#if defined(WTF_USE_ACCELERATED_COMPOSITING) && defined(HAVE_ECORE_X)
    const char* engine = "opengl_x11";
    m_ecoreEvas = ecore_evas_new(engine, 0, 0, width, height, 0);
#else
    m_ecoreEvas = ecore_evas_new(0, 0, 0, width, height, 0);
#endif

    ecore_evas_show(m_ecoreEvas);
    Evas* evas = ecore_evas_get(m_ecoreEvas);

    Evas_Smart* smart = evas_smart_class_new(&m_ewkViewClass.sc);

    Ewk_Context* newContext = ewk_context_new();
    Ewk_Page_Group* newPageGroup = ewk_page_group_create("UnitTest");
    m_webView = ewk_view_smart_add(evas, smart, newContext, newPageGroup);

    // Clear HTTP cache files before running the unit tests, which prevents 
    // performance degradation due to so many cache files.
    ewk_context_resource_cache_clear(newContext);
    ewk_object_unref(newContext);
    ewk_object_unref(newPageGroup);

    ewk_view_theme_set(m_webView, environment->defaultTheme());

    evas_object_resize(m_webView, width, height);
    evas_object_show(m_webView);
    evas_object_focus_set(m_webView, true);
}
开发者ID:massa84,项目名称:phantomjs-webkit,代码行数:33,代码来源:EWK2UnitTestBase.cpp

示例6: malloc

static MiniBrowser *browserCreate(const char *url)
{
    MiniBrowser *app = malloc(sizeof(MiniBrowser));

    app->ee = ecore_evas_new(0, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);

    ecore_evas_title_set(app->ee, "EFL MiniBrowser");
    ecore_evas_callback_resize_set(app->ee, on_ecore_evas_resize);
    ecore_evas_borderless_set(app->ee, 0);
    ecore_evas_show(app->ee);

    app->evas = ecore_evas_get(app->ee);

    app->bg = evas_object_rectangle_add(app->evas);
    evas_object_name_set(app->bg, "bg");
    evas_object_size_hint_weight_set(app->bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

    evas_object_move(app->bg, 0, 0);
    evas_object_resize(app->bg, DEFAULT_WIDTH, DEFAULT_HEIGHT);
    evas_object_color_set(app->bg, 255, 150, 150, 255);
    evas_object_show(app->bg);

    /* Create webview */
    app->browser = ewk_view_add(app->evas);
    evas_object_name_set(app->browser, "browser");
    evas_object_size_hint_weight_set(app->browser, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);

    evas_object_resize(app->browser, DEFAULT_WIDTH, DEFAULT_HEIGHT);
    evas_object_show(app->browser);
    evas_object_focus_set(app->browser, EINA_TRUE);

    ewk_view_uri_set(app->browser, url);

    return app;
}
开发者ID:yang-bo,项目名称:webkit,代码行数:35,代码来源:main.c

示例7: main

int main(void) {
    Evas_Object *o;
    Ecore_Evas *ee;
    int r;

    evas_init();
    ecore_init();
    ecore_evas_init();
    edje_init();

    ee = ecore_evas_new(NULL, 0, 0, 320, 240, NULL);
    if (!ee)
        return -1;

    o = edje_object_add(ecore_evas_get(ee));
    if (!edje_object_file_set(o, "test.edj", "main")) {
        fprintf(stderr, "could not load edje: %d\n",
                edje_object_load_error_get(o));
        return -2;
    }
    evas_object_resize(o, 320, 240);
    evas_object_show(o);

    ecore_evas_alpha_set(ee, 1);
    ecore_evas_borderless_set(ee, 1);
    ecore_evas_show(ee);
    ecore_main_loop_begin();

    return 0;
}
开发者ID:barbieri,项目名称:barbieri-playground,代码行数:30,代码来源:test-transp-bg.c

示例8: Dout

EcoreEvasWindowXRenderX11::EcoreEvasWindowXRenderX11( int width, int height, const char* display )
                :EcoreEvasWindow()
{    
    Dout( dc::notice, "EcoreEvasWindow::EcoreEvasWindowGL" );
    EcoreApplication::application()->setMainWindow( this );

    if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
    if ( ::getenv( "EFL_WIDTH" ) ) width = atoi( ::getenv( "EFL_WIDTH" ) );
    if ( ::getenv( "EFL_HEIGHT" ) ) height = atoi( ::getenv( "EFL_HEIGHT" ) );
  
    Dout( dc::notice, "- detected display string '" << ( display ? display:"<null>" ) << "' - starting X11 engine" );
    //FIXME: Should we care about positioning? 0, 0 for now
    _ee = ecore_evas_xrender_x11_new( const_cast<char*>( display ), 0, 0, 0, width, height );
    
    ecore_evas_title_set( _ee, eApp->name().c_str() );
    ecore_evas_borderless_set( _ee, 0 );

    _canvas = new EvasCanvas( ecore_evas_get( _ee ) );

    /* Set up magic object back link */
    ecore_evas_data_set( _ee, "obj_c++", this );

    /* Set up default callbacks */
    setEventEnabled( Resize, true );
    setEventEnabled( DeleteRequest, true );
}
开发者ID:playya,项目名称:Enlightenment,代码行数:26,代码来源:eflpp_ecore_window.cpp

示例9: EvasWindow

EvasWindowSoftwareX11::EvasWindowSoftwareX11( const Eflxx::Size &size, const char* display ) : 
  EvasWindow(),
  mExwin (NULL)
{
  Dout( dc::notice, "EvasWindow::EvasWindowSoftwareX11" );
  Application::getInstance()->setMainWindow( this );

  /*if ( ::getenv( "EFL_DISPLAY" ) ) display = ::getenv( "EFL_DISPLAY" );
  if ( ::getenv( "EFL_WIDTH" ) ) size.width (atoi( ::getenv( "EFL_WIDTH" ) ));
  if ( ::getenv( "EFL_HEIGHT" ) ) size.height (atoi( ::getenv( "EFL_HEIGHT" ) ));*/

  Dout( dc::notice, "- detected display string '" << ( display ? display:"<null>" ) << "' - starting X11 engine" );
  //FIXME: Should we care about positioning? 0, 0 for now
  _ee = ecore_evas_software_x11_new( const_cast<char*>( display ), 0, 0, 0, size.width (), size.height () );

  ecore_evas_title_set( _ee, Application::getInstance()->getName().c_str() );
  ecore_evas_borderless_set( _ee, 0 );

  _canvas = Evasxx::Canvas::wrap ( ecore_evas_get( _ee ) );

  /* Set up magic object back link */
  ecore_evas_data_set( _ee, "obj_c++", this );

  /* Set up default callbacks */
  setEventEnabled( Resize, true );
  setEventEnabled( DeleteRequest, true );
}
开发者ID:Limsik,项目名称:e17,代码行数:27,代码来源:EvasWindowSoftwareX11.cpp

示例10: main

int main(int argc, char **argv) {

    init_efl();

    char *theme = find_theme();
    if (!theme)
		fatal("Could not find theme");

    Ecore_Evas *ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, 400, 400);
    if (!ee) {
		fprintf(stderr, "FATAL: Could not get an ee...\n");
		exit(1);
	}
    Ecore_X_Screen_Size sz = get_screen_size(ee);
    ecore_evas_resize(ee, sz.width, sz.height);
    ecore_evas_title_set(ee, "Launcher");
    ecore_evas_borderless_set(ee, 1);
    ecore_evas_fullscreen_set(ee, 1);

    Evas *evas = ecore_evas_get(ee);
    Evas_Object *edje = edje_object_add(evas);
    edje_object_file_set(edje, theme, "main");
    evas_object_move(edje, 0, 0);
    evas_object_resize(edje, sz.width, sz.height);
    evas_object_show(edje);

    ecore_evas_show(ee);
    ecore_main_loop_begin();

	shutdown_efl();

    return 0;

}
开发者ID:derobert,项目名称:DebianLINK,代码行数:34,代码来源:nl-launcher.c

示例11: ui_wiondow_frame_create

int64_t ui_wiondow_frame_create(struct ui_object *frame){
  ecore_evas_init();
  
  // create your canvas
   // NOTE: consider using ecore_evas_buffer_new() instead!
  
  struct _frame_window *fwin = (struct _frame_window*) malloc(sizeof(struct _frame_window));
  
  char *data;

  Eina_List *l, *engines = ecore_evas_engines_get();
  printf("Available engines:\n");
  EINA_LIST_FOREACH(engines, l, data)
    printf("%s\n", data);
  ecore_evas_engines_free(engines);
  
  fwin->canvas = ecore_evas_new("opengl_x11", 0, 0, frame->w, frame->h, NULL);
  if (!fwin->canvas)
    return -1;

  ecore_evas_show(fwin->canvas);  
  
  struct ui_frame *frame_obj = (struct _ui_window*) malloc(sizeof(struct ui_frame));
  frame_obj->data = fwin;
  frame_obj->ui = *frame;
  frame_obj->canvas = ecore_evas_get(fwin->canvas);
  
  return id_keeper_gen(id_keeper, frame_obj);
}
开发者ID:ixdu,项目名称:caravan,代码行数:29,代码来源:test.c

示例12: _load_list

static Eina_List *
_load_list(void)
{
   Eina_List *tree = NULL;
   Eina_List *ees;
   Ecore_Evas *ee;

   ees = ecore_evas_ecore_evas_list_get();

   EINA_LIST_FREE(ees, ee)
     {
        Eina_List *objs;
        Evas_Object *obj;
        Clouseau_Tree_Item *treeit;

        Evas *e;
        int w, h;

        e = ecore_evas_get(ee);
        evas_output_size_get(e, &w, &h);

        treeit = calloc(1, sizeof(Clouseau_Tree_Item));
        if (!treeit) continue ;

        treeit->name = eina_stringshare_add(ecore_evas_title_get(ee));
        treeit->ptr = (uintptr_t) ee;

        tree = eina_list_append(tree, treeit);

        objs = evas_objects_in_rectangle_get(e, SHRT_MIN, SHRT_MIN,
              USHRT_MAX, USHRT_MAX, EINA_TRUE, EINA_TRUE);

        EINA_LIST_FREE(objs, obj)
          libclouseau_item_add(obj, treeit);
    }
开发者ID:Limsik,项目名称:e17,代码行数:35,代码来源:clouseau_client.c

示例13: main

int main(int argc, char *argv[])
{
   Ecore_Evas *window;
   Evas *canvas;
   Evas_Object *edje;
   const char *text;

   ecore_evas_init();
   edje_init();

   window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, NULL);
   if (!window)
     {
        EINA_LOG_CRIT("could not create window.");
        return -1;
     }
   canvas = ecore_evas_get(window);

   text = (argc > 1) ? argv[1] : NULL;

   edje = create_my_group(canvas, text);
   if (!edje)
     return -2;

   ecore_evas_show(window);
   ecore_main_loop_begin();

   evas_object_del(edje);
   ecore_evas_free(window);

   edje_shutdown();
   ecore_evas_shutdown();

   return 0;
}
开发者ID:RomainNaour,项目名称:efl,代码行数:35,代码来源:edje_example.c

示例14: ASSERT

WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
{
    ASSERT(m_inspectedPage);

#ifdef HAVE_ECORE_X
    const char* engine = "opengl_x11";
    m_inspectorWindow = ecore_evas_new(engine, 0, 0, initialWindowWidth, initialWindowHeight, 0);

    // Gracefully fall back to software if evas_gl engine is not available.
    if (!m_inspectorWindow)
#endif
    m_inspectorWindow = ecore_evas_new(0, 0, 0, initialWindowWidth, initialWindowHeight, 0);
    if (!m_inspectorWindow)
        return 0;

    WKContextRef wkContext = toAPI(&inspectorProcessPool());
    WKRetainPtr<WKStringRef> wkGroupIdentifier = adoptWK(WKStringCreateWithUTF8CString(inspectorPageGroupIdentifier().utf8().data()));
    WKPageGroupRef wkPageGroup = WKPageGroupCreateWithIdentifier(wkGroupIdentifier.get());

    WKRetainPtr<WKPageConfigurationRef> wkPageConfiguration = adoptWK(WKPageConfigurationCreate());
    WKPageConfigurationSetContext(wkPageConfiguration.get(), wkContext);
    WKPageConfigurationSetPageGroup(wkPageConfiguration.get(), wkPageGroup);

    m_inspectorView = EWKViewCreate(wkContext, wkPageConfiguration.get(), ecore_evas_get(m_inspectorWindow), /* smart */ 0);
    WKViewRef wkView = EWKViewGetWKView(m_inspectorView);

    WKRetainPtr<WKStringRef> wkTheme = adoptWK(WKStringCreateWithUTF8CString(DEFAULT_THEME_DIR "/default.edj"));
    WKViewSetThemePath(wkView, wkTheme.get());

    WKPreferencesRef wkPreferences = WKPageGroupGetPreferences(wkPageGroup);
    WKPreferencesSetFileAccessFromFileURLsAllowed(wkPreferences, true);
    WKPreferencesSetJavaScriptRuntimeFlags(wkPreferences, 0);

    return toImpl(WKViewGetPage(wkView));
}
开发者ID:valbok,项目名称:WebKitForWayland,代码行数:35,代码来源:WebInspectorProxyEfl.cpp

示例15: e_canvas_add

/* externally accessible functions */
EAPI void
e_canvas_add(Ecore_Evas *ee)
{
   Evas *e;

   _e_canvases = eina_list_prepend(_e_canvases, ee);
   e = ecore_evas_get(ee);
   evas_image_cache_set(e, e_config->image_cache * 1024);
   evas_font_cache_set(e, e_config->font_cache * 1024);
   e_path_evas_append(path_fonts, e);
   if (e_config->font_hinting == 0)
     {
        if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_BYTECODE))
          evas_font_hinting_set(e, EVAS_FONT_HINTING_BYTECODE);
        else if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO))
          evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO);
        else
          evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
     }
   else if (e_config->font_hinting == 1)
     {
        if (evas_font_hinting_can_hint(e, EVAS_FONT_HINTING_AUTO))
          evas_font_hinting_set(e, EVAS_FONT_HINTING_AUTO);
        else
          evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
     }
   else if (e_config->font_hinting == 2)
     evas_font_hinting_set(e, EVAS_FONT_HINTING_NONE);
}
开发者ID:Deepspeed,项目名称:moksha,代码行数:30,代码来源:e_canvas.c


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