From dfe89ed1948d97202d08a3ed245c8fd0e9feacb7 Mon Sep 17 00:00:00 2001 From: raster Date: Tue, 13 Jul 2010 23:31:16 +0000 Subject: [PATCH] add pixmap set/get for comp. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@50238 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_x/Ecore_X.h | 2 ++ src/lib/ecore_x/Ecore_X_Atoms.h | 2 ++ src/lib/ecore_x/ecore_x_atoms_decl.h | 2 ++ src/lib/ecore_x/xlib/ecore_x_atoms.c | 4 +++- src/lib/ecore_x/xlib/ecore_x_e.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_x/Ecore_X.h b/src/lib/ecore_x/Ecore_X.h index af67e56..7c6f6c8 100644 --- a/src/lib/ecore_x/Ecore_X.h +++ b/src/lib/ecore_x/Ecore_X.h @@ -1624,6 +1624,8 @@ EAPI void ecore_x_e_comp_sync_cancel_send(Ecore_X_Window win); EAPI void ecore_x_e_comp_flush_send(Ecore_X_Window win); EAPI void ecore_x_e_comp_dump_send(Ecore_X_Window win); +EAPI void ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap); +EAPI Ecore_X_Pixmap ecore_x_e_comp_pixmap_get(Ecore_X_Window win); EAPI Ecore_X_Sync_Alarm ecore_x_sync_alarm_new(Ecore_X_Sync_Counter counter); EAPI int ecore_x_sync_alarm_free(Ecore_X_Sync_Alarm alarm); diff --git a/src/lib/ecore_x/Ecore_X_Atoms.h b/src/lib/ecore_x/Ecore_X_Atoms.h index 02d9905..8508a68 100644 --- a/src/lib/ecore_x/Ecore_X_Atoms.h +++ b/src/lib/ecore_x/Ecore_X_Atoms.h @@ -18,6 +18,7 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_STRING; EAPI extern Ecore_X_Atom ECORE_X_ATOM_TEXT; EAPI extern Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING; EAPI extern Ecore_X_Atom ECORE_X_ATOM_WINDOW; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_PIXMAP; /* dnd atoms */ EAPI extern Ecore_X_Atom ECORE_X_ATOM_SELECTION_XDND; @@ -250,5 +251,6 @@ EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_END; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_CANCEL; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_FLUSH; EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_DUMP; +EAPI extern Ecore_X_Atom ECORE_X_ATOM_E_COMP_PIXMAP; #endif /* _ECORE_X_ATOMS_H */ diff --git a/src/lib/ecore_x/ecore_x_atoms_decl.h b/src/lib/ecore_x/ecore_x_atoms_decl.h index fd7e9b6..1933ecc 100644 --- a/src/lib/ecore_x/ecore_x_atoms_decl.h +++ b/src/lib/ecore_x/ecore_x_atoms_decl.h @@ -7,6 +7,7 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_STRING = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_TEXT = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_UTF8_STRING = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_WINDOW = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_PIXMAP = 0; /* dnd atoms */ EAPI Ecore_X_Atom ECORE_X_ATOM_SELECTION_PROP_XDND = 0; @@ -273,3 +274,4 @@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_SYNC_CANCEL = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_FLUSH = 0; EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_DUMP = 0; +EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_PIXMAP = 0; diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index c7b2ea2..87442bd 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c @@ -51,6 +51,7 @@ _ecore_x_atoms_init(void) { "TEXT", &ECORE_X_ATOM_TEXT }, { "UTF8_STRING", &ECORE_X_ATOM_UTF8_STRING }, { "WINDOW", &ECORE_X_ATOM_WINDOW }, + { "PIXMAP", &ECORE_X_ATOM_PIXMAP }, { "JXSelectionWindowProperty", &ECORE_X_ATOM_SELECTION_PROP_XDND }, { "XdndSelection", &ECORE_X_ATOM_SELECTION_XDND }, @@ -264,7 +265,8 @@ _ecore_x_atoms_init(void) { "_E_COMP_SYNC_CANCEL", &ECORE_X_ATOM_E_COMP_SYNC_CANCEL }, { "_E_COMP_FLUSH", &ECORE_X_ATOM_E_COMP_FLUSH }, - { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP } + { "_E_COMP_DUMP", &ECORE_X_ATOM_E_COMP_DUMP }, + { "_E_COMP_PIXMAP", &ECORE_X_ATOM_E_COMP_PIXMAP } }; Atom *atoms; char **names; diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c index 5493ca4..330f6fd 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c @@ -858,3 +858,31 @@ ecore_x_e_comp_dump_send(Ecore_X_Window win) NoEventMask, //SubstructureRedirectMask | SubstructureNotifyMask, &xev); } + +EAPI void +ecore_x_e_comp_pixmap_set(Ecore_X_Window win, Ecore_X_Pixmap pixmap) +{ + LOGFN(__FILE__, __LINE__, __FUNCTION__); + if (pixmap) + ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_DUMP, + ECORE_X_ATOM_PIXMAP, &pixmap, 1); + else + ecore_x_window_prop_property_del(win, pixmap); +} + +EAPI Ecore_X_Pixmap +ecore_x_e_comp_pixmap_get(Ecore_X_Window win) +{ + int ret = 0; + Ecore_X_Pixmap pixmap = 0; + + LOGFN(__FILE__, __LINE__, __FUNCTION__); + ret = + ecore_x_window_prop_xid_get(win, + ECORE_X_ATOM_E_COMP_DUMP, + ECORE_X_ATOM_PIXMAP, + &pixmap, 1); + if (ret != 1) return 0; + return pixmap; +} + -- 2.7.4