1 /* 2 __ 3 / _| 4 __ _ _ _ _ __ ___ _ __ __ _ | |_ ___ ___ ___ 5 / _` | | | | '__/ _ \| '__/ _` | | _/ _ \/ __/ __| 6 | (_| | |_| | | | (_) | | | (_| | | || (_) \__ \__ \ 7 \__,_|\__,_|_| \___/|_| \__,_| |_| \___/|___/___/ 8 9 Copyright (C) 2018-2019 Aurora Free Open Source Software. 10 11 This file is part of the Aurora Free Open Source Software. This 12 organization promote free and open source software that you can 13 redistribute and/or modify under the terms of the GNU Lesser General 14 Public License Version 3 as published by the Free Software Foundation or 15 (at your option) any later version approved by the Aurora Free Open Source 16 Software Organization. The license is available in the package root path 17 as 'LICENSE' file. Please review the following information to ensure the 18 GNU Lesser General Public License version 3 requirements will be met: 19 https://www.gnu.org/licenses/lgpl.html . 20 21 Alternatively, this file may be used under the terms of the GNU General 22 Public License version 3 or later as published by the Free Software 23 Foundation. Please review the following information to ensure the GNU 24 General Public License requirements will be met: 25 http://www.gnu.org/licenses/gpl-3.0.html. 26 27 NOTE: All products, services or anything associated to trademarks and 28 service marks used or referenced on this file are the property of their 29 respective companies/owners or its subsidiaries. Other names and brands 30 may be claimed as the property of others. 31 32 For more info about intellectual property visit: aurorafoss.org or 33 directly send an email to: contact (at) aurorafoss.org . 34 */ 35 36 module riverd.xcursor.statfun; 37 38 import riverd.x11.types; 39 import riverd.xcursor.types; 40 import core.stdc.stdio; 41 42 43 extern(C) @nogc nothrow { 44 /** 45 * Manage Image objects 46 */ 47 XcursorImage* XcursorImageCreate(int width, int height); 48 /// 49 void XcursorImageDestroy(XcursorImage* image); 50 51 /** 52 * Manage Images objects 53 */ 54 XcursorImages* XcursorImagesCreate(int size); 55 /// 56 void XcursorImagesDestroy(XcursorImages* images); 57 /// 58 void XcursorImagesSetName(XcursorImages* images, const char* name); 59 60 /** 61 * Manage Cursor objects 62 */ 63 XcursorCursors* XcursorCursorsCreate(Display* dpy, int size); 64 /// 65 void XcursorCursorsDestroy(XcursorCursors* cursors); 66 67 /** 68 * Manage Animate objects 69 */ 70 XcursorAnimate* XcursorAnimateCreate(XcursorCursors* cursors); 71 /// 72 void XcursorAnimateDestroy(XcursorAnimate* animate); 73 /// 74 Cursor XcursorAnimateNext(XcursorAnimate* animate); 75 76 //TODO: Change to C-like function style. 77 78 /** 79 * Manage Comment objects 80 */ 81 XcursorComment* function(XcursorUInt comment_type, int length) XcursorCommentCreate; 82 /// 83 void function(XcursorComment* comment) XcursorCommentDestroy; 84 /// 85 XcursorComments* function(int size) XcursorCommentsCreate; 86 /// 87 void function(XcursorComments* comments) XcursorCommentsDestroy; 88 89 /** 90 * XcursorFile/Image APIs 91 */ 92 XcursorImage* function(XcursorFile* file, int size) XcursorXcFileLoadImage; 93 /// 94 XcursorImages* function(XcursorFile* file, int size) XcursorXcFileLoadImages; 95 /// 96 XcursorImages* function(XcursorFile* file) XcursorXcFileLoadAllImages; 97 /// 98 XcursorBool function(XcursorFile* file, XcursorComments** commentsp, XcursorImages** imagesp) XcursorXcFileLoad; 99 /// 100 XcursorBool function(XcursorFile* file, const XcursorComments* comments, const XcursorImages* images) XcursorXcFileSave; 101 102 /** 103 * FILE/Image APIs 104 */ 105 XcursorImage* function(FILE* file, int size) XcursorFileLoadImage; 106 /// 107 XcursorImages* function(FILE* file, int size) XcursorFileLoadImages; 108 /// 109 XcursorImages* function(FILE* file) XcursorFileLoadAllImages; 110 /// 111 XcursorBool function(FILE* file, XcursorComments** commentsp, XcursorImages** imagesp) XcursorFileLoad; 112 /// 113 XcursorBool function(FILE* file, const XcursorImages* images) XcursorFileSaveImages; 114 /// 115 XcursorBool function(FILE* file, const XcursorComments* comments, const XcursorImages* images) XcursorFileSave; 116 117 /** 118 * Filename/Image APIs 119 */ 120 XcursorImage* function(const char* filename, int size) XcursorFilenameLoadImage; 121 /// 122 XcursorImages* function(const char* filename, int size) XcursorFilenameLoadImages; 123 /// 124 XcursorImages* function(const char* filename) XcursorFilenameLoadAllImages; 125 /// 126 XcursorBool function(const char* file, XcursorComments** commentsp, XcursorImages** imagesp) XcursorFilenameLoad; 127 /// 128 XcursorBool function(const char* filename, const XcursorImages* images) XcursorFilenameSaveImages; 129 /// 130 XcursorBool function(const char* file, const XcursorComments* comments, const XcursorImages* images) XcursorFilenameSave; 131 132 /** 133 * Library/Image APIs 134 */ 135 XcursorImage* function(const char* library, const char* theme, int size) XcursorLibraryLoadImage; 136 /// 137 XcursorImages* function(const char* library, const char* theme, int size) XcursorLibraryLoadImages; 138 139 /** 140 * Library/shape API 141 */ 142 const char* function() XcursorLibraryPath; 143 /// 144 int function(const char* library) XcursorLibraryShape; 145 146 /** 147 * Image/Cursor APIs 148 */ 149 Cursor function(Display* dpy, const XcursorImage* image) XcursorImageLoadCursor; 150 /// 151 XcursorCursors* function(Display* dpy, const XcursorImages* images) XcursorImagesLoadCursors; 152 /// 153 Cursor function(Display* dpy, const XcursorImages* images) XcursorImagesLoadCursor; 154 155 /** 156 * Filename/Cursor APIs 157 */ 158 Cursor function(Display* dpy, const char* file) XcursorFilenameLoadCursor; 159 /// 160 XcursorCursors* function(Display* dpy, const char* file) XcursorFilenameLoadCursors; 161 162 /** 163 * Library/Cursor APIs 164 */ 165 Cursor function(Display* dpy, const char* file) XcursorLibraryLoadCursor; 166 /// 167 XcursorCursors* function(Display* dpy, const char* file) XcursorLibraryLoadCursors; 168 169 /** 170 * Shape/Image APIs 171 */ 172 XcursorImage* function(uint shape, const char* theme, int size) XcursorShapeLoadImage; 173 /// 174 XcursorImages* function(uint shape, const char* theme, int size) XcursorShapeLoadImages; 175 176 /** 177 * Shape/Cursor APIs 178 */ 179 Cursor function(Display* dpy, uint shape) XcursorShapeLoadCursor; 180 /// 181 XcursorCursors* function(Display* dpy, uint shape) XcursorShapeLoadCursors; 182 183 /** 184 * This is the function called by Xlib when attempting to 185 * load cursors from XCreateGlyphCursor. The interface must 186 * not change as Xlib loads 'libXcursor.so' instead of 187 * a specific major version 188 */ 189 Cursor function(Display* dpy, Font source_font, Font mask_font, uint source_char, uint mask_char, const XColor* foreground, const XColor* background) XcursorTryShapeCursor; 190 /// 191 void function(Display* dpy,Pixmap pid, uint width, uint height) XcursorNoticeCreateBitmap; 192 /// 193 void function(Display* dpy, Drawable draw, XImage* image) XcursorNoticePutBitmap; 194 /// 195 Cursor function(Display* dpy, Pixmap source, Pixmap mask, XColor* foreground, XColor* background, uint x, uint y) XcursorTryShapeBitmapCursor; 196 /// 197 void function(XImage* image, ubyte[XCURSOR_BITMAP_HASH_SIZE] hash) XcursorImageHash; 198 199 /** 200 * Display information APIs 201 */ 202 XcursorBool function(Display* dpy) XcursorSupportsARGB; 203 /// 204 XcursorBool function(Display* dpy) XcursorSupportsAnim; 205 /// 206 XcursorBool function(Display* dpy, int size) XcursorSetDefaultSize; 207 /// 208 int function(Display* dpy) XcursorGetDefaultSize; 209 /// 210 XcursorBool function(Display* dpy, const char* theme) XcursorSetTheme; 211 /// 212 char* function(Display* dpy) XcursorGetTheme; 213 /// 214 XcursorBool function(Display* dpy) XcursorGetThemeCore; 215 /// 216 XcursorBool function(Display* dpy, XcursorBool theme_core) XcursorSetThemeCore; 217 }