EAPI Evas_Object *
e_toolbar_add(Evas *evas) 
{
   if (!_e_toolbar_smart) 
     {
	static const Evas_Smart_Class sc = 
	  {
	     "e_toolbar",
	       EVAS_SMART_CLASS_VERSION,
	       _e_toolbar_smart_add,
	       _e_toolbar_smart_del,
	       _e_toolbar_smart_move,
	       _e_toolbar_smart_resize,
	       _e_toolbar_smart_show,
	       _e_toolbar_smart_hide,
	       _e_toolbar_color_set,
	       _e_toolbar_clip_set,
	       _e_toolbar_clip_unset,
	       NULL
	  };
	_e_toolbar_smart = evas_smart_class_new(&sc);
	_e_toolbar_smart_use = 0;
     }
   _e_toolbar_smart_use++;
   return evas_object_smart_add(evas, _e_toolbar_smart);
}
Evas_Smart *
esmart_textarea_smart_get()
{
   static Evas_Smart *s = NULL;
   static const Evas_Smart_Class sc = {
      "Text Area",
      EVAS_SMART_CLASS_VERSION,
      esmart_textarea_add,
      esmart_textarea_del,
      esmart_textarea_move,
      esmart_textarea_resize,
      esmart_textarea_show,
      esmart_textarea_hide,
      esmart_textarea_color_set,
      esmart_textarea_clip_set,
      esmart_textarea_clip_unset,
      NULL,
      NULL,
      NULL
  };

  if (!s)
    s = evas_smart_class_new(&sc);

  return s;
}
Beispiel #3
0
static void
_smart_init(void)
{
    if (_e_smart) return;
    {
        static const Evas_Smart_Class sc =
        {
            "enscribi_input_frame",
            EVAS_SMART_CLASS_VERSION,
            _smart_add,
            _smart_del,
            _smart_move,
            _smart_resize,
            _smart_show,
            _smart_hide,
            _smart_color_set,
            _smart_clip_set,
            _smart_clip_unset,
            NULL,
            NULL,
            NULL,
            NULL
        };
        _e_smart = evas_smart_class_new(&sc);
    }
}
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);
}
Beispiel #5
0
static Evas_Smart *
_esmart_dragable_object_smart_get ()
{
  static Evas_Smart *smart = NULL;

  if (!smart)
    { 
       static const Evas_Smart_Class sc = 
	 {
	    "esmart_dragable_object",
	    EVAS_SMART_CLASS_VERSION,
	    _esmart_dragable_object_add,
	    _esmart_dragable_object_del,
	    _esmart_dragable_object_move,
	    _esmart_dragable_object_resize,
	    _esmart_dragable_object_show,
	    _esmart_dragable_object_hide,
	    _esmart_dragable_object_color_set,
	    _esmart_dragable_object_clip_set,
	    _esmart_dragable_object_clip_unset, 
	    NULL,
	    NULL,
	    NULL
	 };

       smart = evas_smart_class_new(&sc);
    }

  return smart;
}
Beispiel #6
0
static inline Evas_Smart* _ewk_view_tiled_smart_class_new(void)
{
    static Ewk_View_Smart_Class api = EWK_VIEW_SMART_CLASS_INIT_NAME_VERSION("EWK_View_Tiled");
    static Evas_Smart* smart = 0;

    if (EINA_UNLIKELY(!smart)) {
        ewk_view_tiled_smart_set(&api);
        smart = evas_smart_class_new(&api.sc);
    }

    return smart;
}
Beispiel #7
0
Evas_Smart *EvasEsmart::getEsmart( const char *name )
{
  sc.name = name;
  sc.version =  EVAS_SMART_CLASS_VERSION;
  sc.add = wrap_add;
  sc.del = wrap_del;
  sc.move = wrap_move;
  sc.resize = wrap_resize;
  sc.show = wrap_show;
  sc.hide = wrap_hide;
  sc.color_set = wrap_color_set;
  sc.clip_set = wrap_clip_set;
  sc.clip_unset = wrap_clip_unset;
  sc.data = this;
  
  Evas_Smart *smart = evas_smart_class_new( &sc );
  
  return smart;
}
Beispiel #8
0
void EWK2UnitTestBase::SetUp()
{
    ewk_init();

    unsigned int width = environment->defaultWidth();
    unsigned int height = environment->defaultHeight();

    m_ecoreEvas = ecore_evas_new(0, 0, 0, width, height, 0);

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

    Evas_Smart* smart = evas_smart_class_new(&m_ewkViewClass.sc);
    m_webView = ewk_view_smart_add(evas, smart, ewk_context_default_get());
    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);
}
Beispiel #9
0
static void
_e_layout_smart_init(void)
{
   if (_e_smart) return;

   static const Evas_Smart_Class _e_smart_class = {
	"e_layout",
	EVAS_SMART_CLASS_VERSION,
	_e_layout_smart_add,
	_e_layout_smart_del,
	_e_layout_smart_move,
	_e_layout_smart_resize,
	_e_layout_smart_show,
	_e_layout_smart_hide,
	_e_layout_smart_color_set,
	_e_layout_smart_clip_set,
	_e_layout_smart_clip_unset,
	NULL, NULL, NULL, NULL };

   _e_smart = evas_smart_class_new(&_e_smart_class);
}
Beispiel #10
0
static void
_e_icon_smart_init(void)
{
   if (_e_smart) return;
   {
      static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("e_icon");
      if (!sc.add)
        {
           sc.add = _e_icon_smart_add;
           sc.del = _e_icon_smart_del;
           sc.move = _e_icon_smart_move;
           sc.resize = _e_icon_smart_resize;
           sc.show = _e_icon_smart_show;
           sc.hide = _e_icon_smart_hide;
           sc.color_set = _e_icon_smart_color_set;
           sc.clip_set = _e_icon_smart_clip_set;
           sc.clip_unset = _e_icon_smart_clip_unset;
        }
      _e_smart = evas_smart_class_new(&sc);
   }
}
Beispiel #11
0
static void _smart_init(void)
{
    static const Evas_Smart_Class sc =
    {
        SMART_NAME,
        EVAS_SMART_CLASS_VERSION,
        _smart_add,
        _smart_del,
        _smart_move,
        _smart_resize,
        _smart_show,
        _smart_hide,
        _smart_color_set,
        _smart_clip_set,
        _smart_clip_unset,
        NULL,
        NULL
    };

    if (!_smart)
       _smart = evas_smart_class_new(&sc);
}
Beispiel #12
0
void EWK2UnitTestBase::SetUp()
{
    unsigned int width = environment->defaultWidth();
    unsigned int height = environment->defaultHeight();

#if defined(HAVE_ECORE_X)
    const char* engine = "opengl_x11";
    m_ecoreEvas = ecore_evas_new(engine, 0, 0, width, height, 0);
    // Graceful fallback to software rendering if evas_gl engine is not available.
    if (!m_ecoreEvas)
#endif
    m_ecoreEvas = ecore_evas_new(0, 0, 0, width, height, 0);

    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();
    if (m_multipleProcesses)
        ewk_context_process_model_set(newContext, EWK_PROCESS_MODEL_MULTIPLE_SECONDARY);

    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);
}