| 1 |
/* |
|---|
| 2 |
* This file is part of gtkD. |
|---|
| 3 |
* |
|---|
| 4 |
* gtkD is free software; you can redistribute it and/or modify |
|---|
| 5 |
* it under the terms of the GNU Lesser General Public License |
|---|
| 6 |
* as published by the Free Software Foundation; either version 3 |
|---|
| 7 |
* of the License, or (at your option) any later version, with |
|---|
| 8 |
* some exceptions, please read the COPYING file. |
|---|
| 9 |
* |
|---|
| 10 |
* gtkD is distributed in the hope that it will be useful, |
|---|
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 |
* GNU Lesser General Public License for more details. |
|---|
| 14 |
* |
|---|
| 15 |
* You should have received a copy of the GNU Lesser General Public License |
|---|
| 16 |
* along with gtkD; if not, write to the Free Software |
|---|
| 17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA |
|---|
| 18 |
*/ |
|---|
| 19 |
|
|---|
| 20 |
// generated automatically - do not change |
|---|
| 21 |
// find conversion definition on APILookup.txt |
|---|
| 22 |
// implement new conversion functionalities on the wrap.utils pakage |
|---|
| 23 |
|
|---|
| 24 |
/* |
|---|
| 25 |
* Conversion parameters: |
|---|
| 26 |
* inFile = GSeekable.html |
|---|
| 27 |
* outPack = gio |
|---|
| 28 |
* outFile = SeekableIF |
|---|
| 29 |
* strct = GSeekable |
|---|
| 30 |
* realStrct= |
|---|
| 31 |
* ctorStrct= |
|---|
| 32 |
* clss = SeekableT |
|---|
| 33 |
* interf = SeekableIF |
|---|
| 34 |
* class Code: No |
|---|
| 35 |
* interface Code: No |
|---|
| 36 |
* template for: |
|---|
| 37 |
* extend = |
|---|
| 38 |
* implements: |
|---|
| 39 |
* prefixes: |
|---|
| 40 |
* - g_seekable_ |
|---|
| 41 |
* omit structs: |
|---|
| 42 |
* omit prefixes: |
|---|
| 43 |
* omit code: |
|---|
| 44 |
* omit signals: |
|---|
| 45 |
* imports: |
|---|
| 46 |
* - glib.ErrorG |
|---|
| 47 |
* - glib.GException |
|---|
| 48 |
* - gio.Cancellable |
|---|
| 49 |
* structWrap: |
|---|
| 50 |
* - GCancellable* -> Cancellable |
|---|
| 51 |
* module aliases: |
|---|
| 52 |
* local aliases: |
|---|
| 53 |
* overrides: |
|---|
| 54 |
*/ |
|---|
| 55 |
|
|---|
| 56 |
module gio.SeekableIF; |
|---|
| 57 |
|
|---|
| 58 |
public import gtkc.giotypes; |
|---|
| 59 |
|
|---|
| 60 |
private import gtkc.gio; |
|---|
| 61 |
private import glib.ConstructionException; |
|---|
| 62 |
|
|---|
| 63 |
|
|---|
| 64 |
private import glib.ErrorG; |
|---|
| 65 |
private import glib.GException; |
|---|
| 66 |
private import gio.Cancellable; |
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
|
|---|
| 70 |
|
|---|
| 71 |
/** |
|---|
| 72 |
* Description |
|---|
| 73 |
* GSeekable is implemented by streams (implementations of |
|---|
| 74 |
* GInputStream or GOutputStream) that support seeking. |
|---|
| 75 |
*/ |
|---|
| 76 |
public interface SeekableIF |
|---|
| 77 |
{ |
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
public GSeekable* getSeekableTStruct(); |
|---|
| 81 |
|
|---|
| 82 |
/** the main Gtk struct as a void* */ |
|---|
| 83 |
protected void* getStruct(); |
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
/** |
|---|
| 87 |
*/ |
|---|
| 88 |
|
|---|
| 89 |
/** |
|---|
| 90 |
* Tells the current position within the stream. |
|---|
| 91 |
* Returns: the offset from the beginning of the buffer. |
|---|
| 92 |
*/ |
|---|
| 93 |
public long tell(); |
|---|
| 94 |
|
|---|
| 95 |
/** |
|---|
| 96 |
* Tests if the stream supports the GSeekableIface. |
|---|
| 97 |
* Returns: TRUE if seekable can be seeked. FALSE otherwise. |
|---|
| 98 |
*/ |
|---|
| 99 |
public int canSeek(); |
|---|
| 100 |
|
|---|
| 101 |
/** |
|---|
| 102 |
* Seeks in the stream by the given offset, modified by type. |
|---|
| 103 |
* If cancellable is not NULL, then the operation can be cancelled by |
|---|
| 104 |
* triggering the cancellable object from another thread. If the operation |
|---|
| 105 |
* was cancelled, the error G_IO_ERROR_CANCELLED will be returned. |
|---|
| 106 |
* Params: |
|---|
| 107 |
* offset = a goffset. |
|---|
| 108 |
* type = a GSeekType. |
|---|
| 109 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 110 |
* Returns: TRUE if successful. If an error has occurred, this function will return FALSE and set error appropriately if present. |
|---|
| 111 |
* Throws: GException on failure. |
|---|
| 112 |
*/ |
|---|
| 113 |
public int seek(long offset, GSeekType type, Cancellable cancellable); |
|---|
| 114 |
|
|---|
| 115 |
/** |
|---|
| 116 |
* Tests if the stream can be truncated. |
|---|
| 117 |
* Returns: TRUE if the stream can be truncated, FALSE otherwise. |
|---|
| 118 |
*/ |
|---|
| 119 |
public int canTruncate(); |
|---|
| 120 |
|
|---|
| 121 |
/** |
|---|
| 122 |
* Truncates a stream with a given offset. |
|---|
| 123 |
* If cancellable is not NULL, then the operation can be cancelled by |
|---|
| 124 |
* triggering the cancellable object from another thread. If the operation |
|---|
| 125 |
* was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an |
|---|
| 126 |
* operation was partially finished when the operation was cancelled the |
|---|
| 127 |
* partial result will be returned, without an error. |
|---|
| 128 |
* Virtual: truncate_fn |
|---|
| 129 |
* Params: |
|---|
| 130 |
* offset = a goffset. |
|---|
| 131 |
* cancellable = optional GCancellable object, NULL to ignore. [allow-none] |
|---|
| 132 |
* Returns: TRUE if successful. If an error has occurred, this function will return FALSE and set error appropriately if present. |
|---|
| 133 |
* Throws: GException on failure. |
|---|
| 134 |
*/ |
|---|
| 135 |
public int truncate(long offset, Cancellable cancellable); |
|---|
| 136 |
} |
|---|