
org.gnome.glib.UserDirectory Maven / Gradle / Ivy
// Java-GI - Java language bindings for GObject-Introspection-based libraries
// Copyright (C) 2022-2024 Jan-Willem Harmannij
//
// SPDX-License-Identifier: LGPL-2.1-or-later
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, see .
//
// This file has been generated with Java-GI.
// Do not edit this file directly!
// Visit for more information.
//
package org.gnome.glib;
import io.github.jwharm.javagi.base.Enumeration;
import java.lang.Override;
import javax.annotation.processing.Generated;
/**
* These are logical ids for special directories which are defined
* depending on the platform used. You should use g_get_user_special_dir()
* to retrieve the full path associated to the logical id.
*
* The {@code GUserDirectory} enumeration can be extended at later date. Not
* every platform has a directory for every logical id in this
* enumeration.
* @version 2.14
*/
@Generated("io.github.jwharm.JavaGI")
public enum UserDirectory implements Enumeration {
/**
* the user's Desktop directory
*/
DIRECTORY_DESKTOP(0),
/**
* the user's Documents directory
*/
DIRECTORY_DOCUMENTS(1),
/**
* the user's Downloads directory
*/
DIRECTORY_DOWNLOAD(2),
/**
* the user's Music directory
*/
DIRECTORY_MUSIC(3),
/**
* the user's Pictures directory
*/
DIRECTORY_PICTURES(4),
/**
* the user's shared directory
*/
DIRECTORY_PUBLIC_SHARE(5),
/**
* the user's Templates directory
*/
DIRECTORY_TEMPLATES(6),
/**
* the user's Movies directory
*/
DIRECTORY_VIDEOS(7),
/**
* the number of enum values
*/
N_DIRECTORIES(8);
static {
GLib.javagi$ensureInitialized();
}
private final int value;
/**
* Create a new UserDirectory for the provided value
*
* @param value the enum value
*/
private UserDirectory(int value) {
this.value = value;;
}
/**
* Create a new UserDirectory for the provided value
*
* @param value the enum value
* @return the enum for the provided value
*/
public static UserDirectory of(int value) {
return switch(value) {
case 0 -> DIRECTORY_DESKTOP;
case 1 -> DIRECTORY_DOCUMENTS;
case 2 -> DIRECTORY_DOWNLOAD;
case 3 -> DIRECTORY_MUSIC;
case 4 -> DIRECTORY_PICTURES;
case 5 -> DIRECTORY_PUBLIC_SHARE;
case 6 -> DIRECTORY_TEMPLATES;
case 7 -> DIRECTORY_VIDEOS;
case 8 -> N_DIRECTORIES;
default -> throw new IllegalStateException("Unexpected value: " + value);
} ;
}
/**
* Get the numeric value of this enum
*
* @return the enum value
*/
@Override
public int getValue() {
return value;
}
}