<commit_before>// 27 february 2014
package main

import (
	"fmt"
	"time"
)

// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
// #include <stdlib.h>
// #include "objc_darwin.h"
import "C"

var (
	_NSApplication = objc_getClass("NSApplication")
	_NSNotificationCenter = objc_getClass("NSNotificationCenter")

	_sharedApplication = sel_getUid("sharedApplication")
	_defaultCenter = sel_getUid("defaultCenter")
	_run = sel_getUid("run")
)

var NSApp C.id
var defNC C.id
var delegate C.id
var notesel C.SEL

func init() {
	// need an NSApplication first - see https://github.com/TooTallNate/NodObjC/issues/21
	NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication)

	defNC = C.objc_msgSend_noargs(_NSNotificationCenter, _defaultCenter)

	selW := sel_getUid("windowShouldClose:")
	selB := sel_getUid("buttonClicked:")
	selN := sel_getUid("gotNotification:")
	mk("hello", selW, selB, selN)
	delegate = objc_alloc(objc_getClass("hello"))

	notesel = selN
}

const (
	NSBorderlessWindowMask = 0
	NSTitledWindowMask = 1 << 0
	NSClosableWindowMask = 1 << 1
	NSMiniaturizableWindowMask = 1 << 2
	NSResizableWindowMask = 1 << 3
	NSTexturedBackgroundWindowMask = 1 << 8
)

const (
//	NSBackingStoreRetained = 0			// "You should not use this mode."
//	NSBackingStoreNonretained = 1		// "You should not use this mode."
	NSBackingStoreBuffered = 2
)

const (
	NSRoundedBezelStyle = 1
	// TODO copy in the rest?
)<commit_msg>Removed the NSNotificationCenter stuff since we're not using that to run UI operations on the main thread anymore.<commit_after>// 27 february 2014
package main

import (
	"fmt"
	"time"
)

// #cgo LDFLAGS: -lobjc -framework Foundation -framework AppKit
// #include <stdlib.h>
// #include "objc_darwin.h"
import "C"

var (
	_NSApplication = objc_getClass("NSApplication")

	_sharedApplication = sel_getUid("sharedApplication")
	_run = sel_getUid("run")
)

var NSApp C.id
var delegate C.id
var notesel C.SEL

func init() {
	// need an NSApplication first - see https://github.com/TooTallNate/NodObjC/issues/21
	NSApp = C.objc_msgSend_noargs(_NSApplication, _sharedApplication)

	selW := sel_getUid("windowShouldClose:")
	selB := sel_getUid("buttonClicked:")
	selN := sel_getUid("gotNotification:")
	mk("hello", selW, selB, selN)
	delegate = objc_alloc(objc_getClass("hello"))

	notesel = selN
}

const (
	NSBorderlessWindowMask = 0
	NSTitledWindowMask = 1 << 0
	NSClosableWindowMask = 1 << 1
	NSMiniaturizableWindowMask = 1 << 2
	NSResizableWindowMask = 1 << 3
	NSTexturedBackgroundWindowMask = 1 << 8
)

const (
//	NSBackingStoreRetained = 0			// "You should not use this mode."
//	NSBackingStoreNonretained = 1		// "You should not use this mode."
	NSBackingStoreBuffered = 2
)

const (
	NSRoundedBezelStyle = 1
	// TODO copy in the rest?
)
{'fraction_non_alphanumeric': 0.11544011544011544, 'fraction_numerical': 0.016594516594516596, 'mean_word_length': 4.613360323886639, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7117177', 'n_tokens_mistral': 1052, 'n_tokens_neox': 993, 'n_words': 243}