mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-05 00:50:53 +00:00
add dirent wrapper
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@344 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
46
include/Mw/Directory.h
Normal file
46
include/Mw/Directory.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* $Id$ */
|
||||
/*!
|
||||
* %file Mw/Directory.h
|
||||
* %brief Directory functions
|
||||
*/
|
||||
#ifndef __MW_DIRECTORY_H__
|
||||
#define __MW_DIRECTORY_H__
|
||||
|
||||
#include <Mw/MachDep.h>
|
||||
#include <Mw/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* %brief Opens a directory
|
||||
* %param path Path
|
||||
* %return Handle
|
||||
*/
|
||||
MWDECL void* MwDirectoryOpen(const char* path);
|
||||
|
||||
/*!
|
||||
* %brief Closes a directory
|
||||
* %param handle Handle
|
||||
*/
|
||||
MWDECL void MwDirectoryClose(void* handle);
|
||||
|
||||
/*!
|
||||
* %brief Reads a directory
|
||||
* %param handle Handle
|
||||
* %return Directory entry
|
||||
*/
|
||||
MWDECL MwDirectoryEntry* MwDirectoryRead(void* handle);
|
||||
|
||||
/*!
|
||||
* %brief Frees a directory entry
|
||||
* %param entry Entry
|
||||
*/
|
||||
MWDECL void MwDirectoryFreeEntry(MwDirectoryEntry* entry);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -42,6 +42,7 @@ MWDECL char* MwIconQuestion[];
|
||||
*/
|
||||
MWDECL char* MwIconWarning[];
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,13 +23,13 @@ typedef void* MwLLPixmap;
|
||||
|
||||
#ifdef _MILSKO
|
||||
#ifdef USE_X11
|
||||
#include "../src/backend/x11.h"
|
||||
#include "../../src/backend/x11.h"
|
||||
#endif
|
||||
#ifdef USE_GDI
|
||||
#include "../src/backend/gdi.h"
|
||||
#include "../../src/backend/gdi.h"
|
||||
#endif
|
||||
#ifdef USE_DARWIN
|
||||
#include "../src/backend/mac/mac.h"
|
||||
#include "../../src/backend/mac/mac.h"
|
||||
#endif
|
||||
#endif
|
||||
#include <Mw/TypeDefs.h>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <sys/shm.h>
|
||||
#include <dlfcn.h>
|
||||
#include <signal.h>
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#ifndef M_PI
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <Mw/Unicode.h>
|
||||
#include <Mw/Icon.h>
|
||||
#include <Mw/MessageBox.h>
|
||||
#include <Mw/Directory.h>
|
||||
|
||||
#include <Mw/Widget/Window.h>
|
||||
#include <Mw/Widget/Menu.h>
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef struct _MwEntry* MwEntry;
|
||||
typedef struct _MwViewport* MwViewport;
|
||||
typedef struct _MwListBox* MwListBox;
|
||||
typedef struct _MwSizeHints MwSizeHints;
|
||||
typedef struct _MwDirectoryEntry MwDirectoryEntry;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _MwWidget* MwWidget;
|
||||
#else
|
||||
@@ -136,6 +137,11 @@ struct _MwSizeHints {
|
||||
int max_height;
|
||||
};
|
||||
|
||||
struct _MwDirectoryEntry {
|
||||
char* name;
|
||||
unsigned long attribute;
|
||||
};
|
||||
|
||||
#define MwCursorDataHeight 16
|
||||
struct _MwCursor {
|
||||
int width;
|
||||
|
||||
Reference in New Issue
Block a user