resolution.h (1713B)
1/* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20#ifndef GUAC_RDP_RESOLUTION_H 21#define GUAC_RDP_RESOLUTION_H 22 23#include <guacamole/user.h> 24 25/** 26 * Returns whether the given resolution is reasonable for the given user, 27 * based on arbitrary criteria for reasonability. 28 * 29 * @param user 30 * The guac_user to test the given resolution against. 31 * 32 * @param resolution 33 * The resolution to test, in DPI. 34 * 35 * @return 36 * Non-zero if the resolution is reasonable, zero otherwise. 37 */ 38int guac_rdp_resolution_reasonable(guac_user* user, int resolution); 39 40/** 41 * Returns a reasonable resolution for the remote display, given the size and 42 * resolution of a guac_user. 43 * 44 * @param user 45 * The guac_user whose size and resolution shall be used to determine an 46 * appropriate remote display resolution. 47 * 48 * @return 49 * A reasonable resolution for the remote display, in DPI. 50 */ 51int guac_rdp_suggest_resolution(guac_user* user); 52 53#endif 54