Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ec24f20b
Commit
ec24f20b
authored
Jun 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 11, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added editor mode up key implementation.
parent
b2f995a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
editor.c
dlls/mshtml/editor.c
+46
-0
No files found.
dlls/mshtml/editor.c
View file @
ec24f20b
...
...
@@ -44,8 +44,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
#define NSCMD_INDENT "cmd_indent"
#define NSCMD_INSERTHR "cmd_insertHR"
#define NSCMD_ITALIC "cmd_italic"
#define NSCMD_LINEPREVIOUS "cmd_linePrevious"
#define NSCMD_MOVEPAGEUP "cmd_movePageUp"
#define NSCMD_OL "cmd_ol"
#define NSCMD_OUTDENT "cmd_outdent"
#define NSCMD_SELECTLINEPREVIOUS "cmd_selectLinePrevious"
#define NSCMD_SELECTPAGEUP "cmd_selectPageUp"
#define NSCMD_UL "cmd_ul"
#define NSCMD_UNDERLINE "cmd_underline"
...
...
@@ -94,6 +98,18 @@ static void do_ns_command(NSContainer *This, const char *cmd, nsICommandParams *
nsICommandManager_Release
(
cmdmgr
);
}
static
void
do_ns_editor_command
(
NSContainer
*
This
,
const
char
*
cmd
)
{
nsresult
nsres
;
if
(
!
This
->
editor_controller
)
return
;
nsres
=
nsIController_DoCommand
(
This
->
editor_controller
,
cmd
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"DoCommand(%s) failed: %08x
\n
"
,
debugstr_a
(
cmd
),
nsres
);
}
static
nsresult
get_ns_command_state
(
NSContainer
*
This
,
const
char
*
cmd
,
nsICommandParams
*
nsparam
)
{
nsICommandManager
*
cmdmgr
;
...
...
@@ -550,6 +566,24 @@ static void collapse_next_char(HTMLDocument *doc, nsIDOMKeyEvent *event, BOOL ne
nsISelection_Release
(
selection
);
}
static
void
handle_arrow_key
(
HTMLDocument
*
This
,
nsIDOMKeyEvent
*
event
,
const
char
**
cmds
)
{
int
i
=
0
;
PRBool
b
;
nsIDOMKeyEvent_GetCtrlKey
(
event
,
&
b
);
if
(
b
)
i
|=
1
;
nsIDOMKeyEvent_GetShiftKey
(
event
,
&
b
);
if
(
b
)
i
|=
2
;
do_ns_editor_command
(
This
->
nscontainer
,
cmds
[
i
]);
nsIDOMKeyEvent_PreventDefault
(
event
);
}
void
handle_edit_event
(
HTMLDocument
*
This
,
nsIDOMEvent
*
event
)
{
nsIDOMKeyEvent
*
key_event
;
...
...
@@ -567,6 +601,18 @@ void handle_edit_event(HTMLDocument *This, nsIDOMEvent *event)
case
DOM_VK_RIGHT
:
TRACE
(
"right
\n
"
);
collapse_next_char
(
This
,
key_event
,
TRUE
);
break
;
case
DOM_VK_UP
:
{
static
const
char
*
cmds
[]
=
{
NSCMD_LINEPREVIOUS
,
NSCMD_MOVEPAGEUP
,
NSCMD_SELECTLINEPREVIOUS
,
NSCMD_SELECTPAGEUP
};
handle_arrow_key
(
This
,
key_event
,
cmds
);
break
;
}
};
nsIDOMKeyEvent_Release
(
key_event
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment