summaryrefslogtreecommitdiff
path: root/main/src/include/ivug-slider.h
blob: 4ca46ee763fdde7240976c88510014701e127488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/*
 * 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 __IVUG_SLIDER_H__
#define __IVUG_SLIDER_H__

#include <Elementary.h>
#include "ivug-medialist.h"
#include "ivug-drm.h"

typedef enum {
	SLIDE_STATE_NONE = 0x00,
	SLIDE_STATE_SET,	// Thumbnail is displayed.

	SLIDE_STATE_DRM_CHECKING,			// wait for drm popup

	SLIDE_STATE_READY,		// Got original media

	SLIDE_STATE_LOADING,			// Load main image or drm decryption.
	SLIDE_STATE_LOADED,				// Image is shown

// Error state
	SLIDE_STATE_NO_RIGHT,
	SLIDE_STATE_ERROR,
} slide_state_t;


typedef enum {
	SLIDE_TO_RIGHT = 0x00,
	SLIDE_TO_LEFT,
	SLIDE_INSTANTLY,
} slide_dir_t;

typedef enum {
	LONGTAP_ENDED,
	LONGTAP_CANCELED,
} longtap_state;


/*
	Slider signal list.

	"slider,clicked" : when click once
	"slider,longpressed" : when long pressed on slider
	"slider,clicked,icon" : video icon clicked.
	"slider,item,changed" :

	"slider,item,state,changed"
	"slider,item,deleted"
*/

#ifdef __cplusplus
extern "C" {
#endif

Evas_Object*
ivug_slider_add(Evas_Object* parent);

void
ivug_slider_start(Evas_Object *obj);

Eina_Bool
ivug_slider_set_medialist(Evas_Object* obj, Media_List *mList, Media_Item *current);

void
ivug_slider_set_item(Evas_Object* obj, Media_Item *item, slide_dir_t dir);

/*
	Delete current media item
*/
void
ivug_slider_delete_item(Evas_Object* obj);

Media_Item *
ivug_slider_get_item(Evas_Object* obj);

slide_state_t
ivug_slider_get_state(Evas_Object* obj);

/*
	Go background - stop animation
*/
void
ivug_slider_pause(Evas_Object* obj);

/*
	Go foreground - start animation
*/
void
ivug_slider_resume(Evas_Object* obj);

void
ivug_slider_skip(Evas_Object* obj);

bool
ivug_slider_load(Evas_Object* obj);

void
ivug_slider_dump_photocam(Evas_Object* obj);

void
ivug_slider_set_menu_visibility(Evas_Object* obj, Eina_Bool bVisible);

unsigned int
ivug_slider_zoom_level_get(Evas_Object *obj);

void
ivug_slider_zoom_in(Evas_Object *obj);

void
ivug_slider_zoom_out(Evas_Object *obj);

#ifdef __cplusplus
}
#endif


#endif	// __IVUG_SLIDER_H__