xref: /aosp_15_r20/external/pdfium/testing/command_line_helpers.h (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2022 The PDFium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef TESTING_COMMAND_LINE_HELPERS_H_
6 #define TESTING_COMMAND_LINE_HELPERS_H_
7 
8 #include <string>
9 
10 #include "public/fpdfview.h"
11 
12 // Extract the value from a keyed command line argument.
13 // `arg` is expected to be "--key=value", and `key` is "--key=".
14 bool ParseSwitchKeyValue(const std::string& arg,
15                          const std::string& key,
16                          std::string* value);
17 
18 // Identifies the compile-time default 2D graphics library to use for rendering
19 // to FPDF_BITMAPs. Used as part of support to override the renderer at runtime
20 // based upon command line options.
21 FPDF_RENDERER_TYPE GetDefaultRendererType();
22 
23 #endif  // TESTING_COMMAND_LINE_HELPERS_H_
24