summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-07-11 10:46:20 +0100
committerChris Michael <cp.michael@samsung.com>2013-07-11 10:49:25 +0100
commit72a3a4c787efe5da3e63032bddcbefd7daa2388e (patch)
treed27c47f2c0c168bcfe3c363dcce9db261d7469db /src/lib/ecore_evas/ecore_evas.c
parentfc9ee114624bcc04a8d795939f64825347741714 (diff)
Add function code for:
- ecore_evas_pixmap_visual_get - ecore_evas_pixmap_colormap_get - ecore_evas_pixmap_depth_get Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 72ac807241..3bd8b1167f 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2396,6 +2396,99 @@ ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, Evas_Coord y)
2396 return EINA_FALSE; 2396 return EINA_FALSE;
2397} 2397}
2398 2398
2399EAPI void *
2400ecore_evas_pixmap_visual_get(const Ecore_Evas *ee)
2401{
2402 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2403 {
2404 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_pixmap_visual_get");
2405 return NULL;
2406 }
2407
2408 if (!strcmp(ee->driver, "software_x11"))
2409 {
2410 Ecore_Evas_Interface_Software_X11 *iface;
2411 iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
2412 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
2413
2414 if (iface->pixmap_visual_get)
2415 return iface->pixmap_visual_get(ee);
2416 }
2417 else if (!strcmp(ee->driver, "opengl_x11"))
2418 {
2419 Ecore_Evas_Interface_Gl_X11 *iface;
2420 iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
2421 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
2422
2423 if (iface->pixmap_visual_get)
2424 return iface->pixmap_visual_get(ee);
2425 }
2426
2427 return NULL;
2428}
2429
2430EAPI unsigned long
2431ecore_evas_pixmap_colormap_get(const Ecore_Evas *ee)
2432{
2433 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2434 {
2435 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_pixmap_colormap_get");
2436 return 0;
2437 }
2438
2439 if (!strcmp(ee->driver, "software_x11"))
2440 {
2441 Ecore_Evas_Interface_Software_X11 *iface;
2442 iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
2443 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
2444
2445 if (iface->pixmap_colormap_get)
2446 return iface->pixmap_colormap_get(ee);
2447 }
2448 else if (!strcmp(ee->driver, "opengl_x11"))
2449 {
2450 Ecore_Evas_Interface_Gl_X11 *iface;
2451 iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
2452 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
2453
2454 if (iface->pixmap_colormap_get)
2455 return iface->pixmap_colormap_get(ee);
2456 }
2457
2458 return 0;
2459}
2460
2461EAPI int
2462ecore_evas_pixmap_depth_get(const Ecore_Evas *ee)
2463{
2464 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2465 {
2466 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_pixmap_depth_get");
2467 return 0;
2468 }
2469
2470 if (!strcmp(ee->driver, "software_x11"))
2471 {
2472 Ecore_Evas_Interface_Software_X11 *iface;
2473 iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
2474 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
2475
2476 if (iface->pixmap_depth_get)
2477 return iface->pixmap_depth_get(ee);
2478 }
2479 else if (!strcmp(ee->driver, "opengl_x11"))
2480 {
2481 Ecore_Evas_Interface_Gl_X11 *iface;
2482 iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, "gl_x11");
2483 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
2484
2485 if (iface->pixmap_depth_get)
2486 return iface->pixmap_depth_get(ee);
2487 }
2488
2489 return 0;
2490}
2491
2399/* fps debug calls - for debugging how much time your app actually spends */ 2492/* fps debug calls - for debugging how much time your app actually spends */
2400/* rendering graphics... :) */ 2493/* rendering graphics... :) */
2401 2494