1 package org.coolreader.crengine;
2 
3 public enum ReaderCommand
4 {
5 	DCMD_NONE(0),
6 	DCMD_REPEAT(1), // repeat last action
7 
8 	//definitions from crengine/include/lvdocview.h
9 	DCMD_BEGIN(100),
10 	DCMD_LINEUP(101),
11 	DCMD_PAGEUP(102),
12 	DCMD_PAGEDOWN(103),
13 	DCMD_LINEDOWN(104),
14 	DCMD_LINK_FORWARD(105),
15 	DCMD_LINK_BACK(106),
16 	DCMD_LINK_NEXT(107),
17 	DCMD_LINK_PREV(108),
18 	DCMD_LINK_GO(109),
19 	DCMD_END(110),
20 	DCMD_GO_POS(111),
21 	DCMD_GO_PAGE(112),
22 	DCMD_ZOOM_IN(113),
23 	DCMD_ZOOM_OUT(114),
24 	DCMD_TOGGLE_TEXT_FORMAT(115),
25 	DCMD_BOOKMARK_SAVE_N(116),
26 	DCMD_BOOKMARK_GO_N(117),
27 	DCMD_MOVE_BY_CHAPTER(118),
28 	DCMD_GO_SCROLL_POS(119),
29 	DCMD_TOGGLE_PAGE_SCROLL_VIEW(120),
30 	DCMD_LINK_FIRST(121),
31 	DCMD_ROTATE_BY(122),
32 	DCMD_ROTATE_SET(123),
33 	DCMD_SAVE_HISTORY(124),
34 	DCMD_SAVE_TO_CACHE(125),
35 	DCMD_TOGGLE_BOLD(126),
36 	DCMD_SCROLL_BY(127),
37 	DCMD_REQUEST_RENDER(128),
38 	DCMD_GO_PAGE_DONT_SAVE_HISTORY(129),
39 	DCMD_SET_INTERNAL_STYLES(130),
40 
41     DCMD_SELECT_FIRST_SENTENCE(131), // select first sentence on page
42     DCMD_SELECT_NEXT_SENTENCE(132), // move selection to next sentence
43     DCMD_SELECT_PREV_SENTENCE(133), // move selection to next sentence
44     DCMD_SELECT_MOVE_LEFT_BOUND_BY_WORDS(134), // move selection start by words
45     DCMD_SELECT_MOVE_RIGHT_BOUND_BY_WORDS(135), // move selection end by words
46 
47 	DCMD_SET_TEXT_FORMAT(136),
48 
49 	DCMD_SET_DOC_FONTS(137),
50 
51 	DCMD_SET_REQUESTED_DOM_VERSION(138),
52 	DCMD_SET_RENDER_BLOCK_RENDERING_FLAGS(139),
53 
54 
55 	// definitions from android/jni/readerview.h
56 	DCMD_OPEN_RECENT_BOOK(2000),
57 	DCMD_CLOSE_BOOK(2001),
58 	DCMD_RESTORE_POSITION(2002),
59 
60 	// application actions
61 	DCMD_RECENT_BOOKS_LIST(2003),
62 	DCMD_SEARCH(2004),
63 	DCMD_EXIT(2005),
64 	DCMD_BOOKMARKS(2005),
65 	DCMD_GO_PERCENT_DIALOG(2006),
66 	DCMD_GO_PAGE_DIALOG(2007),
67 	DCMD_TOC_DIALOG(2008),
68 	DCMD_FILE_BROWSER(2009),
69 	DCMD_OPTIONS_DIALOG(2010),
70 	DCMD_TOGGLE_DAY_NIGHT_MODE(2011),
71 	DCMD_READER_MENU(2012),
72 	DCMD_TOGGLE_TOUCH_SCREEN_LOCK(2013),
73 	DCMD_TOGGLE_SELECTION_MODE(2014),
74 	DCMD_TOGGLE_ORIENTATION(2015),
75 	DCMD_TOGGLE_FULLSCREEN(2016),
76 	DCMD_SHOW_HOME_SCREEN(2017), // home screen activity
77 	DCMD_TOGGLE_DOCUMENT_STYLES(2018),
78 	DCMD_ABOUT(2019),
79 	DCMD_BOOK_INFO(2020),
80 	DCMD_TTS_PLAY(2021),
81 	DCMD_TOGGLE_TITLEBAR(2022),
82 	DCMD_SHOW_POSITION_INFO_POPUP(2023),
83 	DCMD_SHOW_DICTIONARY(2024),
84 	DCMD_OPEN_PREVIOUS_BOOK(2025),
85 	DCMD_TOGGLE_AUTOSCROLL(2026),
86 	DCMD_AUTOSCROLL_SPEED_INCREASE(2027),
87 	DCMD_AUTOSCROLL_SPEED_DECREASE(2028),
88 	DCMD_START_SELECTION(2029),
89 	DCMD_SWITCH_PROFILE(2030),
90 	DCMD_TOGGLE_TEXT_AUTOFORMAT(2031),
91 
92 	DCMD_FONT_NEXT(2032),
93 	DCMD_FONT_PREVIOUS(2033),
94 
95 	DCMD_USER_MANUAL(2034),
96 	DCMD_CURRENT_BOOK_DIRECTORY(2035),
97 
98 	DCMD_OPDS_CATALOGS(2050),
99 	DCMD_FILE_BROWSER_ROOT(2051),
100 	DCMD_FILE_BROWSER_UP(2052),
101 	DCMD_CURRENT_BOOK(2053),
102 	DCMD_SCAN_DIRECTORY_RECURSIVE(2054),
103 	DCMD_FILE_BROWSER_SORT_ORDER(2055),
104 
105 	DCMD_TOGGLE_DICT_ONCE(2056),
106 	DCMD_TOGGLE_DICT(2057),
107 
108 	DCMD_BACKLIGHT_SET_DEFAULT(2058),
109 	DCMD_SHOW_SYSTEM_BACKLIGHT_DIALOG(2059),
110 
111 	DCMD_GOOGLEDRIVE_SYNC(2100),
112 
113 	DCMD_SAVE_LOGCAT(2200),
114 	;
115 
116 	final int nativeId;
ReaderCommand( int nativeId )117 	private ReaderCommand( int nativeId )
118 	{
119 		this.nativeId = nativeId;
120 	}
121 
getNativeId()122 	public int getNativeId() {
123 		return nativeId;
124 	}
125 }