diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to 'libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c')
-rw-r--r-- | libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c | 236 |
1 files changed, 236 insertions, 0 deletions
diff --git a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c index c868f5e..60bfc9c 100644 --- a/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c +++ b/libraries/ecore/src/lib/ecore_x/xcb/ecore_xcb_e.c | |||
@@ -7,6 +7,8 @@ static Ecore_X_Atom _ecore_xcb_e_quickpanel_atom_get(Ecore_X_ | |||
7 | static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom); | 7 | static Ecore_X_Illume_Quickpanel_State _ecore_xcb_e_quickpanel_state_get(Ecore_X_Atom atom); |
8 | static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode); | 8 | static Ecore_X_Atom _ecore_xcb_e_illume_atom_get(Ecore_X_Illume_Mode mode); |
9 | static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom); | 9 | static Ecore_X_Illume_Mode _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom); |
10 | static Ecore_X_Atom _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state); | ||
11 | static Ecore_X_Illume_Indicator_State _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom); | ||
10 | 12 | ||
11 | EAPI void | 13 | EAPI void |
12 | ecore_x_e_init(void) | 14 | ecore_x_e_init(void) |
@@ -719,6 +721,99 @@ ecore_x_e_illume_quickpanel_state_toggle(Ecore_X_Window win) | |||
719 | 0, 0, 0, 0, 0); | 721 | 0, 0, 0, 0, 0); |
720 | } | 722 | } |
721 | 723 | ||
724 | static Ecore_X_Atom | ||
725 | _ecore_xcb_e_clipboard_atom_get(Ecore_X_Illume_Clipboard_State state) | ||
726 | { | ||
727 | switch (state) | ||
728 | { | ||
729 | case ECORE_X_ILLUME_CLIPBOARD_STATE_ON: | ||
730 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON; | ||
731 | case ECORE_X_ILLUME_CLIPBOARD_STATE_OFF: | ||
732 | return ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF; | ||
733 | default: | ||
734 | break; | ||
735 | } | ||
736 | return 0; | ||
737 | } | ||
738 | |||
739 | static Ecore_X_Illume_Clipboard_State | ||
740 | _ecore_xcb_e_clipboard_state_get(Ecore_X_Atom atom) | ||
741 | { | ||
742 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_ON) | ||
743 | return ECORE_X_ILLUME_CLIPBOARD_STATE_ON; | ||
744 | |||
745 | if (atom == ECORE_X_ATOM_E_ILLUME_CLIPBOARD_OFF) | ||
746 | return ECORE_X_ILLUME_CLIPBOARD_STATE_OFF; | ||
747 | |||
748 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
749 | } | ||
750 | |||
751 | EAPI void | ||
752 | ecore_x_e_illume_clipboard_state_set(Ecore_X_Window win, | ||
753 | Ecore_X_Illume_Clipboard_State state) | ||
754 | { | ||
755 | Ecore_X_Atom atom = 0; | ||
756 | |||
757 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
758 | atom = _ecore_xcb_e_clipboard_atom_get(state); | ||
759 | |||
760 | ecore_x_window_prop_atom_set(win, | ||
761 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
762 | &atom, 1); | ||
763 | } | ||
764 | |||
765 | EAPI Ecore_X_Illume_Clipboard_State | ||
766 | ecore_x_e_illume_clipboard_state_get(Ecore_X_Window win) | ||
767 | { | ||
768 | Ecore_X_Atom atom = 0; | ||
769 | |||
770 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
771 | |||
772 | if (!ecore_x_window_prop_atom_get(win, | ||
773 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_STATE, | ||
774 | &atom, 1)) | ||
775 | return ECORE_X_ILLUME_CLIPBOARD_STATE_UNKNOWN; | ||
776 | return _ecore_xcb_e_clipboard_state_get(atom); | ||
777 | } | ||
778 | |||
779 | EAPI void | ||
780 | ecore_x_e_illume_clipboard_geometry_set(Ecore_X_Window win, | ||
781 | int x, int y, int w, int h) | ||
782 | { | ||
783 | unsigned int geom[4]; | ||
784 | |||
785 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
786 | geom[0] = x; | ||
787 | geom[1] = y; | ||
788 | geom[2] = w; | ||
789 | geom[3] = h; | ||
790 | ecore_x_window_prop_card32_set(win, | ||
791 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
792 | geom, 4); | ||
793 | } | ||
794 | |||
795 | EAPI Eina_Bool | ||
796 | ecore_x_e_illume_clipboard_geometry_get(Ecore_X_Window win, | ||
797 | int *x, int *y, int *w, int *h) | ||
798 | { | ||
799 | int ret = 0; | ||
800 | unsigned int geom[4]; | ||
801 | |||
802 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
803 | ret = | ||
804 | ecore_x_window_prop_card32_get(win, | ||
805 | ECORE_X_ATOM_E_ILLUME_CLIPBOARD_GEOMETRY, | ||
806 | geom, 4); | ||
807 | if (ret != 4) return EINA_FALSE; | ||
808 | |||
809 | if (x) *x = geom[0]; | ||
810 | if (y) *y = geom[1]; | ||
811 | if (w) *w = geom[2]; | ||
812 | if (h) *h = geom[3]; | ||
813 | |||
814 | return EINA_TRUE; | ||
815 | } | ||
816 | |||
722 | EAPI void | 817 | EAPI void |
723 | ecore_x_e_illume_mode_set(Ecore_X_Window win, | 818 | ecore_x_e_illume_mode_set(Ecore_X_Window win, |
724 | Ecore_X_Illume_Mode mode) | 819 | Ecore_X_Illume_Mode mode) |
@@ -1069,3 +1164,144 @@ _ecore_xcb_e_illume_mode_get(Ecore_X_Atom atom) | |||
1069 | return ECORE_X_ILLUME_MODE_UNKNOWN; | 1164 | return ECORE_X_ILLUME_MODE_UNKNOWN; |
1070 | } | 1165 | } |
1071 | 1166 | ||
1167 | static Ecore_X_Atom | ||
1168 | _ecore_xcb_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state) | ||
1169 | { | ||
1170 | switch (state) | ||
1171 | { | ||
1172 | case ECORE_X_ILLUME_INDICATOR_STATE_ON: | ||
1173 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON; | ||
1174 | |||
1175 | case ECORE_X_ILLUME_INDICATOR_STATE_OFF: | ||
1176 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF; | ||
1177 | |||
1178 | default: | ||
1179 | break; | ||
1180 | } | ||
1181 | return 0; | ||
1182 | } | ||
1183 | |||
1184 | static Ecore_X_Illume_Indicator_State | ||
1185 | _ecore_xcb_e_indicator_state_get(Ecore_X_Atom atom) | ||
1186 | { | ||
1187 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON) | ||
1188 | return ECORE_X_ILLUME_INDICATOR_STATE_ON; | ||
1189 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF) | ||
1190 | return ECORE_X_ILLUME_INDICATOR_STATE_OFF; | ||
1191 | |||
1192 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1193 | } | ||
1194 | |||
1195 | EAPI void | ||
1196 | ecore_x_e_illume_indicator_state_set(Ecore_X_Window win, | ||
1197 | Ecore_X_Illume_Indicator_State state) | ||
1198 | { | ||
1199 | Ecore_X_Atom atom = 0; | ||
1200 | |||
1201 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1202 | |||
1203 | atom = _ecore_xcb_e_indicator_atom_get(state); | ||
1204 | ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1205 | &atom, 1); | ||
1206 | } | ||
1207 | |||
1208 | EAPI Ecore_X_Illume_Indicator_State | ||
1209 | ecore_x_e_illume_indicator_state_get(Ecore_X_Window win) | ||
1210 | { | ||
1211 | Ecore_X_Atom atom = 0; | ||
1212 | |||
1213 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1214 | |||
1215 | if (!ecore_x_window_prop_atom_get(win, | ||
1216 | ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1217 | &atom, 1)) | ||
1218 | return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN; | ||
1219 | |||
1220 | return _ecore_xcb_e_indicator_state_get(atom); | ||
1221 | } | ||
1222 | |||
1223 | EAPI void | ||
1224 | ecore_x_e_illume_indicator_state_send(Ecore_X_Window win, | ||
1225 | Ecore_X_Illume_Indicator_State state) | ||
1226 | { | ||
1227 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1228 | ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE, | ||
1229 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1230 | _ecore_xcb_e_indicator_atom_get(state), | ||
1231 | 0, 0, 0, 0); | ||
1232 | } | ||
1233 | |||
1234 | static Ecore_X_Atom | ||
1235 | _ecore_x_e_indicator_opacity_atom_get(Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1236 | { | ||
1237 | switch (mode) | ||
1238 | { | ||
1239 | case ECORE_X_ILLUME_INDICATOR_OPAQUE: | ||
1240 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE; | ||
1241 | |||
1242 | case ECORE_X_ILLUME_INDICATOR_TRANSLUCENT: | ||
1243 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT; | ||
1244 | |||
1245 | case ECORE_X_ILLUME_INDICATOR_TRANSPARENT: | ||
1246 | return ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT; | ||
1247 | |||
1248 | default: | ||
1249 | break; | ||
1250 | } | ||
1251 | return 0; | ||
1252 | } | ||
1253 | |||
1254 | static Ecore_X_Illume_Indicator_Opacity_Mode | ||
1255 | _ecore_x_e_indicator_opacity_get(Ecore_X_Atom atom) | ||
1256 | { | ||
1257 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPAQUE) | ||
1258 | return ECORE_X_ILLUME_INDICATOR_OPAQUE; | ||
1259 | |||
1260 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT) | ||
1261 | return ECORE_X_ILLUME_INDICATOR_TRANSLUCENT; | ||
1262 | |||
1263 | if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT) | ||
1264 | return ECORE_X_ILLUME_INDICATOR_TRANSPARENT; | ||
1265 | |||
1266 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1267 | } | ||
1268 | |||
1269 | EAPI void | ||
1270 | ecore_x_e_illume_indicator_opacity_set(Ecore_X_Window win, | ||
1271 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1272 | { | ||
1273 | Ecore_X_Atom atom = 0; | ||
1274 | |||
1275 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1276 | atom = _ecore_x_e_indicator_opacity_atom_get(mode); | ||
1277 | ecore_x_window_prop_atom_set(win, | ||
1278 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1279 | &atom, 1); | ||
1280 | } | ||
1281 | |||
1282 | EAPI Ecore_X_Illume_Indicator_Opacity_Mode | ||
1283 | ecore_x_e_illume_indicator_opacity_get(Ecore_X_Window win) | ||
1284 | { | ||
1285 | Ecore_X_Atom atom; | ||
1286 | |||
1287 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1288 | if (!ecore_x_window_prop_atom_get(win, | ||
1289 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1290 | &atom, 1)) | ||
1291 | return ECORE_X_ILLUME_INDICATOR_OPACITY_UNKNOWN; | ||
1292 | |||
1293 | return _ecore_x_e_indicator_opacity_get(atom); | ||
1294 | } | ||
1295 | |||
1296 | EAPI void | ||
1297 | ecore_x_e_illume_indicator_opacity_send(Ecore_X_Window win, | ||
1298 | Ecore_X_Illume_Indicator_Opacity_Mode mode) | ||
1299 | { | ||
1300 | LOGFN(__FILE__, __LINE__, __FUNCTION__); | ||
1301 | ecore_x_client_message32_send(win, | ||
1302 | ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE, | ||
1303 | ECORE_X_EVENT_MASK_WINDOW_CONFIGURE, | ||
1304 | _ecore_x_e_indicator_opacity_atom_get(mode), | ||
1305 | 0, 0, 0, 0); | ||
1306 | } | ||
1307 | |||