jdk/src/jdk.accessibility/windows/native/jaccessinspector/MessageHistory.h
author ptbrunet
Fri, 20 Nov 2015 17:54:58 -0600
changeset 34411 b46324665539
permissions -rw-r--r--
8056925: Add jaccessinspector and jaccesswalker to the bin directory Summary: Add jaccessinspector, jaccesswalker to jdk.accessibility module; update launcher in make Reviewed-by: erikj, van, prr Contributed-by: peter.brunet@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34411
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     1
/*
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     2
 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     4
 *
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    10
 *
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    15
 * accompanied this code).
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    16
 *
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    20
 *
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    23
 * questions.
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    24
 */
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    25
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    26
#ifndef __MessageHistory_H__
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    27
#define __MessageHistory_H__
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    28
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    29
#include <list>
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    30
#include <string>
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    31
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    32
class MessageHistory
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    33
{
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    34
public:
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    35
    static size_t sm_MaxMessages;
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    36
private:
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    37
    typedef std::list< std::string > stringlist;
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    38
    stringlist m_Messages;
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    39
    stringlist::const_iterator m_CurrentPosition;
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    40
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    41
public:
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    42
    void AddMessage(const char * message);
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    43
    const char * GetFirstMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    44
    const char * GetPreviousMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    45
    const char * GetNextMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    46
    const char * GetLastMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    47
    const char * GetCurrentMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    48
    const char * GetMessage(const size_t messageIndex);
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    49
    size_t GetCurrentMessageIndex();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    50
    BOOL IsFirstMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    51
    BOOL IsLastMessage();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    52
    size_t GetMessageCount();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    53
    void clear();
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    54
};
b46324665539 8056925: Add jaccessinspector and jaccesswalker to the bin directory
ptbrunet
parents:
diff changeset
    55
#endif