Merge remote-tracking branch 'origin/upstream'
authorJeonghyun Yun <jh0506.yun@samsung.com>
Wed, 29 Feb 2012 06:59:22 +0000 (01:59 -0500)
committerJeonghyun Yun <jh0506.yun@samsung.com>
Wed, 29 Feb 2012 06:59:22 +0000 (01:59 -0500)
Conflicts:
src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/xlib/ecore_x_e.c

12 files changed:
1  2 
src/lib/ecore/ecore_thread.c
src/lib/ecore_con/ecore_con_url.c
src/lib/ecore_evas/ecore_evas_buffer.c
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_x.c
src/lib/ecore_imf/Ecore_IMF.h
src/lib/ecore_imf/ecore_imf_context.c
src/lib/ecore_x/Ecore_X.h
src/lib/ecore_x/Ecore_X_Atoms.h
src/lib/ecore_x/ecore_x_atoms_decl.h
src/lib/ecore_x/xlib/ecore_x_atoms.c
src/lib/ecore_x/xlib/ecore_x_e.c

Simple merge
Simple merge
Simple merge
  extern "C" {
  #endif
  
+ /**
+  * @addtogroup Ecore_IMF_Context_Group
+  *
+  * @{
+  */
 +/* ecore_imf_context_input_panel_event_callback_add() flag */
 +typedef enum
 +{
 +   ECORE_IMF_INPUT_PANEL_STATE_EVENT,              /**< Input Panel STATE Event */
 +   ECORE_IMF_INPUT_PANEL_LANGUAGE_EVENT,           /**< Input Panel LANGUAGE Event */
 +   ECORE_IMF_INPUT_PANEL_SHIFT_MODE_EVENT,         /**< Input Panel SHIFT MODE */
 +   ECORE_IMF_INPUT_PANEL_PREDICTION_MODE_EVENT     /**< Input Panel PREDICTION MODE */
 +} Ecore_IMF_Input_Panel_Event;
 +
 +typedef enum
 +{
 +   ECORE_IMF_INPUT_PANEL_STATE_SHOW,        /**< Notification after the display of the input panel */
 +   ECORE_IMF_INPUT_PANEL_STATE_HIDE,        /**< Notification prior to the dismissal of the input panel */
 +   ECORE_IMF_INPUT_PANEL_STATE_WILL_SHOW    /**< Notification prior to the display of the input panel */
 +} Ecore_IMF_Input_Panel_State;
  
  /* Events sent by the Input Method */
  typedef struct _Ecore_IMF_Event_Preedit_Start      Ecore_IMF_Event_Preedit_Start;
@@@ -1560,107 -1564,3 +1564,106 @@@ ecore_imf_context_input_panel_caps_lock
     return ctx->input_panel_caps_lock_mode;
  }
  
 +/**
 + * Get the position of the current active input panel.
 + *
 + * @param ctx An #Ecore_IMF_Context.
 + * @param x top-left x co-ordinate of the input panel
 + * @param y top-left y co-ordinate of the input panel
 + * @param w width of the input panel
 + * @param h height of the input panel
 + * @ingroup Ecore_IMF_Context_Group
 + * @since 1.2.0
 + */
 +EAPI void
 +ecore_imf_context_input_panel_geometry_get(Ecore_IMF_Context *ctx, int *x, int *y, int *w, int *h)
 +{
 +   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
 +     {
 +        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
 +                         "ecore_imf_context_input_panel_geometry_get");
 +        return;
 +     }
 +
 +   if (ctx->klass->input_panel_geometry_get)
 +     ctx->klass->input_panel_geometry_get(ctx, x, y, w, h);
 +}
 +
 +/**
 + * Get state of current active input panel.
 + *
 + * @param ctx An #Ecore_IMF_Context.
 + * @param The state of input panel.
 + * @ingroup Ecore_IMF_Context_Group
 + * @since 1.2.0
 + */
 +EAPI Ecore_IMF_Input_Panel_State
 +ecore_imf_context_input_panel_state_get(Ecore_IMF_Context *ctx)
 +{
 +   Ecore_IMF_Input_Panel_State state = ECORE_IMF_INPUT_PANEL_STATE_HIDE;
 +   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
 +     {
 +        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
 +                         "ecore_imf_context_input_panel_state_get");
 +        return ECORE_IMF_INPUT_PANEL_STATE_HIDE;
 +     }
 +
 +   if (ctx->klass->input_panel_state_get)
 +     state = ctx->klass->input_panel_state_get(ctx);
 +
 +   return state;
 +}
 +
 +/**
 + * Register a callback function which will be called if there is change in input panel state,language,mode etc.
 + * In order to deregister the callback function 
 + * Use @ref ecore_imf_context_input_panel_event_callback_del.
 + *
 + * @param ctx An #Ecore_IMF_Context
 + * @param type event type
 + * @param func the callback function
 + * @param data application-input panel specific data.
 + * @ingroup Ecore_IMF_Context_Group
 + * @since 1.2.0
 + */
 +EAPI void
 +ecore_imf_context_input_panel_event_callback_add(Ecore_IMF_Context *ctx,
 +                                                 Ecore_IMF_Input_Panel_Event type,
 +                                                 void (*func) (void *data, Ecore_IMF_Context *ctx, int value),
 +                                                 const void *data)
 +{
 +   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
 +     {
 +        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
 +                         "ecore_imf_context_input_panel_event_callback_add");
 +        return;
 +     }
 +
 +   if (ctx->klass->input_panel_event_callback_add)
 +     ctx->klass->input_panel_event_callback_add(ctx, type, func, (void *)data);
 +}
 +
 +/**
 + * Unregister a callback function which will be called if there is change in input panel state, language, mode etc.
 + *
 + * @param ctx An #Ecore_IMF_Context.
 + * @param func the callback function
 + * @param data application-input panel specific data.
 + * @ingroup Ecore_IMF_Context_Group
 + * @since 1.2.0
 + */
 +EAPI void
 +ecore_imf_context_input_panel_event_callback_del(Ecore_IMF_Context *ctx,
 +                                                 Ecore_IMF_Input_Panel_Event type,
 +                                                 void (*func) (void *data, Ecore_IMF_Context *ctx, int value))
 +{
 +   if (!ECORE_MAGIC_CHECK(ctx, ECORE_MAGIC_CONTEXT))
 +     {
 +        ECORE_MAGIC_FAIL(ctx, ECORE_MAGIC_CONTEXT,
 +                         "ecore_imf_context_input_panel_event_callback_del");
 +        return;
 +     }
 +
 +   if (ctx->klass->input_panel_event_callback_del)
 +     ctx->klass->input_panel_event_callback_del(ctx, type, func);
 +}
@@@ -3700,20 -3650,14 +3726,28 @@@ ecore_x_gesture_event_ungrab(Ecore_X_Wi
                               Ecore_X_Gesture_Event_Type type,
                               int num_fingers);
  
 +/* Illume window states */
 +typedef enum _Ecore_X_Illume_Window_State
 +{
 +   ECORE_X_ILLUME_WINDOW_STATE_NORMAL = 0,
 +   ECORE_X_ILLUME_WINDOW_STATE_INSET
 +} Ecore_X_Illume_Window_State;
 +
 +EAPI void
 +ecore_x_e_illume_window_state_set(Ecore_X_Window win,
 +                                  Ecore_X_Illume_Window_State state);
 +
 +EAPI Ecore_X_Illume_Window_State
 +ecore_x_e_illume_window_state_get(Ecore_X_Window win);
 +
+ EAPI void
+ ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
+                                      Ecore_X_Illume_Indicator_State state);
+ EAPI Ecore_X_Illume_Indicator_State
+ ecore_x_e_illume_indicator_state_get(Ecore_X_Window win);
+ EAPI void
+ ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
+                                       Ecore_X_Illume_Indicator_State state);
  #ifdef __cplusplus
  }
  #endif // ifdef __cplusplus
Simple merge
@@@ -276,15 -279,6 +279,14 @@@ EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_F
  EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_DUMP = 0;
  EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_PIXMAP = 0;
  
- EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_USER_CREATED_WINDOW = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_PARENT_BORDER_WINDOW = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_AVAILABLE_ANGLE = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_OPERATOR = 0;
 +EAPI Ecore_X_Atom ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE = 0;
 +
  /* currently Emotion and E17 specific extension */
  EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_PARENT = 0;
  EAPI Ecore_X_Atom ECORE_X_ATOM_E_VIDEO_POSITION = 0;
Simple merge
@@@ -1135,113 -1058,69 +1135,179 @@@ ecore_x_e_comp_pixmap_get(Ecore_X_Windo
     return pixmap;
  }
  
 +EAPI void
 +ecore_x_e_comp_dri_buff_flip_supported_set(Ecore_X_Window root, Eina_Bool enabled)
 +{
 +  Ecore_X_Window win;
 +  
 +  if (!root) root = DefaultRootWindow(_ecore_x_disp);
 +  LOGFN(__FILE__, __LINE__, __FUNCTION__);
 +  if (enabled)
 +    {
 +      win = ecore_x_window_new(root, 1, 2, 3, 4);
 +      ecore_x_window_prop_xid_set(win, ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED,
 +                                  ECORE_X_ATOM_WINDOW, &win, 1);
 +      ecore_x_window_prop_xid_set(root, ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED,
 +                                  ECORE_X_ATOM_WINDOW, &win, 1);
 +    }
 +  else
 +    {
 +      int ret =
 +        ecore_x_window_prop_xid_get(root,
 +                                    ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED,
 +                                    ECORE_X_ATOM_WINDOW,
 +                                    &win, 1);
 +      if ((ret == 1) && (win))
 +        {
 +          ecore_x_window_prop_property_del(root, ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED);
 +          ecore_x_window_free(win);
 +        }
 +    }
 +}
 +
 +EAPI Eina_Bool
 +ecore_x_e_comp_dri_buff_flip_supported_get(Ecore_X_Window root)
 +{
 +  Ecore_X_Window win, win2;
 +  int ret;
 +  
 +  LOGFN(__FILE__, __LINE__, __FUNCTION__);
 +  if (!root) root = DefaultRootWindow(_ecore_x_disp);
 +  ret =
 +    ecore_x_window_prop_xid_get(root,
 +                                ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED,
 +                                ECORE_X_ATOM_WINDOW,
 +                                &win, 1);
 +  if ((ret == 1) && (win))
 +    {
 +      ret =
 +        ecore_x_window_prop_xid_get(win,
 +                                    ECORE_X_ATOM_E_COMP_DRI_BUFF_FLIP_SUPPORTED,
 +                                    ECORE_X_ATOM_WINDOW,
 +                                    &win2, 1);
 +      if ((ret == 1) && (win2 == win)) return EINA_TRUE;
 +    }
 +  return EINA_FALSE;
 +}
 +
  static Ecore_X_Atom
+ _ecore_x_e_indicator_atom_get(Ecore_X_Illume_Indicator_State state)
+ {
+    switch (state)
+      {
+       case ECORE_X_ILLUME_INDICATOR_STATE_ON:
+         return ECORE_X_ATOM_E_ILLUME_INDICATOR_ON;
+       case ECORE_X_ILLUME_INDICATOR_STATE_OFF:
+         return ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF;
+       default:
+         break;
+      }
+    return 0;
+ }
+ static Ecore_X_Illume_Indicator_State
+ _ecore_x_e_indicator_state_get(Ecore_X_Atom atom)
+ {
+    if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_ON)
+      return ECORE_X_ILLUME_INDICATOR_STATE_ON;
+    if (atom == ECORE_X_ATOM_E_ILLUME_INDICATOR_OFF)
+      return ECORE_X_ILLUME_INDICATOR_STATE_OFF;
+    return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
+ }
+ EAPI void
+ ecore_x_e_illume_indicator_state_set(Ecore_X_Window win,
+                                      Ecore_X_Illume_Indicator_State state)
+ {
+    Ecore_X_Atom atom = 0;
+    LOGFN(__FILE__, __LINE__, __FUNCTION__);
+    atom = _ecore_x_e_indicator_atom_get(state);
+    ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
+                                 &atom, 1);
+ }
+ EAPI Ecore_X_Illume_Indicator_State
+ ecore_x_e_illume_indicator_state_get(Ecore_X_Window win)
+ {
+    Ecore_X_Atom atom;
+    LOGFN(__FILE__, __LINE__, __FUNCTION__);
+    if (!ecore_x_window_prop_atom_get(win,
+                                      ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
+                                      &atom, 1))
+      return ECORE_X_ILLUME_INDICATOR_STATE_UNKNOWN;
+    return _ecore_x_e_indicator_state_get(atom);
+ }
+ EAPI void
+ ecore_x_e_illume_indicator_state_send(Ecore_X_Window win,
+                                       Ecore_X_Illume_Indicator_State state)
+ {
+    LOGFN(__FILE__, __LINE__, __FUNCTION__);
+    ecore_x_client_message32_send(win, ECORE_X_ATOM_E_ILLUME_INDICATOR_STATE,
+                                  ECORE_X_EVENT_MASK_WINDOW_CONFIGURE,
+                                  _ecore_x_e_indicator_atom_get(state),
+                                  0, 0, 0, 0);
+ }
++static Ecore_X_Atom
 +_ecore_x_e_illume_window_state_atom_get(Ecore_X_Illume_Window_State state)
 +{
 +   switch (state)
 +     {
 +      case ECORE_X_ILLUME_WINDOW_STATE_NORMAL:
 +        return ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_NORMAL;
 +
 +      case ECORE_X_ILLUME_WINDOW_STATE_INSET:
 +        return ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_INSET;
 +
 +      default:
 +        break;
 +     }
 +   return 0;
 +}
 +
 +static Ecore_X_Illume_Window_State
 +_ecore_x_e_illume_window_state_get(Ecore_X_Atom atom)
 +{
 +   if (atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_NORMAL)
 +     return ECORE_X_ILLUME_WINDOW_STATE_NORMAL;
 +
 +   if (atom == ECORE_X_ATOM_E_ILLUME_WINDOW_STATE_INSET)
 +     return ECORE_X_ILLUME_WINDOW_STATE_INSET;
 +
 +   return ECORE_X_ILLUME_WINDOW_STATE_NORMAL;
 +}
 +
 +EAPI void
 +ecore_x_e_illume_window_state_set(Ecore_X_Window win,
 +                                  Ecore_X_Illume_Window_State state)
 +{
 +   Ecore_X_Atom atom = 0;
 +
 +   LOGFN(__FILE__, __LINE__, __FUNCTION__);
 +   atom = _ecore_x_e_illume_window_state_atom_get(state);
 +   ecore_x_window_prop_atom_set(win, ECORE_X_ATOM_E_ILLUME_WINDOW_STATE,
 +                                &atom, 1);
 +}
 +
 +EAPI Ecore_X_Illume_Window_State
 +ecore_x_e_illume_window_state_get(Ecore_X_Window win)
 +{
 +   Ecore_X_Atom atom;
 +
 +   LOGFN(__FILE__, __LINE__, __FUNCTION__);
 +   if (!ecore_x_window_prop_atom_get(win,
 +                                     ECORE_X_ATOM_E_ILLUME_WINDOW_STATE,
 +                                     &atom, 1))
 +     return ECORE_X_ILLUME_WINDOW_STATE_NORMAL;
 +
 +   return _ecore_x_e_illume_window_state_get(atom);
 +}
 +