From: Jay Freeman (saurik) Date: Tue, 20 Jan 2009 00:22:17 +0000 (+0000) Subject: GraphicsServices: fixed __cplusplus, added _GSEventGetGSEventRecord, organizined... X-Git-Url: https://git.saurik.com/iphone-api.git/commitdiff_plain/13db960d8de253da38b145449a208f94af549489 GraphicsServices: fixed __cplusplus, added _GSEventGetGSEventRecord, organizined GSFontRef, and better factored names. --- diff --git a/GraphicsServices/GSFont.h b/GraphicsServices/GSFont.h new file mode 100644 index 0000000..2e93391 --- /dev/null +++ b/GraphicsServices/GSFont.h @@ -0,0 +1,25 @@ +#ifndef GRAPHICSSERVICES_GSFONT_H_ +#define GRAPHICSSERVICES_GSFONT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + kGSFontItalicTrait = (1 << 0), + kGSFontBoldTrait = (1 << 1), + kGSFontExpandedTrait = (1 << 5), + kGSFontCondensedTrait = (1 << 6), + kGSFontMonoSpaceTrait = (1 << 10), + kGSFontVerticalTrait = (1 << 11), +}; typedef uint32_t GSFontSymbolicTraits; + +typedef struct __GSFont *GSFontRef; + +GSFontRef GSFontCreateWithName(const char *name, GSFontSymbolicTraits traits, float size); + +#ifdef __cplusplus +} +#endif + +#endif/*GRAPHICSSERVICES_GSFONT_H_*/ diff --git a/GraphicsServices/GSWindow.h b/GraphicsServices/GSWindow.h index d5a10ea..9d96697 100644 --- a/GraphicsServices/GSWindow.h +++ b/GraphicsServices/GSWindow.h @@ -38,13 +38,13 @@ #ifndef GRAPHICSSERVICS_GSWINDOW_H_ #define GRAPHICSSERVICS_GSWINDOW_H_ -#ifdef __plusplus +#ifdef __cplusplus extern "C" { #endif typedef struct __GSWindow *GSWindowRef; -#ifdef __plusplus +#ifdef __cplusplus } #endif diff --git a/GraphicsServices/GraphicsServices.h b/GraphicsServices/GraphicsServices.h index c23c21d..c4c349f 100644 --- a/GraphicsServices/GraphicsServices.h +++ b/GraphicsServices/GraphicsServices.h @@ -41,9 +41,9 @@ #include #import #include -#include -typedef struct __GSFont *GSFontRef; +#include +#include #ifdef __cplusplus extern "C" { @@ -88,6 +88,12 @@ struct GSEventHandInfo { /*0x40:48:10:70*/ uint32_t x40; //handInfoScale scales }; +struct GSEventApplicationInfo { + /*0x30:00*/ uint32_t pid; + /*0x34:04*/ uint32_t x34; + /*0x38:08*/ char name[]; +}; + struct GSEventRecordInfo { /*0x30:38:00:5c*/ struct GSEventHandInfo handInfo; /*0x44:4c:14:74*/ uint32_t x44; @@ -168,11 +174,12 @@ typedef struct __GSEvent *GSEventRef; mach_port_name_t GSCopyPurpleSystemEventPort(void); uint64_t GSCurrentEventTimestamp(void); struct GSEventHandInfo GSEventGetHandInfo(GSEventRef event); -struct CGRect GSEventGetLocationInWindow(GSEventRef ev); +struct CGRect GSEventGetLocationInWindow(GSEventRef event); struct GSPathInfo GSEventGetPathInfoAtIndex(GSEventRef event, unsigned index); mach_port_name_t GSGetPurpleNamedPort(CFStringRef name); void GSSendEvent(struct GSEventRecord *record, mach_port_name_t port); void GSSendSystemEvent(struct GSEventRecord *record); +struct GSEventRecord *_GSEventGetGSEventRecord(GSEventRef event); CFArrayRef GSSystemGetCapability(CFStringRef type); extern CFStringRef const kGSDisplayIdentifiersCapability;