[cbhm] License is changed to Flora License
[framework/uifw/cbhm.git] / src / clipdrawer.h
index f5a5f12..3a439d2 100644 (file)
@@ -1,36 +1,69 @@
-#ifndef _clipdrawer_h_
-#define _clipdrawer_h_
-
-#define CLIPDRAWER_POS_X 0
-#define CLIPDRAWER_POS_Y 440
-#define CLIPDRAWER_WIDTH 480
-#define CLIPDRAWER_HEIGHT 360
-#define CLIPDRAWER_HEIGHT_LANDSCAPE 288
-#define SCREEN_WIDTH 480
-#define SCREEN_HEIGHT 800
-
-enum {
-       GI_TEXT = 0,
-       GI_IMAGE,
-
-       GI_MAX_ITEMS,
+/*
+ * Copyright 2012  Samsung Electronics Co., Ltd
+
+ * Licensed under the Flora License, Version 1.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+
+ * http://www.tizenopensource.org/license
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef _CLIPDRAWER_H_
+#define _CLIPDRAWER_H_
+
+#include <Ecore_X.h>
+#include <Elementary.h>
+
+typedef enum _AnimStatus AnimStatus;
+enum _AnimStatus {
+       STATUS_NONE = 0,
+       SHOW_ANIM,
+       HIDE_ANIM
 };
 
-/* view maintains */
-int clipdrawer_init(void *data);
-int clipdrawer_create_view(void *data);
-void clipdrawer_activate_view(void *data);
-//void clipdrawer_hide_view(void *data);
-void clipdrawer_lower_view(void *data);
+struct _ClipdrawerData {
+       Evas_Object *main_win;
+       Ecore_X_Window x_main_win;
+       Evas_Object *gengrid;
+       Evas_Object *main_layout;
+       Elm_Gengrid_Item_Class gic;
+       Evas_Object *popup;
 
-void set_rotation_to_clipdrawer(void *data);
+       int o_degree;
+
+       int root_w;
+       int root_h;
+
+       int height;
+       int landscape_height;
+       int grid_item_w;
+       int grid_item_h;
+
+       Ecore_Event_Handler *keydown_handler;
+       Evas *evas;
+
+       Ecore_Timer *anim_timer;
+       AnimStatus anim_status;
+       int anim_count;
+       Eina_Bool paste_text_only:1;
+};
 
-const char* clipdrawer_get_plain_string_from_escaped(char *escstr);
+#include "cbhm.h"
 
-char *clipdrawer_get_item_data(void *data, int pos);
-int clipdrawer_add_item(char *idata, int type);
+Eina_Bool delete_mode;
 
-void clipdrawer_paste_textonly_set(void *data, Eina_Bool textonly);
-Eina_Bool clipdrawer_paste_textonly_get(void *data);
+void set_rotation_to_clipdrawer(ClipdrawerData *ad);
+void clipdrawer_activate_view(AppData* ad);
+void clipdrawer_lower_view(AppData* ad);
+ClipdrawerData *init_clipdrawer(AppData *ad);
+void depose_clipdrawer(ClipdrawerData *cd);
+void _delete_mode_set(AppData *ad, Eina_Bool del_mode);
 
-#endif // _clipdrawer_h_
+#endif // _CLIPDRAWER_H_