-Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
+libslp-utilx (0.1.7-3) unstable; urgency=low
+
+ * Change code to use internal atom for indicator according to EFL 1.0 upgrade
+ * Git: slp/pkgs/l/libslp-utilx
+ * Tag: libslp-utilx_0.1.7-3
+
+ -- Doyoun Kang <doyoun.kang@samsung.com> Tue, 13 Mar 2012 10:27:51 +0900
+
libslp-utilx (0.1.7-2) unstable; urgency=low
- * Add a key string (KEY_MEDIA) for Earset multimedia key
+ * Add a key string (KEY_MEDIA) for Earset multimedia key
* Git: slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.7-2
libslp-utilx (0.1.5-1) unstable; urgency=low
* Changed the boilerplate of sources
- * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
+ * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.5-1
-- Doyoun Kang <doyoun.kang@samsung.com> Thu, 20 Oct 2011 15:36:18 +0900
* Bug fix in utilx_grab_key() for OR_EXCLUSIVE_GRAB mode
* Add an API:utilx_get_key_status()
- * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
+ * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.5-0
-- Sung-Jin Park <sj76.park@samsung.com> Thu, 13 Oct 2011 16:01:50 +0900
libslp-utilx (0.1.4-1) unstable; urgency=low
* Add key symbol strings for Earjack/BT Headset/Multimedia keys
- * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
+ * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.4-1
-- Sung-Jin Park <sj76.park@samsung.com> Tue, 11 Oct 2011 09:53:48 +0900
libslp-utilx (0.1.4-0) unstable; urgency=low
- * Add a API - utilx_get_system_notification_level
- * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
+ * Add a API - utilx_get_system_notification_level
+ * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.4-0
-- Doyoun Kang <doyoun.kang@samsung.com> Tue, 04 Oct 2011 12:37:05 +0900
libslp-utilx (0.1.3-1) unstable; urgency=low
- * Add overrridable EXCLUSIVE_GRAB mode (OR_EXCLUSIVE_GRAB) in utilx_grab_key()/utilx_ungrab_key()
- * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
- * Tag: libslp-utilx_0.1.3-1
+ * Add overrridable EXCLUSIVE_GRAB mode (OR_EXCLUSIVE_GRAB) in utilx_grab_key()/utilx_ungrab_key()
+ * Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
+ * Tag: libslp-utilx_0.1.3-1
-- Sung-Jin Park <sj76.park@samsung.com> Wed, 21 Sep 2011 15:26:16 +0900
libslp-utilx (0.1.1-18) unstable; urgency=low
- * [COMP] change effect type, effect style's enum string more clearly.
+ * [COMP] change effect type, effect style's enum string more clearly.
* Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.1-18
libslp-utilx (0.1.1-17) unstable; urgency=low
- * [COMP] add custom effect related api
+ * [COMP] add custom effect related api
* Git: 165.213.180.234:slp/pkgs/l/libslp-utilx
* Tag: libslp-utilx_0.1.1-17
libslp-utilx (0.1.1-9) unstable; urgency=low
- * [COMP] change window effect related name
+ * [COMP] change window effect related name
* Git: 165.213.180.234:/git/slp/pkgs/libslp-utilx
* Tag: libslp-utilx_0.1.1-9
libslp-utilx (0.1.1-8) unstable; urgency=low
- * 1. Update documentation
+ * 1. Update documentation
2. Add boilerplate in source files
- 3. Add COPYING,AUTHORS files
+ 3. Add COPYING,AUTHORS files
4. Remedy debian/copyright file
5. Remove test directory
* Git: 165.213.180.234:/git/slp/pkgs/libslp-utilx
libslp-utilx (0.1.1-6) unstable; urgency=low
- * [COMP] add XSync when effect property is changed.
+ * [COMP] add XSync when effect property is changed.
* Git: 165.213.180.234:/git/slp/pkgs/libslp-utilx
* Tag: libslp-utilx_0.1.1-6
libslp-utilx (0.1.1-4) unstable; urgency=low
- * [COMP] Add Feature : set/get window effect state and set fake launch effect
+ * [COMP] Add Feature : set/get window effect state and set fake launch effect
* Git: 165.213.180.234:/git/slp/pkgs/libslp-utilx
* Tag: libslp-utilx_0.1.1-4
Version: 0.1.7
Release: 1.1
Group: System/Libraries
-License: SAMSUNG
+License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
/*
* libslp-utilx
*
- Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
static Atom _atom_notification_level = None;
static Atom _atom_indicator_visible_state = None;
+static Atom _atom_indicator_visible_state_on = None;
+static Atom _atom_indicator_visible_state_off = None;
static Atom _atom_comp_effect_state = None;
static Atom _atom_comp_fake_launch = None;
static Atom _utilx_convert_style_to_atom( Display* dpy, Utilx_Effect_Style style );
static Utilx_Effect_Style _utilx_convert_atom_to_style( Display* dpy, Atom style );
+static int _utilx_get_indicator_atoms(Display *dpy);
+
API void utilx_set_system_notification_level (Display* dpy, Window win, Utilx_Notification_Level level)
{
UTILX_TRACE ("[UTILX] utilx_set_system_notification_level... win = %x, level = %d\n", win, level);
return noti_level;
}
+static int _utilx_get_indicator_atoms(Display *dpy)
+{
+ if (!_atom_indicator_visible_state)
+ {
+ _atom_indicator_visible_state = XInternAtom (dpy, "_E_ILLUME_INDICATOR_STATE", False);
+ if (!_atom_indicator_visible_state)
+ {
+ fprintf (stderr, "[UTILX] Error.. Cannot create _E_ILLUME_INDICATOR_STATE atom.. %s (%d)\n", __func__, __LINE__);
+ return 0;
+ }
+ }
+
+ if (!_atom_indicator_visible_state_on)
+ {
+ _atom_indicator_visible_state_on = XInternAtom (dpy, "_E_ILLUME_INDICATOR_ON", False);
+ if (!_atom_indicator_visible_state_on)
+ {
+ fprintf (stderr, "[UTILX] Error.. Cannot create _E_ILLUME_INDICATOR_ON atom.. %s (%d)\n", __func__, __LINE__);
+ return 0;
+ }
+ }
+
+ if (!_atom_indicator_visible_state_off)
+ {
+ _atom_indicator_visible_state_off = XInternAtom (dpy, "_E_ILLUME_INDICATOR_OFF", False);
+ if (!_atom_indicator_visible_state_off)
+ {
+ fprintf (stderr, "[UTILX] Error.. Cannot create _E_ILLUME_INDICATOR_OFF atom.. %s (%d)\n", __func__, __LINE__);
+ return 0;
+ }
+ }
+
+ return 1;
+}
API void utilx_enable_indicator (Display* dpy, Window win, int enable)
{
return;
}
- if (!_atom_indicator_visible_state)
+ if (!_utilx_get_indicator_atoms(dpy))
{
- _atom_indicator_visible_state = XInternAtom (dpy, "_E_ILLUME_INDICATOR_STATE", False);
- if (!_atom_indicator_visible_state)
- {
- fprintf (stderr, "[UTILX] Error.. Cannot create _E_ILLUME_INDICATOR_STATE atom.. %s (%d)\n", __func__, __LINE__);
- return;
- }
+ fprintf (stderr, "[UTILX] Error.. Cannot create atoms.. %s (%d)\n", __func__, __LINE__);
+ return;
}
- _utilx_set_window_property (dpy, win, _atom_indicator_visible_state, XA_CARDINAL,
- (unsigned int *)&enable, 1);
+ if (enable == 1)
+ {
+ _utilx_set_window_property (dpy, win, _atom_indicator_visible_state, XA_ATOM,
+ (unsigned int *)&_atom_indicator_visible_state_on, 1);
+ }
+ else
+ {
+ _utilx_set_window_property (dpy, win, _atom_indicator_visible_state, XA_ATOM,
+ (unsigned int *)&_atom_indicator_visible_state_off, 1);
+ }
}
UTILX_TRACE ("[UTILX] utilx_indicator_set_visible_state... win = %x, show_state = %d\n", win, enable);
int ret;
- int state;
+ Atom state;
if (dpy == NULL)
{
return -1;
}
- if (!_atom_indicator_visible_state)
+ if (!_utilx_get_indicator_atoms(dpy))
{
- _atom_indicator_visible_state = XInternAtom (dpy, "_E_ILLUME_INDICATOR_STATE", False);
- if (!_atom_indicator_visible_state)
- {
- fprintf (stderr, "[UTILX] Error.. Cannot create _E_ILLUME_INDICATOR_STATE atom.. %s (%d)\n", __func__, __LINE__);
- return -1;
- }
+ fprintf (stderr, "[UTILX] Error.. Cannot create atoms.. %s (%d)\n", __func__, __LINE__);
+ return;
}
- ret = _utilx_get_window_property (dpy, win, _atom_indicator_visible_state, XA_CARDINAL,
+ ret = _utilx_get_window_property (dpy, win, _atom_indicator_visible_state, XA_ATOM,
(unsigned int *)&state, 1);
if (ret > 0)
- return state;
+ {
+ if (state == _atom_indicator_visible_state_on)
+ return 1;
+ else if (state == _atom_indicator_visible_state_off)
+ return 0;
+ else
+ return -1;
+ }
else
return -1;
}